Colin Cross | 20bc2bf | 2019-07-24 15:53:15 -0700 | [diff] [blame] | 1 | // Copyright (C) 2012 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 | |
| 15 | android_app { |
| 16 | name: "InputDevices", |
Jeff Sharkey | d23b537 | 2020-10-23 14:30:42 -0600 | [diff] [blame^] | 17 | defaults: ["platform_app_defaults"], |
Colin Cross | 20bc2bf | 2019-07-24 15:53:15 -0700 | [diff] [blame] | 18 | |
| 19 | srcs: [ |
| 20 | "**/*.java", |
| 21 | ":validate_input_devices_keymaps", |
| 22 | ], |
| 23 | |
| 24 | resource_dirs: ["res"], |
| 25 | |
| 26 | sdk_version: "current", |
| 27 | certificate: "platform", |
| 28 | privileged: true, |
| 29 | } |
| 30 | |
| 31 | // Validate all key maps. |
| 32 | // Produces an empty srcjar that is used as an input to InputDevices to make sure |
| 33 | // the check runs for platform builds. |
| 34 | genrule { |
| 35 | name: "validate_input_devices_keymaps", |
| 36 | tools: [ |
| 37 | "validatekeymaps", |
| 38 | "soong_zip", |
| 39 | ], |
| 40 | srcs: ["res/raw/*.kcm"], |
| 41 | out: ["validate_input_devices_keymaps.srcjar"], |
| 42 | cmd: "$(location validatekeymaps) -q $(in) && $(location soong_zip) -o $(out)", |
| 43 | } |