diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-09-10 00:54:48 +0000 |
|---|---|---|
| committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-09-10 00:54:48 +0000 |
| commit | ae95e2a448982a9768ccbbbbd1409454620466b8 (patch) | |
| tree | 4775e35c120dd484fd127a8baf897bd58e3bc14d /core/java/android | |
| parent | cf2ddc138c9cb8af7b194d657ea66a8652d47171 (diff) | |
| parent | 089f82deb640428c529e1f1b615688d79d085cc6 (diff) | |
Merge "Sanitize more of the notification text fields" into rvc-dev am: ceb7aefd6f am: 1ed53ed94e am: 089f82deb6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12512483
Change-Id: I42bada5cf24216465486fe8b4a3c97c5f6c2edae
Diffstat (limited to 'core/java/android')
| -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 b95a402013ec..af36260fedf2 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. @@ -7821,7 +7821,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; @@ -7935,7 +7935,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) { |
