diff options
| author | 2020-09-10 00:21:00 +0000 | |
|---|---|---|
| committer | 2020-09-10 00:21:00 +0000 | |
| commit | 4988fff65a5bbb809a12789889a7cc4d96c59e7d (patch) | |
| tree | 91bad13ad80b2a57064c5263611d3e8a8201b3e0 | |
| parent | cb9c1a20e766c0a6d36db31e20f4d75ea1e32f2b (diff) | |
| parent | ceb7aefd6f3cef84e882406bc7a314556dad294c (diff) | |
Merge "Sanitize more of the notification text fields" into rvc-dev am: ceb7aefd6f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12512483
Change-Id: I1c5eda2259402e412e6100f53bf4e13925572556
| -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 79d2a8102358..609083e719ba 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -207,7 +207,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. @@ -7830,7 +7830,7 @@ public class Notification implements Parcelable */ public Message(@NonNull CharSequence text, long timestamp, @Nullable Person sender, boolean remoteInputHistory) { - mText = text; + mText = safeCharSequence(text); mTimestamp = timestamp; mSender = sender; mRemoteInputHistory = remoteInputHistory; @@ -7944,7 +7944,7 @@ public class Notification implements Parcelable bundle.putLong(KEY_TIMESTAMP, mTimestamp); if (mSender != null) { // Legacy listeners need this - bundle.putCharSequence(KEY_SENDER, mSender.getName()); + bundle.putCharSequence(KEY_SENDER, safeCharSequence(mSender.getName())); bundle.putParcelable(KEY_SENDER_PERSON, mSender); } if (mDataMimeType != null) { |