Merge "2D Recents: Fix a glitch during task relayout after a dismiss" into nyc-mr2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
f47658f120
@@ -20,6 +20,8 @@ import static android.app.ActivityManager.StackId.FREEFORM_WORKSPACE_STACK_ID;
|
|||||||
import static android.app.ActivityManager.StackId.FULLSCREEN_WORKSPACE_STACK_ID;
|
import static android.app.ActivityManager.StackId.FULLSCREEN_WORKSPACE_STACK_ID;
|
||||||
import static android.app.ActivityManager.StackId.INVALID_STACK_ID;
|
import static android.app.ActivityManager.StackId.INVALID_STACK_ID;
|
||||||
|
|
||||||
|
import android.animation.Animator;
|
||||||
|
import android.animation.AnimatorListenerAdapter;
|
||||||
import android.animation.ObjectAnimator;
|
import android.animation.ObjectAnimator;
|
||||||
import android.animation.ValueAnimator;
|
import android.animation.ValueAnimator;
|
||||||
import android.annotation.IntDef;
|
import android.annotation.IntDef;
|
||||||
@@ -1496,11 +1498,6 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
|
|||||||
// Remove the task from the ignored set
|
// Remove the task from the ignored set
|
||||||
removeIgnoreTask(removedTask);
|
removeIgnoreTask(removedTask);
|
||||||
|
|
||||||
// Resize the grid layout task view focus frame
|
|
||||||
if (mTaskViewFocusFrame != null) {
|
|
||||||
mTaskViewFocusFrame.resize();
|
|
||||||
}
|
|
||||||
|
|
||||||
// If requested, relayout with the given animation
|
// If requested, relayout with the given animation
|
||||||
if (animation != null) {
|
if (animation != null) {
|
||||||
updateLayoutAlgorithm(true /* boundScroll */);
|
updateLayoutAlgorithm(true /* boundScroll */);
|
||||||
@@ -1838,6 +1835,17 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
|
|||||||
announceForAccessibility(getContext().getString(
|
announceForAccessibility(getContext().getString(
|
||||||
R.string.accessibility_recents_item_dismissed, event.task.title));
|
R.string.accessibility_recents_item_dismissed, event.task.title));
|
||||||
|
|
||||||
|
if (useGridLayout() && event.animation != null) {
|
||||||
|
event.animation.setListener(new AnimatorListenerAdapter() {
|
||||||
|
public void onAnimationEnd(Animator animator) {
|
||||||
|
if (mTaskViewFocusFrame != null) {
|
||||||
|
// Resize the grid layout task view focus frame
|
||||||
|
mTaskViewFocusFrame.resize();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Remove the task from the stack
|
// Remove the task from the stack
|
||||||
mStack.removeTask(event.task, event.animation, false /* fromDockGesture */);
|
mStack.removeTask(event.task, event.animation, false /* fromDockGesture */);
|
||||||
EventBus.getDefault().send(new DeleteTaskDataEvent(event.task));
|
EventBus.getDefault().send(new DeleteTaskDataEvent(event.task));
|
||||||
|
|||||||
@@ -269,7 +269,6 @@ public class TaskView extends FixedSizeFrameLayout implements Task.TaskCallbacks
|
|||||||
return super.onInterceptTouchEvent(ev);
|
return super.onInterceptTouchEvent(ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void measureContents(int width, int height) {
|
protected void measureContents(int width, int height) {
|
||||||
int widthWithoutPadding = width - mPaddingLeft - mPaddingRight;
|
int widthWithoutPadding = width - mPaddingLeft - mPaddingRight;
|
||||||
|
|||||||
Reference in New Issue
Block a user