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_visibility: [":__pkg__"], 19 default_applicable_licenses: ["Android-Apache-2.0"], 20} 21 22filegroup { 23 name: "framework-profiling-sources", 24 defaults: ["framework-sources-module-defaults"], 25 srcs: [ 26 "java/**/*.java", 27 ":framework-profiling-aidl-sources", 28 ], 29 visibility: ["//packages/modules/Profiling/framework:__subpackages__"], 30} 31 32java_sdk_library { 33 name: "framework-profiling", 34 defaults: ["framework-module-defaults"], 35 installable: true, 36 37 jarjar_rules: "jarjar-rules.txt", 38 39 srcs: [ 40 ":framework-profiling-sources", 41 ], 42 43 libs: [ 44 "androidx.annotation_annotation", 45 ], 46 47 aconfig_declarations: [ 48 "android.os.profiling.flags-aconfig", 49 ], 50 51 static_libs: [ 52 "modules-utils-build", 53 "profiling_flags_lib", 54 ], 55 56 permitted_packages: [ 57 "android.app", 58 "android.os", 59 "android.util", 60 "com.android.internal.profiling", 61 ], 62 63 api_packages: [ 64 "android.app", 65 "android.os", 66 "android.util", 67 ], 68 69 hostdex: true, // for hiddenapi check 70 71 impl_library_visibility: [ 72 "//packages/modules/Profiling/service:__subpackages__", 73 "//packages/modules/Profiling/tests:__subpackages__", 74 ], 75 76 apex_available: [ 77 "com.android.profiling", 78 ], 79 min_sdk_version: "35", 80} 81 82aconfig_declarations { 83 name: "android.os.profiling.flags-aconfig", 84 package: "android.os.profiling", 85 container: "com.android.profiling", 86 exportable: true, 87 srcs: ["java/android/os/flags.aconfig"], 88} 89 90java_aconfig_library { 91 name: "profiling_flags_lib", 92 aconfig_declarations: "android.os.profiling.flags-aconfig", 93 apex_available: [ 94 "com.android.profiling", 95 "//apex_available:platform", 96 ], 97 mode: "exported", 98 min_sdk_version: "35", 99 defaults: ["framework-minus-apex-aconfig-java-defaults"], 100 visibility: [ 101 "//packages/modules/Profiling:__subpackages__", 102 "//frameworks/base/services/core", 103 ], 104} 105