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

Commit 5c6ba8e3 authored by Justin Weir's avatar Justin Weir
Browse files

Delete ShadeViewController.isExpandingOrCollapsing

Moves the more thoughtfully written implementation from
ShadeLockscreenInteractor to ShadeController, replaced all references
to the one in ShadeViewController with it, and deletes it from
both ShadeViewController and ShadeLockscreenInteractor.

Flag: ACONFIG com.android.systemui.scene_container DEVELOPMENT
Test: Updated and ran affected test
Bug: 303267342
Change-Id: Ib1396793f23340c50ac7f19416c9088aa635e86d
parent 10274506
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -2603,7 +2603,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
        return maxHeight;
    }

    @Override
    public boolean isExpandingOrCollapsing() {
        float lockscreenExpansionProgress = mQsController.getLockscreenShadeDragProgress();
        return mIsExpandingOrCollapsing
+1 −2
Original line number Diff line number Diff line
@@ -89,8 +89,7 @@ constructor(

    override fun isShadeFullyOpen(): Boolean = shadeInteractor.isAnyFullyExpanded.value

    override fun isExpandingOrCollapsing(): Boolean =
        shadeInteractor.anyExpansion.value > 0f && shadeInteractor.anyExpansion.value < 1f
    override fun isExpandingOrCollapsing(): Boolean = shadeInteractor.isUserInteracting.value

    override fun instantExpandShade() {
        // Do nothing
+0 −3
Original line number Diff line number Diff line
@@ -27,9 +27,6 @@ interface ShadeLockscreenInteractor {
     */
    @Deprecated("Use ShadeInteractor instead") fun expandToNotifications()

    /** Returns whether the shade is expanding or collapsing itself or quick settings. */
    val isExpandingOrCollapsing: Boolean

    /**
     * Returns whether the shade height is greater than zero (i.e. partially or fully expanded),
     * there is a HUN, the shade is animating, or the shade is instantly expanding.
+0 −3
Original line number Diff line number Diff line
@@ -31,9 +31,6 @@ import java.util.function.Consumer
 * @see NotificationPanelViewController
 */
interface ShadeViewController {
    /** Returns whether the shade is expanding or collapsing itself or quick settings. */
    val isExpandingOrCollapsing: Boolean

    /**
     * Returns whether the shade height is greater than zero or the shade is expecting a synthesized
     * down event.
+0 −1
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ class ShadeViewControllerEmptyImpl @Inject constructor() :
    ShadeLockscreenInteractor,
    PanelExpansionInteractor {
    override fun expandToNotifications() {}
    override val isExpandingOrCollapsing: Boolean = false
    override val isExpanded: Boolean = false
    override val isPanelExpanded: Boolean = false
    override fun animateCollapseQs(fullyCollapse: Boolean) {}
Loading