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

Commit 4f364c9e authored by Jim Miller's avatar Jim Miller
Browse files

Fix NPE cause by new fingerprint permission check

We no longer send fingerprintid to non-privileged apps. Though
Keyguard can get the permission, it does not currently use fingerprint
info, so remove the API call.

Fixes bug 21040383

Change-Id: I8a9461ed138c368afc75601fe6d4eadc9a8b91c5
parent 800ebfc1
Loading
Loading
Loading
Loading
+3 −5
Original line number Original line Diff line number Diff line
@@ -205,7 +205,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
                    handleScreenTurnedOn();
                    handleScreenTurnedOn();
                    break;
                    break;
                case MSG_FINGERPRINT_AUTHENTICATED:
                case MSG_FINGERPRINT_AUTHENTICATED:
                    handleFingerprintAuthenticated(msg.arg1, msg.arg2);
                    handleFingerprintAuthenticated();
                    break;
                    break;
                case MSG_FINGERPRINT_HELP:
                case MSG_FINGERPRINT_HELP:
                    handleFingerprintHelp(msg.arg1 /* msgId */, (String) msg.obj /* errString */);
                    handleFingerprintHelp(msg.arg1 /* msgId */, (String) msg.obj /* errString */);
@@ -348,7 +348,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
        handleFingerprintHelp(-1, mContext.getString(R.string.fingerprint_not_recognized));
        handleFingerprintHelp(-1, mContext.getString(R.string.fingerprint_not_recognized));
    }
    }


    private void handleFingerprintAuthenticated(int fingerId, int groupId) {
    private void handleFingerprintAuthenticated() {
        try {
        try {
            final int userId;
            final int userId;
            try {
            try {
@@ -524,9 +524,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {


        @Override
        @Override
        public void onAuthenticationSucceeded(AuthenticationResult result) {
        public void onAuthenticationSucceeded(AuthenticationResult result) {
            mHandler.obtainMessage(MSG_FINGERPRINT_AUTHENTICATED,
            mHandler.obtainMessage(MSG_FINGERPRINT_AUTHENTICATED).sendToTarget();
                    result.getFingerprint().getFingerId(),
                    result.getFingerprint().getGroupId()).sendToTarget();
        }
        }


        @Override
        @Override