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

Commit 2633c06a authored by Justin Weir's avatar Justin Weir
Browse files

Delete methods from ShadeViewController

All calls are either called directly against a specific implementation
or can be replace by calls to ShadeController.

Flag: ACONFIG com.android.systemui.scene_container DEVELOPMENT
Test: Updated and ran affected test
Bug: 303267342
Change-Id: Idb840f9d23369b0018dac9105b9cb9a20e9ae98c
parent 455dd739
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -1979,7 +1979,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
        mNotificationStackScrollLayoutController.resetScrollPosition();
    }

    @Override
    public void collapse(boolean animate, boolean delayed, float speedUpFactor) {
        boolean waiting = false;
        if (animate && !isFullyCollapsed()) {
@@ -1997,7 +1996,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
        }
    }

    @Override
    public void collapse(boolean delayed, float speedUpFactor) {
        if (!canBeCollapsed()) {
            return;
@@ -4004,7 +4002,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
        return mExpandedHeight >= getMaxPanelTransitionDistance();
    }

    @Override
    public boolean isShadeFullyExpanded() {
        if (mBarState == SHADE) {
            return isFullyExpanded();
@@ -4035,7 +4032,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
        return !isFullyCollapsed() && !isTracking() && !isClosing();
    }

    @Override
    public void instantCollapse() {
        abortAnimations();
        setExpandedFraction(0f);
+0 −19
Original line number Diff line number Diff line
@@ -40,25 +40,6 @@ interface ShadeViewController {
     */
    val isPanelExpanded: Boolean

    /** Returns whether the shade is fully expanded in either QS or QQS. */
    val isShadeFullyExpanded: Boolean

    /**
     * Animates the collapse of a shade with the given delay and the default duration divided by
     * speedUpFactor.
     */
    fun collapse(delayed: Boolean, speedUpFactor: Float)

    /** Collapses the shade. */
    fun collapse(animate: Boolean, delayed: Boolean, speedUpFactor: Float)

    /** Collapses the shade instantly without animation. */
    fun instantCollapse()

    /** Returns whether the shade can be collapsed. */
    @Deprecated("Do not use outside of the shade package. Not supported by scenes.")
    fun canBeCollapsed(): Boolean

    /** Returns whether the shade is in the process of collapsing. */
    val isCollapsing: Boolean

+0 −4
Original line number Diff line number Diff line
@@ -32,10 +32,6 @@ class ShadeViewControllerEmptyImpl @Inject constructor() :
    override val isExpandingOrCollapsing: Boolean = false
    override val isExpanded: Boolean = false
    override val isPanelExpanded: Boolean = false
    override val isShadeFullyExpanded: Boolean = false
    override fun collapse(delayed: Boolean, speedUpFactor: Float) {}
    override fun collapse(animate: Boolean, delayed: Boolean, speedUpFactor: Float) {}
    override fun instantCollapse() {}
    override fun animateCollapseQs(fullyCollapse: Boolean) {}
    override fun canBeCollapsed(): Boolean = false
    override val isCollapsing: Boolean = false
+1 −2
Original line number Diff line number Diff line
@@ -301,8 +301,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba

        if (KeyEvent.KEYCODE_SYSTEM_NAVIGATION_UP == key.getKeyCode()) {
            mMetricsLogger.action(MetricsEvent.ACTION_SYSTEM_NAVIGATION_KEY_UP);
            mShadeViewController.collapse(
                    false /* delayed */, 1.0f /* speedUpFactor */);
            mShadeController.animateCollapseShade();
        } else if (KeyEvent.KEYCODE_SYSTEM_NAVIGATION_DOWN == key.getKeyCode()) {
            mMetricsLogger.action(MetricsEvent.ACTION_SYSTEM_NAVIGATION_KEY_DOWN);
            if (mShadeViewController.isFullyCollapsed()) {
+1 −2
Original line number Diff line number Diff line
@@ -3043,8 +3043,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
            if (userSetup != mUserSetup) {
                mUserSetup = userSetup;
                if (!mUserSetup && mState == StatusBarState.SHADE) {
                    mShadeSurface.collapse(true /* animate */, false  /* delayed */,
                            1.0f  /* speedUpFactor */);
                    mShadeController.animateCollapseShade();
                }
            }
        }