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

Commit 3652c0a4 authored by Danny Baumann's avatar Danny Baumann
Browse files

Fix dock intent lookup.

PackageManagerService doesn't support UserHandle.USER_CURRENT passed in,
so always pass in the real user ID.

Change-Id: I86ed3cc41ee52628da874500d280f722501233cf
parent a3186e56
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -324,6 +324,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
    int mDeviceHardwareKeys;
    boolean mHasMenuKeyEnabled;

    int mCurrentUser = 0;

    // The last window we were told about in focusChanged.
    WindowState mFocusedWindow;
    IApplicationToken mFocusedApp;
@@ -5296,8 +5298,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        ActivityInfo ai = null;
        ResolveInfo info = mContext.getPackageManager().resolveActivityAsUser(
                intent,
                PackageManager.MATCH_DEFAULT_ONLY,
                UserHandle.USER_CURRENT);
                PackageManager.MATCH_DEFAULT_ONLY | PackageManager.GET_META_DATA,
                mCurrentUser);
        if (info != null) {
            ai = info.activityInfo;
        }
@@ -5545,6 +5547,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            }
        }
        setLastInputMethodWindowLw(null, null);
        mCurrentUser = newUserId;
    }

    @Override