• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2019 The Android Open Source Project
2package {
3    default_applicable_licenses: ["Android-Apache-2.0"],
4}
5
6java_defaults {
7    name: "CellBroadcastServiceCommon",
8    min_sdk_version: "30",
9    srcs: [
10      "src/**/*.java",
11      ":statslog-cellbroadcast-module-java-gen",
12    ],
13    libs: [
14        "framework-annotations-lib",
15        "framework-statsd",
16        "unsupportedappusage",
17    ],
18    sdk_version: "module_current",
19    static_libs: [
20        "modules-utils-build",
21        "modules-utils-handlerexecutor",
22        "modules-utils-locallog",
23        "modules-utils-preconditions",
24        "modules-utils-statemachine",
25    ],
26    certificate: "platform",
27    privileged: true,
28    resource_dirs: ["res"],
29    optimize: {
30        shrink_resources: true,
31        proguard_flags_files: ["proguard.flags"],
32    },
33    jarjar_rules: "cellbroadcast-jarjar-rules.txt",
34    lint: {
35        strict_updatability_linting: true,
36    },
37}
38
39android_app {
40    name: "CellBroadcastServiceModule",
41    defaults: ["CellBroadcastServiceCommon"],
42    certificate: "networkstack",
43    manifest: "AndroidManifest.xml",
44    apex_available: ["com.android.cellbroadcast"],
45    required: ["privapp_allowlist_com.android.cellbroadcastservice.xml"],
46}
47
48android_app {
49     name: "CellBroadcastServiceModulePlatform",
50     target_sdk_version: "33",
51     defaults: ["CellBroadcastServiceCommon"],
52     certificate: "platform",
53     // CellBroadcastServicePlatformModule is a replacement for com.android.cellbroadcast apex
54     // which consists of CellBroadcastServiceModule
55     overrides: ["com.android.cellbroadcast"],
56     manifest: "AndroidManifest_Platform.xml",
57     required: ["platform_privapp_allowlist_com.android.cellbroadcastservice.xml"],
58}
59
60genrule {
61  name: "statslog-cellbroadcast-java-gen",
62  tools: ["stats-log-api-gen"],
63  cmd: "$(location stats-log-api-gen) --java $(out) --module cellbroadcast" +
64       " --javaPackage com.android.cellbroadcastservice --javaClass CellBroadcastStatsLog" +
65       " --minApiLevel 30",
66  out: ["com/android/cellbroadcastservice/CellBroadcastStatsLog.java"],
67}
68
69genrule {
70  name: "statslog-cellbroadcast-module-java-gen",
71  tools: ["stats-log-api-gen"],
72  cmd: "$(location stats-log-api-gen) --java $(out) --module cellbroadcast" +
73       " --javaPackage com.android.cellbroadcastservice --javaClass CellBroadcastModuleStatsLog" +
74       " --minApiLevel 30",
75  out: ["com/android/cellbroadcastservice/CellBroadcastModuleStatsLog.java"],
76}
77
78// used to share common constants between cellbroadcastservice and cellbroadcastreceier
79filegroup {
80    name: "cellbroadcast-constants-shared-srcs",
81    srcs: [
82        "src/com/android/cellbroadcastservice/SmsCbConstants.java",
83        "src/com/android/cellbroadcastservice/CellBroadcastMetrics.java",
84        ":statslog-cellbroadcast-module-java-gen",
85    ],
86}
87
88// used to share src with cellbroadcastreceiver test app
89filegroup {
90    name: "cellbroadcast-util-shared-srcs",
91    srcs: [
92        "src/com/android/cellbroadcastservice/GsmAlphabet.java",
93        "src/com/android/cellbroadcastservice/CbGeoUtils.java",
94        "src/com/android/cellbroadcastservice/SmsCbHeader.java",
95        "src/com/android/cellbroadcastservice/CellBroadcastServiceMetrics.java",
96    ],
97}
98
99// used to share src with unit test app
100filegroup {
101    name: "cellbroadcast-shared-srcs",
102    srcs: [
103        "src/**/*.java",
104        ":statslog-cellbroadcast-module-java-gen",
105    ],
106}
107