Loading quickstep/src/com/android/quickstep/inputconsumers/DeviceLockedInputConsumer.java +26 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import static com.android.launcher3.util.VelocityUtils.PX_PER_MS; import static com.android.quickstep.AbsSwipeUpHandler.MIN_PROGRESS_FOR_OVERVIEW; import static com.android.quickstep.MultiStateCallback.DEBUG_STATES; import static com.android.quickstep.OverviewComponentObserver.startHomeIntentSafely; import static com.android.quickstep.TaskAnimationManager.ENABLE_SHELL_TRANSITIONS; import static com.android.quickstep.util.ActiveGestureLog.INTENT_EXTRA_LOG_TRACE_ID; import android.animation.Animator; Loading Loading @@ -101,6 +102,8 @@ public class DeviceLockedInputConsumer implements InputConsumer, private boolean mThresholdCrossed = false; private boolean mHomeLaunched = false; private boolean mCancelWhenRecentsStart = false; private boolean mDismissTask = false; private RecentsAnimationController mRecentsAnimationController; Loading Loading @@ -204,7 +207,17 @@ public class DeviceLockedInputConsumer implements InputConsumer, animator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { if (dismissTask) { if (ENABLE_SHELL_TRANSITIONS) { if (mTaskAnimationManager.getCurrentCallbacks() != null) { if (mRecentsAnimationController != null) { finishRecentsAnimationForShell(dismissTask); } else { // the transition of recents animation hasn't started, wait for it mCancelWhenRecentsStart = true; mDismissTask = dismissTask; } } } else if (dismissTask) { // For now, just start the home intent so user is prompted to // unlock the device. startHomeIntentSafely(mContext, mGestureState.getHomeIntent(), null); Loading Loading @@ -239,12 +252,24 @@ public class DeviceLockedInputConsumer implements InputConsumer, mTransformParams.setTargetSet(targets); applyTransform(); mStateCallback.setState(STATE_TARGET_RECEIVED); if (mCancelWhenRecentsStart) { finishRecentsAnimationForShell(mDismissTask); } } @Override public void onRecentsAnimationCanceled(HashMap<Integer, ThumbnailData> thumbnailDatas) { mRecentsAnimationController = null; mTransformParams.setTargetSet(null); mCancelWhenRecentsStart = false; } private void finishRecentsAnimationForShell(boolean dismissTask) { mCancelWhenRecentsStart = false; mTaskAnimationManager.finishRunningRecentsAnimation(dismissTask /* toHome */); if (dismissTask) { mHomeLaunched = true; } } private void endRemoteAnimation() { Loading Loading
quickstep/src/com/android/quickstep/inputconsumers/DeviceLockedInputConsumer.java +26 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import static com.android.launcher3.util.VelocityUtils.PX_PER_MS; import static com.android.quickstep.AbsSwipeUpHandler.MIN_PROGRESS_FOR_OVERVIEW; import static com.android.quickstep.MultiStateCallback.DEBUG_STATES; import static com.android.quickstep.OverviewComponentObserver.startHomeIntentSafely; import static com.android.quickstep.TaskAnimationManager.ENABLE_SHELL_TRANSITIONS; import static com.android.quickstep.util.ActiveGestureLog.INTENT_EXTRA_LOG_TRACE_ID; import android.animation.Animator; Loading Loading @@ -101,6 +102,8 @@ public class DeviceLockedInputConsumer implements InputConsumer, private boolean mThresholdCrossed = false; private boolean mHomeLaunched = false; private boolean mCancelWhenRecentsStart = false; private boolean mDismissTask = false; private RecentsAnimationController mRecentsAnimationController; Loading Loading @@ -204,7 +207,17 @@ public class DeviceLockedInputConsumer implements InputConsumer, animator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { if (dismissTask) { if (ENABLE_SHELL_TRANSITIONS) { if (mTaskAnimationManager.getCurrentCallbacks() != null) { if (mRecentsAnimationController != null) { finishRecentsAnimationForShell(dismissTask); } else { // the transition of recents animation hasn't started, wait for it mCancelWhenRecentsStart = true; mDismissTask = dismissTask; } } } else if (dismissTask) { // For now, just start the home intent so user is prompted to // unlock the device. startHomeIntentSafely(mContext, mGestureState.getHomeIntent(), null); Loading Loading @@ -239,12 +252,24 @@ public class DeviceLockedInputConsumer implements InputConsumer, mTransformParams.setTargetSet(targets); applyTransform(); mStateCallback.setState(STATE_TARGET_RECEIVED); if (mCancelWhenRecentsStart) { finishRecentsAnimationForShell(mDismissTask); } } @Override public void onRecentsAnimationCanceled(HashMap<Integer, ThumbnailData> thumbnailDatas) { mRecentsAnimationController = null; mTransformParams.setTargetSet(null); mCancelWhenRecentsStart = false; } private void finishRecentsAnimationForShell(boolean dismissTask) { mCancelWhenRecentsStart = false; mTaskAnimationManager.finishRunningRecentsAnimation(dismissTask /* toHome */); if (dismissTask) { mHomeLaunched = true; } } private void endRemoteAnimation() { Loading