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 Diff line number Diff line
@@ -37,9 +37,6 @@ interface ShadeViewController {
     */
    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. */
    val isTracking: Boolean

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

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

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