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

Commit 68ce6dc1 authored by Mahaver Chopra's avatar Mahaver Chopra Committed by Android (Google) Code Review
Browse files

Merge "Add ACTION_PROVISION_MANAGED_USER"

parents 29deb334 5e73256a
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -147,6 +147,14 @@ public class DevicePolicyManager {
    public static final String ACTION_PROVISION_MANAGED_PROFILE
        = "android.app.action.PROVISION_MANAGED_PROFILE";

    /**
     * @hide
     * TODO Add Documentation
     */
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
    public static final String ACTION_PROVISION_MANAGED_USER
        = "android.app.action.PROVISION_MANAGED_USER";

    /**
     * Activity action: Starts the provisioning flow which sets up a managed device.
     * Must be started with {@link android.app.Activity#startActivityForResult(Intent, int)}.
+5 −0
Original line number Diff line number Diff line
@@ -6676,6 +6676,11 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
                return false;
            }
            return true;
        } else if (DevicePolicyManager.ACTION_PROVISION_MANAGED_USER.equals(action)) {
            if (hasUserSetupCompleted(callingUserId)) {
                return false;
            }
            return true;
        }
        throw new IllegalArgumentException("Unknown provisioning action " + action);
    }