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

Commit cd953e93 authored by Chen Xu's avatar Chen Xu Committed by Gerrit Code Review
Browse files

Merge "add a new telephony protection level"

parents 8e999f22 da02e07b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1746,6 +1746,7 @@ package android.content.pm {
    field public static final int PROTECTION_FLAG_INCIDENT_REPORT_APPROVER = 1048576; // 0x100000
    field public static final int PROTECTION_FLAG_OEM = 16384; // 0x4000
    field public static final int PROTECTION_FLAG_SYSTEM_TEXT_CLASSIFIER = 65536; // 0x10000
    field public static final int PROTECTION_FLAG_TELEPHONY = 4194304; // 0x400000
    field public static final int PROTECTION_FLAG_WELLBEING = 131072; // 0x20000
    field @Nullable public final String backgroundPermission;
    field @StringRes public int requestRes;
+2 −0
Original line number Diff line number Diff line
@@ -707,6 +707,7 @@ package android.content.pm {
    method @RequiresPermission(anyOf={"android.permission.GRANT_RUNTIME_PERMISSIONS", "android.permission.REVOKE_RUNTIME_PERMISSIONS", "android.permission.GET_RUNTIME_PERMISSIONS"}) public abstract int getPermissionFlags(@NonNull String, @NonNull String, @NonNull android.os.UserHandle);
    method @NonNull public abstract String getServicesSystemSharedLibraryPackageName();
    method @NonNull public abstract String getSharedSystemSharedLibraryPackageName();
    method @Nullable public String[] getTelephonyPackageNames();
    method @Nullable public String getWellbeingPackageName();
    method @RequiresPermission("android.permission.GRANT_RUNTIME_PERMISSIONS") public abstract void grantRuntimePermission(@NonNull String, @NonNull String, @NonNull android.os.UserHandle);
    method @RequiresPermission("android.permission.REVOKE_RUNTIME_PERMISSIONS") public abstract void revokeRuntimePermission(@NonNull String, @NonNull String, @NonNull android.os.UserHandle);
@@ -739,6 +740,7 @@ package android.content.pm {
    field public static final int PROTECTION_FLAG_INCIDENT_REPORT_APPROVER = 1048576; // 0x100000
    field public static final int PROTECTION_FLAG_OEM = 16384; // 0x4000
    field public static final int PROTECTION_FLAG_SYSTEM_TEXT_CLASSIFIER = 65536; // 0x10000
    field public static final int PROTECTION_FLAG_TELEPHONY = 4194304; // 0x400000
    field public static final int PROTECTION_FLAG_VENDOR_PRIVILEGED = 32768; // 0x8000
    field public static final int PROTECTION_FLAG_WELLBEING = 131072; // 0x20000
    field @Nullable public final String backgroundPermission;
+9 −0
Original line number Diff line number Diff line
@@ -3120,6 +3120,15 @@ public class ApplicationPackageManager extends PackageManager {
        }
    }

    @Override
    public String[] getTelephonyPackageNames() {
        try {
            return mPM.getTelephonyPackageNames();
        } catch (RemoteException e) {
            throw e.rethrowAsRuntimeException();
        }
    }

    @Override
    public String getSystemCaptionsServicePackageName() {
        try {
+2 −0
Original line number Diff line number Diff line
@@ -753,6 +753,8 @@ interface IPackageManager {

    String getWellbeingPackageName();

    String[] getTelephonyPackageNames();

    String getAppPredictionServicePackageName();

    String getSystemCaptionsServicePackageName();
+12 −0
Original line number Diff line number Diff line
@@ -7367,6 +7367,18 @@ public abstract class PackageManager {
            "getAppPredictionServicePackageName not implemented in subclass");
    }

    /**
     * @return the system defined telephony package names, or null if there's none.
     *
     * @hide
     */
    @Nullable
    @TestApi
    public String[] getTelephonyPackageNames() {
        throw new UnsupportedOperationException(
                "getTelephonyPackageNames not implemented in subclass");
    }

    /**
     * @return the system defined content capture service package name, or null if there's none.
     *
Loading