Loading core/java/android/service/fingerprint/FingerprintManager.java +21 −2 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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 core/java/android/service/fingerprint/IFingerprintService.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -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); } services/core/java/com/android/server/fingerprint/FingerprintService.java +6 −0 Original line number Diff line number Diff line Loading @@ -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 Loading Loading
core/java/android/service/fingerprint/FingerprintManager.java +21 −2 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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
core/java/android/service/fingerprint/IFingerprintService.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -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); }
services/core/java/com/android/server/fingerprint/FingerprintService.java +6 −0 Original line number Diff line number Diff line Loading @@ -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 Loading