1//
2// Copyright (C) 2019 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
17package {
18    // See: http://go/android-license-faq
19    // A large-scale-change added 'default_applicable_licenses' to import
20    // all of the 'license_kinds' from "hardware_interfaces_license"
21    // to get the below license kinds:
22    //   SPDX-license-identifier-Apache-2.0
23    default_applicable_licenses: ["hardware_interfaces_license"],
24}
25
26cc_library_static {
27    name: "librebootescrowdefaultimpl",
28    vendor: true,
29    shared_libs: [
30        "libbase",
31        "libbinder_ndk",
32        "android.hardware.rebootescrow-V1-ndk",
33    ],
34    export_include_dirs: ["include"],
35    srcs: [
36        "RebootEscrow.cpp",
37    ],
38    visibility: [
39        ":__subpackages__",
40    ],
41}
42
43cc_binary {
44    name: "android.hardware.rebootescrow-service.default",
45    relative_install_path: "hw",
46    vendor: true,
47    installable: false, // installed in APEX
48
49    srcs: [
50        "service.cpp",
51    ],
52    cflags: [
53        "-Wall",
54        "-Werror",
55    ],
56    stl: "c++_static",
57    shared_libs: [
58        "libbinder_ndk",
59        "liblog",
60    ],
61    static_libs: [
62        "android.hardware.rebootescrow-V1-ndk",
63        "libbase",
64        "libhadamardutils",
65        "librebootescrowdefaultimpl",
66    ],
67}
68
69cc_library_static {
70    name: "libhadamardutils",
71    vendor_available: true,
72    host_supported: true,
73    shared_libs: [
74        "libbase",
75    ],
76    srcs: [
77        "HadamardUtils.cpp",
78    ],
79    visibility: [
80        ":__subpackages__",
81    ],
82}
83
84cc_test {
85    name: "HadamardUtilsTest",
86    host_supported: true,
87    srcs: [
88        "HadamardUtilsTest.cpp",
89    ],
90    static_libs: [
91        "libhadamardutils",
92    ],
93    header_libs: [
94        "libgtest_prod_headers",
95    ],
96    shared_libs: [
97        "liblog",
98        "libbase",
99    ],
100    test_suites: ["device-tests"],
101}
102
103prebuilt_etc {
104    name: "rebootescrow-default.rc",
105    src: "rebootescrow-default.rc",
106    installable: false,
107}
108
109prebuilt_etc {
110    name: "rebootescrow-default.xml",
111    src: "rebootescrow-default.xml",
112    sub_dir: "vintf",
113    installable: false,
114}
115
116apex {
117    name: "com.android.hardware.rebootescrow",
118    manifest: "apex_manifest.json",
119    file_contexts: "apex_file_contexts",
120    key: "com.android.hardware.key",
121    certificate: ":com.android.hardware.certificate",
122    vendor: true,
123    updatable: false,
124
125    binaries: [
126        "android.hardware.rebootescrow-service.default",
127    ],
128    prebuilts: [
129        "rebootescrow-default.rc",
130        "rebootescrow-default.xml",
131        "android.hardware.reboot_escrow.prebuilt.xml", // <feature>
132    ],
133}
134