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: tingna_sung <tingna_sung@htc.com>
This commit is contained in:
@@ -4000,6 +4000,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) {
|
||||
|
||||
Reference in New Issue
Block a user