diff options
| author | Alex Johnston <acjohnston@google.com> | 2020-11-12 21:25:34 +0000 |
|---|---|---|
| committer | Alex Johnston <acjohnston@google.com> | 2020-11-12 21:25:34 +0000 |
| commit | d3c01ef591aa077a54ba337403a89e5a6c2fbdc5 (patch) | |
| tree | abf87024225a7270d8a6901b892e7fa0d40450d7 /core/java/android | |
| parent | dc030d615f3c227acc7adae9719a7404c56327bb (diff) | |
add MANAGE_CREDENTIALS appop
This is part of the work to support
a credential management app on
unmanaged devices.
Bug: 165641221
Test: atest android.appsecurity.cts.AppOpsTest
Change-Id: Ifd87b5e38f341db4b34bf9f61480e29e49148846
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/AppOpsManager.java | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java index 26b4234fd14b..5f2c7abed787 100644 --- a/core/java/android/app/AppOpsManager.java +++ b/core/java/android/app/AppOpsManager.java @@ -1157,9 +1157,16 @@ public class AppOpsManager { // TODO: Add as AppProtoEnums public static final int OP_RECORD_AUDIO_HOTWORD = 102; + /** + * Manage credentials in the system KeyChain. + * + * @hide + */ + public static final int OP_MANAGE_CREDENTIALS = AppProtoEnums.APP_OP_MANAGE_CREDENTIALS; + /** @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) - public static final int _NUM_OP = 104; + public static final int _NUM_OP = 105; /** Access to coarse location information. */ public static final String OPSTR_COARSE_LOCATION = "android:coarse_location"; @@ -1510,6 +1517,13 @@ public class AppOpsManager { */ public static final String OPSTR_RECORD_AUDIO_HOTWORD = "android:record_audio_hotword"; + /** + * Manage credentials in the system KeyChain. + * + * @hide + */ + public static final String OPSTR_MANAGE_CREDENTIALS = "android:manage_credentials"; + /** {@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} */ @@ -1704,6 +1718,7 @@ public class AppOpsManager { OP_PHONE_CALL_CAMERA, // OP_PHONE_CALL_CAMERA OP_RECORD_AUDIO_HOTWORD, // RECORD_AUDIO_HOTWORD OP_MANAGE_ONGOING_CALLS, // MANAGE_ONGOING_CALLS + OP_MANAGE_CREDENTIALS, // MANAGE_CREDENTIALS }; /** @@ -1814,6 +1829,7 @@ public class AppOpsManager { OPSTR_PHONE_CALL_CAMERA, OPSTR_RECORD_AUDIO_HOTWORD, OPSTR_MANAGE_ONGOING_CALLS, + OPSTR_MANAGE_CREDENTIALS, }; /** @@ -1925,6 +1941,7 @@ public class AppOpsManager { "PHONE_CALL_CAMERA", "RECORD_AUDIO_HOTWORD", "MANAGE_ONGOING_CALLS", + "MANAGE_CREDENTIALS", }; /** @@ -2037,6 +2054,7 @@ public class AppOpsManager { null, // no permission for OP_PHONE_CALL_CAMERA null, // no permission for OP_RECORD_AUDIO_HOTWORD Manifest.permission.MANAGE_ONGOING_CALLS, + null, // no permission for OP_MANAGE_CREDENTIALS }; /** @@ -2149,6 +2167,7 @@ public class AppOpsManager { null, // PHONE_CALL_MICROPHONE null, // RECORD_AUDIO_HOTWORD null, // MANAGE_ONGOING_CALLS + null, // MANAGE_CREDENTIALS }; /** @@ -2260,6 +2279,7 @@ public class AppOpsManager { null, // PHONE_CALL_CAMERA null, // RECORD_AUDIO_HOTWORD null, // MANAGE_ONGOING_CALLS + null, // MANAGE_CREDENTIALS }; /** @@ -2370,6 +2390,7 @@ public class AppOpsManager { AppOpsManager.MODE_ALLOWED, // PHONE_CALL_CAMERA AppOpsManager.MODE_ALLOWED, // OP_RECORD_AUDIO_HOTWORD AppOpsManager.MODE_DEFAULT, // MANAGE_ONGOING_CALLS + AppOpsManager.MODE_DEFAULT, // MANAGE_CREDENTIALS }; /** @@ -2484,6 +2505,7 @@ public class AppOpsManager { false, // PHONE_CALL_CAMERA false, // RECORD_AUDIO_HOTWORD true, // MANAGE_ONGOING_CALLS + false, // MANAGE_CREDENTIALS }; /** |
