diff options
author | Amith Yamasani <yamasani@google.com> | 2011-07-22 10:34:58 -0700 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2011-07-25 14:09:57 -0700 |
commit | a4379d6b38e568fcb60831d6f2fa349ba20f9b82 (patch) | |
tree | c864ae3fb36b7da46c80e8a2639dc63c2352aace /src/com/android/settings/Settings.java | |
parent | 8374a2db64f772c5e934ccd2e47f0df4b5928012 (diff) | |
download | packages_apps_settings-a4379d6b38e568fcb60831d6f2fa349ba20f9b82.zip packages_apps_settings-a4379d6b38e568fcb60831d6f2fa349ba20f9b82.tar.gz packages_apps_settings-a4379d6b38e568fcb60831d6f2fa349ba20f9b82.tar.bz2 |
Use a different wallpaper fragment title from the preference item.
Change wallpaper list ordering to alphabetic.
Display battery level and charging status in Battery settings.
Change-Id: I8ead0fb0f018c79ed258bd1c1ca3f8ecaf32da83
Diffstat (limited to 'src/com/android/settings/Settings.java')
-rw-r--r-- | src/com/android/settings/Settings.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/settings/Settings.java b/src/com/android/settings/Settings.java index eb0b40c..456bdf6 100644 --- a/src/com/android/settings/Settings.java +++ b/src/com/android/settings/Settings.java @@ -23,7 +23,9 @@ import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.os.Bundle; +import android.preference.Preference; import android.preference.PreferenceActivity; +import android.preference.PreferenceFragment; import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; @@ -535,6 +537,17 @@ public class Settings extends PreferenceActivity implements ButtonBarHandler { } @Override + public boolean onPreferenceStartFragment(PreferenceFragment caller, Preference pref) { + // Override the fragment title for Wallpaper settings + CharSequence title = pref.getTitle(); + if (pref.getFragment().equals(WallpaperTypeSettings.class.getName())) { + title = getString(R.string.wallpaper_settings_fragment_title); + } + startPreferencePanel(pref.getFragment(), pref.getExtras(), 0, title, null, 0); + return true; + } + + @Override public void setListAdapter(ListAdapter adapter) { if (mHeaders == null) { mHeaders = new ArrayList<Header>(); |