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

Commit 216ce5d7 authored by Jim Miller's avatar Jim Miller Committed by Android (Google) Code Review
Browse files

Merge "Add rename support to FingerprintManager"

parents d5e97f93 99d6019b
Loading
Loading
Loading
Loading
+21 −2
Original line number Diff line number Diff line
@@ -98,8 +98,8 @@ public class FingerprintManager {
    };

    public static final class FingerprintItem {
        CharSequence name;
        int id;
        public CharSequence name;
        public int id;
        FingerprintItem(CharSequence name, int id) {
            this.name = name;
            this.id = id;
@@ -291,4 +291,23 @@ public class FingerprintManager {
        }
        return false;
    }

    /**
     * Renames the given fingerprint template
     * @param fpId the fingerprint id
     * @param newName the new name
     * @hide
     */
    public void rename(int fpId, String newName) {
        // Renames the given fpId
        if (mService != null) {
            try {
                mService.rename(fpId, newName);
            } catch (RemoteException e) {
                Log.v(TAG, "Remote exception in rename(): ", e);
            }
        } else {
            Log.w(TAG, "rename(): Service not connected!");
        }
    }
}
 No newline at end of file
+3 −0
Original line number Diff line number Diff line
@@ -41,4 +41,7 @@ interface IFingerprintService {

    // Determine if HAL is loaded and ready
    boolean isHardwareDetected();

    // Rename the given fingerprint id
    void rename(int fpId, String name);
}
+6 −0
Original line number Diff line number Diff line
@@ -320,6 +320,12 @@ public class FingerprintService extends SystemService {
            checkPermission(USE_FINGERPRINT);
            return mHalDeviceId != 0;
        }

        @Override
        public void rename(int fpId, String name) {
            checkPermission(MANAGE_FINGERPRINT);
            // TODO
        }
    }

    @Override