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

Commit 848b6d44 authored by Charles Chen's avatar Charles Chen Committed by Android (Google) Code Review
Browse files

Merge "Fix that WindowContext token is always null"

parents 97753051 bda14d04
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -60,12 +60,12 @@ public class WindowContext extends ContextWrapper {
        if (token != null && !isWindowToken(token)) {
        if (token != null && !isWindowToken(token)) {
            throw new IllegalArgumentException("Token must be registered to server.");
            throw new IllegalArgumentException("Token must be registered to server.");
        }
        }
        mToken = token != null ? token : new Binder();


        final ContextImpl contextImpl = createBaseWindowContext(base, token);
        final ContextImpl contextImpl = createBaseWindowContext(base, mToken);
        attachBaseContext(contextImpl);
        attachBaseContext(contextImpl);
        contextImpl.setOuterContext(this);
        contextImpl.setOuterContext(this);


        mToken = token != null ? token : new Binder();
        mDisplayId = getDisplayId();
        mDisplayId = getDisplayId();
        mWindowManager = new WindowManagerImpl(this);
        mWindowManager = new WindowManagerImpl(this);
        mWindowManager.setDefaultToken(mToken);
        mWindowManager.setDefaultToken(mToken);