Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/org/adblockplus/android/AboutDialog.java

Issue 9433002: ABP/Android Proxy settings user helper (Closed)
Patch Set: Created Feb. 20, 2013, 8:49 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/org/adblockplus/android/AboutDialog.java
===================================================================
--- a/src/org/adblockplus/android/AboutDialog.java
+++ b/src/org/adblockplus/android/AboutDialog.java
@@ -76,29 +76,12 @@
info.append(" ");
info.append(versionCode);
info.append("</p>");
- appendRawTextFile(info, R.raw.info);
- appendRawTextFile(info, R.raw.legal);
+ AdblockPlus.appendRawTextFile(context, info, R.raw.info);
+ AdblockPlus.appendRawTextFile(context, info, R.raw.legal);
// Show text
TextView tv = (TextView) findViewById(R.id.about_text);
tv.setText(Html.fromHtml(info.toString()));
tv.setMovementMethod(LinkMovementMethod.getInstance());
}
-
- public static void appendRawTextFile(StringBuilder text, int id)
- {
- InputStream inputStream = context.getResources().openRawResource(id);
- InputStreamReader in = new InputStreamReader(inputStream);
- BufferedReader buf = new BufferedReader(in);
- String line;
- try
- {
- while ((line = buf.readLine()) != null)
- text.append(line);
- }
- catch (IOException e)
- {
- e.printStackTrace();
- }
- }
}

Powered by Google App Engine
This is Rietveld