Muhammad Qureshi | 237c774 | 2019-12-12 11:03:55 -0800 | [diff] [blame] | 1 | // Copyright (C) 2019 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 | |
Muhammad Qureshi | 974f4e8 | 2020-02-12 22:55:24 -0800 | [diff] [blame] | 15 | package { |
| 16 | default_visibility: [ ":__pkg__" ] |
| 17 | } |
| 18 | |
Muhammad Qureshi | cefc882 | 2020-02-09 11:46:23 -0800 | [diff] [blame] | 19 | genrule { |
| 20 | name: "statslog-statsd-java-gen", |
| 21 | tools: ["stats-log-api-gen"], |
| 22 | cmd: "$(location stats-log-api-gen) --java $(out) --module statsd" + |
Tej Singh | 058db96 | 2020-06-01 18:12:18 -0700 | [diff] [blame] | 23 | " --javaPackage com.android.internal.statsd --javaClass StatsdStatsLog", |
| 24 | out: ["com/android/internal/statsd/StatsdStatsLog.java"], |
Muhammad Qureshi | cefc882 | 2020-02-09 11:46:23 -0800 | [diff] [blame] | 25 | } |
| 26 | |
| 27 | java_library_static { |
| 28 | name: "statslog-statsd", |
| 29 | srcs: [ |
| 30 | ":statslog-statsd-java-gen", |
| 31 | ], |
Muhammad Qureshi | 974f4e8 | 2020-02-12 22:55:24 -0800 | [diff] [blame] | 32 | visibility: [ |
| 33 | "//cts/hostsidetests/statsd/apps:__subpackages__", |
| 34 | ] |
Muhammad Qureshi | cefc882 | 2020-02-09 11:46:23 -0800 | [diff] [blame] | 35 | } |
| 36 | |
Muhammad Qureshi | 237c774 | 2019-12-12 11:03:55 -0800 | [diff] [blame] | 37 | filegroup { |
| 38 | name: "framework-statsd-sources", |
| 39 | srcs: [ |
Muhammad Qureshi | 555400f | 2020-02-07 09:10:55 -0800 | [diff] [blame] | 40 | "java/**/*.java", |
Muhammad Qureshi | fc3e305 | 2020-02-09 13:27:28 -0800 | [diff] [blame] | 41 | ":framework-statsd-aidl-sources", |
Muhammad Qureshi | cefc882 | 2020-02-09 11:46:23 -0800 | [diff] [blame] | 42 | ":statslog-statsd-java-gen", |
Muhammad Qureshi | 237c774 | 2019-12-12 11:03:55 -0800 | [diff] [blame] | 43 | ], |
Muhammad Qureshi | 974f4e8 | 2020-02-12 22:55:24 -0800 | [diff] [blame] | 44 | visibility: [ |
| 45 | "//frameworks/base", // For the "global" stubs. |
Muhammad Qureshi | 3669752 | 2020-02-26 11:41:17 -0800 | [diff] [blame] | 46 | "//frameworks/base/apex/statsd:__subpackages__", |
Muhammad Qureshi | 974f4e8 | 2020-02-12 22:55:24 -0800 | [diff] [blame] | 47 | ], |
Muhammad Qureshi | 237c774 | 2019-12-12 11:03:55 -0800 | [diff] [blame] | 48 | } |
Paul Duffin | e21f7f8 | 2020-05-13 19:48:43 +0100 | [diff] [blame] | 49 | java_sdk_library { |
Muhammad Qureshi | 237c774 | 2019-12-12 11:03:55 -0800 | [diff] [blame] | 50 | name: "framework-statsd", |
Paul Duffin | e21f7f8 | 2020-05-13 19:48:43 +0100 | [diff] [blame] | 51 | defaults: ["framework-module-defaults"], |
Muhammad Qureshi | 237c774 | 2019-12-12 11:03:55 -0800 | [diff] [blame] | 52 | installable: true, |
Paul Duffin | e21f7f8 | 2020-05-13 19:48:43 +0100 | [diff] [blame] | 53 | |
Muhammad Qureshi | 237c774 | 2019-12-12 11:03:55 -0800 | [diff] [blame] | 54 | srcs: [ |
| 55 | ":framework-statsd-sources", |
| 56 | ], |
Muhammad Qureshi | fc3e305 | 2020-02-09 13:27:28 -0800 | [diff] [blame] | 57 | |
Muhammad Qureshi | 237c774 | 2019-12-12 11:03:55 -0800 | [diff] [blame] | 58 | permitted_packages: [ |
| 59 | "android.app", |
Tej Singh | 8ffe1ea | 2020-02-03 19:00:19 -0800 | [diff] [blame] | 60 | "android.os", |
Muhammad Qureshi | 237c774 | 2019-12-12 11:03:55 -0800 | [diff] [blame] | 61 | "android.util", |
Paul Duffin | 3efcb54 | 2020-05-28 16:23:43 +0100 | [diff] [blame] | 62 | // From :statslog-statsd-java-gen |
Tej Singh | 058db96 | 2020-06-01 18:12:18 -0700 | [diff] [blame] | 63 | "com.android.internal.statsd", |
Muhammad Qureshi | 237c774 | 2019-12-12 11:03:55 -0800 | [diff] [blame] | 64 | ], |
Muhammad Qureshi | fc3e305 | 2020-02-09 13:27:28 -0800 | [diff] [blame] | 65 | |
Paul Duffin | e21f7f8 | 2020-05-13 19:48:43 +0100 | [diff] [blame] | 66 | api_packages: [ |
| 67 | "android.app", |
| 68 | "android.os", |
| 69 | "android.util", |
| 70 | ], |
Howard Ro | 30ab9fe | 2020-02-26 23:34:17 -0800 | [diff] [blame] | 71 | |
Jiyong Park | c81df3f | 2020-01-06 13:30:59 +0900 | [diff] [blame] | 72 | hostdex: true, // for hiddenapi check |
Paul Duffin | dde2230 | 2020-05-31 11:32:06 +0100 | [diff] [blame] | 73 | |
Jiyong Park | c81df3f | 2020-01-06 13:30:59 +0900 | [diff] [blame] | 74 | visibility: [ |
Muhammad Qureshi | 974f4e8 | 2020-02-12 22:55:24 -0800 | [diff] [blame] | 75 | "//frameworks/base", // Framework |
Paul Duffin | dde2230 | 2020-05-31 11:32:06 +0100 | [diff] [blame] | 76 | "//frameworks/base/apex/statsd:__subpackages__", // statsd apex |
Anton Hansson | e85c525 | 2020-03-31 20:49:43 +0100 | [diff] [blame] | 77 | "//frameworks/opt/net/wifi/service", // wifi service |
| 78 | "//packages/providers/MediaProvider", // MediaProvider apk |
Anton Hansson | 4bb837b | 2020-03-24 19:42:36 +0000 | [diff] [blame] | 79 | ], |
Paul Duffin | dde2230 | 2020-05-31 11:32:06 +0100 | [diff] [blame] | 80 | |
| 81 | // Restrict access to implementation library. |
| 82 | impl_library_visibility: [ |
| 83 | "//visibility:override", // Ignore the visibility property. |
| 84 | "//frameworks/base/apex/statsd:__subpackages__", // statsd apex |
| 85 | ], |
| 86 | |
Paul Duffin | e21f7f8 | 2020-05-13 19:48:43 +0100 | [diff] [blame] | 87 | apex_available: [ |
| 88 | "com.android.os.statsd", |
| 89 | "test_com.android.os.statsd", |
| 90 | ], |
Jeffrey Huang | ceaa769 | 2020-06-15 19:12:09 -0700 | [diff] [blame] | 91 | } |