commit | fa11998a23039f578ebf718b379ea8642ac92658 | [log] [tgz] |
---|---|---|
author | Julia Reynolds <juliacr@google.com> | Thu Nov 07 11:37:18 2019 -0500 |
committer | Anis Assi <anisassi@google.com> | Thu Mar 12 13:37:58 2020 -0700 |
tree | 2f2f3a95e725fb9809801df42ad0c2fa005cfbb2 | |
parent | b6ce8a330c01509add201420084d0554cfc6ac57 [diff] |
Only suspend package from system or shell Test: manual Bug: 148059175 Change-Id: I50ee768e792266ad2091f1913168e89d5d1463ed Merged-In: I50ee768e792266ad2091f1913168e89d5d1463ed (cherry picked from commit 1c943a2670c1ff499669b42ef72dcd9f07db08c3) (cherry picked from commit adc39de3a148a2058d63bd7a1b8b71ee0a3524ac) (cherry picked from commit eb4f716bf3a0ee3ac8015cde48305aeb82724039)
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index 897877a..78204ac 100644 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -6991,6 +6991,7 @@ @VisibleForTesting protected void simulatePackageSuspendBroadcast(boolean suspend, String pkg) { + checkCallerIsSystemOrShell(); // only use for testing: mimic receive broadcast that package is (un)suspended // but does not actually (un)suspend the package final Bundle extras = new Bundle();