Merge "Format ListPreference summary with empty string if entry is null" into lmp-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
bb852b0b6b
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user