diff options
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 4 | ||||
| -rw-r--r-- | data/etc/services.core.protolog.json | 12 | ||||
| -rw-r--r-- | services/core/java/com/android/server/wm/DisplayContent.java | 1 | ||||
| -rw-r--r-- | services/core/java/com/android/server/wm/WindowState.java | 26 |
4 files changed, 13 insertions, 30 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 27ce71155857..768948d7831f 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -2860,7 +2860,6 @@ public final class ViewRootImpl implements ViewParent, final int surfaceGenerationId = mSurface.getGenerationId(); final boolean isViewVisible = viewVisibility == View.VISIBLE; - final boolean windowRelayoutWasForced = mForceNextWindowRelayout; boolean surfaceSizeChanged = false; boolean surfaceCreated = false; boolean surfaceDestroyed = false; @@ -3034,8 +3033,7 @@ public final class ViewRootImpl implements ViewParent, if (isHardwareEnabled()) { mAttachInfo.mThreadedRenderer.destroy(); } - } else if ((surfaceReplaced - || surfaceSizeChanged || windowRelayoutWasForced) + } else if ((surfaceReplaced || surfaceSizeChanged) && mSurfaceHolder == null && mAttachInfo.mThreadedRenderer != null && mSurface.isValid()) { diff --git a/data/etc/services.core.protolog.json b/data/etc/services.core.protolog.json index 9b09616d4630..2f021fe563c2 100644 --- a/data/etc/services.core.protolog.json +++ b/data/etc/services.core.protolog.json @@ -2137,6 +2137,12 @@ "group": "WM_DEBUG_RECENTS_ANIMATIONS", "at": "com\/android\/server\/wm\/RecentsAnimationController.java" }, + "25888308": { + "message": "Resize reasons for w=%s: %s configChanged=%b dragResizingChanged=%b", + "level": "VERBOSE", + "group": "WM_DEBUG_RESIZE", + "at": "com\/android\/server\/wm\/WindowState.java" + }, "35398067": { "message": "goodToGo(): onAnimationStart, transit=%s, apps=%d, wallpapers=%d, nonApps=%d", "level": "DEBUG", @@ -2797,12 +2803,6 @@ "group": "WM_DEBUG_FOCUS_LIGHT", "at": "com\/android\/server\/wm\/DisplayContent.java" }, - "625447638": { - "message": "Resize reasons for w=%s: %s configChanged=%b dragResizingChanged=%b reportOrientationChanged=%b", - "level": "VERBOSE", - "group": "WM_DEBUG_RESIZE", - "at": "com\/android\/server\/wm\/WindowState.java" - }, "628276090": { "message": "Delaying app transition for screen rotation animation to finish", "level": "VERBOSE", diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index 466075702409..11233a325238 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -1997,7 +1997,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp ProtoLog.v(WM_DEBUG_ORIENTATION, "Set mOrientationChanging of %s", w); w.setOrientationChanging(true); } - w.mReportOrientationChanged = true; }, true /* traverseTopToBottom */); for (int i = mWmService.mRotationWatchers.size() - 1; i >= 0; i--) { diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index 238f96ffd1e1..1ac61070d0b7 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -616,11 +616,6 @@ 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. */ int mLastFreezeDuration; @@ -1541,13 +1536,11 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP || configChanged || insetsChanged || dragResizingChanged - || mReportOrientationChanged || shouldSendRedrawForSync()) { ProtoLog.v(WM_DEBUG_RESIZE, - "Resize reasons for w=%s: %s configChanged=%b " - + "dragResizingChanged=%b reportOrientationChanged=%b", + "Resize reasons for w=%s: %s configChanged=%b dragResizingChanged=%b", this, mWindowFrames.getInsetsChangedInfo(), - configChanged, dragResizingChanged, mReportOrientationChanged); + configChanged, dragResizingChanged); if (insetsChanged) { mWindowFrames.setInsetsChanged(false); @@ -3592,10 +3585,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP mAnimatingExit = false; ProtoLog.d(WM_DEBUG_ANIM, "Clear animatingExit: reason=destroySurface win=%s", this); - // Clear the flag so the buffer requested for the next new surface won't be dropped by - // mistaking the surface size needs to update. - mReportOrientationChanged = false; - if (useBLASTSync()) { immediatelyNotifyBlastSync(); } @@ -3914,12 +3903,10 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP ProtoLog.i(WM_DEBUG_ORIENTATION, "Resizing %s WITH DRAW PENDING", this); } - final boolean reportOrientation = mReportOrientationChanged; // Always reset these states first, so if {@link IWindow#resized} fails, this // window won't be added to {@link WindowManagerService#mResizingWindows} and set // {@link #mOrientationChanging} to true again by {@link #updateResizingWindowIfNeeded} // that may cause WINDOW_FREEZE_TIMEOUT because resizing the client keeps failing. - mReportOrientationChanged = false; mDragResizingChangeReported = true; mWindowFrames.clearReportResizeHints(); @@ -3928,7 +3915,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP final boolean syncRedraw = shouldSendRedrawForSync(); final boolean reportDraw = syncRedraw || drawPending; final boolean isDragResizeChanged = isDragResizeChanged(); - final boolean forceRelayout = syncRedraw || reportOrientation || isDragResizeChanged; + final boolean forceRelayout = syncRedraw || isDragResizeChanged; final DisplayContent displayContent = getDisplayContent(); final boolean alwaysConsumeSystemBars = displayContent.getDisplayPolicy().areSystemBarsForcedShownLw(); @@ -3955,7 +3942,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP mClient.resized(mClientWindowFrames, reportDraw, mLastReportedConfiguration, getCompatInsetsState(), forceRelayout, alwaysConsumeSystemBars, displayId, mSyncSeqId, resizeMode); - if (drawPending && reportOrientation && mOrientationChanging) { + if (drawPending && mOrientationChanging) { mOrientationChangeRedrawRequestTime = SystemClock.elapsedRealtime(); ProtoLog.v(WM_DEBUG_ORIENTATION, "Requested redraw for orientation change: %s", this); @@ -4380,12 +4367,11 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP + " mDestroying=" + mDestroying + " mRemoved=" + mRemoved); } - if (getOrientationChanging() || mAppFreezing || mReportOrientationChanged) { + if (getOrientationChanging() || mAppFreezing) { pw.println(prefix + "mOrientationChanging=" + mOrientationChanging + " configOrientationChanging=" + (getLastReportedConfiguration().orientation != getConfiguration().orientation) - + " mAppFreezing=" + mAppFreezing - + " mReportOrientationChanged=" + mReportOrientationChanged); + + " mAppFreezing=" + mAppFreezing); } if (mLastFreezeDuration != 0) { pw.print(prefix + "mLastFreezeDuration="); |