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

Delta Between Two Patch Sets: src/org/adblockplus/sbrowser/contentblocker/MainPreferences.java

Issue 29370727: Issue 4505 - Add translations (Closed)
Left Patch Set: Created Jan. 4, 2017, 5:24 p.m.
Right Patch Set: Removing now unused readTextFile Created Jan. 6, 2017, 4:07 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « res/values/strings.xml ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 } 218 }
219 else if (this.getString(R.string.key_application_activated).equals(key)) 219 else if (this.getString(R.string.key_application_activated).equals(key))
220 { 220 {
221 if (this.setupDialog != null) 221 if (this.setupDialog != null)
222 { 222 {
223 this.setupDialog.dismiss(); 223 this.setupDialog.dismiss();
224 this.setupDialog = null; 224 this.setupDialog = null;
225 } 225 }
226 } 226 }
227 } 227 }
228
229 private String readTextFile(int id)
230 {
231 try
232 {
233 final BufferedReader r = new BufferedReader(new InputStreamReader(this.get Resources()
234 .openRawResource(id), "UTF-8"));
235 try
236 {
237 final StringBuilder sb = new StringBuilder();
238 for (String line = r.readLine(); line != null; line = r.readLine())
239 {
240 sb.append(line);
241 sb.append('\n');
242 }
243 return sb.toString();
244 }
245 finally
246 {
247 r.close();
248 }
249 }
250 catch (IOException e)
251 {
252 Log.e(TAG, "Resource reading failed for: " + id, e);
253 return "...";
254 }
255 }
256 } 228 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld