From ade26fa73afd2d4510ac00def5b0beada19d1b36 Mon Sep 17 00:00:00 2001 From: Fabian Kozynski Date: Fri, 7 Jun 2019 13:20:49 -0400 Subject: [PATCH] Restore WATCH_APPOPS permission for systemui This permission is necessary for Q as it allows systemui to tag notifications of apps that are using certain AppOps. This is a P feature that has regressed when the permission was made privileged. This is used by AppOpsController in order to obtain updates on any apps (onOpActiveChanged, onOpNoted). There is no other way to obtain the updates from apps that are not systemui, as specified in AppOpsManager. Talked to moltmann@ to verify that this is the correct API to use for this feature. I'll remove this permission once SystemUI does not need it anymore. In particular, if AppOpsController does not require it for being notified of AppOps changes. Fixes: 134747188 Test: build Test: dumpsys SystemUI. Check that AppOpsController is getting updates. Change-Id: I08cca4361a7fbfa8b2eb419f1459b0b8bce93a5f --- data/etc/com.android.systemui.xml | 1 + packages/SystemUI/AndroidManifest.xml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/data/etc/com.android.systemui.xml b/data/etc/com.android.systemui.xml index a4337cc8ce79c..a305d48c4633b 100644 --- a/data/etc/com.android.systemui.xml +++ b/data/etc/com.android.systemui.xml @@ -54,6 +54,7 @@ + diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml index 7db8969e2e042..4b4912cb1e8a5 100644 --- a/packages/SystemUI/AndroidManifest.xml +++ b/packages/SystemUI/AndroidManifest.xml @@ -222,6 +222,9 @@ + + +