use of android.hardware.fingerprint.Fingerprint in project platform_frameworks_base by android.
the class FingerprintsUserState method getCopy.
private ArrayList<Fingerprint> getCopy(ArrayList<Fingerprint> array) {
ArrayList<Fingerprint> result = new ArrayList<Fingerprint>(array.size());
for (int i = 0; i < array.size(); i++) {
Fingerprint fp = array.get(i);
result.add(new Fingerprint(fp.getName(), fp.getGroupId(), fp.getFingerId(), fp.getDeviceId()));
}
return result;
}
use of android.hardware.fingerprint.Fingerprint in project platform_frameworks_base by android.
the class FingerprintsUserState method getUniqueName.
/**
* Finds a unique name for the given fingerprint
* @return unique name
*/
private String getUniqueName() {
int guess = 1;
while (true) {
// Not the most efficient algorithm in the world, but there shouldn't be more than 10
String name = mCtx.getString(com.android.internal.R.string.fingerprint_name_template, guess);
if (isUnique(name)) {
return name;
}
guess++;
}
}
use of android.hardware.fingerprint.Fingerprint in project platform_frameworks_base by android.
the class FingerprintsUserState method renameFingerprint.
public void renameFingerprint(int fingerId, CharSequence name) {
synchronized (this) {
for (int i = 0; i < mFingerprints.size(); i++) {
if (mFingerprints.get(i).getFingerId() == fingerId) {
Fingerprint old = mFingerprints.get(i);
mFingerprints.set(i, new Fingerprint(name, old.getGroupId(), old.getFingerId(), old.getDeviceId()));
scheduleWriteStateLocked();
break;
}
}
}
}
use of android.hardware.fingerprint.Fingerprint in project android_frameworks_base by crdroidandroid.
the class FingerprintsUserState method renameFingerprint.
public void renameFingerprint(int fingerId, CharSequence name) {
synchronized (this) {
for (int i = 0; i < mFingerprints.size(); i++) {
if (mFingerprints.get(i).getFingerId() == fingerId) {
Fingerprint old = mFingerprints.get(i);
mFingerprints.set(i, new Fingerprint(name, old.getGroupId(), old.getFingerId(), old.getDeviceId()));
scheduleWriteStateLocked();
break;
}
}
}
}
use of android.hardware.fingerprint.Fingerprint in project android_frameworks_base by crdroidandroid.
the class FingerprintsUserState method getCopy.
private ArrayList<Fingerprint> getCopy(ArrayList<Fingerprint> array) {
ArrayList<Fingerprint> result = new ArrayList<Fingerprint>(array.size());
for (int i = 0; i < array.size(); i++) {
Fingerprint fp = array.get(i);
result.add(new Fingerprint(fp.getName(), fp.getGroupId(), fp.getFingerId(), fp.getDeviceId()));
}
return result;
}
Aggregations