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

Commit d888399a authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Explicitly specify current user everywhere home is started.

Change-Id: I58d86136de7f9cef1eaf72793d0e200b852d7355
parent 72018294
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);