Merge "Fix missing operation when hiding window for rotation" into tm-dev am: 25b45cfd6c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17103843 Change-Id: Id93b481a57b8b4ed7b7372eac0d6ed39048962d8
This commit is contained in:
@@ -329,8 +329,12 @@ class AsyncRotationController extends FadeAnimationController implements Consume
|
|||||||
void hideImmediately(WindowToken windowToken) {
|
void hideImmediately(WindowToken windowToken) {
|
||||||
final boolean original = mHideImmediately;
|
final boolean original = mHideImmediately;
|
||||||
mHideImmediately = true;
|
mHideImmediately = true;
|
||||||
|
final Operation op = new Operation(Operation.ACTION_FADE);
|
||||||
|
mTargetWindowTokens.put(windowToken, op);
|
||||||
fadeWindowToken(false /* show */, windowToken, ANIMATION_TYPE_FIXED_TRANSFORM);
|
fadeWindowToken(false /* show */, windowToken, ANIMATION_TYPE_FIXED_TRANSFORM);
|
||||||
|
op.mLeash = windowToken.getAnimationLeash();
|
||||||
mHideImmediately = original;
|
mHideImmediately = original;
|
||||||
|
if (DEBUG) Slog.d(TAG, "hideImmediately " + windowToken.getTopChild());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns {@code true} if the window will rotate independently. */
|
/** Returns {@code true} if the window will rotate independently. */
|
||||||
|
|||||||
@@ -1370,7 +1370,9 @@ public class DisplayContentTests extends WindowTestsBase {
|
|||||||
ROTATION_0 /* oldRotation */, ROTATION_90 /* newRotation */,
|
ROTATION_0 /* oldRotation */, ROTATION_90 /* newRotation */,
|
||||||
false /* forceUpdate */));
|
false /* forceUpdate */));
|
||||||
|
|
||||||
assertNotNull(mDisplayContent.getAsyncRotationController());
|
final AsyncRotationController asyncRotationController =
|
||||||
|
mDisplayContent.getAsyncRotationController();
|
||||||
|
assertNotNull(asyncRotationController);
|
||||||
assertTrue(mStatusBarWindow.isAnimating(PARENTS, ANIMATION_TYPE_FIXED_TRANSFORM));
|
assertTrue(mStatusBarWindow.isAnimating(PARENTS, ANIMATION_TYPE_FIXED_TRANSFORM));
|
||||||
assertTrue(mNavBarWindow.isAnimating(PARENTS, ANIMATION_TYPE_FIXED_TRANSFORM));
|
assertTrue(mNavBarWindow.isAnimating(PARENTS, ANIMATION_TYPE_FIXED_TRANSFORM));
|
||||||
// Notification shade may have its own view animation in real case so do not fade out it.
|
// Notification shade may have its own view animation in real case so do not fade out it.
|
||||||
@@ -1443,6 +1445,7 @@ public class DisplayContentTests extends WindowTestsBase {
|
|||||||
mDisplayContent.setImeLayeringTarget(mAppWindow);
|
mDisplayContent.setImeLayeringTarget(mAppWindow);
|
||||||
LocalServices.getService(WindowManagerInternal.class).onToggleImeRequested(true /* show */,
|
LocalServices.getService(WindowManagerInternal.class).onToggleImeRequested(true /* show */,
|
||||||
app.token, app.token, mDisplayContent.mDisplayId);
|
app.token, app.token, mDisplayContent.mDisplayId);
|
||||||
|
assertTrue(asyncRotationController.isTargetToken(mImeWindow.mToken));
|
||||||
assertTrue(mImeWindow.mToken.hasFixedRotationTransform());
|
assertTrue(mImeWindow.mToken.hasFixedRotationTransform());
|
||||||
assertTrue(mImeWindow.isAnimating(PARENTS, ANIMATION_TYPE_FIXED_TRANSFORM));
|
assertTrue(mImeWindow.isAnimating(PARENTS, ANIMATION_TYPE_FIXED_TRANSFORM));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user