Temporary fix to disable task#onClickListener during transition to overview am: 15b0f700fe
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/13418432 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I4b0ff95325a02a9843395425503b668f9b11bc78
This commit is contained in:
commit
2ebbee6d0d
2 files changed
+16
No files matched your search
@@ -970,6 +970,9 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<?>, Q extends
|
|||||||
}
|
}
|
||||||
duration = Math.max(duration, mRecentsView.getScroller().getDuration());
|
duration = Math.max(duration, mRecentsView.getScroller().getDuration());
|
||||||
}
|
}
|
||||||
|
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||||
|
mRecentsView.getRunningTaskView().setIsClickableAsLiveTile(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Let RecentsView handle the scrolling to the task, which we launch in startNewTask()
|
// Let RecentsView handle the scrolling to the task, which we launch in startNewTask()
|
||||||
@@ -1447,6 +1450,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<?>, Q extends
|
|||||||
private void finishCurrentTransitionToRecents() {
|
private void finishCurrentTransitionToRecents() {
|
||||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||||
mStateCallback.setStateOnUiThread(STATE_CURRENT_TASK_FINISHED);
|
mStateCallback.setStateOnUiThread(STATE_CURRENT_TASK_FINISHED);
|
||||||
|
mRecentsView.getRunningTaskView().setIsClickableAsLiveTile(true);
|
||||||
} else if (!hasTargets() || mRecentsAnimationController == null) {
|
} else if (!hasTargets() || mRecentsAnimationController == null) {
|
||||||
// If there are no targets or the animation not started, then there is nothing to finish
|
// If there are no targets or the animation not started, then there is nothing to finish
|
||||||
mStateCallback.setStateOnUiThread(STATE_CURRENT_TASK_FINISHED);
|
mStateCallback.setStateOnUiThread(STATE_CURRENT_TASK_FINISHED);
|
||||||
|
|||||||
@@ -257,6 +257,8 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable {
|
|||||||
private final float[] mIconCenterCoords = new float[2];
|
private final float[] mIconCenterCoords = new float[2];
|
||||||
private final float[] mChipCenterCoords = new float[2];
|
private final float[] mChipCenterCoords = new float[2];
|
||||||
|
|
||||||
|
private boolean mIsClickableAsLiveTile = true;
|
||||||
|
|
||||||
public TaskView(Context context) {
|
public TaskView(Context context) {
|
||||||
this(context, null);
|
this(context, null);
|
||||||
}
|
}
|
||||||
@@ -273,6 +275,11 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && isRunningTask()) {
|
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && isRunningTask()) {
|
||||||
|
if (!mIsClickableAsLiveTile) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mIsClickableAsLiveTile = false;
|
||||||
RecentsView recentsView = getRecentsView();
|
RecentsView recentsView = getRecentsView();
|
||||||
RemoteAnimationTargets targets = recentsView.getLiveTileParams().getTargetSet();
|
RemoteAnimationTargets targets = recentsView.getLiveTileParams().getTargetSet();
|
||||||
recentsView.getLiveTileTaskViewSimulator().setDrawsBelowRecents(false);
|
recentsView.getLiveTileTaskViewSimulator().setDrawsBelowRecents(false);
|
||||||
@@ -289,6 +296,7 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable {
|
|||||||
public void onAnimationEnd(Animator animator) {
|
public void onAnimationEnd(Animator animator) {
|
||||||
recentsView.getLiveTileTaskViewSimulator().setDrawsBelowRecents(true);
|
recentsView.getLiveTileTaskViewSimulator().setDrawsBelowRecents(true);
|
||||||
recentsView.finishRecentsAnimation(false, null);
|
recentsView.finishRecentsAnimation(false, null);
|
||||||
|
mIsClickableAsLiveTile = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
anim.start();
|
anim.start();
|
||||||
@@ -348,6 +356,10 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setIsClickableAsLiveTile(boolean isClickableAsLiveTile) {
|
||||||
|
mIsClickableAsLiveTile = isClickableAsLiveTile;
|
||||||
|
}
|
||||||
|
|
||||||
private void computeAndSetIconTouchDelegate() {
|
private void computeAndSetIconTouchDelegate() {
|
||||||
float iconHalfSize = mIconView.getWidth() / 2f;
|
float iconHalfSize = mIconView.getWidth() / 2f;
|
||||||
mIconCenterCoords[0] = mIconCenterCoords[1] = iconHalfSize;
|
mIconCenterCoords[0] = mIconCenterCoords[1] = iconHalfSize;
|
||||||
|
|||||||
Reference in new issue
Block a user