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

Unified Diff: adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/ConnectivityChanged.java

Issue 29716681: Issue 6454 - IllegalStateException crash (Closed)
Patch Set: Adjusting engine check Created March 9, 2018, 11:42 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: adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/ConnectivityChanged.java
===================================================================
--- a/adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/ConnectivityChanged.java
+++ b/adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/ConnectivityChanged.java
@@ -18,7 +18,7 @@
package org.adblockplus.sbrowser.contentblocker;
import org.adblockplus.sbrowser.contentblocker.engine.Engine;
-import org.adblockplus.sbrowser.contentblocker.engine.EngineService;
+import org.adblockplus.sbrowser.contentblocker.engine.EngineManager;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -26,7 +26,7 @@
import android.util.Log;
public class ConnectivityChanged extends BroadcastReceiver implements
- EngineService.OnEngineCreatedCallback
+ EngineManager.OnEngineCreatedCallback
{
private static final String TAG = ConnectivityChanged.class.getSimpleName();
@@ -38,14 +38,14 @@
if (intent != null && ACTION.equals(intent.getAction()))
{
Log.d(TAG, "Triggering connectivity changed event");
- EngineService.startService(context, this);
+ EngineManager.getInstance().retrieveEngine(context, this);
}
}
@Override
- public void onEngineCreated(Engine engine, boolean success)
+ public void onEngineCreated(Engine engine)
{
- if (success)
+ if (engine != null)
{
engine.connectivityChanged();
}

Powered by Google App Engine
This is Rietveld