Add new atoms for auto revoke

Added new atoms for auto revoke logging

Test: manual
Bug: 154650244
Change-Id: Ifdc291c24f249b275b435495fcd3c73db089adbc
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index 03061bb..feeb0ed 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -429,6 +429,15 @@
         AccessibilityServiceReported accessibility_service_reported = 267 [(module) = "settings"];
         DocsUIDragAndDropReported docs_ui_drag_and_drop_reported = 268 [(module) = "docsui"];
         AppUsageEventOccurred app_usage_event_occurred = 269 [(module) = "framework"];
+        AutoRevokeNotificationClicked auto_revoke_notification_clicked =
+            270 [(module) = "permissioncontroller"];
+        AutoRevokeFragmentAppViewed auto_revoke_fragment_app_viewed =
+            271 [(module) = "permissioncontroller"];
+        AutoRevokedAppInteraction auto_revoked_app_interaction =
+            272 [(module) = "permissioncontroller", (module) = "settings"];
+        AppPermissionGroupsFragmentAutoRevokeAction
+            app_permission_groups_fragment_auto_revoke_action =
+            273 [(module) = "permissioncontroller"];
         SdkExtensionStatus sdk_extension_status = 354;
 
         // StatsdStats tracks platform atoms with ids upto 500.
@@ -8210,7 +8219,8 @@
 }
 
 /**
-* Information about a AppPermissionsFragment viewed by user
+* Information about a AppPermissionGroupsFragment viewed by user. Fragment has been renamed, but
+* the log retains the old fragment name.
 */
 message AppPermissionsFragmentViewed {
     // id which identifies single session of user interacting with permission controller
@@ -8238,7 +8248,6 @@
     }
     optional Category category = 6;
 }
-
 /**
 * Information about a PermissionAppsFragment viewed by user.
 * Logged from ui/handheld/PermissionAppsFragment.java
@@ -8271,6 +8280,99 @@
 }
 
 /**
+* Log that the Auto Revoke notification has been clicked
+* Logged from ui/ManagePermissionsActivity
+*/
+message AutoRevokeNotificationClicked {
+    // id which identifies single session of user interacting with permission controller
+    optional int64 session_id = 1;
+}
+
+/**
+* Log that an app has been displayed on the auto revoke page, and lists one permission that was
+* auto revoked for it.
+* Logged from ui/handheld/AutoRevokeFragment
+*/
+message AutoRevokeFragmentAppViewed {
+    // id which identifies single session of user interacting with permission controller
+    optional int64 session_id = 1;
+
+    // UID of package for which permissions are viewed
+    optional int32 uid = 2 [(is_uid) = true];
+
+    // Name of package for which permissions are viewed
+    optional string package_name = 3;
+
+    // The name of a permission group that has been revoked
+    optional string permission_group_name = 4;
+
+    // The age of the app- more than three months old, or more than six months
+    enum Age {
+        UNDEFINED = 0;
+        NEWER_BUCKET = 1;
+        OLDER_BUCKET = 2;
+    }
+
+    // How long the app has been unused. Currently, newer bucket is 3 months, older is 6 months
+    optional Age age = 5;
+}
+
+/**
+* Log that the user has interacted with an app on the auto revoke fragment
+* Logged from ui/handheld/AutoRevokeFragment
+*/
+message AutoRevokedAppInteraction {
+    // id which identifies single session of user interacting with permission controller
+    optional int64 session_id = 1;
+
+    // UID of package for which permissions are viewed
+    optional int32 uid = 2 [(is_uid) = true];
+
+    // Name of package for which permissions are viewed
+    optional string package_name = 3;
+
+    enum Action {
+        UNDEFINED = 0;
+        REMOVE = 1;
+        OPEN = 2;
+        APP_INFO = 3;
+        PERMISSIONS = 4;
+        REMOVE_IN_SETTINGS = 5;
+        OPEN_IN_SETTINGS = 6;
+    }
+
+    // The action the user took to interact with the app
+    optional Action action = 4;
+}
+
+/**
+* Log that the AppPermissionGroupsFragment has been interacted with for the possible purposes of
+* auto revoke, or that the auto revoke switch has been changed
+* Logged from ui/handheld/AppPermissionGroupsFragment
+ */
+message AppPermissionGroupsFragmentAutoRevokeAction {
+    // id which identifies single session of user interacting with permission controller
+    optional int64 session_id = 1;
+
+    // UID of package for which permissions are viewed
+    optional int32 uid = 2 [(is_uid) = true];
+
+    // Name of package for which permissions are viewed
+    optional string package_name = 3;
+
+    enum Action {
+        UNDEFINED = 0;
+        OPENED_FOR_AUTO_REVOKE = 1;
+        OPENED_FROM_INTENT = 2;
+        SWITCH_ENABLED = 3;
+        SWITCH_DISABLED = 4;
+    }
+
+    // The action the user took to interact with the fragment
+    optional Action action = 4;
+}
+
+/**
  * Logs when there is a smart selection related event.
  * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java
  * Logged from: TextClassifierEventLogger.java