From c7c4dbb1475378eb3bc17819188b91a2ab1253bf Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Fri, 28 Oct 2016 14:33:32 -0700 Subject: [PATCH] Removing forced layout when the window is translated. Test: Manual, ensure that the accessibility focus is still visible on a moved window (enable talkback, focus a view, then move the window). Change-Id: Ifd67afe355cac2f1df01ddd16f960282f4d36132 --- core/java/android/view/ViewRootImpl.java | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 87b330d3fd7d3..5a6cf7dfaa239 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -19,7 +19,6 @@ package android.view; import static android.view.WindowCallbacks.RESIZE_MODE_DOCKED_DIVIDER; import static android.view.WindowCallbacks.RESIZE_MODE_FREEFORM; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY; -import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD; import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL; import static android.view.WindowManager.LayoutParams.TYPE_VOLUME_OVERLAY; @@ -3542,20 +3541,7 @@ public final class ViewRootImpl implements ViewParent, mWinFrame.bottom = t + h; mPendingBackDropFrame.set(mWinFrame); - - // Suppress layouts during resizing - a correct layout will happen when resizing - // is done, and this just increases system load. - boolean isDockedDivider = mWindowAttributes.type == TYPE_DOCK_DIVIDER; - boolean suppress = (mDragResizing && mResizeMode == RESIZE_MODE_DOCKED_DIVIDER) - || isDockedDivider; - if (!suppress) { - if (mView != null) { - forceLayout(mView); - } - requestLayout(); - } else { - maybeHandleWindowMove(mWinFrame); - } + maybeHandleWindowMove(mWinFrame); } break; case MSG_WINDOW_FOCUS_CHANGED: {