sys user split: update createUser method

After the system user is split out, all users are more or less the same.
We combine the generic user and secondary user create method to reflect
this concept.  This also fixes the bug the newly created Primary user
from lock screen contains secondary user restrictions.

Bug: 19913735
Change-Id: I407a877c11346409bad85e00038f6cfd3d126da3
This commit is contained in:
Xiaohui Chen
2015-07-16 14:31:41 -07:00
parent 33b17beb9d
commit 8ae4680977

View File

@@ -394,7 +394,7 @@ public class UserSettings extends SettingsPreferenceFragment
}
private UserInfo createLimitedUser() {
UserInfo newUserInfo = mUserManager.createSecondaryUser(
UserInfo newUserInfo = mUserManager.createUser(
getResources().getString(R.string.user_new_profile_name),
UserInfo.FLAG_RESTRICTED);
int userId = newUserInfo.id;
@@ -418,7 +418,7 @@ public class UserSettings extends SettingsPreferenceFragment
}
private UserInfo createTrustedUser() {
UserInfo newUserInfo = mUserManager.createSecondaryUser(
UserInfo newUserInfo = mUserManager.createUser(
getResources().getString(R.string.user_new_user_name), 0);
if (newUserInfo != null) {
assignDefaultPhoto(newUserInfo);