Loading services/core/java/com/android/server/wm/DisplayContent.java +0 −2 Original line number Diff line number Diff line Loading @@ -1831,8 +1831,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp if (w.mHasSurface && !rotateSeamlessly) { ProtoLog.v(WM_DEBUG_ORIENTATION, "Set mOrientationChanging of %s", w); w.setOrientationChanging(true); mWmService.mRoot.mOrientationChangeComplete = false; w.mLastFreezeDuration = 0; } w.mReportOrientationChanged = true; }, true /* traverseTopToBottom */); Loading services/core/java/com/android/server/wm/RootWindowContainer.java +1 −5 Original line number Diff line number Diff line Loading @@ -89,7 +89,6 @@ import static com.android.server.wm.WindowManagerService.UPDATE_FOCUS_NORMAL; import static com.android.server.wm.WindowManagerService.UPDATE_FOCUS_PLACING_SURFACES; import static com.android.server.wm.WindowManagerService.UPDATE_FOCUS_WILL_PLACE_SURFACES; import static com.android.server.wm.WindowManagerService.WINDOWS_FREEZING_SCREENS_NONE; import static com.android.server.wm.WindowSurfacePlacer.SET_ORIENTATION_CHANGE_COMPLETE; import static com.android.server.wm.WindowSurfacePlacer.SET_UPDATE_ROTATION; import static com.android.server.wm.WindowSurfacePlacer.SET_WALLPAPER_ACTION_PENDING; Loading Loading @@ -1181,10 +1180,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> mUpdateRotation = true; doRequest = true; } if ((bulkUpdateParams & SET_ORIENTATION_CHANGE_COMPLETE) == 0) { mOrientationChangeComplete = false; } else { mOrientationChangeComplete = true; if (mOrientationChangeComplete) { mLastWindowFreezeSource = mWmService.mAnimator.mLastWindowFreezeSource; if (mWmService.mWindowsFreezingScreen != WINDOWS_FREEZING_SCREENS_NONE) { doRequest = true; Loading services/core/java/com/android/server/wm/WindowAnimator.java +14 −12 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ import static com.android.server.wm.WindowContainer.AnimationFlags.TRANSITION; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_WINDOW_TRACE; import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME; import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM; import static com.android.server.wm.WindowSurfacePlacer.SET_ORIENTATION_CHANGE_COMPLETE; import android.content.Context; import android.os.Trace; Loading Loading @@ -134,8 +133,10 @@ public class WindowAnimator { // Schedule next frame already such that back-pressure happens continuously. scheduleAnimation(); final RootWindowContainer root = mService.mRoot; mCurrentTime = frameTimeNs / TimeUtils.NANOS_PER_MS; mBulkUpdateParams = SET_ORIENTATION_CHANGE_COMPLETE; mBulkUpdateParams = 0; root.mOrientationChangeComplete = true; if (DEBUG_WINDOW_TRACE) { Slog.i(TAG, "!!! animate: entry time=" + mCurrentTime); } Loading @@ -144,14 +145,14 @@ public class WindowAnimator { mService.openSurfaceTransaction(); try { // Remove all deferred displays, tasks, and activities. mService.mRoot.handleCompleteDeferredRemoval(); root.handleCompleteDeferredRemoval(); final AccessibilityController accessibilityController = mService.mAccessibilityController; final int numDisplays = mDisplayContentsAnimators.size(); for (int i = 0; i < numDisplays; i++) { final int displayId = mDisplayContentsAnimators.keyAt(i); final DisplayContent dc = mService.mRoot.getDisplayContent(displayId); final DisplayContent dc = root.getDisplayContent(displayId); // Update animations of all applications, including those associated with // exiting/removed apps. dc.updateWindowsForAnimator(); Loading @@ -160,7 +161,7 @@ public class WindowAnimator { for (int i = 0; i < numDisplays; i++) { final int displayId = mDisplayContentsAnimators.keyAt(i); final DisplayContent dc = mService.mRoot.getDisplayContent(displayId); final DisplayContent dc = root.getDisplayContent(displayId); dc.checkAppWindowsReadyToShow(); if (accessibilityController != null) { Loading @@ -179,13 +180,14 @@ public class WindowAnimator { Slog.wtf(TAG, "Unhandled exception in Window Manager", e); } final boolean hasPendingLayoutChanges = mService.mRoot.hasPendingLayoutChanges(this); final boolean doRequest = mBulkUpdateParams != 0 && mService.mRoot.copyAnimToLayoutParams(); final boolean hasPendingLayoutChanges = root.hasPendingLayoutChanges(this); final boolean doRequest = (mBulkUpdateParams != 0 || root.mOrientationChangeComplete) && root.copyAnimToLayoutParams(); if (hasPendingLayoutChanges || doRequest) { mService.mWindowPlacerLocked.requestTraversal(); } final boolean rootAnimating = mService.mRoot.isAnimating(TRANSITION | CHILDREN /* flags */, final boolean rootAnimating = root.isAnimating(TRANSITION | CHILDREN /* flags */, ANIMATION_TYPE_ALL /* typesToCheck */); if (rootAnimating && !mLastRootAnimating) { Trace.asyncTraceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "animating", 0); Loading @@ -197,7 +199,7 @@ public class WindowAnimator { mLastRootAnimating = rootAnimating; final boolean runningExpensiveAnimations = mService.mRoot.isAnimating(TRANSITION | CHILDREN /* flags */, root.isAnimating(TRANSITION | CHILDREN /* flags */, ANIMATION_TYPE_APP_TRANSITION | ANIMATION_TYPE_SCREEN_ROTATION | ANIMATION_TYPE_RECENTS /* typesToCheck */); if (runningExpensiveAnimations && !mRunningExpensiveAnimations) { Loading @@ -216,7 +218,7 @@ public class WindowAnimator { ProtoLog.i(WM_SHOW_TRANSACTIONS, "<<< CLOSE TRANSACTION animate"); if (mRemoveReplacedWindows) { mService.mRoot.removeReplacedWindows(); root.removeReplacedWindows(); mRemoveReplacedWindows = false; } Loading @@ -235,8 +237,8 @@ public class WindowAnimator { if ((bulkUpdateParams & WindowSurfacePlacer.SET_UPDATE_ROTATION) != 0) { builder.append(" UPDATE_ROTATION"); } if ((bulkUpdateParams & WindowSurfacePlacer.SET_ORIENTATION_CHANGE_COMPLETE) != 0) { builder.append(" ORIENTATION_CHANGE_COMPLETE"); if ((bulkUpdateParams & WindowSurfacePlacer.SET_WALLPAPER_ACTION_PENDING) != 0) { builder.append(" SET_WALLPAPER_ACTION_PENDING"); } return builder.toString(); } Loading services/core/java/com/android/server/wm/WindowManagerService.java +0 −2 Original line number Diff line number Diff line Loading @@ -5730,8 +5730,6 @@ public class WindowManagerService extends IWindowManager.Stub if (!w.mToken.okToDisplay() && mWindowsFreezingScreen != WINDOWS_FREEZING_SCREENS_TIMEOUT) { ProtoLog.v(WM_DEBUG_ORIENTATION, "Changing surface while display frozen: %s", w); w.setOrientationChanging(true); w.mLastFreezeDuration = 0; mRoot.mOrientationChangeComplete = false; if (mWindowsFreezingScreen == WINDOWS_FREEZING_SCREENS_NONE) { mWindowsFreezingScreen = WINDOWS_FREEZING_SCREENS_ACTIVE; // XXX should probably keep timeout from Loading services/core/java/com/android/server/wm/WindowState.java +4 −1 Original line number Diff line number Diff line Loading @@ -1490,6 +1490,10 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP void setOrientationChanging(boolean changing) { mOrientationChanging = changing; mOrientationChangeTimedOut = false; if (changing) { mLastFreezeDuration = 0; mWmService.mRoot.mOrientationChangeComplete = false; } } void orientationChangeTimedOut() { Loading Loading @@ -3287,7 +3291,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP ProtoLog.v(WM_DEBUG_ORIENTATION, "set mOrientationChanging of %s", this); setOrientationChanging(true); mWmService.mRoot.mOrientationChangeComplete = false; } mLastFreezeDuration = 0; setDisplayLayoutNeeded(); Loading Loading
services/core/java/com/android/server/wm/DisplayContent.java +0 −2 Original line number Diff line number Diff line Loading @@ -1831,8 +1831,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp if (w.mHasSurface && !rotateSeamlessly) { ProtoLog.v(WM_DEBUG_ORIENTATION, "Set mOrientationChanging of %s", w); w.setOrientationChanging(true); mWmService.mRoot.mOrientationChangeComplete = false; w.mLastFreezeDuration = 0; } w.mReportOrientationChanged = true; }, true /* traverseTopToBottom */); Loading
services/core/java/com/android/server/wm/RootWindowContainer.java +1 −5 Original line number Diff line number Diff line Loading @@ -89,7 +89,6 @@ import static com.android.server.wm.WindowManagerService.UPDATE_FOCUS_NORMAL; import static com.android.server.wm.WindowManagerService.UPDATE_FOCUS_PLACING_SURFACES; import static com.android.server.wm.WindowManagerService.UPDATE_FOCUS_WILL_PLACE_SURFACES; import static com.android.server.wm.WindowManagerService.WINDOWS_FREEZING_SCREENS_NONE; import static com.android.server.wm.WindowSurfacePlacer.SET_ORIENTATION_CHANGE_COMPLETE; import static com.android.server.wm.WindowSurfacePlacer.SET_UPDATE_ROTATION; import static com.android.server.wm.WindowSurfacePlacer.SET_WALLPAPER_ACTION_PENDING; Loading Loading @@ -1181,10 +1180,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> mUpdateRotation = true; doRequest = true; } if ((bulkUpdateParams & SET_ORIENTATION_CHANGE_COMPLETE) == 0) { mOrientationChangeComplete = false; } else { mOrientationChangeComplete = true; if (mOrientationChangeComplete) { mLastWindowFreezeSource = mWmService.mAnimator.mLastWindowFreezeSource; if (mWmService.mWindowsFreezingScreen != WINDOWS_FREEZING_SCREENS_NONE) { doRequest = true; Loading
services/core/java/com/android/server/wm/WindowAnimator.java +14 −12 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ import static com.android.server.wm.WindowContainer.AnimationFlags.TRANSITION; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_WINDOW_TRACE; import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME; import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM; import static com.android.server.wm.WindowSurfacePlacer.SET_ORIENTATION_CHANGE_COMPLETE; import android.content.Context; import android.os.Trace; Loading Loading @@ -134,8 +133,10 @@ public class WindowAnimator { // Schedule next frame already such that back-pressure happens continuously. scheduleAnimation(); final RootWindowContainer root = mService.mRoot; mCurrentTime = frameTimeNs / TimeUtils.NANOS_PER_MS; mBulkUpdateParams = SET_ORIENTATION_CHANGE_COMPLETE; mBulkUpdateParams = 0; root.mOrientationChangeComplete = true; if (DEBUG_WINDOW_TRACE) { Slog.i(TAG, "!!! animate: entry time=" + mCurrentTime); } Loading @@ -144,14 +145,14 @@ public class WindowAnimator { mService.openSurfaceTransaction(); try { // Remove all deferred displays, tasks, and activities. mService.mRoot.handleCompleteDeferredRemoval(); root.handleCompleteDeferredRemoval(); final AccessibilityController accessibilityController = mService.mAccessibilityController; final int numDisplays = mDisplayContentsAnimators.size(); for (int i = 0; i < numDisplays; i++) { final int displayId = mDisplayContentsAnimators.keyAt(i); final DisplayContent dc = mService.mRoot.getDisplayContent(displayId); final DisplayContent dc = root.getDisplayContent(displayId); // Update animations of all applications, including those associated with // exiting/removed apps. dc.updateWindowsForAnimator(); Loading @@ -160,7 +161,7 @@ public class WindowAnimator { for (int i = 0; i < numDisplays; i++) { final int displayId = mDisplayContentsAnimators.keyAt(i); final DisplayContent dc = mService.mRoot.getDisplayContent(displayId); final DisplayContent dc = root.getDisplayContent(displayId); dc.checkAppWindowsReadyToShow(); if (accessibilityController != null) { Loading @@ -179,13 +180,14 @@ public class WindowAnimator { Slog.wtf(TAG, "Unhandled exception in Window Manager", e); } final boolean hasPendingLayoutChanges = mService.mRoot.hasPendingLayoutChanges(this); final boolean doRequest = mBulkUpdateParams != 0 && mService.mRoot.copyAnimToLayoutParams(); final boolean hasPendingLayoutChanges = root.hasPendingLayoutChanges(this); final boolean doRequest = (mBulkUpdateParams != 0 || root.mOrientationChangeComplete) && root.copyAnimToLayoutParams(); if (hasPendingLayoutChanges || doRequest) { mService.mWindowPlacerLocked.requestTraversal(); } final boolean rootAnimating = mService.mRoot.isAnimating(TRANSITION | CHILDREN /* flags */, final boolean rootAnimating = root.isAnimating(TRANSITION | CHILDREN /* flags */, ANIMATION_TYPE_ALL /* typesToCheck */); if (rootAnimating && !mLastRootAnimating) { Trace.asyncTraceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "animating", 0); Loading @@ -197,7 +199,7 @@ public class WindowAnimator { mLastRootAnimating = rootAnimating; final boolean runningExpensiveAnimations = mService.mRoot.isAnimating(TRANSITION | CHILDREN /* flags */, root.isAnimating(TRANSITION | CHILDREN /* flags */, ANIMATION_TYPE_APP_TRANSITION | ANIMATION_TYPE_SCREEN_ROTATION | ANIMATION_TYPE_RECENTS /* typesToCheck */); if (runningExpensiveAnimations && !mRunningExpensiveAnimations) { Loading @@ -216,7 +218,7 @@ public class WindowAnimator { ProtoLog.i(WM_SHOW_TRANSACTIONS, "<<< CLOSE TRANSACTION animate"); if (mRemoveReplacedWindows) { mService.mRoot.removeReplacedWindows(); root.removeReplacedWindows(); mRemoveReplacedWindows = false; } Loading @@ -235,8 +237,8 @@ public class WindowAnimator { if ((bulkUpdateParams & WindowSurfacePlacer.SET_UPDATE_ROTATION) != 0) { builder.append(" UPDATE_ROTATION"); } if ((bulkUpdateParams & WindowSurfacePlacer.SET_ORIENTATION_CHANGE_COMPLETE) != 0) { builder.append(" ORIENTATION_CHANGE_COMPLETE"); if ((bulkUpdateParams & WindowSurfacePlacer.SET_WALLPAPER_ACTION_PENDING) != 0) { builder.append(" SET_WALLPAPER_ACTION_PENDING"); } return builder.toString(); } Loading
services/core/java/com/android/server/wm/WindowManagerService.java +0 −2 Original line number Diff line number Diff line Loading @@ -5730,8 +5730,6 @@ public class WindowManagerService extends IWindowManager.Stub if (!w.mToken.okToDisplay() && mWindowsFreezingScreen != WINDOWS_FREEZING_SCREENS_TIMEOUT) { ProtoLog.v(WM_DEBUG_ORIENTATION, "Changing surface while display frozen: %s", w); w.setOrientationChanging(true); w.mLastFreezeDuration = 0; mRoot.mOrientationChangeComplete = false; if (mWindowsFreezingScreen == WINDOWS_FREEZING_SCREENS_NONE) { mWindowsFreezingScreen = WINDOWS_FREEZING_SCREENS_ACTIVE; // XXX should probably keep timeout from Loading
services/core/java/com/android/server/wm/WindowState.java +4 −1 Original line number Diff line number Diff line Loading @@ -1490,6 +1490,10 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP void setOrientationChanging(boolean changing) { mOrientationChanging = changing; mOrientationChangeTimedOut = false; if (changing) { mLastFreezeDuration = 0; mWmService.mRoot.mOrientationChangeComplete = false; } } void orientationChangeTimedOut() { Loading Loading @@ -3287,7 +3291,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP ProtoLog.v(WM_DEBUG_ORIENTATION, "set mOrientationChanging of %s", this); setOrientationChanging(true); mWmService.mRoot.mOrientationChangeComplete = false; } mLastFreezeDuration = 0; setDisplayLayoutNeeded(); Loading