Index: adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/MainPreferences.java |
=================================================================== |
--- a/adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/MainPreferences.java |
+++ b/adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/MainPreferences.java |
@@ -12,16 +12,17 @@ |
* GNU General Public License for more details. |
* |
* You should have received a copy of the GNU General Public License |
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
*/ |
package org.adblockplus.sbrowser.contentblocker; |
+import org.adblockplus.sbrowser.contentblocker.engine.DownloadJobService; |
import org.adblockplus.sbrowser.contentblocker.engine.Engine; |
import org.adblockplus.sbrowser.contentblocker.engine.EngineManager; |
import org.adblockplus.adblockplussbrowser.R; |
import org.adblockplus.sbrowser.contentblocker.util.ConnectivityUtils; |
import org.adblockplus.sbrowser.contentblocker.util.SharedPrefsUtils; |
import android.app.AlertDialog; |
import android.app.Fragment; |
@@ -66,23 +67,25 @@ public class MainPreferences extends Pre |
{ |
this.dialogTitleResId = R.string.initialization_title; |
this.dialog = ProgressDialog.show(this, |
this.getString(this.dialogTitleResId), |
this.getString(R.string.initialization_message)); |
super.onStart(); |
SharedPrefsUtils.registerOnSharedPreferenceChangeListener(this, listener); |
EngineManager.getInstance().retrieveEngine(this, this); |
+ startService(new Intent(this, DownloadJobService.class)); |
} |
@Override |
protected void onStop() |
{ |
super.onStop(); |
SharedPrefsUtils.unregisterOnSharedPreferenceChangeListener(this, listener); |
+ stopService(new Intent(this, DownloadJobService.class)); |
this.dismissDialog(); |
} |
@Override |
protected void onDestroy() |
{ |
EngineManager.getInstance().removeOnEngineCreatedCallback(this); |
super.onDestroy(); |