Merge "Consolidate two different onTransitionCancelled implementations" into sc-dev
This commit is contained in:
commit
029e930751
|
@ -319,9 +319,9 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
|||
mStateCallback.runOnceAtState(STATE_LAUNCHER_PRESENT | STATE_HANDLER_INVALIDATED,
|
||||
this::invalidateHandlerWithLauncher);
|
||||
mStateCallback.runOnceAtState(STATE_HANDLER_INVALIDATED | STATE_RESUME_LAST_TASK,
|
||||
this::notifyTransitionCancelled);
|
||||
this::resetStateForAnimationCancel);
|
||||
mStateCallback.runOnceAtState(STATE_HANDLER_INVALIDATED | STATE_FINISH_WITH_NO_END,
|
||||
this::notifyTransitionCancelled);
|
||||
this::resetStateForAnimationCancel);
|
||||
|
||||
if (!LIVE_TILE.get()) {
|
||||
mStateCallback.addChangeListener(STATE_APP_CONTROLLER_RECEIVED | STATE_LAUNCHER_PRESENT
|
||||
|
@ -1383,10 +1383,6 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
|||
mActivity.getRootView().setOnApplyWindowInsetsListener(null);
|
||||
}
|
||||
|
||||
private void notifyTransitionCancelled() {
|
||||
mAnimationFactory.onTransitionCancelled();
|
||||
}
|
||||
|
||||
private void resetStateForAnimationCancel() {
|
||||
boolean wasVisible = mWasLauncherAlreadyVisible || mGestureStarted;
|
||||
mActivityInterface.onTransitionCancelled(wasVisible);
|
||||
|
|
|
@ -368,8 +368,6 @@ public abstract class BaseActivityInterface<STATE_TYPE extends BaseState<STATE_T
|
|||
|
||||
void createActivityInterface(long transitionLength);
|
||||
|
||||
default void onTransitionCancelled() { }
|
||||
|
||||
/**
|
||||
* @param attached Whether to show RecentsView alongside the app window. If false, recents
|
||||
* will be hidden by some property we can animate, e.g. alpha.
|
||||
|
@ -435,11 +433,6 @@ public abstract class BaseActivityInterface<STATE_TYPE extends BaseState<STATE_T
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTransitionCancelled() {
|
||||
mActivity.getStateManager().goToState(mStartState, false /* animate */);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRecentsAttachedToAppWindow(boolean attached, boolean animate) {
|
||||
if (mIsAttachedToWindow == attached && animate) {
|
||||
|
|
Loading…
Reference in New Issue