| LEFT | RIGHT |
| 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 Loading... |
| 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 } |
| LEFT | RIGHT |