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

Commit 11c21eb2 authored by Güliz Seray Tuncay's avatar Güliz Seray Tuncay
Browse files

Migrate |documenter to |role

Migrate the |documenter permission flag to the role infrastructure

Bug: 158878560
Test: atest CtsPermission2TestCases:PermissionPolicyTest
Change-Id: Iad1ad168064688b2efbb964a1eae9110a4cac231
parent c19acf5a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2802,7 +2802,7 @@ package android.content.pm {
    field public static final int PROTECTION_FLAG_APP_PREDICTOR = 2097152; // 0x200000
    field public static final int PROTECTION_FLAG_COMPANION = 8388608; // 0x800000
    field public static final int PROTECTION_FLAG_CONFIGURATOR = 524288; // 0x80000
    field public static final int PROTECTION_FLAG_DOCUMENTER = 262144; // 0x40000
    field @Deprecated public static final int PROTECTION_FLAG_DOCUMENTER = 262144; // 0x40000
    field public static final int PROTECTION_FLAG_INCIDENT_REPORT_APPROVER = 1048576; // 0x100000
    field public static final int PROTECTION_FLAG_KNOWN_SIGNER = 134217728; // 0x8000000
    field public static final int PROTECTION_FLAG_OEM = 16384; // 0x4000
+2 −4
Original line number Diff line number Diff line
@@ -211,6 +211,8 @@ public class PermissionInfo extends PackageItemInfo implements Parcelable {
     * Additional flag for {@link #protectionLevel}, corresponding to the
     * {@code documenter} value of {@link android.R.attr#protectionLevel}.
     *
     * @deprecated this protectionLevel is obsolete. Permissions previously granted
     * through this protectionLevel have been migrated to use <code>role</code> instead
     * @hide
     */
    @SystemApi
@@ -309,7 +311,6 @@ public class PermissionInfo extends PackageItemInfo implements Parcelable {
            PROTECTION_FLAG_OEM,
            PROTECTION_FLAG_VENDOR_PRIVILEGED,
            PROTECTION_FLAG_SYSTEM_TEXT_CLASSIFIER,
            PROTECTION_FLAG_DOCUMENTER,
            PROTECTION_FLAG_CONFIGURATOR,
            PROTECTION_FLAG_INCIDENT_REPORT_APPROVER,
            PROTECTION_FLAG_APP_PREDICTOR,
@@ -561,9 +562,6 @@ public class PermissionInfo extends PackageItemInfo implements Parcelable {
        if ((level & PermissionInfo.PROTECTION_FLAG_SYSTEM_TEXT_CLASSIFIER) != 0) {
            protLevel.append("|textClassifier");
        }
        if ((level & PermissionInfo.PROTECTION_FLAG_DOCUMENTER) != 0) {
            protLevel.append("|documenter");
        }
        if ((level & PROTECTION_FLAG_CONFIGURATOR) != 0) {
            protLevel.append("|configurator");
        }
+3 −3
Original line number Diff line number Diff line
@@ -2576,7 +2576,7 @@
         third-party apps.
    -->
    <permission android:name="android.permission.MANAGE_DOCUMENTS"
        android:protectionLevel="signature|documenter" />
        android:protectionLevel="signature|role" />

    <!-- Allows an application to manage access to crates, usually as part
         of a crates picker.
@@ -2593,7 +2593,7 @@
         <p>Not for use by third-party applications.
    -->
    <permission android:name="android.permission.CACHE_CONTENT"
        android:protectionLevel="signature|documenter" />
        android:protectionLevel="signature|role" />

    <!-- @SystemApi @hide
         Allows an application to aggressively allocate disk space.
@@ -2740,7 +2740,7 @@

    <!-- @SystemApi @TestApi @hide Allows an application to change to remove/kill tasks -->
    <permission android:name="android.permission.REMOVE_TASKS"
        android:protectionLevel="signature|documenter|recents" />
        android:protectionLevel="signature|recents|role" />

    <!-- @deprecated Use MANAGE_ACTIVITY_TASKS instead.
         @SystemApi @TestApi @hide Allows an application to create/manage/remove stacks -->
+0 −3
Original line number Diff line number Diff line
@@ -285,9 +285,6 @@
        <!-- Additional flag from base permission type: this permission can be automatically
            granted to the system default text classifier -->
        <flag name="textClassifier" value="0x10000" />
        <!-- Additional flag from base permission type: this permission can be automatically
            granted to the document manager -->
        <flag name="documenter" value="0x40000" />
        <!-- Additional flag from base permission type: this permission automatically
            granted to device configurator -->
        <flag name="configurator" value="0x80000" />
+0 −1
Original line number Diff line number Diff line
@@ -69,7 +69,6 @@ public abstract class PackageManagerInternal {
            PACKAGE_BROWSER,
            PACKAGE_SYSTEM_TEXT_CLASSIFIER,
            PACKAGE_PERMISSION_CONTROLLER,
            PACKAGE_DOCUMENTER,
            PACKAGE_CONFIGURATOR,
            PACKAGE_INCIDENT_REPORT_APPROVER,
            PACKAGE_APP_PREDICTOR,
Loading