Skip to content

Commit

Permalink
Update WebViewColoringUtils.java
Browse files Browse the repository at this point in the history
  • Loading branch information
gdlbo committed May 22, 2023
1 parent 08dae9b commit 6d3dded
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,8 @@ public class WebViewColoringUtils {
public static String loadedCSSAmoled = "";

private static String load(String str) {
try (Reader reader = new InputStreamReader(getGlobalContext().getAssets().open(str), StandardCharsets.UTF_8)) {
StringWriter writer = new StringWriter();
char[] buffer = new char[1024];
int len;
while ((len = reader.read(buffer)) != -1) {
writer.write(buffer, 0, len);
}
return writer.toString();
try (var is = getGlobalContext().getAssets().open(str)) {
return IOUtils.readAllLines(is);
} catch (IOException e) {
e.printStackTrace();
return "";
Expand Down

0 comments on commit 6d3dded

Please sign in to comment.