summaryrefslogtreecommitdiff
path: root/core/java/android/app/NotificationManager.java
diff options
context:
space:
mode:
authorMatías Hernández <matiashe@google.com>2023-06-15 18:31:34 +0200
committerJulian Veit <claymore1298@gmail.com>2023-09-18 17:45:38 +0200
commitf967feb00be10bb72cc869aac989aa31d66e29f9 (patch)
treed751136dd798cc21c296c6ccbf2196117bf4676e /core/java/android/app/NotificationManager.java
parent2f93d1b3fed0d09fb007fd2c8b51d0279a894933 (diff)
Forbid granting access to NLSes with too-long component names
This makes the limitation, which was previously only checked on the Settings UI, enforced everywhere. Fixes: 260570119 Fixes: 286043036 Test: atest + manually (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6fcdbd0c6efc67b014b8e1b43c5ec233f912ee8b) Merged-In: I4c25d80978cb37a8fa1531f5045259d25ac64692 Change-Id: I4c25d80978cb37a8fa1531f5045259d25ac64692
Diffstat (limited to 'core/java/android/app/NotificationManager.java')
-rw-r--r--core/java/android/app/NotificationManager.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/java/android/app/NotificationManager.java b/core/java/android/app/NotificationManager.java
index 37a90de8d600..d6d3c7164c66 100644
--- a/core/java/android/app/NotificationManager.java
+++ b/core/java/android/app/NotificationManager.java
@@ -571,6 +571,12 @@ public class NotificationManager {
*/
public static final int BUBBLE_PREFERENCE_SELECTED = 2;
+ /**
+ * Maximum length of the component name of a registered NotificationListenerService.
+ * @hide
+ */
+ public static int MAX_SERVICE_COMPONENT_NAME_LENGTH = 500;
+
@UnsupportedAppUsage
private static INotificationManager sService;