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

Commit 69be1d22 authored by Lucas Dupin's avatar Lucas Dupin Committed by android-build-merger
Browse files

Merge "Stop face auth requests when users are typing" into qt-qpr1-dev am: 5364c5c4

am: 4c5c7c9a

Change-Id: Ic0a7b138fcee84d4e1c830085e9fba9116bfa056
parents 5d075030 4c5c7c9a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -253,6 +253,7 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout
    protected void onUserInput() {
        if (mCallback != null) {
            mCallback.userActivity();
            mCallback.onUserInput();
        }
        mSecurityMessageDisplay.setMessage("");
    }
+2 −0
Original line number Diff line number Diff line
@@ -274,6 +274,7 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit
        @Override
        public void onPatternCellAdded(List<LockPatternView.Cell> pattern) {
            mCallback.userActivity();
            mCallback.onUserInput();
        }

        @Override
@@ -336,6 +337,7 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit
                    });
            if (pattern.size() > MIN_PATTERN_BEFORE_POKE_WAKELOCK) {
                mCallback.userActivity();
                mCallback.onUserInput();
            }
        }

+5 −0
Original line number Diff line number Diff line
@@ -55,4 +55,9 @@ public interface KeyguardSecurityCallback {
    default void onCancelClicked() {
        // No-op
    }

    /**
     * Invoked whenever users are typing their password or drawing a pattern.
     */
    void onUserInput();
}
+7 −0
Original line number Diff line number Diff line
@@ -596,6 +596,11 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
            }
        }

        @Override
        public void onUserInput() {
            mUpdateMonitor.cancelFaceAuth();
        }

        public void dismiss(boolean authenticated, int targetId) {
            mSecurityCallback.dismiss(authenticated, targetId);
        }
@@ -640,6 +645,8 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
        @Override
        public void dismiss(boolean securityVerified, int targetUserId) { }
        @Override
        public void onUserInput() { }
        @Override
        public void reset() {}
    };

+7 −0
Original line number Diff line number Diff line
@@ -1664,6 +1664,13 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
        updateFaceListeningState();
    }

    /**
     * In case face auth is running, cancel it.
     */
    public void cancelFaceAuth() {
        stopListeningForFace();
    }

    private void updateFaceListeningState() {
        // If this message exists, we should not authenticate again until this message is
        // consumed by the handler