From 3d215df180f817ab0d41742a38c661c871a557b0 Mon Sep 17 00:00:00 2001 From: Stanislav Zholnin Date: Wed, 5 Jun 2019 16:48:20 +0100 Subject: [PATCH] Add atom for logging of ReviewPermissionsFragment actions. Test: make statsd_testdrive && ./out/host/linux-x86/bin/statsd_testdrive -p com.google.android.permissioncontroller 211 Bug: 133401502 Bug: 134581123 Change-Id: I326731e70221c1a28568573a241592006d1bb59e --- cmds/statsd/src/atoms.proto | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto index 495a09f2e99a0..e9208437ff070 100644 --- a/cmds/statsd/src/atoms.proto +++ b/cmds/statsd/src/atoms.proto @@ -303,6 +303,8 @@ message Atom { ContentCaptureSessionEvents content_capture_session_events = 208; ContentCaptureFlushed content_capture_flushed = 209; LocationManagerApiUsageReported location_manager_api_usage_reported = 210; + ReviewPermissionsFragmentResultReported review_permissions_fragment_result_reported + = 211 [(log_from_module) = "permissioncontroller"]; } // Pulled events will start at field 10000. @@ -6544,3 +6546,24 @@ message LocationManagerApiUsageReported { // Categorized to 3 types that are interesting from location's perspective. optional android.stats.location.ActivityImportance activiy_importance = 12; } + +/** + * Information about a permission grant or denial made by user inside ReviewPermissionsFragment + */ +message ReviewPermissionsFragmentResultReported { + // unique value identifying a permission group change. A permission group change might result + // in multiple of these atoms + optional int64 change_id = 1; + + // UID of package the permission belongs to + optional int32 uid = 2 [(is_uid) = true]; + + // Name of package the permission belongs to + optional string package_name = 3; + + // The permission to be granted + optional string permission_name = 4; + + // The result of the permission grant + optional bool permission_granted = 5; +}