From 3e0f9bcce01ac55d3fb3a5b6211a1f71a5fb2095 Mon Sep 17 00:00:00 2001 From: Stanislav Zholnin Date: Thu, 23 May 2019 19:03:55 +0100 Subject: [PATCH] Add logging atoms to record user actions in AppPermissionFragment (handheld devices only) Test: make statsd_testdrive && ./out/host/linux-x86/bin/statsd_testdrive -p com.google.android.permissioncontroller 215 Bug:133401502 Bug:134581123 Change-Id: I2a0b15dfdd6398707a762c48602f970f14534b51 --- cmds/statsd/src/atoms.proto | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto index 8c94e29877c85..3ae21aa3a22b6 100644 --- a/cmds/statsd/src/atoms.proto +++ b/cmds/statsd/src/atoms.proto @@ -311,6 +311,8 @@ message Atom { 213 [(log_from_module) = "permissioncontroller"]; LocationAccessCheckNotificationAction location_access_check_notification_action = 214 [(log_from_module) = "permissioncontroller"]; + AppPermissionFragmentActionReported app_permission_fragment_action_reported = + 215 [(log_from_module) = "permissioncontroller"]; } // Pulled events will start at field 10000. @@ -6637,3 +6639,27 @@ message LocationAccessCheckNotificationAction { // View / interaction recorded optional Result result = 4; } + +/** + * Information about a permission grant or revoke made by user inside AppPermissionFragment + */ +message AppPermissionFragmentActionReported { + // id which identifies single session of user interacting with permission controller + optional int64 session_id = 1; + + // unique value identifying a permission group change. A permission group change might result + // in multiple of these atoms + optional int64 change_id = 2; + + // UID of package the permission belongs to + optional int32 uid = 3 [(is_uid) = true]; + + // Name of package the permission belongs to + optional string package_name = 4; + + // The permission to be granted + optional string permission_name = 5; + + // The result of the permission grant + optional bool permission_granted = 6; +}