diff options
| author | 2017-03-15 12:46:04 -0700 | |
|---|---|---|
| committer | 2017-03-16 09:21:15 -0700 | |
| commit | e56c08e85250f7d60228eaf625bbcde6d0dcb4cb (patch) | |
| tree | 88fbb21e8a0bcf75e81e4c7b3424083f79c040f1 | |
| parent | 180f5e918c099a87fe80b4e18730ac7b45e18534 (diff) | |
Add TRON Events for app-ops permissions.
Fixes: 36212313
Test: Added and ran new EventLoggerTest-case. Installed and ran MobilIron Go app (like in the bug-report)
Change-Id: Ib1c69bb3aa2159b9101b6924484b51c223d136e0
| -rw-r--r-- | core/java/android/app/AppOpsManager.java | 2 | ||||
| -rw-r--r-- | proto/src/metrics_constants.proto | 64 |
2 files changed, 66 insertions, 0 deletions
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java index 0f2ce3c09f00..09e7595242af 100644 --- a/core/java/android/app/AppOpsManager.java +++ b/core/java/android/app/AppOpsManager.java @@ -362,6 +362,8 @@ public class AppOpsManager { public static final String OPSTR_ANSWER_PHONE_CALLS = "android:answer_phone_calls"; + // Warning: If an permission is added here it also has to be added to + // com.android.packageinstaller.permission.utils.EventLogger private static final int[] RUNTIME_AND_APPOP_PERMISSIONS_OPS = { // RUNTIME PERMISSIONS // Contacts diff --git a/proto/src/metrics_constants.proto b/proto/src/metrics_constants.proto index 0cc2311a8110..58e020f68bfc 100644 --- a/proto/src/metrics_constants.proto +++ b/proto/src/metrics_constants.proto @@ -3608,6 +3608,70 @@ message MetricsEvent { // CATEGORY: SETTINGS SETTINGS_LOCK_SCREEN_PREFERENCES = 882; + // ACTION: An app requested the app-op permission ACCESS_NOTIFICATIONS + // PACKAGE: The package name of the app requesting the permission + ACTION_APPOP_REQUEST_ACCESS_NOTIFICATIONS = 883; + + // ACTION: An app was granted the app-op permission ACCESS_NOTIFICATIONS + // PACKAGE: The package name of the app that was granted the permission + ACTION_APPOP_GRANT_ACCESS_NOTIFICATIONS = 884; + + // ACTION: An app requested the app-op permission ACCESS_NOTIFICATIONS and the request was denied + // PACKAGE: The package name of the app requesting the permission + ACTION_APPOP_DENIED_ACCESS_NOTIFICATIONS = 885; + + // ACTION: The app-op permission ACCESS_NOTIFICATIONS was revoked for an app + // PACKAGE: The package name of the app the permission was revoked for + ACTION_APPOP_REVOKE_ACCESS_NOTIFICATIONS = 886; + + // ACTION: An app requested the app-op permission SYSTEM_ALERT_WINDOW + // PACKAGE: The package name of the app requesting the permission + ACTION_APPOP_REQUEST_SYSTEM_ALERT_WINDOW = 887; + + // ACTION: An app was granted the app-op permission SYSTEM_ALERT_WINDOW + // PACKAGE: The package name of the app that was granted the permission + ACTION_APPOP_GRANT_SYSTEM_ALERT_WINDOW = 888; + + // ACTION: An app requested the app-op permission SYSTEM_ALERT_WINDOW and the request was denied + // PACKAGE: The package name of the app requesting the permission + ACTION_APPOP_DENIED_SYSTEM_ALERT_WINDOW = 889; + + // ACTION: The app-op permission SYSTEM_ALERT_WINDOW was revoked for an app + // PACKAGE: The package name of the app the permission was revoked for + ACTION_APPOP_REVOKE_SYSTEM_ALERT_WINDOW = 890; + + // ACTION: An app requested the app-op permission REQUEST_WRITE_SETTINGS + // PACKAGE: The package name of the app requesting the permission + ACTION_APPOP_REQUEST_WRITE_SETTINGS = 891; + + // ACTION: An app was granted the app-op permission REQUEST_WRITE_SETTINGS + // PACKAGE: The package name of the app that was granted the permission + ACTION_APPOP_GRANT_WRITE_SETTINGS = 892; + + // ACTION: An app requested the app-op permission REQUEST_WRITE_SETTINGS and the request was denied + // PACKAGE: The package name of the app requesting the permission + ACTION_APPOP_DENIED_WRITE_SETTINGS = 893; + + // ACTION: The app-op permission REQUEST_WRITE_SETTINGS was revoked for an app + // PACKAGE: The package name of the app the permission was revoked for + ACTION_APPOP_REVOKE_WRITE_SETTINGS = 894; + + // ACTION: An app requested the app-op permission REQUEST_INSTALL_PACKAGES + // PACKAGE: The package name of the app requesting the permission + ACTION_APPOP_REQUEST_REQUEST_INSTALL_PACKAGES = 895; + + // ACTION: An app was granted the app-op permission REQUEST_INSTALL_PACKAGES + // PACKAGE: The package name of the app that was granted the permission + ACTION_APPOP_GRANT_REQUEST_INSTALL_PACKAGES = 896; + + // ACTION: An app requested the app-op permission REQUEST_INSTALL_PACKAGES and the request was denied + // PACKAGE: The package name of the app requesting the permission + ACTION_APPOP_DENIED_REQUEST_INSTALL_PACKAGES = 897; + + // ACTION: The app-op permission REQUEST_INSTALL_PACKAGES was revoked for an app + // PACKAGE: The package name of the app the permission was revoked for + ACTION_APPOP_REVOKE_REQUEST_INSTALL_PACKAGES = 898; + // ---- End O Constants, all O constants go above this line ---- // Add new aosp constants above this line. |