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 15package { 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 24cc_library { 25 name: "libkeystore2_apc_compat", 26 srcs: [ 27 "apc_compat.cpp", 28 ], 29 shared_libs: [ 30 "android.hardware.confirmationui-V1-ndk", 31 "[email protected]", 32 "libbase", 33 "libbinder_ndk", 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: [ 46 "--allowlist-function=abortUserConfirmation", 47 "--allowlist-function=closeUserConfirmationService", 48 "--allowlist-function=promptUserConfirmation", 49 "--allowlist-function=tryGetUserConfirmationService", 50 "--allowlist-var=APC_COMPAT_.*", 51 "--allowlist-var=INVALID_SERVICE_HANDLE", 52 ], 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} 68 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} 78