commit | 912a53e677cd158e7fe3bd7351c96e4360e4c2af | [log] [tgz] |
---|---|---|
author | Schneider Victor-tulias <victortulias@google.com> | Tue Nov 15 12:12:17 2022 -0800 |
committer | Schneider Victor-tulias <victortulias@google.com> | Tue Nov 15 12:12:17 2022 -0800 |
tree | 9d7612ff571740b64aafd58c398f63d9aa194750 | |
parent | 1d253ac8e0269da11c0357acdab86623de6d2c2e [diff] |
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(); }