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

Commit dc583a90 authored by Curtis Belmonte's avatar Curtis Belmonte
Browse files

RESTRICT AUTOMERGE Update UDFPS enroll progress when help received

Fixes a bug where the completion animation is sometimes played near the
end of enrollment if ACQUIRED_GOOD is followed by a help message.

Test: Manual
Bug: 198989936
Bug: 199192982
Change-Id: I0fcf6d2cfbf33fb9b90d3ccf1fcbd7734a55edbd
Merged-In: Ifda20133f1ee90c9e1612e9066c19efbb6ffc9cd
Merged-In: Ic12b85bd6f8f1d4068952eb83bcc8a1df21f2e8e
parent 27878137
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -217,6 +217,7 @@ public class UdfpsController implements DozeReceiver {
        }

        void onEnrollmentHelp() {
            Log.d(TAG, "onEnrollmentHelp");
            if (mEnrollHelper != null) {
                mEnrollHelper.onEnrollmentHelp();
            }
+4 −1
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ public class UdfpsEnrollHelper {

    interface Listener {
        void onEnrollmentProgress(int remaining, int totalSteps);
        void onEnrollmentHelp(int remaining, int totalSteps);
        void onLastStepAcquired();
    }

@@ -173,7 +174,9 @@ public class UdfpsEnrollHelper {
    }

    void onEnrollmentHelp() {

        if (mListener != null) {
            mListener.onEnrollmentHelp(mRemainingSteps, mTotalSteps);
        }
    }

    void setListener(Listener listener) {
+5 −0
Original line number Diff line number Diff line
@@ -83,6 +83,11 @@ public class UdfpsEnrollView extends UdfpsAnimationView {
        });
    }

    void onEnrollmentHelp(int remaining, int totalSteps) {
        mHandler.post(
                () -> mFingerprintProgressDrawable.setEnrollmentProgress(remaining, totalSteps));
    }

    void onLastStepAcquired() {
        mHandler.post(() -> {
            mFingerprintProgressDrawable.onLastStepAcquired();
+14 −9
Original line number Diff line number Diff line
@@ -38,6 +38,11 @@ public class UdfpsEnrollViewController extends UdfpsAnimationViewController<Udfp
                    mView.onEnrollmentProgress(remaining, totalSteps);
                }

                @Override
                public void onEnrollmentHelp(int remaining, int totalSteps) {
                    mView.onEnrollmentHelp(remaining, totalSteps);
                }

                @Override
                public void onLastStepAcquired() {
                    mView.onLastStepAcquired();