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

Commit 5e73256a authored by Mahaver Chopra's avatar Mahaver Chopra
Browse files

Add ACTION_PROVISION_MANAGED_USER

Adding ACTION_PROVISION_MANAGED_USER to DevicePolicyManager.

Bug: 25462684
Change-Id: Ic90c3471f3a9c431d728197a19ab25b9946f090a
parent 42817202
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);
    }