APIs to watch active op changes

System singed components can watch for starting/finishing of
long running app ops. Also protected the APIs to watch op mode
changes with a singature permission for the cross-uid use case.

Test: atest com.android.server.appops.AppOpsActiveWatcherTest

bug:64085448

Change-Id: Id7fe79ce1de4c5690b4f52786424ec5a5d9eb0fa
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index 35c4d59..3d49e5c 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -202,6 +202,9 @@
     <!-- to change themes - light or dark -->
     <uses-permission android:name="android.permission.CHANGE_OVERLAY_PACKAGES" />
 
+    <!-- Listen app op changes -->
+    <uses-permission android:name="android.permission.WATCH_APPOPS" />
+
     <application
         android:name=".SystemUIApplication"
         android:persistent="true"