summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Clara Bayarri <clarabayarri@google.com> 2016-01-26 16:36:14 +0000
committer Clara Bayarri <clarabayarri@google.com> 2016-01-27 10:55:41 +0000
commita5c1a77fad0ea3e2cbdf1dec773800cd77d6562e (patch)
treec6ed88027ed3481977c279d84d8409ef1ca8fe17
parentd7693917a7c7348cb12692116d2693314c29e809 (diff)
Make Fingerprint rename and delete user-aware
Bug: 26790762 Change-Id: I8c54f2ad2cc8cab2508b1feeb6a6131b462466a7
-rw-r--r--core/java/android/hardware/fingerprint/FingerprintManager.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/core/java/android/hardware/fingerprint/FingerprintManager.java b/core/java/android/hardware/fingerprint/FingerprintManager.java
index c96c9be02a3d..9f8c28ee1216 100644
--- a/core/java/android/hardware/fingerprint/FingerprintManager.java
+++ b/core/java/android/hardware/fingerprint/FingerprintManager.java
@@ -491,12 +491,13 @@ public class FingerprintManager {
* credentials (e.g. pin, pattern or password).
* @param cancel an object that can be used to cancel enrollment
* @param flags optional flags
+ * @param userId the user to whom this fingerprint will belong to
* @param callback an object to receive enrollment events
* @hide
*/
@RequiresPermission(MANAGE_FINGERPRINT)
public void enroll(byte [] token, CancellationSignal cancel, int flags,
- EnrollmentCallback callback, int userId) {
+ int userId, EnrollmentCallback callback) {
if (userId == UserHandle.USER_CURRENT) {
userId = getCurrentUserId();
}
@@ -576,17 +577,18 @@ public class FingerprintManager {
/**
* Remove given fingerprint template from fingerprint hardware and/or protected storage.
* @param fp the fingerprint item to remove
+ * @param userId the user who this fingerprint belongs to
* @param callback an optional callback to verify that fingerprint templates have been
* successfully removed. May be null of no callback is required.
*
* @hide
*/
@RequiresPermission(MANAGE_FINGERPRINT)
- public void remove(Fingerprint fp, RemovalCallback callback) {
+ public void remove(Fingerprint fp, int userId, RemovalCallback callback) {
if (mService != null) try {
mRemovalCallback = callback;
mRemovalFingerprint = fp;
- mService.remove(mToken, fp.getFingerId(), getCurrentUserId(), mServiceReceiver);
+ mService.remove(mToken, fp.getFingerId(), userId, mServiceReceiver);
} catch (RemoteException e) {
Log.w(TAG, "Remote exception in remove: ", e);
if (callback != null) {
@@ -599,16 +601,17 @@ public class FingerprintManager {
/**
* Renames the given fingerprint template
* @param fpId the fingerprint id
+ * @param userId the user who this fingerprint belongs to
* @param newName the new name
*
* @hide
*/
@RequiresPermission(MANAGE_FINGERPRINT)
- public void rename(int fpId, String newName) {
+ public void rename(int fpId, int userId, String newName) {
// Renames the given fpId
if (mService != null) {
try {
- mService.rename(fpId, getCurrentUserId(), newName);
+ mService.rename(fpId, userId, newName);
} catch (RemoteException e) {
Log.v(TAG, "Remote exception in rename(): ", e);
}