diff options
3 files changed, 9 insertions, 8 deletions
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index fa603682bc40..f22e654ac07e 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -619,8 +619,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp private static final long FIXED_ROTATION_HIDE_ANIMATION_DEBOUNCE_DELAY_MS = 250; private AsyncRotationController mAsyncRotationController; - final FixedRotationTransitionListener mFixedRotationTransitionListener = - new FixedRotationTransitionListener(); + final FixedRotationTransitionListener mFixedRotationTransitionListener; @VisibleForTesting final DeviceStateController mDeviceStateController; @@ -1163,6 +1162,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp TAG_WM + "/displayId:" + mDisplayId, mDisplayId); mHoldScreenWakeLock.setReferenceCounted(false); + mFixedRotationTransitionListener = new FixedRotationTransitionListener(mDisplayId); mAppTransition = new AppTransition(mWmService.mContext, mWmService, this); mAppTransition.registerListenerLocked(mWmService.mActivityManagerAppTransitionNotifier); mAppTransition.registerListenerLocked(mFixedRotationTransitionListener); @@ -6927,8 +6927,8 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp /** Whether {@link #mAnimatingRecents} is going to be the top activity. */ private boolean mRecentsWillBeTop; - FixedRotationTransitionListener() { - super(DisplayContent.this.mDisplayId); + FixedRotationTransitionListener(int displayId) { + super(displayId); } /** @@ -7017,7 +7017,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp // by finishing the recents animation and moving it to top. That also avoids flickering // due to wait for previous activity to be paused if it supports PiP that ignores the // effect of resume-while-pausing. - if (r == null || r == mAnimatingRecents || r.getDisplayId() != mDisplayId) { + if (r == null || r == mAnimatingRecents) { return; } if (mAnimatingRecents != null && mRecentsWillBeTop) { diff --git a/services/core/java/com/android/server/wm/TransitionController.java b/services/core/java/com/android/server/wm/TransitionController.java index 1df251cf3225..67d7b37396c0 100644 --- a/services/core/java/com/android/server/wm/TransitionController.java +++ b/services/core/java/com/android/server/wm/TransitionController.java @@ -1350,7 +1350,8 @@ class TransitionController { private static boolean shouldDispatchLegacyListener( WindowManagerInternal.AppTransitionListener listener, int displayId) { // INVALID_DISPLAY means that it is a global listener. - return listener.mDisplayId == Display.INVALID_DISPLAY || listener.mDisplayId == displayId; + return listener.mTargetDisplayId == Display.INVALID_DISPLAY + || listener.mTargetDisplayId == displayId; } void dispatchLegacyAppTransitionPending(int displayId) { diff --git a/services/core/java/com/android/server/wm/WindowManagerInternal.java b/services/core/java/com/android/server/wm/WindowManagerInternal.java index 132e1ee99914..50611331619b 100644 --- a/services/core/java/com/android/server/wm/WindowManagerInternal.java +++ b/services/core/java/com/android/server/wm/WindowManagerInternal.java @@ -247,7 +247,7 @@ public abstract class WindowManagerInternal { * The display this listener is interested in. If it is INVALID_DISPLAY, then which display * should be notified depends on the dispatcher. */ - public final int mDisplayId; + public final int mTargetDisplayId; /** Let transition controller decide which display should receive the callbacks. */ public AppTransitionListener() { @@ -256,7 +256,7 @@ public abstract class WindowManagerInternal { /** It will listen the transition on the given display. */ public AppTransitionListener(int displayId) { - mDisplayId = displayId; + mTargetDisplayId = displayId; } /** |