summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorPresubmit Automerger Backend <android-build-presubmit-automerger-backend@system.gserviceaccount.com>2022-09-08 20:51:43 +0000
committerPresubmit Automerger Backend <android-build-presubmit-automerger-backend@system.gserviceaccount.com>2022-09-08 20:51:43 +0000
commit89439d1cbca5a7e2ebd11d56aff10e70a5c037a8 (patch)
treee7ba1a8ff611b2a721457e14b16f3281661a0ddd /core/java
parent25ab88ccc3e99cc6db6a555b804de18f96e6c0ed (diff)
parente51c402650c5e4400108cf63d460ec349577087c (diff)
[automerge] Fix NPE 2p: e51c402650
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19886855 Bug: 241764350 Bug: 241764340 Bug: 241764135 Bug: 242702935 Bug: 242703118 Bug: 242703202 Bug: 242702851 Bug: 242703217 Bug: 242703556 Change-Id: If4fbb93679e171c01f687d2e4a91ac6aa81a7677 Merged-In: I9c681106f6d645e62b0e44903d40aa523fee0e95
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/app/NotificationChannelGroup.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/core/java/android/app/NotificationChannelGroup.java b/core/java/android/app/NotificationChannelGroup.java
index c194a2844bd5..39e48443f1ff 100644
--- a/core/java/android/app/NotificationChannelGroup.java
+++ b/core/java/android/app/NotificationChannelGroup.java
@@ -95,8 +95,11 @@ public final class NotificationChannelGroup implements Parcelable {
} else {
mId = null;
}
- mName = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
- mName = getTrimmedString(mName.toString());
+ if (in.readByte() != 0) {
+ mName = getTrimmedString(in.readString());
+ } else {
+ mName = "";
+ }
if (in.readByte() != 0) {
mDescription = getTrimmedString(in.readString());
} else {
@@ -122,7 +125,12 @@ public final class NotificationChannelGroup implements Parcelable {
} else {
dest.writeByte((byte) 0);
}
- TextUtils.writeToParcel(mName.toString(), dest, flags);
+ if (mName != null) {
+ dest.writeByte((byte) 1);
+ dest.writeString(mName.toString());
+ } else {
+ dest.writeByte((byte) 0);
+ }
if (mDescription != null) {
dest.writeByte((byte) 1);
dest.writeString(mDescription);