mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Merge "Load home properly even if AllSetActivity fails Go To Home Swipe." into tm-qpr-dev am: d01497d714 am: 8e97128a7e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21048063 Change-Id: I172bb350e7ccb70ae60f17f4b579a8b0eb49a0ef Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -20,6 +20,7 @@ import static com.android.launcher3.touch.BaseSwipeDetector.calculateDuration;
|
||||
import static com.android.launcher3.touch.SingleAxisSwipeDetector.DIRECTION_POSITIVE;
|
||||
import static com.android.launcher3.touch.SingleAxisSwipeDetector.VERTICAL;
|
||||
import static com.android.quickstep.MultiStateCallback.DEBUG_STATES;
|
||||
import static com.android.quickstep.OverviewComponentObserver.startHomeIntentSafely;
|
||||
import static com.android.quickstep.util.ActiveGestureLog.INTENT_EXTRA_LOG_TRACE_ID;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
@@ -102,8 +103,7 @@ public class ProgressDelegateInputConsumer implements InputConsumer,
|
||||
mStateCallback = new MultiStateCallback(STATE_NAMES);
|
||||
mStateCallback.runOnceAtState(STATE_TARGET_RECEIVED | STATE_HANDLER_INVALIDATED,
|
||||
this::endRemoteAnimation);
|
||||
mStateCallback.runOnceAtState(STATE_TARGET_RECEIVED | STATE_FLING_FINISHED,
|
||||
this::onFlingFinished);
|
||||
mStateCallback.runOnceAtState(STATE_FLING_FINISHED, this::onFlingFinished);
|
||||
|
||||
mSwipeDetector = new SingleAxisSwipeDetector(mContext, this, VERTICAL);
|
||||
mSwipeDetector.setDetectableScrollConditions(DIRECTION_POSITIVE, false);
|
||||
@@ -159,10 +159,12 @@ public class ProgressDelegateInputConsumer implements InputConsumer,
|
||||
}
|
||||
|
||||
private void onFlingFinished() {
|
||||
boolean endToRecents = mFlingEndsOnHome == null ? true : mFlingEndsOnHome;
|
||||
if (mRecentsAnimationController != null) {
|
||||
boolean endToRecents = mFlingEndsOnHome == null ? true : mFlingEndsOnHome;
|
||||
mRecentsAnimationController.finishController(endToRecents /* toRecents */,
|
||||
null /* callback */, false /* sendUserLeaveHint */);
|
||||
} else if (endToRecents) {
|
||||
startHomeIntentSafely(mContext, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user