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

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

Merge "Move isFullyCollapsed to PanelExpansionInteractor" into main

parents 97c7930d 5f6a777d
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -37,9 +37,6 @@ interface ShadeViewController {
     */
     */
    val isPanelExpanded: Boolean
    val isPanelExpanded: Boolean


    /** Returns whether shade's height is zero. */
    val isFullyCollapsed: Boolean

    /** Returns whether the shade is tracking touches for expand/collapse of the shade or QS. */
    /** Returns whether the shade is tracking touches for expand/collapse of the shade or QS. */
    val isTracking: Boolean
    val isTracking: Boolean


+1 −0
Original line number Original line Diff line number Diff line
@@ -39,6 +39,7 @@ class ShadeViewControllerEmptyImpl @Inject constructor() :
    override fun animateCollapseQs(fullyCollapse: Boolean) {}
    override fun animateCollapseQs(fullyCollapse: Boolean) {}
    override fun canBeCollapsed(): Boolean = false
    override fun canBeCollapsed(): Boolean = false
    @Deprecated("Use ShadeAnimationInteractor instead") override val isCollapsing: Boolean = false
    @Deprecated("Use ShadeAnimationInteractor instead") override val isCollapsing: Boolean = false
    @Deprecated("Use !ShadeInteractor.isAnyExpanded instead")
    override val isFullyCollapsed: Boolean = false
    override val isFullyCollapsed: Boolean = false
    override val isTracking: Boolean = false
    override val isTracking: Boolean = false
    override val isViewEnabled: Boolean = false
    override val isViewEnabled: Boolean = false
+3 −0
Original line number Original line Diff line number Diff line
@@ -55,6 +55,9 @@ interface PanelExpansionInteractor {
    )
    )
    val isFullyExpanded: Boolean
    val isFullyExpanded: Boolean


    /** Returns whether shade's height is zero. */
    @Deprecated("Use !ShadeInteractor.isAnyExpanded instead") val isFullyCollapsed: Boolean

    /** Returns whether the shade is in the process of collapsing. */
    /** Returns whether the shade is in the process of collapsing. */
    @Deprecated("Use ShadeAnimationInteractor instead") val isCollapsing: Boolean
    @Deprecated("Use ShadeAnimationInteractor instead") val isCollapsing: Boolean
}
}
+3 −0
Original line number Original line Diff line number Diff line
@@ -101,6 +101,9 @@ constructor(
    )
    )
    override val isFullyExpanded = shadeInteractor.isAnyFullyExpanded.value
    override val isFullyExpanded = shadeInteractor.isAnyFullyExpanded.value


    @Deprecated("Use !ShadeInteractor.isAnyExpanded instead")
    override val isFullyCollapsed = !shadeInteractor.isAnyExpanded.value

    @Deprecated("Use ShadeAnimationInteractor instead")
    @Deprecated("Use ShadeAnimationInteractor instead")
    override val isCollapsing =
    override val isCollapsing =
        shadeAnimationInteractor.isAnyCloseAnimationRunning.value ||
        shadeAnimationInteractor.isAnyCloseAnimationRunning.value ||
+6 −2
Original line number Original line Diff line number Diff line
@@ -57,6 +57,7 @@ import com.android.systemui.shade.CameraLauncher;
import com.android.systemui.shade.QuickSettingsController;
import com.android.systemui.shade.QuickSettingsController;
import com.android.systemui.shade.ShadeController;
import com.android.systemui.shade.ShadeController;
import com.android.systemui.shade.ShadeViewController;
import com.android.systemui.shade.ShadeViewController;
import com.android.systemui.shade.domain.interactor.PanelExpansionInteractor;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.disableflags.DisableFlagsLogger;
import com.android.systemui.statusbar.disableflags.DisableFlagsLogger;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController;
@@ -81,6 +82,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba
    private final com.android.systemui.shade.ShadeController mShadeController;
    private final com.android.systemui.shade.ShadeController mShadeController;
    private final CommandQueue mCommandQueue;
    private final CommandQueue mCommandQueue;
    private final ShadeViewController mShadeViewController;
    private final ShadeViewController mShadeViewController;
    private final PanelExpansionInteractor mPanelExpansionInteractor;
    private final RemoteInputQuickSettingsDisabler mRemoteInputQuickSettingsDisabler;
    private final RemoteInputQuickSettingsDisabler mRemoteInputQuickSettingsDisabler;
    private final MetricsLogger mMetricsLogger;
    private final MetricsLogger mMetricsLogger;
    private final KeyguardUpdateMonitor mKeyguardUpdateMonitor;
    private final KeyguardUpdateMonitor mKeyguardUpdateMonitor;
