Merge "Fix taskbar bg delay for the case when user is going home." into main
This commit is contained in:
@@ -245,7 +245,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
|
||||
|
||||
private Animator mTaskbarBackgroundAlphaAnimator;
|
||||
private long mTaskbarBackgroundDuration;
|
||||
private boolean mIsGoingHome;
|
||||
private boolean mUserIsNotGoingHome = false;
|
||||
|
||||
// Evaluate whether the handle should be stashed
|
||||
private final LongPredicate mIsStashedPredicate = flags -> {
|
||||
@@ -828,17 +828,13 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
|
||||
private boolean mTaskbarBgAlphaAnimationStarted = false;
|
||||
@Override
|
||||
public void onAnimationUpdate(ValueAnimator valueAnimator) {
|
||||
if (mIsGoingHome) {
|
||||
mTaskbarBgAlphaAnimationStarted = true;
|
||||
}
|
||||
if (mTaskbarBgAlphaAnimationStarted) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (valueAnimator.getAnimatedFraction() >= ANIMATED_FRACTION_THRESHOLD) {
|
||||
if (!mIsGoingHome) {
|
||||
if (mUserIsNotGoingHome) {
|
||||
playTaskbarBackgroundAlphaAnimation();
|
||||
setUserIsGoingHome(false);
|
||||
mTaskbarBgAlphaAnimationStarted = true;
|
||||
}
|
||||
}
|
||||
@@ -850,8 +846,8 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
|
||||
/**
|
||||
* Sets whether the user is going home based on the current gesture.
|
||||
*/
|
||||
public void setUserIsGoingHome(boolean isGoingHome) {
|
||||
mIsGoingHome = isGoingHome;
|
||||
public void setUserIsNotGoingHome(boolean userIsNotGoingHome) {
|
||||
mUserIsNotGoingHome = userIsNotGoingHome;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user