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

Commit 173ce498 authored by tingna_sung's avatar tingna_sung Committed by Steve Kondik
Browse files

Sync focus stack frame and layer with focus app.



Update focus stack frame/layer when focus app is changed to avoid
focus stack/layer isn't updated synchronously with focus app, it's
due to performLayoutAndPlaceSurfacesLocked() is not necessarily
called on focus app change; it will cause sending mismatching
TAP_OUTSIDE_STACK message if there is effectual incoming pointer
event, hence may also result in focus stack is changed again,
therefore erroneous focus app is set by ActivityManager at final.

Change-Id: Ia0ec9a543be887b51a3b29b3e62fdd471c15edf2
Signed-off-by: default avatartingna_sung <tingna_sung@htc.com>
parent 7dbf5dd2
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -4011,6 +4011,15 @@ public class WindowManagerService extends IWindowManager.Stub
            if (changed) {
                mFocusedApp = newFocus;
                mInputMonitor.setFocusedAppLw(newFocus);
                setFocusedStackFrame();
                if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG, ">>> OPEN TRANSACTION setFocusedApp");
                SurfaceControl.openTransaction();
                try {
                    setFocusedStackLayer();
                } finally {
                    SurfaceControl.closeTransaction();
                    if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG, ">>> CLOSE TRANSACTION setFocusedApp");
                }
            }

            if (moveFocusNow && changed) {