Loading quickstep/src/com/android/quickstep/ActivityControlHelper.java +4 β2 Original line number Diff line number Diff line Loading @@ -549,7 +549,8 @@ public interface ActivityControlHelper<T extends BaseDraggingActivity> { public void finish() { } @Override public void update(boolean shouldFinish, boolean isLongSwipe, RectF currentRect) { } public void update(boolean shouldFinish, boolean isLongSwipe, RectF currentRect, float cornerRadius) { } }; } Loading Loading @@ -627,7 +628,8 @@ public interface ActivityControlHelper<T extends BaseDraggingActivity> { void finish(); void update(boolean shouldFinish, boolean isLongSwipe, RectF currentRect); void update(boolean shouldFinish, boolean isLongSwipe, RectF currentRect, float cornerRadius); } interface ActivityInitListener { Loading quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java +2 β1 Original line number Diff line number Diff line Loading @@ -601,7 +601,8 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> { private void updateFinalShiftUi() { if (mRecentsAnimationWrapper.getController() != null && mLayoutListener != null) { mLayoutListener.update(mCurrentShift.value > 1, mUiLongSwipeMode, mClipAnimationHelper.getCurrentRectWithInsets()); mClipAnimationHelper.getCurrentRectWithInsets(), mClipAnimationHelper.getCurrentCornerRadius()); } final boolean passed = mCurrentShift.value >= MIN_PROGRESS_FOR_OVERVIEW; Loading quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java +14 β3 Original line number Diff line number Diff line Loading @@ -88,6 +88,8 @@ public class ClipAnimationHelper { // Corner radius of windows when they're in overview mode. private final float mTaskCornerRadius; // Corner radius currently applied to transformed window. private float mCurrentCornerRadius; private float mTargetScale = 1f; private float mOffsetScale = 1f; private Interpolator mInterpolator = LINEAR; Loading Loading @@ -179,14 +181,15 @@ public class ClipAnimationHelper { float alpha = 1f; int layer; float cornerRadius = 0f; float scale = currentRect.width() / crop.width(); if (app.mode == targetSet.targetMode) { if (app.activityType != RemoteAnimationTargetCompat.ACTIVITY_TYPE_HOME) { mTmpMatrix.setRectToRect(mSourceRect, currentRect, ScaleToFit.FILL); mTmpMatrix.postTranslate(app.position.x, app.position.y); mClipRectF.roundOut(crop); float scale = crop.width() / currentRect.width(); cornerRadius = Utilities.mapRange(progress, mWindowCornerRadius, mTaskCornerRadius * scale); mTaskCornerRadius); mCurrentCornerRadius = cornerRadius; } if (app.isNotInRecents Loading @@ -200,7 +203,11 @@ public class ClipAnimationHelper { crop = null; layer = Integer.MAX_VALUE; } params[i] = new SurfaceParams(app.leash, alpha, mTmpMatrix, crop, layer, cornerRadius); // Since radius is in Surface space, but we draw the rounded corners in screen space, we // have to undo the scale. params[i] = new SurfaceParams(app.leash, alpha, mTmpMatrix, crop, layer, cornerRadius / scale); } applyParams(syncTransactionApplier, params); return currentRect; Loading Loading @@ -339,4 +346,8 @@ public class ClipAnimationHelper { public RectF getSourceRect() { return mSourceRect; } public float getCurrentCornerRadius() { return mCurrentCornerRadius; } } quickstep/src/com/android/quickstep/views/LauncherLayoutListener.java +5 β2 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ public class LauncherLayoutListener extends AbstractFloatingView private final Paint mPaint = new Paint(); private WindowTransformSwipeHandler mHandler; private RectF mCurrentRect; private float mCornerRadius; public LauncherLayoutListener(Launcher launcher) { super(launcher, null); Loading @@ -52,13 +53,15 @@ public class LauncherLayoutListener extends AbstractFloatingView } @Override public void update(boolean shouldFinish, boolean isLongSwipe, RectF currentRect) { public void update(boolean shouldFinish, boolean isLongSwipe, RectF currentRect, float cornerRadius) { if (shouldFinish) { finish(); return; } mCurrentRect = currentRect; mCornerRadius = cornerRadius; setWillNotDraw(mCurrentRect == null || isLongSwipe); invalidate(); Loading Loading @@ -121,6 +124,6 @@ public class LauncherLayoutListener extends AbstractFloatingView @Override protected void onDraw(Canvas canvas) { canvas.drawRect(mCurrentRect, mPaint); canvas.drawRoundRect(mCurrentRect, mCornerRadius, mCornerRadius, mPaint); } } Loading
quickstep/src/com/android/quickstep/ActivityControlHelper.java +4 β2 Original line number Diff line number Diff line Loading @@ -549,7 +549,8 @@ public interface ActivityControlHelper<T extends BaseDraggingActivity> { public void finish() { } @Override public void update(boolean shouldFinish, boolean isLongSwipe, RectF currentRect) { } public void update(boolean shouldFinish, boolean isLongSwipe, RectF currentRect, float cornerRadius) { } }; } Loading Loading @@ -627,7 +628,8 @@ public interface ActivityControlHelper<T extends BaseDraggingActivity> { void finish(); void update(boolean shouldFinish, boolean isLongSwipe, RectF currentRect); void update(boolean shouldFinish, boolean isLongSwipe, RectF currentRect, float cornerRadius); } interface ActivityInitListener { Loading
quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java +2 β1 Original line number Diff line number Diff line Loading @@ -601,7 +601,8 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> { private void updateFinalShiftUi() { if (mRecentsAnimationWrapper.getController() != null && mLayoutListener != null) { mLayoutListener.update(mCurrentShift.value > 1, mUiLongSwipeMode, mClipAnimationHelper.getCurrentRectWithInsets()); mClipAnimationHelper.getCurrentRectWithInsets(), mClipAnimationHelper.getCurrentCornerRadius()); } final boolean passed = mCurrentShift.value >= MIN_PROGRESS_FOR_OVERVIEW; Loading
quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java +14 β3 Original line number Diff line number Diff line Loading @@ -88,6 +88,8 @@ public class ClipAnimationHelper { // Corner radius of windows when they're in overview mode. private final float mTaskCornerRadius; // Corner radius currently applied to transformed window. private float mCurrentCornerRadius; private float mTargetScale = 1f; private float mOffsetScale = 1f; private Interpolator mInterpolator = LINEAR; Loading Loading @@ -179,14 +181,15 @@ public class ClipAnimationHelper { float alpha = 1f; int layer; float cornerRadius = 0f; float scale = currentRect.width() / crop.width(); if (app.mode == targetSet.targetMode) { if (app.activityType != RemoteAnimationTargetCompat.ACTIVITY_TYPE_HOME) { mTmpMatrix.setRectToRect(mSourceRect, currentRect, ScaleToFit.FILL); mTmpMatrix.postTranslate(app.position.x, app.position.y); mClipRectF.roundOut(crop); float scale = crop.width() / currentRect.width(); cornerRadius = Utilities.mapRange(progress, mWindowCornerRadius, mTaskCornerRadius * scale); mTaskCornerRadius); mCurrentCornerRadius = cornerRadius; } if (app.isNotInRecents Loading @@ -200,7 +203,11 @@ public class ClipAnimationHelper { crop = null; layer = Integer.MAX_VALUE; } params[i] = new SurfaceParams(app.leash, alpha, mTmpMatrix, crop, layer, cornerRadius); // Since radius is in Surface space, but we draw the rounded corners in screen space, we // have to undo the scale. params[i] = new SurfaceParams(app.leash, alpha, mTmpMatrix, crop, layer, cornerRadius / scale); } applyParams(syncTransactionApplier, params); return currentRect; Loading Loading @@ -339,4 +346,8 @@ public class ClipAnimationHelper { public RectF getSourceRect() { return mSourceRect; } public float getCurrentCornerRadius() { return mCurrentCornerRadius; } }
quickstep/src/com/android/quickstep/views/LauncherLayoutListener.java +5 β2 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ public class LauncherLayoutListener extends AbstractFloatingView private final Paint mPaint = new Paint(); private WindowTransformSwipeHandler mHandler; private RectF mCurrentRect; private float mCornerRadius; public LauncherLayoutListener(Launcher launcher) { super(launcher, null); Loading @@ -52,13 +53,15 @@ public class LauncherLayoutListener extends AbstractFloatingView } @Override public void update(boolean shouldFinish, boolean isLongSwipe, RectF currentRect) { public void update(boolean shouldFinish, boolean isLongSwipe, RectF currentRect, float cornerRadius) { if (shouldFinish) { finish(); return; } mCurrentRect = currentRect; mCornerRadius = cornerRadius; setWillNotDraw(mCurrentRect == null || isLongSwipe); invalidate(); Loading Loading @@ -121,6 +124,6 @@ public class LauncherLayoutListener extends AbstractFloatingView @Override protected void onDraw(Canvas canvas) { canvas.drawRect(mCurrentRect, mPaint); canvas.drawRoundRect(mCurrentRect, mCornerRadius, mCornerRadius, mPaint); } }