Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11a4676c authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Make mAllAppsButtonContainer not Nullable" into main

parents ed5edb7d 6957a037
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1704,7 +1704,7 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
                duration);

        View allAppsButton = mControllers.taskbarViewController.getAllAppsButtonView();
        if (allAppsButton != null && !FeatureFlags.enableAllAppsButtonInHotseat()) {
        if (!FeatureFlags.enableAllAppsButtonInHotseat()) {
            ValueAnimator alphaOverride = ValueAnimator.ofFloat(0, 1);
            alphaOverride.setDuration(duration);
            alphaOverride.addUpdateListener(a -> {
+20 −28
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
    @Nullable private FolderIcon mLeaveBehindFolderIcon;

    // Only non-null when device supports having an All Apps button.
    @Nullable private final TaskbarAllAppsButtonContainer mAllAppsButtonContainer;
    private final TaskbarAllAppsButtonContainer mAllAppsButtonContainer;

    // Only non-null when device supports having a Divider button.
    @Nullable private TaskbarDividerContainer mTaskbarDividerContainer;
@@ -217,7 +217,6 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar

        // All apps icon takes less space compared to normal icon size, reserve space for the icon
        // separately.
        if (mAllAppsButtonContainer != null) {
        boolean forceTransientTaskbarSize =
                enableTaskbarPinning() && !mActivityContext.isThreeButtonNav();
        availableWidth -= iconSize - (int) getResources().getDimension(
@@ -226,7 +225,6 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
                                DisplayController.isTransientTaskbar(mActivityContext)
                                        && !mActivityContext.isPhoneMode())));
        ++additionalIcons;
        }

        return Math.floorDiv(availableWidth, iconSize) + additionalIcons;
    }
@@ -313,9 +311,7 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
        mIconClickListener = mControllerCallbacks.getIconOnClickListener();
        mIconLongClickListener = mControllerCallbacks.getIconOnLongClickListener();

        if (mAllAppsButtonContainer != null) {
        mAllAppsButtonContainer.setUpCallbacks(callbacks);
        }
        if (mTaskbarDividerContainer != null
                && mActivityContext.getTaskbarFeatureEvaluator().getSupportsPinningPopup()) {
            mTaskbarDividerContainer.setUpCallbacks(callbacks);
@@ -350,13 +346,11 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
        int numViewsAnimated = 0;
        mAddedDividerForRecents = false;

        if (mAllAppsButtonContainer != null) {
        removeView(mAllAppsButtonContainer);

        if (mTaskbarDividerContainer != null) {
            removeView(mTaskbarDividerContainer);
        }
        }
        if (mTaskbarOverflowView != null) {
            removeView(mTaskbarOverflowView);
        }
@@ -532,7 +526,6 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
            removeAndRecycle(getChildAt(nextViewIndex));
        }

        if (mAllAppsButtonContainer != null) {
        addView(mAllAppsButtonContainer, mIsRtl ? hotseatItemInfos.length : 0);

        // If there are no recent tasks, add divider after All Apps (unless it's the only view).
@@ -541,7 +534,7 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
                && getChildCount() > 1) {
            addView(mTaskbarDividerContainer, mIsRtl ? (getChildCount() - 1) : 1);
        }
        }


        if (mActivityContext.getDeviceProfile().isQsbInline) {
            addView(mQsb, mIsRtl ? getChildCount() : 0);
@@ -779,7 +772,6 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
    /**
     * Returns the all apps button in the taskbar.
     */
    @Nullable
    public TaskbarAllAppsButtonContainer getAllAppsButtonContainer() {
        return mAllAppsButtonContainer;
    }
+0 −1
Original line number Diff line number Diff line
@@ -367,7 +367,6 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
        return mTaskbarView.getIconViews();
    }

    @Nullable
    public View getAllAppsButtonView() {
        return mTaskbarView.getAllAppsButtonContainer();
    }