Only suspend package from system or shell

Test: manual
Bug: 148059175
Change-Id: I50ee768e792266ad2091f1913168e89d5d1463ed
Merged-In: I50ee768e792266ad2091f1913168e89d5d1463ed
(cherry picked from commit 1c943a2670)
(cherry picked from commit adc39de3a1)
This commit is contained in:
Julia Reynolds
2019-11-07 11:37:18 -05:00
committed by Beverly Tai
parent e38a710477
commit eb4f716bf3

View File

@@ -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();