diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index cdbf8b44140a1..b72725ad2c32d 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -3165,11 +3165,8 @@ public final class ViewRootImpl implements ViewParent, // possible that checking the most recent value is actually more // correct here. if (!mStopped || wasReportNextDraw) { - boolean focusChangedDueToTouchMode = ensureTouchModeLocally( - (relayoutResult&WindowManagerGlobal.RELAYOUT_RES_IN_TOUCH_MODE) != 0); - if (focusChangedDueToTouchMode || mWidth != host.getMeasuredWidth() - || mHeight != host.getMeasuredHeight() || dispatchApplyInsets || - updatedConfiguration) { + if (mWidth != host.getMeasuredWidth() || mHeight != host.getMeasuredHeight() + || dispatchApplyInsets || updatedConfiguration) { int childWidthMeasureSpec = getRootMeasureSpec(mWidth, lp.width, lp.privateFlags); int childHeightMeasureSpec = getRootMeasureSpec(mHeight, lp.height, diff --git a/core/java/android/view/WindowManagerGlobal.java b/core/java/android/view/WindowManagerGlobal.java index 2dc5fbd5439f3..b0da877bfddd9 100644 --- a/core/java/android/view/WindowManagerGlobal.java +++ b/core/java/android/view/WindowManagerGlobal.java @@ -59,48 +59,42 @@ public final class WindowManagerGlobal { private static boolean sUseBLASTAdapter = false; - /** - * The user is navigating with keys (not the touch screen), so - * navigational focus should be shown. - */ - public static final int RELAYOUT_RES_IN_TOUCH_MODE = 0x1; - /** * This is the first time the window is being drawn, * so the client must call drawingFinished() when done */ - public static final int RELAYOUT_RES_FIRST_TIME = 0x2; + public static final int RELAYOUT_RES_FIRST_TIME = 1; /** * The window manager has changed the surface from the last call. */ - public static final int RELAYOUT_RES_SURFACE_CHANGED = 0x4; + public static final int RELAYOUT_RES_SURFACE_CHANGED = 1 << 1; /** * The window is being resized by dragging on the docked divider. The client should render * at (0, 0) and extend its background to the background frame passed into * {@link IWindow#resized}. */ - public static final int RELAYOUT_RES_DRAG_RESIZING_DOCKED = 0x8; + public static final int RELAYOUT_RES_DRAG_RESIZING_DOCKED = 1 << 2; /** * The window is being resized by dragging one of the window corners, * in this case the surface would be fullscreen-sized. The client should * render to the actual frame location (instead of (0,curScrollY)). */ - public static final int RELAYOUT_RES_DRAG_RESIZING_FREEFORM = 0x10; + public static final int RELAYOUT_RES_DRAG_RESIZING_FREEFORM = 1 << 3; /** * The window manager has changed the size of the surface from the last call. */ - public static final int RELAYOUT_RES_SURFACE_RESIZED = 0x20; + public static final int RELAYOUT_RES_SURFACE_RESIZED = 1 << 4; /** * In multi-window we force show the system bars. Because we don't want that the surface size * changes in this mode, we instead have a flag whether the system bar sizes should always be * consumed, so the app is treated like there is no virtual system bars at all. */ - public static final int RELAYOUT_RES_CONSUME_ALWAYS_SYSTEM_BARS = 0x40; + public static final int RELAYOUT_RES_CONSUME_ALWAYS_SYSTEM_BARS = 1 << 5; /** * This flag indicates the client should not directly submit it's next frame, @@ -108,7 +102,7 @@ public final class WindowManagerGlobal { * {@link WindowManagerService#finishDrawing}. This is used by the WM * BLASTSyncEngine to synchronize rendering of multiple windows. */ - public static final int RELAYOUT_RES_BLAST_SYNC = 0x80; + public static final int RELAYOUT_RES_BLAST_SYNC = 1 << 6; /** * Flag for relayout: the client will be later giving diff --git a/core/java/android/view/WindowlessWindowManager.java b/core/java/android/view/WindowlessWindowManager.java index ad151df055796..06588b2cbb6d0 100644 --- a/core/java/android/view/WindowlessWindowManager.java +++ b/core/java/android/view/WindowlessWindowManager.java @@ -332,8 +332,7 @@ public class WindowlessWindowManager implements IWindowSession { outInsetsState.set(mInsetsState); } - // Include whether the window is in touch mode. - return isInTouchMode() ? WindowManagerGlobal.RELAYOUT_RES_IN_TOUCH_MODE : 0; + return 0; } @Override diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index d5f7a22a3d2be..ad4488fd386bf 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -2503,8 +2503,6 @@ public class WindowManagerService extends IWindowManager.Stub ProtoLog.v(WM_DEBUG_FOCUS, "Relayout of %s: focusMayChange=%b", win, focusMayChange); - result |= mInTouchMode ? WindowManagerGlobal.RELAYOUT_RES_IN_TOUCH_MODE : 0; - if (DEBUG_LAYOUT) { Slog.v(TAG_WM, "Relayout complete " + win + ": outFrames=" + outFrames); }