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

Commit 129a0b0c authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

Remove dual storage permission model

- Also remove typed media permissions
- Leave typed media app-ops

Bug: 129716569
Test: Used apps, looked at permissions in the UI
Change-Id: If7714fb1a6955584157e1a60ab72b09e35287827
parent afebeabb
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -106,12 +106,9 @@ package android {
    field public static final String READ_CALENDAR = "android.permission.READ_CALENDAR";
    field public static final String READ_CALL_LOG = "android.permission.READ_CALL_LOG";
    field public static final String READ_CONTACTS = "android.permission.READ_CONTACTS";
    field @Deprecated public static final String READ_EXTERNAL_STORAGE = "android.permission.READ_EXTERNAL_STORAGE";
    field public static final String READ_EXTERNAL_STORAGE = "android.permission.READ_EXTERNAL_STORAGE";
    field @Deprecated public static final String READ_INPUT_STATE = "android.permission.READ_INPUT_STATE";
    field public static final String READ_LOGS = "android.permission.READ_LOGS";
    field public static final String READ_MEDIA_AUDIO = "android.permission.READ_MEDIA_AUDIO";
    field public static final String READ_MEDIA_IMAGES = "android.permission.READ_MEDIA_IMAGES";
    field public static final String READ_MEDIA_VIDEO = "android.permission.READ_MEDIA_VIDEO";
    field public static final String READ_PHONE_NUMBERS = "android.permission.READ_PHONE_NUMBERS";
    field public static final String READ_PHONE_STATE = "android.permission.READ_PHONE_STATE";
    field public static final String READ_SMS = "android.permission.READ_SMS";
@@ -161,7 +158,7 @@ package android {
    field public static final String WRITE_CALENDAR = "android.permission.WRITE_CALENDAR";
    field public static final String WRITE_CALL_LOG = "android.permission.WRITE_CALL_LOG";
    field public static final String WRITE_CONTACTS = "android.permission.WRITE_CONTACTS";
    field @Deprecated public static final String WRITE_EXTERNAL_STORAGE = "android.permission.WRITE_EXTERNAL_STORAGE";
    field public static final String WRITE_EXTERNAL_STORAGE = "android.permission.WRITE_EXTERNAL_STORAGE";
    field public static final String WRITE_GSERVICES = "android.permission.WRITE_GSERVICES";
    field public static final String WRITE_SECURE_SETTINGS = "android.permission.WRITE_SECURE_SETTINGS";
    field public static final String WRITE_SETTINGS = "android.permission.WRITE_SETTINGS";
@@ -177,13 +174,11 @@ package android {
    field public static final String CAMERA = "android.permission-group.CAMERA";
    field public static final String CONTACTS = "android.permission-group.CONTACTS";
    field public static final String LOCATION = "android.permission-group.LOCATION";
    field public static final String MEDIA_AURAL = "android.permission-group.MEDIA_AURAL";
    field public static final String MEDIA_VISUAL = "android.permission-group.MEDIA_VISUAL";
    field public static final String MICROPHONE = "android.permission-group.MICROPHONE";
    field public static final String PHONE = "android.permission-group.PHONE";
    field public static final String SENSORS = "android.permission-group.SENSORS";
    field public static final String SMS = "android.permission-group.SMS";
    field @Deprecated public static final String STORAGE = "android.permission-group.STORAGE";
    field public static final String STORAGE = "android.permission-group.STORAGE";
  }
  public final class R {
+1 −2
Original line number Diff line number Diff line
@@ -1638,7 +1638,6 @@ package android.content.pm {
    field public static final String FEATURE_BROADCAST_RADIO = "android.hardware.broadcastradio";
    field public static final String FEATURE_TELEPHONY_CARRIERLOCK = "android.hardware.telephony.carrierlock";
    field public static final int FLAG_PERMISSION_GRANTED_BY_DEFAULT = 32; // 0x20
    field public static final int FLAG_PERMISSION_HIDDEN = 1024; // 0x400
    field public static final int FLAG_PERMISSION_POLICY_FIXED = 4; // 0x4
    field public static final int FLAG_PERMISSION_REVIEW_REQUIRED = 64; // 0x40
    field public static final int FLAG_PERMISSION_REVOKE_ON_UPGRADE = 8; // 0x8
@@ -1709,7 +1708,7 @@ package android.content.pm {
    method public void onPermissionsChanged(int);
  }
  @IntDef(prefix={"FLAG_PERMISSION_"}, value={android.content.pm.PackageManager.FLAG_PERMISSION_USER_SET, android.content.pm.PackageManager.FLAG_PERMISSION_USER_FIXED, android.content.pm.PackageManager.FLAG_PERMISSION_POLICY_FIXED, android.content.pm.PackageManager.FLAG_PERMISSION_REVOKE_ON_UPGRADE, android.content.pm.PackageManager.FLAG_PERMISSION_SYSTEM_FIXED, android.content.pm.PackageManager.FLAG_PERMISSION_GRANTED_BY_DEFAULT, android.content.pm.PackageManager.FLAG_PERMISSION_USER_SENSITIVE_WHEN_GRANTED, android.content.pm.PackageManager.FLAG_PERMISSION_USER_SENSITIVE_WHEN_DENIED, android.content.pm.PackageManager.FLAG_PERMISSION_HIDDEN}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface PackageManager.PermissionFlags {
  @IntDef(prefix={"FLAG_PERMISSION_"}, value={android.content.pm.PackageManager.FLAG_PERMISSION_USER_SET, android.content.pm.PackageManager.FLAG_PERMISSION_USER_FIXED, android.content.pm.PackageManager.FLAG_PERMISSION_POLICY_FIXED, android.content.pm.PackageManager.FLAG_PERMISSION_REVOKE_ON_UPGRADE, android.content.pm.PackageManager.FLAG_PERMISSION_SYSTEM_FIXED, android.content.pm.PackageManager.FLAG_PERMISSION_GRANTED_BY_DEFAULT, android.content.pm.PackageManager.FLAG_PERMISSION_USER_SENSITIVE_WHEN_GRANTED, android.content.pm.PackageManager.FLAG_PERMISSION_USER_SENSITIVE_WHEN_DENIED}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface PackageManager.PermissionFlags {
  }
  public class PermissionGroupInfo extends android.content.pm.PackageItemInfo implements android.os.Parcelable {
+0 −1
Original line number Diff line number Diff line
@@ -679,7 +679,6 @@ package android.content.pm {
    method @RequiresPermission(anyOf={"android.permission.GRANT_RUNTIME_PERMISSIONS", "android.permission.REVOKE_RUNTIME_PERMISSIONS"}) public abstract void updatePermissionFlags(@NonNull String, @NonNull String, int, int, @NonNull android.os.UserHandle);
    field public static final String FEATURE_ADOPTABLE_STORAGE = "android.software.adoptable_storage";
    field public static final String FEATURE_FILE_BASED_ENCRYPTION = "android.software.file_based_encryption";
    field public static final int FLAG_PERMISSION_HIDDEN = 1024; // 0x400
    field public static final int FLAG_PERMISSION_POLICY_FIXED = 4; // 0x4
    field public static final int FLAG_PERMISSION_REVIEW_REQUIRED = 64; // 0x40
    field public static final int FLAG_PERMISSION_REVOKE_ON_UPGRADE = 8; // 0x8
+3 −3
Original line number Diff line number Diff line
@@ -1543,11 +1543,11 @@ public class AppOpsManager {
            Manifest.permission.USE_BIOMETRIC,
            Manifest.permission.ACTIVITY_RECOGNITION,
            Manifest.permission.SMS_FINANCIAL_TRANSACTIONS,
            Manifest.permission.READ_MEDIA_AUDIO,
            null,
            null, // no permission for OP_WRITE_MEDIA_AUDIO
            Manifest.permission.READ_MEDIA_VIDEO,
            null,
            null, // no permission for OP_WRITE_MEDIA_VIDEO
            Manifest.permission.READ_MEDIA_IMAGES,
            null,
            null, // no permission for OP_WRITE_MEDIA_IMAGES
            null, // no permission for OP_LEGACY_STORAGE
            null, // no permission for OP_ACCESS_ACCESSIBILITY
+1 −12
Original line number Diff line number Diff line
@@ -3074,15 +3074,6 @@ public abstract class PackageManager {
    @SystemApi
    public static final int FLAG_PERMISSION_USER_SENSITIVE_WHEN_DENIED =  1 << 9;

    /**
     * Permission flag: The permission should not be shown in the UI.
     *
     * @hide
     */
    @SystemApi
    @TestApi
    public static final int FLAG_PERMISSION_HIDDEN =  1 << 10;

    /**
     * Mask for all permission flags present in Android P
     *
@@ -3101,7 +3092,7 @@ public abstract class PackageManager {
     *
     * @hide
     */
    public static final int MASK_PERMISSION_FLAGS_ALL = 0x7FF;
    public static final int MASK_PERMISSION_FLAGS_ALL = 0x3FF;

    /**
     * Injected activity in app that forwards user to setting activity of that app.
@@ -3830,7 +3821,6 @@ public abstract class PackageManager {
            FLAG_PERMISSION_GRANTED_BY_DEFAULT,
            FLAG_PERMISSION_USER_SENSITIVE_WHEN_GRANTED,
            FLAG_PERMISSION_USER_SENSITIVE_WHEN_DENIED,
            FLAG_PERMISSION_HIDDEN,
            /*
            FLAG_PERMISSION_REVOKE_WHEN_REQUESED
            */
@@ -6749,7 +6739,6 @@ public abstract class PackageManager {
            case FLAG_PERMISSION_REVOKE_WHEN_REQUESTED: return "REVOKE_WHEN_REQUESTED";
            case FLAG_PERMISSION_USER_SENSITIVE_WHEN_GRANTED: return "USER_SENSITIVE_WHEN_GRANTED";
            case FLAG_PERMISSION_USER_SENSITIVE_WHEN_DENIED: return "USER_SENSITIVE_WHEN_DENIED";
            case FLAG_PERMISSION_HIDDEN: return "HIDDEN";
            default: return Integer.toString(flag);
        }
    }
Loading