1// Copyright 2011 The Android Open Source Project
2java_defaults {
3    name: "CellBroadcastCommon",
4    min_sdk_version: "29",
5    sdk_version: "system_current",
6    privileged: true,
7    srcs: [
8      "src/**/*.java",
9      ":framework-annotations",
10      ":cellbroadcast-constants-shared-srcs",
11      ":statslog-cellbroadcast-java-gen",
12   ],
13    static_libs: [
14        "androidx.legacy_legacy-support-v4",
15        "androidx.legacy_legacy-support-v13",
16        "androidx.recyclerview_recyclerview",
17        "androidx.preference_preference",
18        "androidx.appcompat_appcompat",
19        "androidx.legacy_legacy-preference-v14",
20    ],
21    optimize: {
22       proguard_flags_files: ["proguard.flags"],
23    },
24    resource_dirs: ["res"],
25    plugins: ["java_api_finder"],
26}
27
28android_app {
29    name: "CellBroadcastApp",
30    defaults: ["CellBroadcastCommon"],
31    certificate: "networkstack",
32    aaptflags: ["--custom-package com.android.cellbroadcastreceiver"],
33    manifest: "AndroidManifest.xml",
34    apex_available: ["com.android.cellbroadcast"],
35}
36
37// filegroup used to include source into unit tests
38filegroup {
39    name: "cellbroadcastreceiver-sources",
40    srcs: [
41      "src/**/*.java",
42      ":framework-annotations",
43      ":cellbroadcast-constants-shared-srcs",
44    ],
45}
46
47android_app {
48     name: "CellBroadcastAppPlatform",
49     defaults: ["CellBroadcastCommon"],
50     certificate: "platform",
51     // CellBroadcastAppPlatform is a replacement for com.android.cellbroadcast apex which consists
52     // of CellBroadcastApp
53     overrides: ["com.android.cellbroadcast", "CellBroadcastLegacyApp"],
54     manifest: "AndroidManifest_Platform.xml",
55     system_ext_specific: true,
56     privileged: true,
57     required: ["privapp_whitelist_com.android.cellbroadcastreceiver"],
58}
59
60// source file shared with legacy cellbroadcast app
61filegroup {
62    name: "cellbroadcast-database-sources",
63    srcs: [
64        "src/com/android/cellbroadcastreceiver/CellBroadcastDatabaseHelper.java",
65    ],
66}
67