mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-13 09:54:36 -05:00
59bf3b75c7
https://review.lineageos.org/c/LineageOS/android_frameworks_base/+/353117 https://review.lineageos.org/q/topic:Q_asb_2023-03 https://review.lineageos.org/q/topic:Q_asb_2023-04 https://review.lineageos.org/q/topic:Q_asb_2023-05 https://review.lineageos.org/q/topic:Q_asb_2023-06 https://review.lineageos.org/q/topic:Q_asb_2023-07 https://review.lineageos.org/q/topic:Q_asb_2023-08 accounted for via patches: https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376560 https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376561 https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376562 https://review.lineageos.org/q/topic:Q_asb_2023-09 https://review.lineageos.org/q/topic:Q_asb_2023-10 https://review.lineageos.org/q/topic:Q_asb_2023-11 accounted for via patches: https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376563 accounted for via manifest change: https://review.lineageos.org/c/LineageOS/android_external_webp/+/376568 https://review.lineageos.org/q/topic:Q_asb_2023-12 https://review.lineageos.org/q/topic:Q_asb_2024-01 https://review.lineageos.org/q/topic:Q_asb_2024-02 https://review.lineageos.org/q/topic:Q_asb_2024-03 Signed-off-by: Tavi <tavi@divested.dev>
36 lines
2.0 KiB
Diff
36 lines
2.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Mat=C3=ADas=20Hern=C3=A1ndez?= <matiashe@google.com>
|
|
Date: Thu, 15 Jun 2023 18:37:52 +0200
|
|
Subject: [PATCH] Settings: don't try to allow NLSes with too-long component
|
|
names
|
|
|
|
* NotificationAccessConfirmationActivity (triggered through CompanionDeviceManager) -> Don't show the dialog, bail out early similarly to other invalid inputs.
|
|
* NotificationAccessSettings (from Special App Access) -> No changes, but use the canonical constant now.
|
|
* NotificationAccessDetails -> Disable the toggle, unless the NLS was previously approved (in which case it can still be removed).
|
|
|
|
Fixes: 260570119
|
|
Fixes: 286043036
|
|
Test: atest + manually
|
|
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:f1af8c529295c60e516b2cc1d1ac812b8d6047ac)
|
|
Merged-In: Ifc048311746c027e3683cdcf65f1079d04cf7c56
|
|
Change-Id: Ifc048311746c027e3683cdcf65f1079d04cf7c56
|
|
---
|
|
.../notification/NotificationAccessConfirmationActivity.java | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/com/android/settings/notification/NotificationAccessConfirmationActivity.java b/src/com/android/settings/notification/NotificationAccessConfirmationActivity.java
|
|
index dfe6df2a5ca..a6b565ae6ba 100644
|
|
--- a/src/com/android/settings/notification/NotificationAccessConfirmationActivity.java
|
|
+++ b/src/com/android/settings/notification/NotificationAccessConfirmationActivity.java
|
|
@@ -67,7 +67,9 @@ public class NotificationAccessConfirmationActivity extends Activity
|
|
mUserId = getIntent().getIntExtra(EXTRA_USER_ID, UserHandle.USER_NULL);
|
|
CharSequence mAppLabel;
|
|
|
|
- if (mComponentName == null || mComponentName.getPackageName() == null) {
|
|
+ if (mComponentName == null || mComponentName.getPackageName() == null
|
|
+ || mComponentName.flattenToString().length()
|
|
+ > NotificationManager.MAX_SERVICE_COMPONENT_NAME_LENGTH) {
|
|
finish();
|
|
return;
|
|
}
|