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: Even more review issues fixed. Created April 28, 2014, 10:18 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..fc5859060b47b53a36261e775df25a25a83b47fe 100644
--- a/src/org/adblockplus/android/Starter.java
+++ b/src/org/adblockplus/android/Starter.java
@@ -27,29 +27,29 @@ 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();
}
« 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