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

Commit 5cc86599 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Dismiss Keyguard correctly

When authenticating with fingerprint, we didn't go through the
dismiss action, and thus launching intents was broken when
authenticating with fingerprint from the bouncer. Also fixed a crash.

Bug: 21695578
Change-Id: I61f74b5b63d4d6ddf7f8f3ce96feb63b9644cd52
parent d56958c4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -455,7 +455,7 @@ public class KeyguardViewMediator extends SystemUI {
        @Override
        public void onFingerprintAuthenticated(int userId) {
            if (mStatusBarKeyguardViewManager.isBouncerShowing()) {
                mViewMediatorCallback.keyguardDone(true);
                mStatusBarKeyguardViewManager.notifyKeyguardAuthenticated();
            } else {
                mStatusBarKeyguardViewManager.animateCollapsePanels(
                        FINGERPRINT_COLLAPSE_SPEEDUP_FACTOR);
+5 −0
Original line number Diff line number Diff line
@@ -228,4 +228,9 @@ public class KeyguardBouncer {
        ensureView();
        return mKeyguardView.interceptMediaKey(event);
    }

    public void notifyKeyguardAuthenticated() {
        ensureView();
        mKeyguardView.finish();
    }
}
+3 −1
Original line number Diff line number Diff line
@@ -2776,8 +2776,10 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
        Runnable cancelRunnable = new Runnable() {
            @Override
            public void run() {
                if (callback != null) {
                    callback.onActivityStarted(ActivityManager.START_CANCELED);
                }
            }
        };
        executeRunnableDismissingKeyguard(runnable, cancelRunnable, dismissShade, afterKeyguardGone);
    }
+8 −0
Original line number Diff line number Diff line
@@ -447,4 +447,12 @@ public class StatusBarKeyguardViewManager {
        mPhoneStatusBar.animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE, true /* force */,
                false /* delayed */, speedUpFactor);
    }

    /**
     * Notifies that the user has authenticated by other means than using the bouncer, for example,
     * fingerprint.
     */
    public void notifyKeyguardAuthenticated() {
        mBouncer.notifyKeyguardAuthenticated();
    }
}