diff options
| author | 2020-09-09 22:32:12 +0000 | |
|---|---|---|
| committer | 2020-09-09 22:32:12 +0000 | |
| commit | 2d7d8c2604c06c62ca96eb1d52b653e8ed60de51 (patch) | |
| tree | b325a147721b9500c6a8e7bb0cdc52e0a39f529d | |
| parent | ea36a0c23611ea72b74802ce14c261981da82b55 (diff) | |
| parent | db023fcd738bb054402b771e5de5d758db526e30 (diff) | |
DO NOT MERGE Sanitize more of the notification text fields am: db023fcd73
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12512962
Change-Id: I4c847573b6ce8032084eeeee4835bd38be9c6c79
| -rw-r--r-- | core/java/android/app/Notification.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index 531afa4c9b58..60b15189dc16 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -184,7 +184,7 @@ public class Notification implements Parcelable * <p> * Avoids spamming the system with overly large strings such as full e-mails. */ - private static final int MAX_CHARSEQUENCE_LENGTH = 5 * 1024; + private static final int MAX_CHARSEQUENCE_LENGTH = 1024; /** * Maximum entries of reply text that are accepted by Builder and friends. @@ -6259,7 +6259,7 @@ public class Notification implements Parcelable * consistent during re-posts of the notification. */ public Message(CharSequence text, long timestamp, CharSequence sender){ - mText = text; + mText = safeCharSequence(text); mTimestamp = timestamp; mSender = sender; } @@ -6348,7 +6348,7 @@ public class Notification implements Parcelable } bundle.putLong(KEY_TIMESTAMP, mTimestamp); if (mSender != null) { - bundle.putCharSequence(KEY_SENDER, mSender); + bundle.putCharSequence(KEY_SENDER, safeCharSequence(mSender)); } if (mDataMimeType != null) { bundle.putString(KEY_DATA_MIME_TYPE, mDataMimeType); |