Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8f912bb authored by Nate Myren's avatar Nate Myren Committed by Robert Lee
Browse files

Add new atoms for auto revoke

Added new atoms for auto revoke logging

Test: manual
Bug: 154650244
Change-Id: Ifdc291c24f249b275b435495fcd3c73db089adbc
parent 04089799
Loading
Loading
Loading
Loading
+104 −2
Original line number Diff line number Diff line
@@ -429,6 +429,15 @@ message Atom {
        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 @@ message AppPermissionFragmentViewed {
}

/**
* 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 @@ message AppPermissionsFragmentViewed {
    }
    optional Category category = 6;
}

/**
* Information about a PermissionAppsFragment viewed by user.
* Logged from ui/handheld/PermissionAppsFragment.java
@@ -8270,6 +8279,99 @@ message PermissionAppsFragmentViewed {
    optional Category category = 6;
}

/**
* 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