Loading core/java/android/view/ViewRootImpl.java +2 −1 Original line number Diff line number Diff line Loading @@ -1724,6 +1724,7 @@ public final class ViewRootImpl implements ViewParent, final int surfaceGenerationId = mSurface.getGenerationId(); final boolean isViewVisible = viewVisibility == View.VISIBLE; final boolean windowRelayoutWasForced = mForceNextWindowRelayout; if (mFirst || windowShouldResize || insetsChanged || viewVisibilityChanged || params != null || mForceNextWindowRelayout) { mForceNextWindowRelayout = false; Loading Loading @@ -1888,7 +1889,7 @@ public final class ViewRootImpl implements ViewParent, mAttachInfo.mThreadedRenderer.destroy(); } } else if ((surfaceGenerationId != mSurface.getGenerationId() || surfaceSizeChanged) || surfaceSizeChanged || windowRelayoutWasForced) && mSurfaceHolder == null && mAttachInfo.mThreadedRenderer != null) { mFullRedrawNeeded = true; Loading services/core/java/com/android/server/wm/WindowManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -4236,7 +4236,7 @@ public class WindowManagerService extends IWindowManager.Stub mRoot.mOrientationChangeComplete = false; w.mLastFreezeDuration = 0; } w.mReportOrientationChanged = true; }, true /* traverseTopToBottom */); if (rotateSeamlessly) { Loading services/core/java/com/android/server/wm/WindowState.java +20 −7 Original line number Diff line number Diff line Loading @@ -430,6 +430,11 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP */ int mLastVisibleLayoutRotation = -1; /** * Set when we need to report the orientation change to client to trigger a relayout. */ boolean mReportOrientationChanged; /** * How long we last kept the screen frozen. */ Loading Loading @@ -1095,7 +1100,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP || mFrameSizeChanged || configChanged || dragResizingChanged || !isResizedWhileNotDragResizingReported()) { || !isResizedWhileNotDragResizingReported() || mReportOrientationChanged) { if (DEBUG_RESIZE || DEBUG_ORIENTATION) { Slog.v(TAG_WM, "Resize reasons for w=" + this + ": " + " contentInsetsChanged=" + mContentInsetsChanged Loading @@ -1110,7 +1116,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP + " configChanged=" + configChanged + " dragResizingChanged=" + dragResizingChanged + " resizedWhileNotDragResizingReported=" + isResizedWhileNotDragResizingReported()); + isResizedWhileNotDragResizingReported() + " reportOrientationChanged=" + mReportOrientationChanged); } // If it's a dead window left on screen, and the configuration changed, there is nothing Loading Loading @@ -3006,6 +3013,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP final Rect stableInsets = mLastStableInsets; final Rect outsets = mLastOutsets; final boolean reportDraw = mWinAnimator.mDrawState == DRAW_PENDING; final boolean reportOrientation = mReportOrientationChanged; if (mAttrs.type != WindowManager.LayoutParams.TYPE_APPLICATION_STARTING && mClient instanceof IWindow.Stub) { // To prevent deadlock simulate one-way call if win.mClient is a local object. Loading @@ -3014,7 +3022,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP public void run() { try { dispatchResized(frame, overscanInsets, contentInsets, visibleInsets, stableInsets, outsets, reportDraw, newConfig); stableInsets, outsets, reportDraw, newConfig, reportOrientation); } catch (RemoteException e) { // Not a remote call, RemoteException won't be raised. } Loading @@ -3022,7 +3031,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP }); } else { dispatchResized(frame, overscanInsets, contentInsets, visibleInsets, stableInsets, outsets, reportDraw, newConfig); outsets, reportDraw, newConfig, reportOrientation); } //TODO (multidisplay): Accessibility supported only for the default display. Loading @@ -3038,6 +3047,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP mFrameSizeChanged = false; mResizedWhileNotDragResizingReported = true; mWinAnimator.mSurfaceResized = false; mReportOrientationChanged = false; } catch (RemoteException e) { mOrientationChanging = false; mLastFreezeDuration = (int)(SystemClock.elapsedRealtime() Loading Loading @@ -3078,8 +3088,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP private void dispatchResized(Rect frame, Rect overscanInsets, Rect contentInsets, Rect visibleInsets, Rect stableInsets, Rect outsets, boolean reportDraw, Configuration newConfig) throws RemoteException { final boolean forceRelayout = isDragResizeChanged() || mResizedWhileNotDragResizing; Configuration newConfig, boolean reportOrientation) throws RemoteException { final boolean forceRelayout = isDragResizeChanged() || mResizedWhileNotDragResizing || reportOrientation; mClient.resized(frame, overscanInsets, contentInsets, visibleInsets, stableInsets, outsets, reportDraw, newConfig, getBackdropFrame(frame), Loading Loading @@ -3372,11 +3383,13 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP pw.print(" mDestroying="); pw.print(mDestroying); pw.print(" mRemoved="); pw.println(mRemoved); } if (mOrientationChanging || mAppFreezing || mTurnOnScreen) { if (mOrientationChanging || mAppFreezing || mTurnOnScreen || mReportOrientationChanged) { pw.print(prefix); pw.print("mOrientationChanging="); pw.print(mOrientationChanging); pw.print(" mAppFreezing="); pw.print(mAppFreezing); pw.print(" mTurnOnScreen="); pw.println(mTurnOnScreen); pw.print(" mReportOrientationChanged="); pw.println(mReportOrientationChanged); } if (mLastFreezeDuration != 0) { pw.print(prefix); pw.print("mLastFreezeDuration="); Loading Loading
core/java/android/view/ViewRootImpl.java +2 −1 Original line number Diff line number Diff line Loading @@ -1724,6 +1724,7 @@ public final class ViewRootImpl implements ViewParent, final int surfaceGenerationId = mSurface.getGenerationId(); final boolean isViewVisible = viewVisibility == View.VISIBLE; final boolean windowRelayoutWasForced = mForceNextWindowRelayout; if (mFirst || windowShouldResize || insetsChanged || viewVisibilityChanged || params != null || mForceNextWindowRelayout) { mForceNextWindowRelayout = false; Loading Loading @@ -1888,7 +1889,7 @@ public final class ViewRootImpl implements ViewParent, mAttachInfo.mThreadedRenderer.destroy(); } } else if ((surfaceGenerationId != mSurface.getGenerationId() || surfaceSizeChanged) || surfaceSizeChanged || windowRelayoutWasForced) && mSurfaceHolder == null && mAttachInfo.mThreadedRenderer != null) { mFullRedrawNeeded = true; Loading
services/core/java/com/android/server/wm/WindowManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -4236,7 +4236,7 @@ public class WindowManagerService extends IWindowManager.Stub mRoot.mOrientationChangeComplete = false; w.mLastFreezeDuration = 0; } w.mReportOrientationChanged = true; }, true /* traverseTopToBottom */); if (rotateSeamlessly) { Loading
services/core/java/com/android/server/wm/WindowState.java +20 −7 Original line number Diff line number Diff line Loading @@ -430,6 +430,11 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP */ int mLastVisibleLayoutRotation = -1; /** * Set when we need to report the orientation change to client to trigger a relayout. */ boolean mReportOrientationChanged; /** * How long we last kept the screen frozen. */ Loading Loading @@ -1095,7 +1100,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP || mFrameSizeChanged || configChanged || dragResizingChanged || !isResizedWhileNotDragResizingReported()) { || !isResizedWhileNotDragResizingReported() || mReportOrientationChanged) { if (DEBUG_RESIZE || DEBUG_ORIENTATION) { Slog.v(TAG_WM, "Resize reasons for w=" + this + ": " + " contentInsetsChanged=" + mContentInsetsChanged Loading @@ -1110,7 +1116,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP + " configChanged=" + configChanged + " dragResizingChanged=" + dragResizingChanged + " resizedWhileNotDragResizingReported=" + isResizedWhileNotDragResizingReported()); + isResizedWhileNotDragResizingReported() + " reportOrientationChanged=" + mReportOrientationChanged); } // If it's a dead window left on screen, and the configuration changed, there is nothing Loading Loading @@ -3006,6 +3013,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP final Rect stableInsets = mLastStableInsets; final Rect outsets = mLastOutsets; final boolean reportDraw = mWinAnimator.mDrawState == DRAW_PENDING; final boolean reportOrientation = mReportOrientationChanged; if (mAttrs.type != WindowManager.LayoutParams.TYPE_APPLICATION_STARTING && mClient instanceof IWindow.Stub) { // To prevent deadlock simulate one-way call if win.mClient is a local object. Loading @@ -3014,7 +3022,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP public void run() { try { dispatchResized(frame, overscanInsets, contentInsets, visibleInsets, stableInsets, outsets, reportDraw, newConfig); stableInsets, outsets, reportDraw, newConfig, reportOrientation); } catch (RemoteException e) { // Not a remote call, RemoteException won't be raised. } Loading @@ -3022,7 +3031,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP }); } else { dispatchResized(frame, overscanInsets, contentInsets, visibleInsets, stableInsets, outsets, reportDraw, newConfig); outsets, reportDraw, newConfig, reportOrientation); } //TODO (multidisplay): Accessibility supported only for the default display. Loading @@ -3038,6 +3047,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP mFrameSizeChanged = false; mResizedWhileNotDragResizingReported = true; mWinAnimator.mSurfaceResized = false; mReportOrientationChanged = false; } catch (RemoteException e) { mOrientationChanging = false; mLastFreezeDuration = (int)(SystemClock.elapsedRealtime() Loading Loading @@ -3078,8 +3088,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP private void dispatchResized(Rect frame, Rect overscanInsets, Rect contentInsets, Rect visibleInsets, Rect stableInsets, Rect outsets, boolean reportDraw, Configuration newConfig) throws RemoteException { final boolean forceRelayout = isDragResizeChanged() || mResizedWhileNotDragResizing; Configuration newConfig, boolean reportOrientation) throws RemoteException { final boolean forceRelayout = isDragResizeChanged() || mResizedWhileNotDragResizing || reportOrientation; mClient.resized(frame, overscanInsets, contentInsets, visibleInsets, stableInsets, outsets, reportDraw, newConfig, getBackdropFrame(frame), Loading Loading @@ -3372,11 +3383,13 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP pw.print(" mDestroying="); pw.print(mDestroying); pw.print(" mRemoved="); pw.println(mRemoved); } if (mOrientationChanging || mAppFreezing || mTurnOnScreen) { if (mOrientationChanging || mAppFreezing || mTurnOnScreen || mReportOrientationChanged) { pw.print(prefix); pw.print("mOrientationChanging="); pw.print(mOrientationChanging); pw.print(" mAppFreezing="); pw.print(mAppFreezing); pw.print(" mTurnOnScreen="); pw.println(mTurnOnScreen); pw.print(" mReportOrientationChanged="); pw.println(mReportOrientationChanged); } if (mLastFreezeDuration != 0) { pw.print(prefix); pw.print("mLastFreezeDuration="); Loading