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 newly added neetutils code Created April 25, 2014, 9:31 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..ce838162f467c7b09fb91acd6044da2fb0d1b6d1 100644
--- a/src/org/adblockplus/android/SummarizedPreferences.java
+++ b/src/org/adblockplus/android/SummarizedPreferences.java
@@ -33,6 +33,7 @@ import android.preference.PreferenceScreen;
*/
public class SummarizedPreferences extends SherlockPreferenceActivity implements OnSharedPreferenceChangeListener
{
+ @SuppressWarnings("deprecation")
Felix Dahlke 2014/04/28 07:29:01 As before, not a fan. Also below.
René Jeschke 2014/04/28 08:34:32 Done.
@Override
public void onResume()
{
@@ -41,6 +42,7 @@ public class SummarizedPreferences extends SherlockPreferenceActivity implements
getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);
}
+ @SuppressWarnings("deprecation")
@Override
public void onPause()
{
@@ -49,17 +51,18 @@ 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);
+ @SuppressWarnings("deprecation")
+ 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 +70,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 +78,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