Merge "Fix quickswitch flickers/ignored swipes" into qt-qpr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a9012ea717
+9
-1
@@ -923,7 +923,15 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity>
|
|||||||
windowAnim.addListener(new AnimationSuccessListener() {
|
windowAnim.addListener(new AnimationSuccessListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onAnimationSuccess(Animator animator) {
|
public void onAnimationSuccess(Animator animator) {
|
||||||
setStateOnUiThread(target.endState);
|
if (target == NEW_TASK && mRecentsView != null
|
||||||
|
&& mRecentsView.getNextPage() == mRecentsView.getRunningTaskIndex()) {
|
||||||
|
// We are about to launch the current running task, so use LAST_TASK state
|
||||||
|
// instead of NEW_TASK. This could happen, for example, if our scroll is
|
||||||
|
// aborted after we determined the target to be NEW_TASK.
|
||||||
|
setStateOnUiThread(LAST_TASK.endState);
|
||||||
|
} else {
|
||||||
|
setStateOnUiThread(target.endState);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
windowAnim.start();
|
windowAnim.start();
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
package com.android.quickstep.views;
|
package com.android.quickstep.views;
|
||||||
|
|
||||||
import static androidx.dynamicanimation.animation.DynamicAnimation.MIN_VISIBLE_CHANGE_PIXELS;
|
import static androidx.dynamicanimation.animation.DynamicAnimation.MIN_VISIBLE_CHANGE_PIXELS;
|
||||||
|
|
||||||
import static com.android.launcher3.BaseActivity.STATE_HANDLER_INVISIBILITY_FLAGS;
|
import static com.android.launcher3.BaseActivity.STATE_HANDLER_INVISIBILITY_FLAGS;
|
||||||
import static com.android.launcher3.InvariantDeviceProfile.CHANGE_FLAG_ICON_PARAMS;
|
import static com.android.launcher3.InvariantDeviceProfile.CHANGE_FLAG_ICON_PARAMS;
|
||||||
import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY;
|
import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY;
|
||||||
@@ -572,9 +571,13 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
|
|||||||
final TaskView taskView = (TaskView) getChildAt(pageIndex);
|
final TaskView taskView = (TaskView) getChildAt(pageIndex);
|
||||||
taskView.bind(task);
|
taskView.bind(task);
|
||||||
}
|
}
|
||||||
TaskView runningTaskView = getRunningTaskView();
|
|
||||||
if (runningTaskView != null) {
|
if (mNextPage == INVALID_PAGE) {
|
||||||
setCurrentPage(indexOfChild(runningTaskView));
|
// Set the current page to the running task, but not if settling on new task.
|
||||||
|
TaskView runningTaskView = getRunningTaskView();
|
||||||
|
if (runningTaskView != null) {
|
||||||
|
setCurrentPage(indexOfChild(runningTaskView));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mIgnoreResetTaskId != -1 && getTaskView(mIgnoreResetTaskId) != ignoreRestTaskView) {
|
if (mIgnoreResetTaskId != -1 && getTaskView(mIgnoreResetTaskId) != ignoreRestTaskView) {
|
||||||
|
|||||||
@@ -1088,7 +1088,9 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
|||||||
if (mFreeScroll) {
|
if (mFreeScroll) {
|
||||||
setCurrentPage(getNextPage());
|
setCurrentPage(getNextPage());
|
||||||
} else if (wasFreeScroll) {
|
} else if (wasFreeScroll) {
|
||||||
snapToPage(getNextPage());
|
if (getScrollForPage(getNextPage()) != getScrollX()) {
|
||||||
|
snapToPage(getNextPage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user