1// Copyright (C) 2023 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
19apex_key {
20    name: "com.android.profiling.key",
21    public_key: "com.android.profiling.avbpubkey",
22    private_key: "com.android.profiling.pem",
23}
24
25android_app_certificate {
26    name: "com.android.profiling.certificate",
27    certificate: "com.android.profiling",
28}
29
30apex {
31    // This apex will be enabled with release_package_profiling_module flag
32    enabled: select(release_flag("RELEASE_PACKAGE_PROFILING_MODULE"), {
33        true: true,
34        false: false,
35    }),
36
37    name: "com.android.profiling",
38    manifest: "manifest.json",
39    file_contexts: ":com.android.profiling-file_contexts",
40    key: "com.android.profiling.key",
41    certificate: ":com.android.profiling.certificate",
42    defaults: ["v-launched-apex-module"],
43    min_sdk_version: "35",
44
45    binaries: ["trace_redactor"],
46
47    bootclasspath_fragments: ["com.android.profiling-bootclasspath-fragment"],
48    systemserverclasspath_fragments: ["com.android.profiling-systemserverclasspath-fragment"],
49}
50
51systemserverclasspath_fragment {
52    // This fragment will be enabled with release_package_profiling_module flag
53    enabled: select(release_flag("RELEASE_PACKAGE_PROFILING_MODULE"), {
54        true: true,
55        false: false,
56    }),
57
58    name: "com.android.profiling-systemserverclasspath-fragment",
59    standalone_contents: ["service-profiling"],
60    apex_available: ["com.android.profiling"],
61}
62
63bootclasspath_fragment {
64    // This fragment will be enabled with release_package_profiling_module flag
65    enabled: select(release_flag("RELEASE_PACKAGE_PROFILING_MODULE"), {
66        true: true,
67        false: false,
68    }),
69
70    name: "com.android.profiling-bootclasspath-fragment",
71    contents: ["framework-profiling"],
72    apex_available: ["com.android.profiling"],
73
74    // The bootclasspath_fragments that provide APIs on which this depends.
75    fragments: [
76        {
77            apex: "com.android.art",
78            module: "art-bootclasspath-fragment",
79        },
80    ],
81
82    // Additional stubs libraries that this fragment's contents use which are
83    // not provided by another bootclasspath_fragment.
84    additional_stubs: [
85        "android-non-updatable",
86    ],
87
88    hidden_api: {
89        split_packages: ["*"],
90    },
91}
92