mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Delay showing task bar until the user releases their finger dragging from all apps to normal
Fixes: 208802276 Test: drag from all apps to normal, and the task bar doesn't stash until the user releases their finger Change-Id: I53133cc80749bdc62e77d858b5714ae32facbd1d
This commit is contained in:
@@ -73,6 +73,8 @@ import java.util.function.Supplier;
|
||||
private boolean mIsAnimatingToLauncherViaGesture;
|
||||
private boolean mIsAnimatingToLauncherViaResume;
|
||||
|
||||
private boolean mShouldDelayLauncherStateAnim;
|
||||
|
||||
private final StateManager.StateListener<LauncherState> mStateListener =
|
||||
new StateManager.StateListener<LauncherState>() {
|
||||
|
||||
@@ -85,7 +87,9 @@ import java.util.function.Supplier;
|
||||
mLauncherState = toState;
|
||||
}
|
||||
updateStateForFlag(FLAG_TRANSITION_STATE_RUNNING, true);
|
||||
applyState();
|
||||
if (!mShouldDelayLauncherStateAnim) {
|
||||
applyState();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -153,6 +157,15 @@ import java.util.function.Supplier;
|
||||
return mIsAnimatingToLauncherViaResume || mIsAnimatingToLauncherViaGesture;
|
||||
}
|
||||
|
||||
public void setShouldDelayLauncherStateAnim(boolean shouldDelayLauncherStateAnim) {
|
||||
if (!shouldDelayLauncherStateAnim && mShouldDelayLauncherStateAnim) {
|
||||
// Animate the animation we have delayed immediately. This is usually triggered when
|
||||
// the user has released their finger.
|
||||
applyState();
|
||||
}
|
||||
mShouldDelayLauncherStateAnim = shouldDelayLauncherStateAnim;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the proper flag to change the state of the task bar.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user