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

Commit 6db4be5c authored by Eugene Susla's avatar Eugene Susla
Browse files

Auto-revoke permissions for unused apps

android.permission.PACKAGE_USAGE_STATS is the minimal required
permission to get app usage stats, as confirmed by the API author
and usage stats is the only place giving us historical app-usage information.

Test: reduce thresholds and test with a toy app
Change-Id: Id8767cab93802d3fc90dc32a93ffb20a53f45ad9
parent c8e17b66
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -6336,6 +6336,8 @@ message PermissionGrantRequestResultReported {
        USER_DENIED_WITH_PREJUDICE_IN_SETTINGS = 14;
        // permission was automatically revoked after one-time permission expired
        AUTO_ONE_TIME_PERMISSION_REVOKED = 15;
        // permission was automatically revoked for unused app
        AUTO_UNUSED_APP_PERMISSION_REVOKED = 16;
    }
    // The result of the permission grant
    optional Result result = 6;
+1 −0
Original line number Diff line number Diff line
@@ -130,6 +130,7 @@ applications that come with the platform
        <permission name="android.permission.APPROVE_INCIDENT_REPORTS"/>
        <permission name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
        <permission name="android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME" />
        <permission name="android.permission.PACKAGE_USAGE_STATS" />
    </privapp-permissions>

    <privapp-permissions package="com.android.phone">