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

Commit 8142ee3e authored by Michael Groover's avatar Michael Groover Committed by Android (Google) Code Review
Browse files

Merge "Make DPM#checkDeviceIdentifierAccess a SystemApi"

parents 8a9e2a5e d4de2c34
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -777,6 +777,7 @@ package android.app.admin {
    method @Nullable public android.content.ComponentName getProfileOwner() throws java.lang.IllegalArgumentException;
    method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public String getProfileOwnerNameAsUser(int) throws java.lang.IllegalArgumentException;
    method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public int getUserProvisioningState();
    method public boolean hasDeviceIdentifierAccess(@NonNull String, int, int);
    method public boolean isDeviceManaged();
    method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public boolean isDeviceProvisioned();
    method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public boolean isDeviceProvisioningConfigApplied();
+3 −2
Original line number Diff line number Diff line
@@ -6764,8 +6764,9 @@ public class DevicePolicyManager {
     *
     * @hide
     */
    public boolean checkDeviceIdentifierAccess(String packageName, int pid, int uid) {
        throwIfParentInstance("checkDeviceIdentifierAccess");
    @SystemApi
    public boolean hasDeviceIdentifierAccess(@NonNull String packageName, int pid, int uid) {
        throwIfParentInstance("hasDeviceIdentifierAccess");
        if (packageName == null) {
            return false;
        }
+1 −1
Original line number Diff line number Diff line
@@ -344,7 +344,7 @@ public final class TelephonyPermissions {
            DevicePolicyManager devicePolicyManager =
                    (DevicePolicyManager) context.getSystemService(
                            Context.DEVICE_POLICY_SERVICE);
            if (devicePolicyManager != null && devicePolicyManager.checkDeviceIdentifierAccess(
            if (devicePolicyManager != null && devicePolicyManager.hasDeviceIdentifierAccess(
                    callingPackage, pid, uid)) {
                return true;
            }