Fix null-pointer exception in all set activity first reveal animation

Fixes: 259296310
Test: started all set activity and started the first reveal animation
Change-Id: I371f62be81e7f28ce5ecee150abb5d294bb2264d
This commit is contained in:
Schneider Victor-tulias
2022-11-15 12:12:17 -08:00
parent 1d253ac8e0
commit 912a53e677
3 changed files with 5 additions and 2 deletions

View File

@@ -920,12 +920,13 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
}
mControllers.taskbarStashController.addUnstashToHotseatAnimation(fullAnimation, duration);
if (!FeatureFlags.ENABLE_ALL_APPS_BUTTON_IN_HOTSEAT.get()) {
View allAppsButton = mControllers.taskbarViewController.getAllAppsButtonView();
if (allAppsButton != null && !FeatureFlags.ENABLE_ALL_APPS_BUTTON_IN_HOTSEAT.get()) {
ValueAnimator alphaOverride = ValueAnimator.ofFloat(0, 1);
alphaOverride.setDuration(duration);
alphaOverride.addUpdateListener(a -> {
// Override the alpha updates in the icon alignment animation.
mControllers.taskbarViewController.getAllAppsButtonView().setAlpha(0);
allAppsButton.setAlpha(0);
});
fullAnimation.play(alphaOverride);
}