use of android.hardware.fingerprint.Fingerprint in project android_frameworks_base by ResurrectionRemix.
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 ResurrectionRemix.
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 android_frameworks_base by ResurrectionRemix.
the class FingerprintsUserState method parseFingerprintsLocked.
private void parseFingerprintsLocked(XmlPullParser parser) throws IOException, XmlPullParserException {
final int outerDepth = parser.getDepth();
int type;
while ((type = parser.next()) != XmlPullParser.END_DOCUMENT && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) {
if (type == XmlPullParser.END_TAG || type == XmlPullParser.TEXT) {
continue;
}
String tagName = parser.getName();
if (tagName.equals(TAG_FINGERPRINT)) {
String name = parser.getAttributeValue(null, ATTR_NAME);
String groupId = parser.getAttributeValue(null, ATTR_GROUP_ID);
String fingerId = parser.getAttributeValue(null, ATTR_FINGER_ID);
String deviceId = parser.getAttributeValue(null, ATTR_DEVICE_ID);
mFingerprints.add(new Fingerprint(name, Integer.parseInt(groupId), Integer.parseInt(fingerId), Integer.parseInt(deviceId)));
}
}
}
use of android.hardware.fingerprint.Fingerprint in project android_frameworks_base by ResurrectionRemix.
the class FingerprintsUserState method addFingerprint.
public void addFingerprint(int fingerId, int groupId) {
synchronized (this) {
mFingerprints.add(new Fingerprint(getUniqueName(), groupId, fingerId, 0));
scheduleWriteStateLocked();
}
}
use of android.hardware.fingerprint.Fingerprint in project android_frameworks_base by ResurrectionRemix.
the class KeyguardUpdateMonitor method onFingerprintAuthenticated.
private void onFingerprintAuthenticated(int userId) {
Trace.beginSection("KeyGuardUpdateMonitor#onFingerPrintAuthenticated");
mUserFingerprintAuthenticated.put(userId, true);
// If fingerprint unlocking is allowed, this event will lead to a Keyguard dismiss or to a
// wake-up (if Keyguard is not showing), so we don't need to listen until Keyguard is
// fully gone.
mFingerprintAlreadyAuthenticated = isUnlockingWithFingerprintAllowed();
for (int i = 0; i < mCallbacks.size(); i++) {
KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
if (cb != null) {
cb.onFingerprintAuthenticated(userId);
}
}
Trace.endSection();
}
Aggregations