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

Commit 15c3fd31 authored by Jorim Jaggi's avatar Jorim Jaggi Committed by Android Git Automerger
Browse files

am 35cfe4c1: Merge "Go back to keyguard when in SHADE_LOCKED with single tap." into lmp-preview-dev

* commit '35cfe4c1f216f477d2c024d53a6f2c1a0d817f53':
  Go back to keyguard when in SHADE_LOCKED with single tap.
parents b4df2f58 8988dbb6
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -637,10 +637,12 @@ public abstract class PanelView extends FrameLayout {
        if (mHintAnimationRunning) {
            return true;
        }
        if (x < mEdgeTapAreaWidth) {
        if (x < mEdgeTapAreaWidth
                && mStatusBar.getBarState() == StatusBarState.KEYGUARD) {
            onEdgeClicked(false /* right */);
            return true;
        } else if (x > getWidth() - mEdgeTapAreaWidth) {
        } else if (x > getWidth() - mEdgeTapAreaWidth
                && mStatusBar.getBarState() == StatusBarState.KEYGUARD) {
            onEdgeClicked(true /* right */);
            return true;
        } else {
@@ -654,7 +656,7 @@ public abstract class PanelView extends FrameLayout {
                startUnlockHintAnimation();
                return true;
            case StatusBarState.SHADE_LOCKED:
                // TODO: Go to Keyguard again.
                mStatusBar.goToKeyguard();
                return true;
            case StatusBarState.SHADE:
                collapse();
+10 −0
Original line number Diff line number Diff line
@@ -3054,6 +3054,16 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
        }
    }

    /**
     * Goes back to the keyguard after hanging around in {@link StatusBarState#SHADE_LOCKED}.
     */
    public void goToKeyguard() {
        if (mState == StatusBarState.SHADE_LOCKED) {
            setBarState(StatusBarState.KEYGUARD);
            updateKeyguardState();
        }
    }

    /**
     * @return a ViewGroup that spans the entire panel which contains the quick settings
     */