commit | 0bb9960598067f3320cdae8ab42c1ba0f3376f21 | [log] [tgz] |
---|---|---|
author | Tammo Spalink <tammo@google.com> | Tue Sep 08 18:30:33 2009 +0800 |
committer | Tammo Spalink <tammo@google.com> | Tue Sep 08 18:30:33 2009 +0800 |
tree | 1541860a216ce148dce857f582210a09567931fa | |
parent | 7390c5af7a0c2379fa72218ea63a714f843edf0f [diff] [blame] |
Do not die when printing empty prefs. Addresses issue: http://buganizer/issue?id=1974140 Change-Id: I0001d69e8d278d4ca900f5ce56ad50c0b4b6b694
diff --git a/core/java/android/preference/Preference.java b/core/java/android/preference/Preference.java index fc39573..08a2a9f 100644 --- a/core/java/android/preference/Preference.java +++ b/core/java/android/preference/Preference.java
@@ -1456,8 +1456,10 @@ if (!TextUtils.isEmpty(summary)) { sb.append(summary).append(' '); } - // Drop the last space - sb.setLength(sb.length() - 1); + if (sb.length() > 0) { + // Drop the last space + sb.setLength(sb.length() - 1); + } return sb; }