Overview - position the modal task in the correct place.
video of new behavoir
https://drive.google.com/a/google.com/file/d/1vFTtjjpwamj5H7dhmB1-5JSFS6fv6vMw/view?usp=sharing
Test: local
Bug: 155205932
Change-Id: I7fe79c848af92013587de32a777645cc472ae910
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
index 411f057..955cf5a 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
@@ -214,6 +214,7 @@
protected final Rect mTempRect = new Rect();
protected final RectF mTempRectF = new RectF();
private final PointF mTempPointF = new PointF();
+ private final float[] mTempFloatPoint = new float[2];
private static final int DISMISS_TASK_DURATION = 300;
private static final int ADDITION_TASK_DURATION = 200;
@@ -1651,6 +1652,7 @@
mTempRect, mActivity.getDeviceProfile(), mTempPointF);
setPivotX(mTempPointF.x);
setPivotY(mTempPointF.y);
+ setTaskModalness(mTaskModalness);
updatePageOffsets();
}
@@ -2131,6 +2133,18 @@
updatePageOffsets();
if (getCurrentPageTaskView() != null) {
getCurrentPageTaskView().setModalness(modalness);
+ TaskView tv = getCurrentPageTaskView();
+
+ // Move the task view up as it scales...
+ // ...the icon on taskview is hidden in modal state, so consider the top of the task
+ mTempFloatPoint[0] = 0;
+ mTempFloatPoint[1] = tv.getTop() + mTaskTopMargin;
+ // ...find the top after the transformation
+ getMatrix().mapPoints(mTempFloatPoint);
+
+ // ...make it match the top inset
+ float calcOffset = (mInsets.top - mTempFloatPoint[1]) * mTaskModalness;
+ tv.setTranslationY(calcOffset);
}
}
diff --git a/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java b/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java
index ac50d6d..47fff5e 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java
@@ -107,7 +107,7 @@
setter.setFloat(
mRecentsView, getTaskModalnessProperty(),
toState.getOverviewModalness(),
- config.getInterpolator(ANIM_OVERVIEW_MODAL, AGGRESSIVE_EASE_IN_OUT));
+ config.getInterpolator(ANIM_OVERVIEW_MODAL, LINEAR));
}
abstract FloatProperty getTaskModalnessProperty();