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

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

Issue 5697499218051072: Usage of new API, cleanups (reduced) (Closed)
Patch Set: Removed even more unrelated changes Created April 28, 2014, 9: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: src/org/adblockplus/android/SummarizedPreferences.java
diff --git a/src/org/adblockplus/android/SummarizedPreferences.java b/src/org/adblockplus/android/SummarizedPreferences.java
index f8d2ce07d758a824e63b85a4e7616b0a8fe28805..adec7617ff143b317a3153d1fd9cf9ef18cef520 100644
--- a/src/org/adblockplus/android/SummarizedPreferences.java
+++ b/src/org/adblockplus/android/SummarizedPreferences.java
@@ -49,17 +49,17 @@ public class SummarizedPreferences extends SherlockPreferenceActivity implements
}
@Override
- public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key)
+ public void onSharedPreferenceChanged(final SharedPreferences sharedPreferences, final String key)
{
- Preference pref = findPreference(key);
+ final Preference pref = findPreference(key);
setPrefSummary(pref);
}
- protected void setPrefSummary(Preference pref)
+ protected void setPrefSummary(final Preference pref)
{
if (pref instanceof ListPreference)
{
- CharSequence summary = ((ListPreference) pref).getEntry();
+ final CharSequence summary = ((ListPreference) pref).getEntry();
if (summary != null)
{
pref.setSummary(summary);
@@ -67,7 +67,7 @@ public class SummarizedPreferences extends SherlockPreferenceActivity implements
}
if (pref instanceof EditTextPreference)
{
- CharSequence summary = ((EditTextPreference) pref).getText();
+ final CharSequence summary = ((EditTextPreference) pref).getText();
if (summary != null)
{
pref.setSummary(summary);
@@ -75,11 +75,11 @@ public class SummarizedPreferences extends SherlockPreferenceActivity implements
}
}
- protected void initSummaries(PreferenceGroup preference)
+ protected void initSummaries(final PreferenceGroup preference)
{
for (int i = preference.getPreferenceCount() - 1; i >= 0; i--)
{
- Preference pref = preference.getPreference(i);
+ final Preference pref = preference.getPreference(i);
if (pref instanceof PreferenceGroup || pref instanceof PreferenceScreen)
{

Powered by Google App Engine
This is Rietveld