@@ -120,6 +122,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba
            ShadeController shadeController,
            ShadeController shadeController,
            CommandQueue commandQueue,
            CommandQueue commandQueue,
            ShadeViewController shadeViewController,
            ShadeViewController shadeViewController,
            PanelExpansionInteractor panelExpansionInteractor,
            RemoteInputQuickSettingsDisabler remoteInputQuickSettingsDisabler,
            RemoteInputQuickSettingsDisabler remoteInputQuickSettingsDisabler,
            MetricsLogger metricsLogger,
            MetricsLogger metricsLogger,
            KeyguardUpdateMonitor keyguardUpdateMonitor,
            KeyguardUpdateMonitor keyguardUpdateMonitor,
@@ -147,6 +150,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba
        mShadeController = shadeController;
        mShadeController = shadeController;
        mCommandQueue = commandQueue;
        mCommandQueue = commandQueue;
        mShadeViewController = shadeViewController;
        mShadeViewController = shadeViewController;
        mPanelExpansionInteractor = panelExpansionInteractor;
        mRemoteInputQuickSettingsDisabler = remoteInputQuickSettingsDisabler;
        mRemoteInputQuickSettingsDisabler = remoteInputQuickSettingsDisabler;
        mMetricsLogger = metricsLogger;
        mMetricsLogger = metricsLogger;
        mKeyguardUpdateMonitor = keyguardUpdateMonitor;
        mKeyguardUpdateMonitor = keyguardUpdateMonitor;
@@ -304,7 +308,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba
            mShadeController.animateCollapseShade();
            mShadeController.animateCollapseShade();
        } else if (KeyEvent.KEYCODE_SYSTEM_NAVIGATION_DOWN == key.getKeyCode()) {
        } else if (KeyEvent.KEYCODE_SYSTEM_NAVIGATION_DOWN == key.getKeyCode()) {
            mMetricsLogger.action(MetricsEvent.ACTION_SYSTEM_NAVIGATION_KEY_DOWN);
            mMetricsLogger.action(MetricsEvent.ACTION_SYSTEM_NAVIGATION_KEY_DOWN);
            if (mShadeViewController.isFullyCollapsed()) {
            if (mPanelExpansionInteractor.isFullyCollapsed()) {
                if (mVibrateOnOpening) {
                if (mVibrateOnOpening) {
                    vibrateOnNavigationKeyDown();
                    vibrateOnNavigationKeyDown();
                }
                }
@@ -371,7 +375,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba
                    mStatusBarKeyguardViewManager.reset(true /* hide */);
                    mStatusBarKeyguardViewManager.reset(true /* hide */);
                }
                }
                mCameraLauncherLazy.get().launchCamera(source,
                mCameraLauncherLazy.get().launchCamera(source,
                        mShadeViewController.isFullyCollapsed());
                        mPanelExpansionInteractor.isFullyCollapsed());
                mCentralSurfaces.updateScrimController();
                mCentralSurfaces.updateScrimController();
            } else {
            } else {
                // We need to defer the camera launch until the screen comes on, since otherwise
                // We need to defer the camera launch until the screen comes on, since otherwise
Loading