Index: src/org/adblockplus/sbrowser/contentblocker/engine/Engine.java |
=================================================================== |
--- a/src/org/adblockplus/sbrowser/contentblocker/engine/Engine.java |
+++ b/src/org/adblockplus/sbrowser/contentblocker/engine/Engine.java |
@@ -418,28 +418,28 @@ public final class Engine |
engine.subscriptions.add(sub); |
} |
} |
Log.d(TAG, "Added " + additional + " additional default/built-in subscriptions"); |
engine.subscriptions.persistSubscriptions(); |
} |
+ engine.handlerThread = new Thread(new EventHandler(engine)); |
+ engine.handlerThread.setDaemon(true); |
+ engine.handlerThread.start(); |
+ |
+ engine.downloader = Downloader.create(context, engine); |
+ |
final File cachedFilterFile = getCachedFilterFile(context); |
if (cachedFilterFile == null || !cachedFilterFile.exists()) |
{ |
engine.sendUpdateBroadcast(); |
} |
- engine.handlerThread = new Thread(new EventHandler(engine)); |
- engine.handlerThread.setDaemon(true); |
- engine.handlerThread.start(); |
- |
- engine.downloader = Downloader.create(context, engine); |
- |
return engine; |
} |
public static String readFileAsString(InputStream instream) throws IOException |
{ |
final StringBuilder sb = new StringBuilder(); |
final BufferedReader r = new BufferedReader(new InputStreamReader(instream, CHARSET_UTF_8)); |
for (int ch = r.read(); ch != -1; ch = r.read()) |