[automerger] Reapply back button alpha at end of state animation am: 5273b695c2

Change-Id: Ic83348b0559743b334c5989d014987f144c390f1
This commit is contained in:
Android Build Merger (Role) 2018-06-07 18:48:57 +00:00
commit ac5a07cb59
1 changed files with 9 additions and 0 deletions

View File

@ -16,6 +16,8 @@
package com.android.launcher3.uioverrides;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
import com.android.launcher3.Launcher;
@ -56,6 +58,13 @@ public class BackButtonAlphaHandler implements LauncherStateManager.StateHandler
final float alpha = (float) valueAnimator.getAnimatedValue();
mOverviewInteractionState.setBackButtonAlpha(alpha, false);
});
anim.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
// Reapply the final alpha in case some state (e.g. window focus) changed.
UiFactory.onLauncherStateOrFocusChanged(mLauncher);
}
});
builder.play(anim);
}
}