From 67c20444993fdd1a768ef68da78c6e28b1e54904 Mon Sep 17 00:00:00 2001 From: Lyn Date: Wed, 11 Jan 2023 15:35:33 +0000 Subject: [PATCH] AndroidManifest: change FSI permission to normal|appop Before: protection=normal, flag=none After: protection=normal, flag=appop Bug: 243421660 Change-Id: I6c4cc5462d37d50ddf61473616ced5938aba0cc1 --- core/java/android/app/AppOpsManager.java | 22 ++++++++++++++++++++-- core/res/AndroidManifest.xml | 2 +- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java index 25b395b5b9e07..f9e40819e1706 100644 --- a/core/java/android/app/AppOpsManager.java +++ b/core/java/android/app/AppOpsManager.java @@ -1454,9 +1454,16 @@ public class AppOpsManager { public static final int OP_BODY_SENSORS_WRIST_TEMPERATURE = AppProtoEnums.APP_OP_BODY_SENSORS_WRIST_TEMPERATURE; + /** + * Send an intent to launch instead of posting the notification to the status bar. + * + * @hide + */ + public static final int OP_USE_FULL_SCREEN_INTENT = AppProtoEnums.APP_OP_USE_FULL_SCREEN_INTENT; + /** @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) - public static final int _NUM_OP = 133; + public static final int _NUM_OP = 134; /** Access to coarse location information. */ public static final String OPSTR_COARSE_LOCATION = "android:coarse_location"; @@ -2043,6 +2050,13 @@ public class AppOpsManager { public static final String OPSTR_BODY_SENSORS_WRIST_TEMPERATURE = "android:body_sensors_wrist_temperature"; + /** + * Send an intent to launch instead of posting the notification to the status bar. + * + * @hide + */ + public static final String OPSTR_USE_FULL_SCREEN_INTENT = "android:use_full_screen_intent"; + /** {@link #sAppOpsToNote} not initialized yet for this op */ private static final byte SHOULD_COLLECT_NOTE_OP_NOT_INITIALIZED = 0; /** Should not collect noting of this app-op in {@link #sAppOpsToNote} */ @@ -2142,6 +2156,7 @@ public class AppOpsManager { OP_FOREGROUND_SERVICE_SPECIAL_USE, OP_CAPTURE_CONSENTLESS_BUGREPORT_ON_USERDEBUG_BUILD, OP_BODY_SENSORS_WRIST_TEMPERATURE, + OP_USE_FULL_SCREEN_INTENT }; static final AppOpInfo[] sAppOpInfos = new AppOpInfo[]{ @@ -2560,7 +2575,10 @@ public class AppOpsManager { OPSTR_BODY_SENSORS_WRIST_TEMPERATURE, "BODY_SENSORS_WRIST_TEMPERATURE") .setPermission(Manifest.permission.BODY_SENSORS_WRIST_TEMPERATURE) - .setDefaultMode(AppOpsManager.MODE_ALLOWED).build() + .setDefaultMode(AppOpsManager.MODE_ALLOWED).build(), + new AppOpInfo.Builder(OP_USE_FULL_SCREEN_INTENT, OPSTR_USE_FULL_SCREEN_INTENT, + "USE_FULL_SCREEN_INTENT").setPermission(Manifest.permission.USE_FULL_SCREEN_INTENT) + .build() }; // The number of longs needed to form a full bitmask of app ops diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 7d69d5675eab2..f9b5d30d9b6ad 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -6652,7 +6652,7 @@ + android:protectionLevel="normal|appop" />