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
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java
index 3c9e96f..79b8c60 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java
@@ -920,12 +920,13 @@
         }
         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);
         }
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarView.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarView.java
index fe38bb1..c4eeca7 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarView.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarView.java
@@ -422,6 +422,7 @@
     /**
      * Returns the all apps button in the taskbar.
      */
+    @Nullable
     public View getAllAppsButtonView() {
         return mAllAppsButton;
     }
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java
index 80a31b4..9936d27 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java
@@ -240,6 +240,7 @@
         return mTaskbarView.getIconViews();
     }
 
+    @Nullable
     public View getAllAppsButtonView() {
         return mTaskbarView.getAllAppsButtonView();
     }