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

Commit 64180d29 authored by Justin Weir's avatar Justin Weir Committed by Android (Google) Code Review
Browse files

Merge "Remove expand and expandToQs from ShadeViewController" into main

parents d0658959 9db6d509
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -2045,7 +2045,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
        mView.animate().cancel();
        mView.animate().cancel();
    }
    }


    @Override
    public void expandToQs() {
    public void expandToQs() {
        if (mQsController.isExpansionEnabled()) {
        if (mQsController.isExpansionEnabled()) {
            mQsController.setExpandImmediate(true);
            mQsController.setExpandImmediate(true);
@@ -2812,7 +2811,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
        mQsController.setListening(listening);
        mQsController.setListening(listening);
    }
    }


    @Override
    public void expand(boolean animate) {
    public void expand(boolean animate) {
        if (isFullyCollapsed() || isCollapsing()) {
        if (isFullyCollapsed() || isCollapsing()) {
            mInstantExpanding = true;
            mInstantExpanding = true;
+0 −6
Original line number Original line Diff line number Diff line
@@ -31,12 +31,6 @@ import java.util.function.Consumer
 * @see NotificationPanelViewController
 * @see NotificationPanelViewController
 */
 */
interface ShadeViewController {
interface ShadeViewController {
    /** Expand the shade either animated or instantly. */
    fun expand(animate: Boolean)

    /** Animates to an expanded shade with QS expanded. If the shade starts expanded, expands QS. */
    fun expandToQs()

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


+0 −2
Original line number Original line Diff line number Diff line
@@ -28,8 +28,6 @@ import javax.inject.Inject
/** Empty implementation of ShadeViewController for variants with no shade. */
/** Empty implementation of ShadeViewController for variants with no shade. */
class ShadeViewControllerEmptyImpl @Inject constructor() :
class ShadeViewControllerEmptyImpl @Inject constructor() :
    ShadeViewController, ShadeBackActionInteractor, ShadeLockscreenInteractor {
    ShadeViewController, ShadeBackActionInteractor, ShadeLockscreenInteractor {
    override fun expand(animate: Boolean) {}
    override fun expandToQs() {}
    override fun expandToNotifications() {}
    override fun expandToNotifications() {}
    override val isExpandingOrCollapsing: Boolean = false
    override val isExpandingOrCollapsing: Boolean = false
    override val isExpanded: Boolean = false
    override val isExpanded: Boolean = false
+1 −1
Original line number Original line Diff line number Diff line
@@ -309,7 +309,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba
                if (mVibrateOnOpening) {
                if (mVibrateOnOpening) {
                    vibrateOnNavigationKeyDown();
                    vibrateOnNavigationKeyDown();
                }
                }
                mShadeViewController.expand(true /* animate */);
                mShadeController.animateExpandShade();
                mNotificationStackScrollLayoutController.setWillExpand(true);
                mNotificationStackScrollLayoutController.setWillExpand(true);
                mHeadsUpManager.unpinAll(true /* userUnpinned */);
                mHeadsUpManager.unpinAll(true /* userUnpinned */);
                mMetricsLogger.count("panel_open", 1);
                mMetricsLogger.count("panel_open", 1);
+1 −1
Original line number Original line Diff line number Diff line
@@ -91,7 +91,7 @@ private constructor(
                if (event.source == InputDevice.SOURCE_MOUSE) {
                if (event.source == InputDevice.SOURCE_MOUSE) {
                    if (event.action == MotionEvent.ACTION_UP) {
                    if (event.action == MotionEvent.ACTION_UP) {
                        v.performClick()
                        v.performClick()
                        shadeViewController.expand(/* animate= */ true)
                        shadeController.animateExpandShade()
                    }
                    }
                    return true
                    return true
                }
                }
Loading