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

Commit 2df2d309 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Remove CentralSurfaces.collapseShade" into udc-qpr-dev am: 0a6addc9

parents 5f7e6fca 0a6addc9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -914,7 +914,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
            mUiEventLogger.log(GlobalActionsEvent.GA_EMERGENCY_DIALER_PRESS);
            if (mTelecomManager != null) {
                // Close shade so user sees the activity
                mCentralSurfacesOptional.ifPresent(CentralSurfaces::collapseShade);
                mShadeController.cancelExpansionAndCollapseShade();
                Intent intent = mTelecomManager.createLaunchEmergencyDialerIntent(
                        null /* number */);
                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+3 −0
Original line number Diff line number Diff line
@@ -71,6 +71,9 @@ public interface ShadeController {
    /** Posts a request to expand the shade to quick settings. */
    void postAnimateExpandQs();

    /** Cancels any ongoing expansion touch handling and collapses the shade. */
    void cancelExpansionAndCollapseShade();

    /**
     * If the shade is not fully expanded, collapse it animated.
     *
+11 −0
Original line number Diff line number Diff line
@@ -269,6 +269,17 @@ public final class ShadeControllerImpl implements ShadeController {
        }
    }

    @Override
    public void cancelExpansionAndCollapseShade() {
        if (mNotificationPanelViewController.isTracking()) {
            mNotificationShadeWindowViewController.cancelCurrentTouch();
        }
        if (mNotificationPanelViewController.isPanelExpanded()
                && mStatusBarStateController.getState() == StatusBarState.SHADE) {
            animateCollapseShade();
        }
    }

    @Override
    public void collapseOnMainThread() {
        if (Looper.getMainLooper().isCurrentThread()) {
+1 −1
Original line number Diff line number Diff line
@@ -744,7 +744,7 @@ constructor(
            } else if (dismissShade) {
                // The animation will take care of dismissing the shade at the end of the animation.
                // If we don't animate, collapse it directly.
                centralSurfaces?.collapseShade()
                shadeControllerLazy.get().cancelExpansionAndCollapseShade()
            }

            // We should exit the dream to prevent the activity from starting below the
+0 −2
Original line number Diff line number Diff line
@@ -318,8 +318,6 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner {

    void setBouncerShowingOverDream(boolean bouncerShowingOverDream);

    void collapseShade();

    int getWakefulnessState();

    boolean isScreenFullyOff();
Loading