Example usage for android.content.pm UserInfo FLAG_DISABLED

List of usage examples for android.content.pm UserInfo FLAG_DISABLED

Introduction

In this page you can find the example usage for android.content.pm UserInfo FLAG_DISABLED.

Prototype

int FLAG_DISABLED

To view the source code for android.content.pm UserInfo FLAG_DISABLED.

Click Source Link

Document

Indicates that this user is disabled.

Usage

From source file:com.android.managedprovisioning.ProfileOwnerProvisioningService.java

private void createProfile(String profileName) throws ProvisioningException {

    ProvisionLogger.logd("Creating managed profile with name " + profileName);

    mManagedProfileOrUserInfo = mUserManager.createProfileForUser(profileName,
            UserInfo.FLAG_MANAGED_PROFILE | UserInfo.FLAG_DISABLED, Process.myUserHandle().getIdentifier());

    if (mManagedProfileOrUserInfo == null) {
        throw raiseError("Couldn't create profile.");
    }/*from   www .  jav a2s  . co  m*/
}