1// Copyright (C) 2022 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
19java_library {
20    name: "crashrecovery-statslog",
21    srcs: [
22        ":statslog-crashrecovery-java-gen",
23    ],
24    libs: [
25        "framework-statsd.stubs.module_lib",
26    ],
27    apex_available: [
28        "com.android.crashrecovery",
29    ],
30    installable: false,
31    min_sdk_version: "35",
32    sdk_version: "system_server_current",
33}
34
35java_defaults {
36    name: "service-crashrecovery-shared",
37    srcs: [
38        "java/**/*.java",
39        ":services-crashrecovery-module-sources",
40        ":service-crashrecovery-shared-srcs",
41    ],
42    defaults: [
43        "framework-system-server-module-defaults",
44    ],
45    static_libs: [
46        "android.crashrecovery.flags-aconfig-java",
47        "crashrecovery-statslog",
48        "modules-utils-preconditions",
49        "modules-utils-backgroundthread",
50        "modules-utils-binary-xml",
51        "modules-utils-fastxmlserializer",
52        "PlatformProperties",
53    ],
54    libs: [
55        "unsupportedappusage",
56        "framework-configinfrastructure.stubs.module_lib",
57        "framework-crashrecovery.impl",
58        "framework-statsd.stubs.module_lib",
59    ],
60    sdk_version: "system_server_current",
61}
62
63java_sdk_library {
64    name: "service-crashrecovery",
65    defaults: ["service-crashrecovery-shared"],
66    permitted_packages: [
67        "com.android.server",
68        "android.crashrecovery",
69    ],
70    apex_available: [
71        "com.android.crashrecovery",
72    ],
73    impl_library_visibility: [
74        "//packages/modules/CrashRecovery:__subpackages__",
75        "//cts:__subpackages__",
76        "//frameworks/base/tests:__subpackages__",
77        "//frameworks/base/services/tests:__subpackages__",
78        "//test/cts-root/tests/packagewatchdog",
79    ],
80    aconfig_declarations: [
81        "android.crashrecovery.flags-aconfig",
82    ],
83    jarjar_rules: "jarjar-rules.txt",
84}
85
86java_library {
87    name: "service-crashrecovery-pre-jarjar",
88    defaults: ["service-crashrecovery-shared"],
89}
90