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

Side by Side Diff: src/org/adblockplus/android/BootBroadcastReceiver.java

Issue 8493083: ABP/Android UI (Closed)
Patch Set: ABP/Android UI Created Oct. 12, 2012, 1:24 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 package org.adblockplus.android;
2
3 import android.content.BroadcastReceiver;
4 import android.content.Context;
5 import android.content.Intent;
6 import android.content.SharedPreferences;
7 import android.preference.PreferenceManager;
8
9 public class BootBroadcastReceiver extends BroadcastReceiver
10 {
11 @Override
12 public void onReceive(Context context, Intent intent)
13 {
14 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(cont ext);
15 boolean enabled = prefs.getBoolean(context.getString(R.string.pref_enabled), false);
16 boolean startAtBoot = prefs.getBoolean(context.getString(R.string.pref_start atboot), context.getResources().getBoolean(R.bool.def_startatboot));
17 if (enabled && startAtBoot)
18 context.startService(new Intent(context, ProxyService.class));
19 }
20 }
OLDNEW
« no previous file with comments | « src/org/adblockplus/android/AdvancedPreferences.java ('k') | src/org/adblockplus/android/ConfigurationActivity.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld