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

Commit 302475e9 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Fix verifyUnlock

Bug: 23970549
Change-Id: I899d8a92050c257217fa8528c33cb4592ad6d76a
parent 1b68e8b7
Loading
Loading
Loading
Loading
+20 −2
Original line number Diff line number Diff line
@@ -920,9 +920,27 @@ public class KeyguardViewMediator extends SystemUI {
                } catch (RemoteException e) {
                    Slog.w(TAG, "Failed to call onKeyguardExitResult(false)", e);
                }
            } else if (!isSecure()) {

                // Keyguard is not secure, no need to do anything, and we don't need to reshow
                // the Keyguard after the client releases the Keyguard lock.
                mExternallyEnabled = true;
                mNeedToReshowWhenReenabled = false;
                updateInputRestricted();
                try {
                    callback.onKeyguardExitResult(true);
                } catch (RemoteException e) {
                    Slog.w(TAG, "Failed to call onKeyguardExitResult(false)", e);
                }
            } else {
                mExitSecureCallback = callback;
                verifyUnlockLocked();

                // Since we prevent apps from hiding the Keyguard if we are secure, this should be
                // a no-op as well.
                try {
                    callback.onKeyguardExitResult(false);
                } catch (RemoteException e) {
                    Slog.w(TAG, "Failed to call onKeyguardExitResult(false)", e);
                }
            }
        }
    }