blob: 61697a85458e88091c9b81e64bb49a1fffc3fd3f [file] [log] [blame]
Janis Danisevskis7a1cf382020-11-20 11:22:14 -08001// Copyright 2020, The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Bob Badour4c7858c2021-02-12 15:40:29 -080015package {
16 // See: http://go/android-license-faq
17 // A large-scale-change added 'default_applicable_licenses' to import
18 // all of the 'license_kinds' from "system_security_license"
19 // to get the below license kinds:
20 // SPDX-license-identifier-Apache-2.0
21 default_applicable_licenses: ["system_security_license"],
22}
23
Janis Danisevskis7a1cf382020-11-20 11:22:14 -080024cc_library {
25 name: "libkeystore2_apc_compat",
26 srcs: [
27 "apc_compat.cpp",
28 ],
29 shared_libs: [
Rajesh Nyamagouddc4b6122022-09-14 23:14:29 +000030 "libbinder_ndk",
Janis Danisevskis7a1cf382020-11-20 11:22:14 -080031 "android.hardware.confirmationui@1.0",
Rajesh Nyamagouddc4b6122022-09-14 23:14:29 +000032 "android.hardware.confirmationui-V1-ndk",
Janis Danisevskis7a1cf382020-11-20 11:22:14 -080033 "libbase",
34 "libhidlbase",
35 "libutils",
36 ],
37}
38
39rust_bindgen {
40 name: "libkeystore2_apc_compat_bindgen",
41 wrapper_src: "apc_compat.hpp",
42 crate_name: "keystore2_apc_compat_bindgen",
43 source_stem: "bindings",
44
45 bindgen_flags: [
Joel Galenson915d3ea2021-04-19 09:02:41 -070046 "--allowlist-function=tryGetUserConfirmationService",
47 "--allowlist-function=promptUserConfirmation",
48 "--allowlist-function=abortUserConfirmation",
49 "--allowlist-function=closeUserConfirmationService",
50 "--allowlist-var=INVALID_SERVICE_HANDLE",
51 "--allowlist-var=APC_COMPAT_.*",
Janis Danisevskis7a1cf382020-11-20 11:22:14 -080052 ],
53}
54
55rust_library {
56 name: "libkeystore2_apc_compat-rust",
57 crate_name: "keystore2_apc_compat",
58 srcs: [
59 "apc_compat.rs",
60 ],
61 rustlibs: [
62 "libkeystore2_apc_compat_bindgen",
63 ],
64 shared_libs: [
65 "libkeystore2_apc_compat",
66 ],
67}
Joel Galenson733d1d02021-08-23 13:47:37 -070068
69rust_test {
70 name: "libkeystore2_apc_compat_bindgen_test",
71 srcs: [":libkeystore2_apc_compat_bindgen"],
72 crate_name: "keystore2_apc_compat_bindgen_test",
73 test_suites: ["general-tests"],
74 auto_gen_config: true,
75 clippy_lints: "none",
76 lints: "none",
77}