Janis Danisevskis | 7a1cf38 | 2020-11-20 11:22:14 -0800 | [diff] [blame] | 1 | // 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 Badour | 4c7858c | 2021-02-12 15:40:29 -0800 | [diff] [blame] | 15 | package { |
| 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 Danisevskis | 7a1cf38 | 2020-11-20 11:22:14 -0800 | [diff] [blame] | 24 | cc_library { |
| 25 | name: "libkeystore2_apc_compat", |
| 26 | srcs: [ |
| 27 | "apc_compat.cpp", |
| 28 | ], |
| 29 | shared_libs: [ |
Rajesh Nyamagoud | dc4b612 | 2022-09-14 23:14:29 +0000 | [diff] [blame] | 30 | "libbinder_ndk", |
Janis Danisevskis | 7a1cf38 | 2020-11-20 11:22:14 -0800 | [diff] [blame] | 31 | "android.hardware.confirmationui@1.0", |
Rajesh Nyamagoud | dc4b612 | 2022-09-14 23:14:29 +0000 | [diff] [blame] | 32 | "android.hardware.confirmationui-V1-ndk", |
Janis Danisevskis | 7a1cf38 | 2020-11-20 11:22:14 -0800 | [diff] [blame] | 33 | "libbase", |
| 34 | "libhidlbase", |
| 35 | "libutils", |
| 36 | ], |
| 37 | } |
| 38 | |
| 39 | rust_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 Galenson | 915d3ea | 2021-04-19 09:02:41 -0700 | [diff] [blame] | 46 | "--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 Danisevskis | 7a1cf38 | 2020-11-20 11:22:14 -0800 | [diff] [blame] | 52 | ], |
| 53 | } |
| 54 | |
| 55 | rust_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 Galenson | 733d1d0 | 2021-08-23 13:47:37 -0700 | [diff] [blame] | 68 | |
| 69 | rust_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 | } |