Merge "Prevent resize animation from changing the requested visibilities" into sc-v2-dev
This commit is contained in:
@@ -1266,6 +1266,11 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
|
|||||||
public void notifyFinished(InsetsAnimationControlRunner runner, boolean shown) {
|
public void notifyFinished(InsetsAnimationControlRunner runner, boolean shown) {
|
||||||
cancelAnimation(runner, false /* invokeCallback */);
|
cancelAnimation(runner, false /* invokeCallback */);
|
||||||
if (DEBUG) Log.d(TAG, "notifyFinished. shown: " + shown);
|
if (DEBUG) Log.d(TAG, "notifyFinished. shown: " + shown);
|
||||||
|
if (runner.getAnimationType() == ANIMATION_TYPE_RESIZE) {
|
||||||
|
// The resize animation doesn't show or hide the insets. We shouldn't change the
|
||||||
|
// requested visibility.
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (shown) {
|
if (shown) {
|
||||||
showDirectly(runner.getTypes(), true /* fromIme */);
|
showDirectly(runner.getTypes(), true /* fromIme */);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -131,6 +131,9 @@ public class InsetsResizeAnimationRunner implements InsetsAnimationControlRunner
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean applyChangeInsets(InsetsState outState) {
|
public boolean applyChangeInsets(InsetsState outState) {
|
||||||
|
if (mCancelled) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
final float fraction = mAnimation.getInterpolatedFraction();
|
final float fraction = mAnimation.getInterpolatedFraction();
|
||||||
for (@InternalInsetsType int type = 0; type < InsetsState.SIZE; type++) {
|
for (@InternalInsetsType int type = 0; type < InsetsState.SIZE; type++) {
|
||||||
final InsetsSource fromSource = mFromState.peekSource(type);
|
final InsetsSource fromSource = mFromState.peekSource(type);
|
||||||
|
|||||||
Reference in New Issue
Block a user