Merge changes Ifb23a73a,If1854a77 into rvc-dev am: 9d3317b8da am: d318730cb9
Change-Id: I6867381494ffc4badfa84623d55e8b35ddcc6d17
This commit is contained in:
@@ -20,21 +20,8 @@
|
|||||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:shareInterpolator="false" android:zAdjustment="top">
|
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%"
|
<translate android:fromYDelta="0" android:toYDelta="110%"
|
||||||
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
|
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
|
||||||
android:interpolator="@interpolator/fast_out_linear_in"
|
android:interpolator="@interpolator/fast_out_linear_in"
|
||||||
android:duration="225"/>
|
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>
|
</set>
|
||||||
@@ -5241,25 +5241,13 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
|
|||||||
* the display naturally.
|
* the display naturally.
|
||||||
*/
|
*/
|
||||||
private void applyRotationAndFinishFixedRotation(int oldRotation, int newRotation) {
|
private void applyRotationAndFinishFixedRotation(int oldRotation, int newRotation) {
|
||||||
if (mFixedRotationLaunchingApp == null) {
|
final WindowToken rotatedLaunchingApp = mFixedRotationLaunchingApp;
|
||||||
|
if (rotatedLaunchingApp == null) {
|
||||||
applyRotation(oldRotation, newRotation);
|
applyRotation(oldRotation, newRotation);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The display may be about to rotate seamlessly, and the animation of closing apps may
|
rotatedLaunchingApp.finishFixedRotationTransform(
|
||||||
// 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(
|
|
||||||
() -> applyRotation(oldRotation, newRotation));
|
() -> applyRotation(oldRotation, newRotation));
|
||||||
mFixedRotationLaunchingApp = null;
|
mFixedRotationLaunchingApp = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.spyOn;
|
||||||
import static com.android.dx.mockito.inline.extended.ExtendedMockito.times;
|
import static com.android.dx.mockito.inline.extended.ExtendedMockito.times;
|
||||||
import static com.android.dx.mockito.inline.extended.ExtendedMockito.verify;
|
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.WindowContainer.POSITION_TOP;
|
||||||
import static com.android.server.wm.WindowManagerService.UPDATE_FOCUS_NORMAL;
|
import static com.android.server.wm.WindowManagerService.UPDATE_FOCUS_NORMAL;
|
||||||
|
|
||||||
@@ -1068,13 +1067,6 @@ public class DisplayContentTests extends WindowTestsBase {
|
|||||||
mDisplayContent.computeScreenConfiguration(config);
|
mDisplayContent.computeScreenConfiguration(config);
|
||||||
mDisplayContent.onRequestedOverrideConfigurationChanged(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;
|
final ActivityRecord app = mAppWindow.mActivityRecord;
|
||||||
mDisplayContent.prepareAppTransition(WindowManager.TRANSIT_ACTIVITY_OPEN,
|
mDisplayContent.prepareAppTransition(WindowManager.TRANSIT_ACTIVITY_OPEN,
|
||||||
false /* alwaysKeepCurrent */);
|
false /* alwaysKeepCurrent */);
|
||||||
@@ -1135,8 +1127,6 @@ public class DisplayContentTests extends WindowTestsBase {
|
|||||||
// The display should be rotated after the launch is finished.
|
// The display should be rotated after the launch is finished.
|
||||||
mDisplayContent.mAppTransition.notifyAppTransitionFinishedLocked(app.token);
|
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.
|
// The fixed rotation should be cleared and the new rotation is applied to display.
|
||||||
assertFalse(app.hasFixedRotationTransform());
|
assertFalse(app.hasFixedRotationTransform());
|
||||||
assertFalse(app2.hasFixedRotationTransform());
|
assertFalse(app2.hasFixedRotationTransform());
|
||||||
|
|||||||
Reference in New Issue
Block a user