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

Commit 3a428a53 authored by Steve Elliott's avatar Steve Elliott
Browse files

Remove NotifShelfController#getInstrinsicHeight()

Bug: 271161129
Test: atest SystemUITests
Change-Id: If7916ea3b0c7516d3d5ff1b51d91d0d5cf7e65ef
parent c98a4c38
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -223,8 +223,6 @@ import com.android.systemui.util.Utils;
import com.android.systemui.util.time.SystemClock;
import com.android.wm.shell.animation.FlingAnimationUtils;

import kotlin.Unit;

import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
@@ -235,6 +233,7 @@ import java.util.function.Consumer;
import javax.inject.Inject;
import javax.inject.Provider;

import kotlin.Unit;
import kotlinx.coroutines.CoroutineDispatcher;

@CentralSurfacesComponent.CentralSurfacesScope
@@ -1704,8 +1703,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
        final float extraSpaceForShelf = lockIconPadding - noShelfOverlapBottomPadding;

        if (extraSpaceForShelf > 0f) {
            return Math.min(mNotificationShelfController.getIntrinsicHeight(),
                    extraSpaceForShelf);
            return Math.min(getShelfHeight(), extraSpaceForShelf);
        }
        return 0f;
    }
@@ -1727,10 +1725,18 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
                mNotificationStackScrollLayoutController.getView(),
                getVerticalSpaceForLockscreenNotifications(),
                getVerticalSpaceForLockscreenShelf(),
                mNotificationShelfController.getIntrinsicHeight()
                getShelfHeight()
        );
    }

    private int getShelfHeight() {
        if (mFeatureFlags.isEnabled(Flags.NOTIFICATION_SHELF_REFACTOR)) {
            return mNotificationStackScrollLayoutController.getShelfHeight();
        } else {
            return mNotificationShelfController.getIntrinsicHeight();
        }
    }

    private void updateClock() {
        if (mIsOcclusionTransitionRunning) {
            return;
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ constructor(
    }

    override val intrinsicHeight: Int
        get() = shelf.intrinsicHeight
        get() = unsupported

    override val shelfIcons: NotificationIconContainer
        get() = unsupported
+9 −0
Original line number Diff line number Diff line
@@ -5119,6 +5119,15 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        requestChildrenUpdate();
    }

    @Nullable
    public ExpandableView getShelf() {
        if (NotificationShelfController.checkRefactorFlagEnabled(mAmbientState.getFeatureFlags())) {
            return mShelf;
        } else {
            return null;
        }
    }

    public void setShelf(NotificationShelf shelf) {
        if (!NotificationShelfController.checkRefactorFlagEnabled(
                mAmbientState.getFeatureFlags())) {
+8 −0
Original line number Diff line number Diff line
@@ -1592,6 +1592,14 @@ public class NotificationStackScrollLayoutController {
        mView.setShelf(shelf);
    }

    public int getShelfHeight() {
        if (!NotificationShelfController.checkRefactorFlagEnabled(mFeatureFlags)) {
            return 0;
        }
        ExpandableView shelf = mView.getShelf();
        return shelf == null ? 0 : shelf.getIntrinsicHeight();
    }

    /**
     * Enum for UiEvent logged from this class
     */