Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 824b959d authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "Explicitly specify current user everywhere home is started." into jb-mr1-dev

parents 4d0b5625 d888399a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4152,7 +4152,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            } catch (ActivityNotFoundException e) {
            }
        }
        mContext.startActivity(mHomeIntent);
        mContext.startActivityAsUser(mHomeIntent, UserHandle.CURRENT);
    }
    
    /**
+1 −1
Original line number Diff line number Diff line
@@ -463,7 +463,7 @@ class UiModeManagerService extends IUiModeManager.Stub {

                if (homeIntent != null) {
                    try {
                        mContext.startActivity(homeIntent);
                        mContext.startActivityAsUser(homeIntent, UserHandle.CURRENT);
                    } catch (ActivityNotFoundException e) {
                    }
                }
+2 −11
Original line number Diff line number Diff line
@@ -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;
            }
        }
        return mMainStack.startActivityMayWait(caller, -1, intent, resolvedType,
                resultTo, resultWho, requestCode, startFlags, profileFile, profileFd,
                null, null, options, userId);