Example usage for android.content.pm UserInfo FLAG_MANAGED_PROFILE

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

Introduction

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

Prototype

int FLAG_MANAGED_PROFILE

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

Click Source Link

Document

Indicates that this user is a profile of another user, for example holding a users corporate data.

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.");
    }/*  w  w w  . j  a v  a  2  s  .c o m*/
}