Cleanup USER_OWNER in Settings

This cl updates a couple places related to managed profiles.

Bug: 19913735
Change-Id: I72b5315885fc34d8716339ecc18447c15867a5ac
This commit is contained in:
Xiaohui Chen
2015-09-01 10:26:53 -07:00
parent b600e38d48
commit 762104ea5d
2 changed files with 8 additions and 5 deletions

View File

@@ -781,7 +781,8 @@ public class RunningState {
mPm = mApplicationContext.getPackageManager();
mUm = (UserManager)mApplicationContext.getSystemService(Context.USER_SERVICE);
mMyUserId = UserHandle.myUserId();
mHideManagedProfiles = mMyUserId != UserHandle.USER_OWNER;
UserInfo userInfo = mUm.getUserInfo(mMyUserId);
mHideManagedProfiles = userInfo == null || !userInfo.canHaveProfile();
mResumed = false;
mBackgroundThread = new HandlerThread("RunningState:Background");
mBackgroundThread.start();