From 5b5e5735775aa19fed52f17159edbd0ee1fef719 Mon Sep 17 00:00:00 2001 From: Kunal Malhotra Date: Tue, 28 Feb 2023 21:57:15 +0000 Subject: [PATCH] Adding platform permissions to audio, media, and camera Test: Manual testing on device Bug: b/263304156 Change-Id: Ib4aacfd9f4f36d2a08d402a0558143cd5180c129 --- core/java/android/app/IActivityManager.aidl | 19 +++++++++---------- data/etc/platform.xml | 3 +++ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/core/java/android/app/IActivityManager.aidl b/core/java/android/app/IActivityManager.aidl index 403acad6bba12..97d45623d3da3 100644 --- a/core/java/android/app/IActivityManager.aidl +++ b/core/java/android/app/IActivityManager.aidl @@ -108,6 +108,15 @@ interface IActivityManager { int getUidProcessState(int uid, in String callingPackage); @UnsupportedAppUsage int checkPermission(in String permission, int pid, int uid); + + /** Logs start of an API call to associate with an FGS, used for FGS Type Metrics */ + void logFgsApiBegin(int apiType, int appUid, int appPid); + + /** Logs stop of an API call to associate with an FGS, used for FGS Type Metrics */ + void logFgsApiEnd(int apiType, int appUid, int appPid); + + /** Logs API state change to associate with an FGS, used for FGS Type Metrics */ + void logFgsApiStateChanged(int apiType, int state, int appUid, int appPid); // =============== End of transactions used on native side as well ============================ // Special low-level communication with activity manager. @@ -870,16 +879,6 @@ interface IActivityManager { /** Returns if the service is a short-service is still "alive" and past the timeout. */ boolean shouldServiceTimeOut(in ComponentName className, in IBinder token); - /** Logs start of an API call to associate with an FGS, used for FGS Type Metrics */ - void logFgsApiBegin(int apiType, int appUid, int appPid); - - /** Logs stop of an API call to associate with an FGS, used for FGS Type Metrics */ - void logFgsApiEnd(int apiType, int appUid, int appPid); - - /** Logs API state change to associate with an FGS, used for FGS Type Metrics */ - void logFgsApiStateChanged(int apiType, int state, int appUid, int appPid); - - @JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.PACKAGE_USAGE_STATS)") void registerUidFrozenStateChangedCallback(in IUidFrozenStateChangedCallback callback); @JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.PACKAGE_USAGE_STATS)") void unregisterUidFrozenStateChangedCallback(in IUidFrozenStateChangedCallback callback); diff --git a/data/etc/platform.xml b/data/etc/platform.xml index 6328b02cf56aa..2c85fe4e92064 100644 --- a/data/etc/platform.xml +++ b/data/etc/platform.xml @@ -160,6 +160,7 @@ + @@ -173,6 +174,7 @@ + @@ -186,6 +188,7 @@ +