Yabin Huang | 59237eb | 2020-02-19 17:44:36 -0800 | [diff] [blame] | 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 | |
Bob Badour | c281271 | 2021-02-12 18:11:11 -0800 | [diff] [blame] | 15 | package { |
| 16 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 17 | } |
| 18 | |
Danny Epstein | ad07247 | 2021-04-09 17:09:55 -0700 | [diff] [blame] | 19 | filegroup { |
| 20 | name: "rotary-service-proto-source", |
| 21 | srcs: [ |
| 22 | "proto/car_rotary_controller.proto", |
| 23 | ], |
| 24 | } |
Vinh Tran | 03d20f8 | 2022-06-08 01:12:51 -0400 | [diff] [blame] | 25 | |
| 26 | java_library { |
Danny Epstein | ad07247 | 2021-04-09 17:09:55 -0700 | [diff] [blame] | 27 | name: "rotary-service-javastream-protos", |
Vinh Tran | 03d20f8 | 2022-06-08 01:12:51 -0400 | [diff] [blame] | 28 | proto: { |
| 29 | type: "stream", |
| 30 | }, |
| 31 | srcs: [":rotary-service-proto-source"], |
| 32 | installable: false, |
| 33 | platform_apis: true, |
Danny Epstein | ad07247 | 2021-04-09 17:09:55 -0700 | [diff] [blame] | 34 | } |
| 35 | |
Yabin Huang | 59237eb | 2020-02-19 17:44:36 -0800 | [diff] [blame] | 36 | android_app { |
| 37 | name: "CarRotaryController", |
Danny Epstein | ad07247 | 2021-04-09 17:09:55 -0700 | [diff] [blame] | 38 | srcs: [ |
| 39 | "src/**/*.java", |
Danny Epstein | ad07247 | 2021-04-09 17:09:55 -0700 | [diff] [blame] | 40 | ], |
Yabin Huang | 59237eb | 2020-02-19 17:44:36 -0800 | [diff] [blame] | 41 | resource_dirs: ["res"], |
Yabin Huang | 4091750 | 2020-03-31 11:30:17 -0700 | [diff] [blame] | 42 | |
Danny Epstein | 346b25c | 2021-03-05 10:28:23 -0800 | [diff] [blame] | 43 | // This app uses allowlisted privileged permissions. |
| 44 | required: ["allowed_privapp_com.android.car.rotary"], |
| 45 | |
Yabin Huang | 4091750 | 2020-03-31 11:30:17 -0700 | [diff] [blame] | 46 | // Because it uses a platform API (CarInputManager). |
| 47 | platform_apis: true, |
| 48 | |
kanant | ac9a283 | 2020-10-30 16:46:40 -0700 | [diff] [blame] | 49 | // This app should be platform signed because it requires |
| 50 | // android.car.permission.CAR_MONITOR_INPUT permission, which is of type "signature". |
Yabin Huang | 4091750 | 2020-03-31 11:30:17 -0700 | [diff] [blame] | 51 | certificate: "platform", |
| 52 | |
Danny Epstein | 346b25c | 2021-03-05 10:28:23 -0800 | [diff] [blame] | 53 | // This app uses allowlisted privileged permissions. |
| 54 | privileged: true, |
| 55 | |
Yabin Huang | 59237eb | 2020-02-19 17:44:36 -0800 | [diff] [blame] | 56 | optimize: { |
| 57 | enabled: false, |
| 58 | }, |
| 59 | dex_preopt: { |
| 60 | enabled: false, |
| 61 | }, |
Yabin Huang | 4091750 | 2020-03-31 11:30:17 -0700 | [diff] [blame] | 62 | libs: [ |
Yabin Huang | 5ae09a5 | 2021-09-09 17:59:42 -0700 | [diff] [blame] | 63 | "android.car-system-stubs", |
Yabin Huang | 4091750 | 2020-03-31 11:30:17 -0700 | [diff] [blame] | 64 | ], |
Yabin Huang | 59237eb | 2020-02-19 17:44:36 -0800 | [diff] [blame] | 65 | static_libs: [ |
| 66 | "car-ui-lib", |
Vinh Tran | 03d20f8 | 2022-06-08 01:12:51 -0400 | [diff] [blame] | 67 | "rotary-service-javastream-protos", |
Yabin Huang | 59237eb | 2020-02-19 17:44:36 -0800 | [diff] [blame] | 68 | ], |
| 69 | product_variables: { |
| 70 | pdk: { |
| 71 | enabled: false, |
| 72 | }, |
| 73 | }, |
| 74 | } |
Heemin Seog | 5343a0f | 2020-12-11 20:20:39 -0800 | [diff] [blame] | 75 | |
| 76 | android_library { |
| 77 | name: "CarRotaryControllerForUnitTesting", |
| 78 | |
| 79 | manifest: "tests/unit/AndroidManifest.xml", |
| 80 | |
Danny Epstein | ad07247 | 2021-04-09 17:09:55 -0700 | [diff] [blame] | 81 | srcs: [ |
| 82 | "src/**/*.java", |
Danny Epstein | ad07247 | 2021-04-09 17:09:55 -0700 | [diff] [blame] | 83 | ], |
Heemin Seog | 5343a0f | 2020-12-11 20:20:39 -0800 | [diff] [blame] | 84 | |
| 85 | resource_dirs: [ |
Heemin Seog | 6e174b1 | 2020-12-23 14:57:56 -0800 | [diff] [blame] | 86 | "tests/unit/res", |
Heemin Seog | 5343a0f | 2020-12-11 20:20:39 -0800 | [diff] [blame] | 87 | "res", |
| 88 | ], |
| 89 | |
| 90 | platform_apis: true, |
| 91 | |
| 92 | optimize: { |
| 93 | enabled: false, |
| 94 | }, |
| 95 | dex_preopt: { |
| 96 | enabled: false, |
| 97 | }, |
| 98 | libs: [ |
Yabin Huang | 5ae09a5 | 2021-09-09 17:59:42 -0700 | [diff] [blame] | 99 | "android.car-system-stubs", |
Heemin Seog | 5343a0f | 2020-12-11 20:20:39 -0800 | [diff] [blame] | 100 | ], |
| 101 | static_libs: [ |
| 102 | "car-ui-lib", |
Vinh Tran | 03d20f8 | 2022-06-08 01:12:51 -0400 | [diff] [blame] | 103 | "rotary-service-javastream-protos", |
Heemin Seog | 5343a0f | 2020-12-11 20:20:39 -0800 | [diff] [blame] | 104 | ], |
| 105 | product_variables: { |
| 106 | pdk: { |
| 107 | enabled: false, |
| 108 | }, |
| 109 | }, |
| 110 | |
| 111 | aaptflags: ["--extra-packages com.android.car.rotary"], |
| 112 | } |