Debian Codegraph @

core/java/android/hardware/fingerprint/Fingerprint.java

raw symbols SCIP
1 /*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package android.hardware.fingerprint;
17
18 import android.hardware.biometrics.BiometricAuthenticator;
19 import android.os.Parcel;
20 import android.os.Parcelable;
21
22 /**
23 * Container for fingerprint metadata.
24 * @hide
25 */
26 public final class Fingerprint extends BiometricAuthenticator.Identifier {
27 private int mGroupId;
28
29 public Fingerprint(CharSequence name, int groupId, int fingerId, long deviceId) {
30 super(name, fingerId, deviceId);
31 mGroupId = groupId;
32 }
33
34 public Fingerprint(CharSequence name, int fingerId, long deviceId) {
35 super(name, fingerId, deviceId);
36 }
37
38 private Fingerprint(Parcel in) {
39 super(in.readString(), in.readInt(), in.readLong());
40 mGroupId = in.readInt();
41 }
42
43 /**
44 * Gets the group id specified when the fingerprint was enrolled.
45 * @return group id for the set of fingerprints this one belongs to.
46 */
47 public int getGroupId() {
48 return mGroupId;
49 }
50
51 public int describeContents() {
52 return 0;
53 }
54
55 public void writeToParcel(Parcel out, int flags) {
56 out.writeString(getName().toString());
57 out.writeInt(getBiometricId());
58 out.writeLong(getDeviceId());
59 out.writeInt(mGroupId);
60 }
61
62 public static final @android.annotation.NonNull Parcelable.Creator<Fingerprint> CREATOR
63 = new Parcelable.Creator<Fingerprint>() {
64 public Fingerprint createFromParcel(Parcel in) {
65 return new Fingerprint(in);
66 }
67
68 public Fingerprint[] newArray(int size) {
69 return new Fingerprint[size];
70 }
71 };
72 }