Merge "Add rename support to FingerprintManager"
This commit is contained in:
@@ -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!");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user