summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-09-10 00:37:58 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-09-10 00:37:58 +0000
commit089f82deb640428c529e1f1b615688d79d085cc6 (patch)
treefba70df36937043bc8a63aebbf5167ae503ec135 /core/java/android
parent20e2db6d6bdd7c5d91d483fe97f4f329ae3fa5c4 (diff)
parent1ed53ed94e661850b1b8a6696a913e9c7149b21b (diff)
Merge "Sanitize more of the notification text fields" into rvc-dev am: ceb7aefd6f am: 1ed53ed94e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12512483 Change-Id: I07d566dc2943e5001a95a0a7437d699cdd365bdd
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/app/Notification.java6
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) {