1// Copyright (C) 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 default_applicable_licenses: ["Android-Apache-2.0"], 17} 18 19filegroup { 20 name: "rotary-service-proto-source", 21 srcs: [ 22 "proto/car_rotary_controller.proto", 23 ], 24} 25 26java_library { 27 name: "rotary-service-javastream-protos", 28 proto: { 29 type: "stream", 30 }, 31 srcs: [":rotary-service-proto-source"], 32 installable: false, 33} 34 35android_app { 36 name: "CarRotaryController", 37 srcs: [ 38 "src/**/*.java", 39 ], 40 resource_dirs: ["res"], 41 42 // This app uses allowlisted privileged permissions. 43 required: ["allowed_privapp_com.android.car.rotary"], 44 45 // Because it uses a platform API (CarInputManager). 46 platform_apis: true, 47 48 // This app should be platform signed because it requires 49 // android.car.permission.CAR_MONITOR_INPUT permission, which is of type "signature". 50 certificate: "platform", 51 52 // This app uses allowlisted privileged permissions. 53 privileged: true, 54 55 optimize: { 56 enabled: false, 57 }, 58 dex_preopt: { 59 enabled: false, 60 }, 61 libs: [ 62 "android.car-system-stubs", 63 ], 64 static_libs: [ 65 "car-ui-lib", 66 "rotary-service-javastream-protos", 67 ], 68} 69 70android_library { 71 name: "CarRotaryControllerForUnitTesting", 72 73 manifest: "tests/unit/AndroidManifest.xml", 74 75 srcs: [ 76 "src/**/*.java", 77 ], 78 79 resource_dirs: [ 80 "tests/unit/res", 81 "res", 82 ], 83 84 optimize: { 85 enabled: false, 86 }, 87 dex_preopt: { 88 enabled: false, 89 }, 90 libs: [ 91 "android.car-system-stubs", 92 ], 93 static_libs: [ 94 "car-ui-lib", 95 "rotary-service-javastream-protos", 96 ], 97 98 aaptflags: ["--extra-packages com.android.car.rotary"], 99 // TODO(b/319708040): re-enable use_resource_processor 100 use_resource_processor: false, 101} 102