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

Unified Diff: src/org/adblockplus/android/Starter.java

Issue 5697499218051072: Usage of new API, cleanups (reduced) (Closed)
Patch Set: Removed another whitespace change Created April 28, 2014, 8:36 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: src/org/adblockplus/android/Starter.java
diff --git a/src/org/adblockplus/android/Starter.java b/src/org/adblockplus/android/Starter.java
index 42532ad4f7606cca9506f82ecfd3698a0d29603f..2620426238240bf74508bb39a445175de0b9f057 100644
--- a/src/org/adblockplus/android/Starter.java
+++ b/src/org/adblockplus/android/Starter.java
@@ -25,36 +25,34 @@ import android.preference.PreferenceManager;
public class Starter extends BroadcastReceiver
{
-
@Override
- public void onReceive(Context context, Intent intent)
+ public void onReceive(final Context context, final Intent intent)
{
- String action = intent.getAction();
- SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
+ final String action = intent.getAction();
+ final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean enabled = prefs.getBoolean(context.getString(R.string.pref_enabled), false);
boolean proxyenabled = prefs.getBoolean(context.getString(R.string.pref_proxyenabled), true);
- boolean autoconfigured = prefs.getBoolean(context.getString(R.string.pref_proxyautoconfigured), false);
+ final boolean autoconfigured = prefs.getBoolean(context.getString(R.string.pref_proxyautoconfigured), false);
if (Intent.ACTION_PACKAGE_REPLACED.equals(action))
{
- String pkg = context.getApplicationInfo().packageName;
- boolean us = pkg.equals(intent.getData().getSchemeSpecificPart());
+ final String pkg = context.getApplicationInfo().packageName;
+ final boolean us = pkg.equals(intent.getData().getSchemeSpecificPart());
enabled &= us;
proxyenabled &= us;
}
if (Intent.ACTION_BOOT_COMPLETED.equals(action))
{
- boolean startAtBoot = prefs.getBoolean(context.getString(R.string.pref_startatboot), context.getResources().getBoolean(R.bool.def_startatboot));
+ final boolean startAtBoot = prefs.getBoolean(context.getString(R.string.pref_startatboot), context.getResources().getBoolean(R.bool.def_startatboot));
enabled &= startAtBoot;
proxyenabled &= startAtBoot;
}
if (enabled)
{
- AdblockPlus application = AdblockPlus.getApplication();
+ final AdblockPlus application = AdblockPlus.getApplication();
application.setFilteringEnabled(true);
application.startEngine();
}
if (enabled || (proxyenabled && !autoconfigured))
context.startService(new Intent(context, ProxyService.class));
}
-
}
« no previous file with comments | « src/org/adblockplus/android/RefreshableListPreference.java ('k') | src/org/adblockplus/android/SubscriptionParser.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld