Merge "Explicitly specify current user everywhere home is started." into jb-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
824b959dfc
@@ -4152,7 +4152,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
} catch (ActivityNotFoundException e) {
|
||||
}
|
||||
}
|
||||
mContext.startActivity(mHomeIntent);
|
||||
mContext.startActivityAsUser(mHomeIntent, UserHandle.CURRENT);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -463,7 +463,7 @@ class UiModeManagerService extends IUiModeManager.Stub {
|
||||
|
||||
if (homeIntent != null) {
|
||||
try {
|
||||
mContext.startActivity(homeIntent);
|
||||
mContext.startActivityAsUser(homeIntent, UserHandle.CURRENT);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2392,17 +2392,8 @@ public final class ActivityManagerService extends ActivityManagerNative
|
||||
String resultWho, int requestCode, int startFlags,
|
||||
String profileFile, ParcelFileDescriptor profileFd, Bundle options, int userId) {
|
||||
enforceNotIsolatedCaller("startActivity");
|
||||
if (userId != UserHandle.getCallingUserId()) {
|
||||
userId = handleIncomingUserLocked(Binder.getCallingPid(), Binder.getCallingUid(), userId,
|
||||
false, true, "startActivity", null);
|
||||
} else {
|
||||
if (intent.getCategories() != null
|
||||
&& intent.getCategories().contains(Intent.CATEGORY_HOME)) {
|
||||
// Requesting home, set the identity to the current user
|
||||
// HACK!
|
||||
userId = mCurrentUserId;
|
||||
}
|
||||
}
|
||||
userId = handleIncomingUserLocked(Binder.getCallingPid(), Binder.getCallingUid(), userId,
|
||||
false, true, "startActivity", null);
|
||||
return mMainStack.startActivityMayWait(caller, -1, intent, resolvedType,
|
||||
resultTo, resultWho, requestCode, startFlags, profileFile, profileFd,
|
||||
null, null, options, userId);
|
||||
|
||||
Reference in New Issue
Block a user