Merge "Fix live tile overlay clipping part of the screen during swipe up to home animation" into ub-launcher3-master

This commit is contained in:
Tracy Zhou 2019-04-03 19:20:04 +00:00 committed by Android (Google) Code Review
commit 79c73fd21b
2 changed files with 10 additions and 3 deletions

View File

@ -939,7 +939,7 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity>
HomeAnimationFactory homeAnimationFactory) {
final RemoteAnimationTargetSet targetSet = mRecentsAnimationWrapper.targetSet;
final RectF startRect = new RectF(mClipAnimationHelper.applyTransform(targetSet,
mTransformParams.setProgress(startProgress)));
mTransformParams.setProgress(startProgress), false /* launcherOnTop */));
final RectF targetRect = homeAnimationFactory.getWindowTargetRect();
final View floatingView = homeAnimationFactory.getFloatingView();
@ -964,7 +964,8 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity>
windowAlphaThreshold, 0f, 1f, Interpolators.LINEAR);
mTransformParams.setCurrentRectAndTargetAlpha(currentRect, 1f - iconAlpha)
.setSyncTransactionApplier(mSyncTransactionApplier);
mClipAnimationHelper.applyTransform(targetSet, mTransformParams);
mClipAnimationHelper.applyTransform(targetSet, mTransformParams,
false /* launcherOnTop */);
if (isFloatingIconView) {
((FloatingIconView) floatingView).update(currentRect, iconAlpha, progress,
@ -976,6 +977,7 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity>
@Override
public void onAnimationStart(Animator animation) {
homeAnim.dispatchOnStart();
mActivity.getRootView().getOverlay().remove(mLiveTileOverlay);
}
@Override

View File

@ -149,6 +149,11 @@ public class ClipAnimationHelper {
}
public RectF applyTransform(RemoteAnimationTargetSet targetSet, TransformParams params) {
return applyTransform(targetSet, params, true /* launcherOnTop */);
}
public RectF applyTransform(RemoteAnimationTargetSet targetSet, TransformParams params,
boolean launcherOnTop) {
if (params.currentRect == null) {
RectF currentRect;
mTmpRectF.set(mTargetRect);
@ -189,7 +194,7 @@ public class ClipAnimationHelper {
}
}
alpha = mTaskAlphaCallback.apply(app, params.targetAlpha);
} else if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
} else if (ENABLE_QUICKSTEP_LIVE_TILE.get() && launcherOnTop) {
crop = null;
layer = Integer.MAX_VALUE;
}