Merge changes Ifb23a73a,If1854a77 into rvc-dev

* changes:
  Revert cancellation of animation in old rotation
  Remove unnecessary effects of wallpaper_open_exit
This commit is contained in:
Riddle Hsu
2020-05-05 15:54:59 +00:00
committed by Android (Google) Code Review
3 changed files with 3 additions and 38 deletions

View File

@@ -20,21 +20,8 @@
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false" android:zAdjustment="top">
<alpha android:fromAlpha="1.0" android:toAlpha="0"
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
android:interpolator="@interpolator/accelerate_quad"
android:startOffset="250"
android:duration="167"/>
<translate android:fromYDelta="0" android:toYDelta="110%"
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
android:interpolator="@interpolator/fast_out_linear_in"
android:duration="225"/>
<scale android:fromXScale="1.0" android:toXScale="1.0"
android:fromYScale="1.0" android:toYScale="1.0"
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
android:pivotX="50%p" android:pivotY="50%p"
android:interpolator="@interpolator/fast_out_slow_in"
android:duration="225" />
</set>

View File

@@ -5241,25 +5241,13 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
* the display naturally.
*/
private void applyRotationAndFinishFixedRotation(int oldRotation, int newRotation) {
if (mFixedRotationLaunchingApp == null) {
final WindowToken rotatedLaunchingApp = mFixedRotationLaunchingApp;
if (rotatedLaunchingApp == null) {
applyRotation(oldRotation, newRotation);
return;
}
// The display may be about to rotate seamlessly, and the animation of closing apps may
// still animate in old rotation. So make sure the outdated animation won't show on the
// rotated display.
forAllActivities(a -> {
if (a.nowVisible && a != mFixedRotationLaunchingApp
&& a.getWindowConfiguration().getRotation() != newRotation) {
final WindowContainer<?> w = a.getAnimatingContainer();
if (w != null) {
w.cancelAnimation();
}
}
});
mFixedRotationLaunchingApp.finishFixedRotationTransform(
rotatedLaunchingApp.finishFixedRotationTransform(
() -> applyRotation(oldRotation, newRotation));
mFixedRotationLaunchingApp = null;
}

View File

@@ -57,7 +57,6 @@ import static com.android.dx.mockito.inline.extended.ExtendedMockito.same;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.spyOn;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.times;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.verify;
import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_APP_TRANSITION;
import static com.android.server.wm.WindowContainer.POSITION_TOP;
import static com.android.server.wm.WindowManagerService.UPDATE_FOCUS_NORMAL;
@@ -1068,13 +1067,6 @@ public class DisplayContentTests extends WindowTestsBase {
mDisplayContent.computeScreenConfiguration(config);
mDisplayContent.onRequestedOverrideConfigurationChanged(config);
final ActivityRecord closingApp = new ActivityTestsBase.StackBuilder(mWm.mRoot)
.setDisplay(mDisplayContent).setOnTop(false).build().getTopMostActivity();
closingApp.nowVisible = true;
closingApp.startAnimation(closingApp.getPendingTransaction(), mock(AnimationAdapter.class),
false /* hidden */, ANIMATION_TYPE_APP_TRANSITION);
assertTrue(closingApp.isAnimating());
final ActivityRecord app = mAppWindow.mActivityRecord;
mDisplayContent.prepareAppTransition(WindowManager.TRANSIT_ACTIVITY_OPEN,
false /* alwaysKeepCurrent */);
@@ -1135,8 +1127,6 @@ public class DisplayContentTests extends WindowTestsBase {
// The display should be rotated after the launch is finished.
mDisplayContent.mAppTransition.notifyAppTransitionFinishedLocked(app.token);
// The animation in old rotation should be cancelled.
assertFalse(closingApp.isAnimating());
// The fixed rotation should be cleared and the new rotation is applied to display.
assertFalse(app.hasFixedRotationTransform());
assertFalse(app2.hasFixedRotationTransform());