summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2014-10-22 00:35:28 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-10-22 00:35:29 +0000
commitbb852b0b6b743aeca3a6daceafc89166ec6022d8 (patch)
tree7de7f8025164041f340ca1fd6dc7cc7cb7731f11 /core
parent054e8be5e0f9c83dd9792bb1bc118b1a7fd70e17 (diff)
parent13e13ddd4e3d1e7c10b55b6e3fe47d6bfd317ed3 (diff)
downloadframeworks_base-bb852b0b6b743aeca3a6daceafc89166ec6022d8.zip
frameworks_base-bb852b0b6b743aeca3a6daceafc89166ec6022d8.tar.gz
frameworks_base-bb852b0b6b743aeca3a6daceafc89166ec6022d8.tar.bz2
Merge "Format ListPreference summary with empty string if entry is null" into lmp-mr1-dev
Diffstat (limited to 'core')
-rw-r--r--core/java/android/preference/ListPreference.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/preference/ListPreference.java b/core/java/android/preference/ListPreference.java
index 8081a54..9482a72 100644
--- a/core/java/android/preference/ListPreference.java
+++ b/core/java/android/preference/ListPreference.java
@@ -162,10 +162,10 @@ public class ListPreference extends DialogPreference {
@Override
public CharSequence getSummary() {
final CharSequence entry = getEntry();
- if (mSummary == null || entry == null) {
+ if (mSummary == null) {
return super.getSummary();
} else {
- return String.format(mSummary, entry);
+ return String.format(mSummary, entry == null ? "" : entry);
}
}