]> gitweb.fperrin.net Git - Dictionary.git/blobdiff - src/com/hughes/android/dictionary/HtmlDisplayActivity.java
Restore Android 10 API compatibility.
[Dictionary.git] / src / com / hughes / android / dictionary / HtmlDisplayActivity.java
index c2f4a8398bc8326b36213d145b27b938ab207fe0..e2e3d606b05be941d5fd722243e7f87e1a4118e8 100644 (file)
@@ -86,7 +86,7 @@ public final class HtmlDisplayActivity extends AppCompatActivity {
             html = StringUtil.readToString(res);
             try {
                 res.close();
-            } catch (IOException e) {
+            } catch (IOException ignored) {
             }
         } else {
             html = getIntent().getStringExtra(HTML);
@@ -103,6 +103,7 @@ public final class HtmlDisplayActivity extends AppCompatActivity {
         webView.getSettings().setDefaultFontSize(fontSizeSp);
         try {
             // No way to get pure UTF-8 data into WebView
+            // Cannot use StandardCharsets due to older Android.
             html = Base64.encodeToString(html.getBytes("UTF-8"), Base64.DEFAULT);
         } catch (UnsupportedEncodingException e) {
             throw new RuntimeException("Missing UTF-8 support?!", e);