diff options
Diffstat (limited to 'core/java/android/text/TextUtils.java')
-rw-r--r-- | core/java/android/text/TextUtils.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/core/java/android/text/TextUtils.java b/core/java/android/text/TextUtils.java index 8675d05..0d7aa02 100644 --- a/core/java/android/text/TextUtils.java +++ b/core/java/android/text/TextUtils.java @@ -627,10 +627,16 @@ public class TextUtils { public CharSequence createFromParcel(Parcel p) { int kind = p.readInt(); - if (kind == 1) - return p.readString(); + String string = p.readString(); + if (string == null) { + return null; + } + + if (kind == 1) { + return string; + } - SpannableString sp = new SpannableString(p.readString()); + SpannableString sp = new SpannableString(string); while (true) { kind = p.readInt(); |