Merge "Fix null-pointer exception in all set activity first reveal animation" into tm-qpr-dev am: 193f8992f1

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20486066

Change-Id: I6200232bd2f266a365e8559ca060f0594052d797
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Schneider Victor-tulias
2022-11-17 22:11:05 +00:00
committed by Automerger Merge Worker
3 changed files with 5 additions and 2 deletions

View File

@@ -958,12 +958,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);
}

View File

@@ -422,6 +422,7 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
/**
* Returns the all apps button in the taskbar.
*/
@Nullable
public View getAllAppsButtonView() {
return mAllAppsButton;
}

View File

@@ -240,6 +240,7 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
return mTaskbarView.getIconViews();
}
@Nullable
public View getAllAppsButtonView() {
return mTaskbarView.getAllAppsButtonView();
}