Loading services/core/java/com/android/server/wm/WindowState.java +12 −4 Original line number Diff line number Diff line Loading @@ -645,15 +645,23 @@ final class WindowState implements WindowManagerPolicy.WindowState { final boolean fullscreenTask = !inMultiWindowMode(); final boolean windowsAreFloating = task != null && task.isFloating(); if (fullscreenTask || (isChildWindow() && (mAttrs.privateFlags & PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME) != 0)) { // If the task has temp inset bounds set, we have to make sure all its windows uses // the temp inset frame. Otherwise different display frames get applied to the main // window and the child window, making them misaligned. if (fullscreenTask) { mInsetFrame.setEmpty(); } else { task.getTempInsetBounds(mInsetFrame); } if (mInsetFrame.isEmpty() && (fullscreenTask || (isChildWindow() && (mAttrs.privateFlags & PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME) != 0))) { // We use the parent frame as the containing frame for fullscreen and child windows mContainingFrame.set(pf); mDisplayFrame.set(df); mInsetFrame.setEmpty(); } else { task.getBounds(mContainingFrame); task.getTempInsetBounds(mInsetFrame); if (mAppToken != null && !mAppToken.mFrozenBounds.isEmpty()) { // If the bounds are frozen, we still want to translate the window freely and only Loading services/core/java/com/android/server/wm/WindowStateAnimator.java +0 −2 Original line number Diff line number Diff line Loading @@ -711,8 +711,6 @@ class WindowStateAnimator { // Start a new transaction and apply position & offset. final int layerStack = w.getDisplayContent().getDisplay().getLayerStack(); if (SHOW_TRANSACTIONS) WindowManagerService.logSurface(w, "POS " + mTmpSize.left + ", " + mTmpSize.top, false); mSurfaceController.setPositionAndLayer(mTmpSize.left, mTmpSize.top, layerStack, mAnimLayer); mLastHidden = true; Loading services/core/java/com/android/server/wm/WindowSurfaceController.java +5 −0 Original line number Diff line number Diff line Loading @@ -119,6 +119,8 @@ class WindowSurfaceController { mSurfaceY = top; try { if (SHOW_TRANSACTIONS) logSurface( "POS (setPositionAndLayer) @ (" + left + "," + top + ")", null); mSurfaceControl.setPosition(left, top); mSurfaceControl.setLayerStack(layerStack); Loading Loading @@ -205,6 +207,9 @@ class WindowSurfaceController { mSurfaceY = top; try { if (SHOW_TRANSACTIONS) logSurface( "POS (setPositionInTransaction) @ (" + left + "," + top + ")", null); mSurfaceControl.setPosition(left, top); } catch (RuntimeException e) { Slog.w(TAG, "Error positioning surface of " + this Loading Loading
services/core/java/com/android/server/wm/WindowState.java +12 −4 Original line number Diff line number Diff line Loading @@ -645,15 +645,23 @@ final class WindowState implements WindowManagerPolicy.WindowState { final boolean fullscreenTask = !inMultiWindowMode(); final boolean windowsAreFloating = task != null && task.isFloating(); if (fullscreenTask || (isChildWindow() && (mAttrs.privateFlags & PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME) != 0)) { // If the task has temp inset bounds set, we have to make sure all its windows uses // the temp inset frame. Otherwise different display frames get applied to the main // window and the child window, making them misaligned. if (fullscreenTask) { mInsetFrame.setEmpty(); } else { task.getTempInsetBounds(mInsetFrame); } if (mInsetFrame.isEmpty() && (fullscreenTask || (isChildWindow() && (mAttrs.privateFlags & PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME) != 0))) { // We use the parent frame as the containing frame for fullscreen and child windows mContainingFrame.set(pf); mDisplayFrame.set(df); mInsetFrame.setEmpty(); } else { task.getBounds(mContainingFrame); task.getTempInsetBounds(mInsetFrame); if (mAppToken != null && !mAppToken.mFrozenBounds.isEmpty()) { // If the bounds are frozen, we still want to translate the window freely and only Loading
services/core/java/com/android/server/wm/WindowStateAnimator.java +0 −2 Original line number Diff line number Diff line Loading @@ -711,8 +711,6 @@ class WindowStateAnimator { // Start a new transaction and apply position & offset. final int layerStack = w.getDisplayContent().getDisplay().getLayerStack(); if (SHOW_TRANSACTIONS) WindowManagerService.logSurface(w, "POS " + mTmpSize.left + ", " + mTmpSize.top, false); mSurfaceController.setPositionAndLayer(mTmpSize.left, mTmpSize.top, layerStack, mAnimLayer); mLastHidden = true; Loading
services/core/java/com/android/server/wm/WindowSurfaceController.java +5 −0 Original line number Diff line number Diff line Loading @@ -119,6 +119,8 @@ class WindowSurfaceController { mSurfaceY = top; try { if (SHOW_TRANSACTIONS) logSurface( "POS (setPositionAndLayer) @ (" + left + "," + top + ")", null); mSurfaceControl.setPosition(left, top); mSurfaceControl.setLayerStack(layerStack); Loading Loading @@ -205,6 +207,9 @@ class WindowSurfaceController { mSurfaceY = top; try { if (SHOW_TRANSACTIONS) logSurface( "POS (setPositionInTransaction) @ (" + left + "," + top + ")", null); mSurfaceControl.setPosition(left, top); } catch (RuntimeException e) { Slog.w(TAG, "Error positioning surface of " + this Loading