diff options
| author | Svetoslav Ganov <svetoslavganov@google.com> | 2021-04-08 18:34:58 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-04-08 18:34:58 +0000 |
| commit | 64b26b5c49ee55422a2c5d30b9bddc2b60076b3e (patch) | |
| tree | 8f333f5a96d7cefae56fc51239082b06f8baf23e /core/java | |
| parent | 41069eb17ec603942f6297e0d2e095cc1544ca2c (diff) | |
| parent | 99d6115e9973aa8ef8921316d5113e00e42b7bce (diff) | |
Merge "Activity recognition source app op tracking" into sc-dev
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/app/AppOpsManager.java | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java index 436007cae502..8e2626a8139b 100644 --- a/core/java/android/app/AppOpsManager.java +++ b/core/java/android/app/AppOpsManager.java @@ -1225,9 +1225,19 @@ public class AppOpsManager { /** @hide */ public static final int OP_UWB_RANGING = AppProtoEnums.APP_OP_UWB_RANGING; + /** + * Activity recognition being accessed by an activity recognition source, which + * is a component that already has access since it is the one that detects + * activity recognition. + * + * @hide + */ + public static final int OP_ACTIVITY_RECOGNITION_SOURCE = + AppProtoEnums.APP_OP_ACTIVITY_RECOGNITION_SOURCE; + /** @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) - public static final int _NUM_OP = 113; + public static final int _NUM_OP = 114; /** Access to coarse location information. */ public static final String OPSTR_COARSE_LOCATION = "android:coarse_location"; @@ -1478,6 +1488,7 @@ public class AppOpsManager { public static final String OPSTR_USE_BIOMETRIC = "android:use_biometric"; /** @hide Recognize physical activity. */ + @TestApi public static final String OPSTR_ACTIVITY_RECOGNITION = "android:activity_recognition"; /** @hide Financial app read sms. */ @@ -1643,6 +1654,17 @@ public class AppOpsManager { /** @hide */ public static final String OPSTR_UWB_RANGING = "android:uwb_ranging"; + /** + * Activity recognition being accessed by an activity recognition source, which + * is a component that already has access since it is the one that detects + * activity recognition. + * + * @hide + */ + @TestApi + public static final String OPSTR_ACTIVITY_RECOGNITION_SOURCE = + "android:activity_recognition_source"; + /** {@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} */ @@ -1853,6 +1875,7 @@ public class AppOpsManager { OP_MANAGE_MEDIA, // MANAGE_MEDIA OP_BLUETOOTH_CONNECT, // OP_BLUETOOTH_CONNECT OP_UWB_RANGING, // OP_UWB_RANGING + OP_ACTIVITY_RECOGNITION_SOURCE // OP_ACTIVITY_RECOGNITION_SOURCE }; /** @@ -1972,6 +1995,7 @@ public class AppOpsManager { OPSTR_MANAGE_MEDIA, OPSTR_BLUETOOTH_CONNECT, OPSTR_UWB_RANGING, + OPSTR_ACTIVITY_RECOGNITION_SOURCE }; /** @@ -2091,7 +2115,8 @@ public class AppOpsManager { "COARSE_LOCATION_SOURCE", "MANAGE_MEDIA", "BLUETOOTH_CONNECT", - "UWB_RANGING" + "UWB_RANGING", + "ACTIVITY_RECOGNITION_SOURCE" }; /** @@ -2213,6 +2238,7 @@ public class AppOpsManager { Manifest.permission.MANAGE_MEDIA, Manifest.permission.BLUETOOTH_CONNECT, Manifest.permission.UWB_RANGING, + null, // no permission for OP_ACTIVITY_RECOGNITION_SOURCE, }; /** @@ -2334,6 +2360,7 @@ public class AppOpsManager { null, // MANAGE_MEDIA null, // BLUETOOTH_CONNECT null, // UWB_RANGING + null, // ACTIVITY_RECOGNITION_SOURCE }; /** @@ -2454,6 +2481,7 @@ public class AppOpsManager { null, // MANAGE_MEDIA null, // BLUETOOTH_CONNECT null, // UWB_RANGING + null // ACTIVITY_RECOGNITION_SOURCE }; /** @@ -2573,6 +2601,7 @@ public class AppOpsManager { AppOpsManager.MODE_DEFAULT, // MANAGE_MEDIA AppOpsManager.MODE_ALLOWED, // BLUETOOTH_CONNECT AppOpsManager.MODE_ALLOWED, // UWB_RANGING + AppOpsManager.MODE_ALLOWED, // ACTIVITY_RECOGNITION_SOURCE }; /** @@ -2696,6 +2725,7 @@ public class AppOpsManager { false, // MANAGE_MEDIA false, // BLUETOOTH_CONNECT false, // UWB_RANGING + false, // ACTIVITY_RECOGNITION_SOURCE }; /** |
