From eb4f716bf3a0ee3ac8015cde48305aeb82724039 Mon Sep 17 00:00:00 2001 From: Julia Reynolds Date: Thu, 7 Nov 2019 11:37:18 -0500 Subject: [PATCH] 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) --- .../android/server/notification/NotificationManagerService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index b1ea47c6f3b09..06b7c4d45c717 100644 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -7101,6 +7101,7 @@ public class NotificationManagerService extends SystemService { @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();