Defer unstashing taskbar on all apps close if gesture in progress. am: 4ad53f1268 am: d4db67233e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17625367 Change-Id: Ic46b19ffeb6da9be2f4ed871c31262489c8819fc Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
f654c087cf
3 files changed
+34
-7
No files matched your search
@@ -33,6 +33,7 @@ import android.view.ViewConfiguration;
|
||||
|
||||
import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.taskbar.allapps.TaskbarAllAppsSlideInView;
|
||||
import com.android.launcher3.testing.TestProtocol;
|
||||
import com.android.launcher3.util.MultiValueAlpha.AlphaProperty;
|
||||
import com.android.quickstep.AnimatedFloat;
|
||||
@@ -518,13 +519,40 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
|
||||
*/
|
||||
public void setSystemGestureInProgress(boolean inProgress) {
|
||||
mIsSystemGestureInProgress = inProgress;
|
||||
// Only update FLAG_STASHED_IN_APP_IME when system gesture is not in progress.
|
||||
if (!mIsSystemGestureInProgress) {
|
||||
if (mIsSystemGestureInProgress) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Only update the following flags when system gesture is not in progress.
|
||||
maybeResetStashedInAppAllApps(hasAnyFlag(FLAG_STASHED_IN_APP_IME) == mIsImeShowing);
|
||||
if (hasAnyFlag(FLAG_STASHED_IN_APP_IME) != mIsImeShowing) {
|
||||
updateStateForFlag(FLAG_STASHED_IN_APP_IME, mIsImeShowing);
|
||||
applyState(TASKBAR_STASH_DURATION_FOR_IME, getTaskbarStashStartDelayForIme());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset stashed in all apps only if no system gesture is in progress.
|
||||
* <p>
|
||||
* Otherwise, the reset should be deferred until after the gesture is finished.
|
||||
*
|
||||
* @see #setSystemGestureInProgress
|
||||
*/
|
||||
public void maybeResetStashedInAppAllApps() {
|
||||
maybeResetStashedInAppAllApps(true);
|
||||
}
|
||||
|
||||
private void maybeResetStashedInAppAllApps(boolean applyState) {
|
||||
if (mIsSystemGestureInProgress) {
|
||||
return;
|
||||
}
|
||||
|
||||
updateStateForFlag(FLAG_STASHED_IN_APP_ALL_APPS, false);
|
||||
if (applyState) {
|
||||
applyState(TaskbarAllAppsSlideInView.DEFAULT_CLOSE_DURATION);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* When hiding the IME, delay the unstash animation to align with the end of the transition.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user