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

Commit aaf9b11e authored by Jim Miller's avatar Jim Miller
Browse files

Don't show security method until we actually return from the camera

This was causing problems because face unlock and the camera app are
competing for the camera.

The solution is to not show the security method until we get back to
keyguard.

Change-Id: I179548e4ee6aa0ab5dad545842ddeb14bc3b58e1
parent 52070c1a
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -584,6 +584,8 @@ public class KeyguardHostView extends KeyguardViewBase {
        }
    };

    protected boolean mShowSecurityWhenReturn;

    @Override
    public void reset() {
        mIsVerifyUnlockOnly = false;
@@ -835,14 +837,10 @@ public class KeyguardHostView extends KeyguardViewBase {
                if (isCameraPage(mAppWidgetContainer.getCurrentPage())) {
                    mAppWidgetContainer.scrollLeft();
                }
                SlidingChallengeLayout slider = locateSlider();
                if (slider != null) {
                    slider.setHandleAlpha(1);
                    slider.showChallenge(true);
                }
                mShowSecurityWhenReturn = true;
            }

            private SlidingChallengeLayout locateSlider() {
            public SlidingChallengeLayout locateSlider() {
                return (SlidingChallengeLayout) findViewById(R.id.sliding_layout);
            }
        };
@@ -1139,6 +1137,14 @@ public class KeyguardHostView extends KeyguardViewBase {
        if (DEBUG) Log.d(TAG, "Window is " + (hasWindowFocus ? "focused" : "unfocused"));
        if (!hasWindowFocus) {
            saveStickyWidgetIndex();
        } else if (mShowSecurityWhenReturn) {
            SlidingChallengeLayout slider =
                (SlidingChallengeLayout) findViewById(R.id.sliding_layout);
            if (slider != null) {
                slider.setHandleAlpha(1);
                slider.showChallenge(true);
            }
            mShowSecurityWhenReturn = false;
        }
    }