xref: /aosp_15_r20/cts/tests/tests/security/CameraPermissionTestApp/Android.bp (revision b7c941bb3fa97aba169d73cee0bed2de8ac964bf)
1//
2// Copyright (C) 2024 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    default_team: "trendy_team_platform_security",
19    default_applicable_licenses: ["Android-Apache-2.0"],
20}
21
22android_library {
23    name: "CameraPermissionTestLib",
24    srcs: [
25        "src/IntentKeys.kt",
26        "src/**/ICameraOpener.aidl",
27    ],
28    min_sdk_version: "21",
29    manifest: "AndroidManifestLibrary.xml",
30}
31
32cc_library {
33    name: "libopencameraapp_jni",
34    srcs: [
35        "jni/*.cpp",
36    ],
37    header_libs: [
38        "jni_headers",
39        "liblog_headers",
40    ],
41    static_libs: [
42        "libimage_io_ndk",
43    ],
44    shared_libs: [
45        "libandroid",
46        "libnativehelper_compat_libc++",
47        "liblog",
48        "libcamera2ndk",
49        "libmediandk",
50    ],
51    // NDK build, shared C++ runtime
52    sdk_version: "current",
53    stl: "c++_shared",
54}
55
56android_test_helper_app {
57    name: "OpenCameraApp",
58    srcs: [
59        "src/CameraOpener.kt",
60        "src/CameraOpenerService.kt",
61        "src/OpenCameraActivity.kt",
62        "src/Utils.kt",
63    ],
64    static_libs: [
65        "androidx.appcompat_appcompat",
66        "androidx.lifecycle_lifecycle-common",
67        "CameraPermissionTestLib",
68        "kotlin-stdlib",
69        "kotlinx-coroutines-android",
70    ],
71    jni_libs: [
72        "libopencameraapp_jni",
73    ],
74
75    min_sdk_version: "30",
76    target_sdk_version: "30",
77    manifest: "AndroidManifestOpen.xml",
78}
79
80android_test_helper_app {
81    name: "CameraProxyApp",
82    srcs: [
83        "src/CameraProxyActivity.kt",
84    ],
85    static_libs: [
86        "androidx.appcompat_appcompat",
87        "androidx.lifecycle_lifecycle-common",
88        "CameraPermissionTestLib",
89        "kotlin-stdlib",
90        "kotlinx-coroutines-android",
91    ],
92
93    min_sdk_version: "30",
94    target_sdk_version: "30",
95    manifest: "AndroidManifestProxy.xml",
96}
97