1package {
2    default_team: "trendy_team_biometrics_framework",
3    // See: http://go/android-license-faq
4    // A large-scale-change added 'default_applicable_licenses' to import
5    // all of the 'license_kinds' from "hardware_interfaces_license"
6    // to get the below license kinds:
7    //   SPDX-license-identifier-Apache-2.0
8    default_applicable_licenses: ["hardware_interfaces_license"],
9}
10
11cc_binary {
12    name: "android.hardware.biometrics.fingerprint-service.example",
13    vendor: true,
14    relative_install_path: "hw",
15    local_include_dirs: ["include"],
16    srcs: [
17        "FakeLockoutTracker.cpp",
18        "FakeFingerprintEngine.cpp",
19        "FakeFingerprintEngineRear.cpp",
20        "FakeFingerprintEngineUdfps.cpp",
21        "FakeFingerprintEngineSide.cpp",
22        "Fingerprint.cpp",
23        "Session.cpp",
24        "FingerprintConfig.cpp",
25        "VirtualHal.cpp",
26        "main.cpp",
27    ],
28    stl: "c++_static",
29    shared_libs: [
30        "libbinder_ndk",
31        "liblog",
32    ],
33    static_libs: [
34        "libandroid.hardware.biometrics.fingerprint.VirtualProps",
35        "libbase",
36        "android.hardware.biometrics.fingerprint-V5-ndk",
37        "android.hardware.biometrics.common-V4-ndk",
38        "android.hardware.biometrics.common.thread",
39        "android.hardware.biometrics.common.util",
40        "android.hardware.biometrics.common.config",
41        "android.hardware.keymaster-V4-ndk",
42    ],
43    installable: false, // install APEX instead
44    product_variables: {
45        debuggable: {
46            cflags: ["-DFPS_DEBUGGABLE"],
47        },
48    },
49}
50
51cc_test {
52    name: "android.hardware.biometrics.fingerprint.FakeFingerprintEngineTest",
53    local_include_dirs: ["include"],
54    srcs: [
55        "tests/FakeFingerprintEngineTest.cpp",
56        "FakeFingerprintEngine.cpp",
57        "FakeLockoutTracker.cpp",
58        "FingerprintConfig.cpp",
59    ],
60    shared_libs: [
61        "libbase",
62        "libbinder_ndk",
63    ],
64    static_libs: [
65        "libandroid.hardware.biometrics.fingerprint.VirtualProps",
66        "android.hardware.biometrics.fingerprint-V5-ndk",
67        "android.hardware.biometrics.common-V4-ndk",
68        "android.hardware.keymaster-V4-ndk",
69        "android.hardware.biometrics.common.util",
70        "android.hardware.biometrics.common.config",
71        "android.hardware.biometrics.common.thread",
72    ],
73    vendor: true,
74    test_suites: ["general-tests"],
75    require_root: true,
76}
77
78cc_test {
79    name: "android.hardware.biometrics.fingerprint.FakeFingerprintEngineUdfpsTest",
80    local_include_dirs: ["include"],
81    srcs: [
82        "tests/FakeFingerprintEngineUdfpsTest.cpp",
83        "FakeFingerprintEngineUdfps.cpp",
84        "FakeFingerprintEngine.cpp",
85        "FakeLockoutTracker.cpp",
86        "FingerprintConfig.cpp",
87    ],
88    shared_libs: [
89        "libbase",
90        "libbinder_ndk",
91    ],
92    static_libs: [
93        "libandroid.hardware.biometrics.fingerprint.VirtualProps",
94        "android.hardware.biometrics.fingerprint-V5-ndk",
95        "android.hardware.biometrics.common-V4-ndk",
96        "android.hardware.keymaster-V4-ndk",
97        "android.hardware.biometrics.common.util",
98        "android.hardware.biometrics.common.config",
99        "android.hardware.biometrics.common.thread",
100    ],
101    vendor: true,
102    test_suites: ["general-tests"],
103    require_root: true,
104}
105
106cc_test {
107    name: "android.hardware.biometrics.fingerprint.FakeLockoutTrackerTest",
108    local_include_dirs: ["include"],
109    srcs: [
110        "tests/FakeLockoutTrackerTest.cpp",
111        "FakeLockoutTracker.cpp",
112        "FingerprintConfig.cpp",
113    ],
114    shared_libs: [
115        "libbase",
116        "libbinder_ndk",
117    ],
118    static_libs: [
119        "libandroid.hardware.biometrics.fingerprint.VirtualProps",
120        "android.hardware.biometrics.fingerprint-V5-ndk",
121        "android.hardware.biometrics.common-V4-ndk",
122        "android.hardware.keymaster-V4-ndk",
123        "android.hardware.biometrics.common.util",
124        "android.hardware.biometrics.common.thread",
125        "android.hardware.biometrics.common.config",
126    ],
127    vendor: true,
128    test_suites: ["general-tests"],
129    require_root: true,
130}
131
132cc_test {
133    name: "android.hardware.biometrics.fingerprint.SessionTest",
134    local_include_dirs: ["include"],
135    srcs: [
136        "tests/SessionTest.cpp",
137        "Session.cpp",
138        "FakeFingerprintEngine.cpp",
139        "FakeLockoutTracker.cpp",
140        "FingerprintConfig.cpp",
141    ],
142    shared_libs: [
143        "libbase",
144        "libbinder_ndk",
145    ],
146    static_libs: [
147        "libandroid.hardware.biometrics.fingerprint.VirtualProps",
148        "android.hardware.biometrics.fingerprint-V5-ndk",
149        "android.hardware.biometrics.common-V4-ndk",
150        "android.hardware.keymaster-V4-ndk",
151        "android.hardware.biometrics.common.util",
152        "android.hardware.biometrics.common.thread",
153        "android.hardware.biometrics.common.config",
154    ],
155    vendor: true,
156    test_suites: ["general-tests"],
157    require_root: true,
158}
159
160cc_test {
161    name: "android.hardware.biometrics.fingerprint.VirtualHalTest",
162    local_include_dirs: ["include"],
163    srcs: [
164        "tests/VirtualHalTest.cpp",
165        "Session.cpp",
166        "VirtualHal.cpp",
167        "FakeFingerprintEngineRear.cpp",
168        "FakeFingerprintEngineUdfps.cpp",
169        "FakeFingerprintEngineSide.cpp",
170        "FakeFingerprintEngine.cpp",
171        "FakeLockoutTracker.cpp",
172        "Fingerprint.cpp",
173        "FingerprintConfig.cpp",
174    ],
175    shared_libs: [
176        "libbase",
177        "libbinder_ndk",
178    ],
179    static_libs: [
180        "libandroid.hardware.biometrics.fingerprint.VirtualProps",
181        "android.hardware.biometrics.fingerprint-V5-ndk",
182        "android.hardware.biometrics.common-V4-ndk",
183        "android.hardware.keymaster-V4-ndk",
184        "android.hardware.biometrics.common.util",
185        "android.hardware.biometrics.common.thread",
186        "android.hardware.biometrics.common.config",
187    ],
188    product_variables: {
189        debuggable: {
190            cflags: ["-DFPS_DEBUGGABLE"],
191        },
192    },
193    vendor: true,
194    test_suites: ["general-tests"],
195    require_root: true,
196}
197
198sysprop_library {
199    name: "android.hardware.biometrics.fingerprint.VirtualProps",
200    srcs: ["fingerprint.sysprop"],
201    property_owner: "Vendor",
202    vendor: true,
203}
204
205prebuilt_etc {
206    name: "fingerprint-example.rc",
207    src: "fingerprint-example.rc",
208    installable: false,
209}
210
211prebuilt_etc {
212    name: "fingerprint-example.xml",
213    src: "fingerprint-example.xml",
214    sub_dir: "vintf",
215    installable: false,
216}
217
218apex {
219    name: "com.android.hardware.biometrics.fingerprint.virtual",
220    manifest: "apex_manifest.json",
221    file_contexts: "apex_file_contexts",
222    key: "com.android.hardware.key",
223    certificate: ":com.android.hardware.certificate",
224    updatable: false,
225    vendor: true,
226
227    binaries: [
228        "android.hardware.biometrics.fingerprint-service.example",
229    ],
230    prebuilts: [
231        // init_rc
232        "fingerprint-example.rc",
233        // vintf_fragment
234        "fingerprint-example.xml",
235    ],
236}
237