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

Commit 21b37a5f authored by Filip Gruszczynski's avatar Filip Gruszczynski Committed by Gerrit Code Review
Browse files

Merge "Make accessing mInputMethodTarget thread-safe"

parents f518ad0a 82c700f5
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -6192,10 +6192,13 @@ public class WindowManagerService extends IWindowManager.Stub
        int retryCount = 0;
        WindowState appWin = null;

        final boolean appIsImTarget = mInputMethodTarget != null
        boolean appIsImTarget;
        synchronized(mWindowMap) {
            appIsImTarget = mInputMethodTarget != null
                    && mInputMethodTarget.mAppToken != null
                    && mInputMethodTarget.mAppToken.appToken != null
                    && mInputMethodTarget.mAppToken.appToken.asBinder() == appToken;
        }

        final int aboveAppLayer = (mPolicy.windowTypeToLayerLw(TYPE_APPLICATION) + 1)
                * TYPE_LAYER_MULTIPLIER + TYPE_LAYER_OFFSET;