blob: 317619ebe8c59ae21492f24cf5ca8090ac160f91 [file] [log] [blame]
Jeff Sharkey56c34e82019-11-21 15:56:37 -07001
Bob Badour45b6e7d2021-02-12 18:09:33 -08002package {
3 default_applicable_licenses: ["packages_providers_MediaProvider_license"],
4}
5
6// Added automatically by a large-scale-change
7// See: http://go/android-license-faq
8license {
9 name: "packages_providers_MediaProvider_license",
10 visibility: [":__subpackages__"],
11 license_kinds: [
12 "SPDX-license-identifier-Apache-2.0",
13 ],
14 license_text: [
15 "NOTICE",
16 ],
17}
18
Jeff Sharkeyc55994b2019-12-20 19:43:59 -070019android_app {
20 name: "MediaProvider",
felkachang775842b2018-10-16 17:05:44 +080021 manifest: "AndroidManifest.xml",
22
Jeff Sharkeyb6781bc2019-07-18 18:45:52 -060023 static_libs: [
24 "androidx.appcompat_appcompat",
Jeff Sharkey7ea24f22019-08-22 10:14:18 -060025 "androidx.core_core",
Ivan Chiangfe204ba2021-04-27 13:57:25 +080026 "androidx.legacy_legacy-support-core-ui",
Sahana Rao1e8923d2021-04-26 00:03:55 +010027 "androidx.lifecycle_lifecycle-extensions",
Ivan Chiangfe204ba2021-04-27 13:57:25 +080028 "androidx.recyclerview_recyclerview",
29 "com.google.android.material_material",
Jeff Sharkeycc5c31d2019-10-08 16:10:53 -060030 "guava",
Ivan Chiang7fce4a52021-01-25 16:53:54 +080031 "modules-utils-build",
Sahana Raoc70976a2021-06-20 13:24:20 +010032 "glide-prebuilt",
Jeff Sharkeyb6781bc2019-07-18 18:45:52 -060033 ],
34
Artur Satayev2bb438d2020-01-23 15:26:14 +000035 libs: [
36 "unsupportedappusage",
atrostcee01812020-01-29 13:37:19 +000037 "app-compat-annotations",
Anton Hansson9258dba2021-03-30 13:38:15 +010038 "framework-annotations-lib",
Paul Duffina3b37862020-05-14 00:40:43 +010039 "framework-mediaprovider.impl",
Chong Zhangd3358642020-12-08 15:37:50 -080040 "framework-media.stubs.module_lib",
Paul Duffindc5abff2020-05-31 11:54:42 +010041 "framework-statsd",
Artur Satayev2bb438d2020-01-23 15:26:14 +000042 ],
43
Narayan Kamath88203dc2019-08-30 17:19:38 +010044 jni_libs: [
45 "libfuse_jni",
46 "libfuse"
47 ],
Zim3e45d9b2019-08-19 21:14:14 +010048
felkachang775842b2018-10-16 17:05:44 +080049 resource_dirs: [
50 "res",
51 ],
felkachang775842b2018-10-16 17:05:44 +080052 srcs: [
Jeff Sharkeyc55994b2019-12-20 19:43:59 -070053 ":mediaprovider-sources",
felkachang775842b2018-10-16 17:05:44 +080054 ],
55
Jeff Sharkey10b4d8d2019-02-04 21:53:22 -070056 optimize: {
57 proguard_flags_files: ["proguard.flags"],
58 },
59
atrost2cf251d2019-10-10 19:32:30 +010060 plugins: [
Jeff Sharkey75b789d2019-10-30 10:24:44 -060061 "java_api_finder",
Jeff Sharkeyc4a5f812020-05-03 21:07:14 -060062 "error_prone_mediaprovider",
atrost2cf251d2019-10-10 19:32:30 +010063 ],
64
Anton Hansson65958d02020-03-31 21:05:53 +010065 sdk_version: "module_current",
Nikita Ioffe0bf6f892020-11-03 22:58:11 +000066 min_sdk_version: "30",
felkachang775842b2018-10-16 17:05:44 +080067
68 certificate: "media",
felkachang775842b2018-10-16 17:05:44 +080069 privileged: true,
atrost2cf251d2019-10-10 19:32:30 +010070
Jeff Sharkey56c34e82019-11-21 15:56:37 -070071 aaptflags: ["--custom-package com.android.providers.media"],
Jeff Sharkeyb3e66032020-05-03 11:34:41 -060072
73 errorprone: {
74 javacflags: [
75 "-Xep:FallThrough:ERROR",
76 "-Xep:GuardedBy:ERROR",
77 "-Xep:StreamResourceLeak:ERROR",
Jeff Sharkeyc4a5f812020-05-03 21:07:14 -060078
79 // Local checkers specific to this module
80 "-Xep:MediaProviderLocaleRoot:ERROR",
81 "-Xep:MediaProviderMimeType:ERROR",
Jeff Sharkeyb3e66032020-05-03 11:34:41 -060082 ],
83 },
Saumya Pathak3054ea52021-03-09 22:14:22 +000084
85 required: ["preinstalled-packages-com.android.providers.media.module.xml"],
Jeff Sharkey56c34e82019-11-21 15:56:37 -070086}
87
Anton Hansson65958d02020-03-31 21:05:53 +010088// Used by MediaProvider and MediaProviderTests
Jeff Sharkeyc55994b2019-12-20 19:43:59 -070089filegroup {
90 name: "mediaprovider-sources",
91 srcs: [
92 "src/**/*.aidl",
93 "src/**/*.java",
Jeff Sharkeyc55994b2019-12-20 19:43:59 -070094 ":mediaprovider-database-sources",
95 ":statslog-mediaprovider-java-gen",
96 ],
97}
98
99// This is defined to give LegacyMediaProvider the bare minimum it needs
100// to keep the legacy database schema working while also building
101// against "system_current"
102filegroup {
103 name: "mediaprovider-database-sources",
104 srcs: [
105 "src/com/android/providers/media/DatabaseHelper.java",
106 "src/com/android/providers/media/util/BackgroundThread.java",
107 "src/com/android/providers/media/util/DatabaseUtils.java",
108 "src/com/android/providers/media/util/FileUtils.java",
Jeff Sharkeye04e2c62020-03-05 10:53:33 -0700109 "src/com/android/providers/media/util/ForegroundThread.java",
Jeff Sharkeyc55994b2019-12-20 19:43:59 -0700110 "src/com/android/providers/media/util/HandlerExecutor.java",
111 "src/com/android/providers/media/util/Logging.java",
Ivan Chiangbe571c92019-12-03 18:09:00 +0800112 "src/com/android/providers/media/util/MimeUtils.java",
Sahana Rao9f4c1fa2020-09-09 15:06:04 +0100113 "src/com/android/providers/media/playlist/*.java",
Jeff Sharkeyc55994b2019-12-20 19:43:59 -0700114 ],
115}
116
atrost2cf251d2019-10-10 19:32:30 +0100117platform_compat_config {
118 name: "media-provider-platform-compat-config",
119 src: ":MediaProvider",
120}
Jeff Sharkey3c0a6c62019-11-15 20:45:41 -0700121
122genrule {
123 name: "statslog-mediaprovider-java-gen",
124 tools: ["stats-log-api-gen"],
Muhammad Qureshi71b395e2020-12-11 14:59:11 -0800125 cmd: "$(location stats-log-api-gen) --java $(out) --module mediaprovider" +
126 " --javaPackage com.android.providers.media --javaClass MediaProviderStatsLog" +
127 " --minApiLevel 30",
Jeff Sharkey3c0a6c62019-11-15 20:45:41 -0700128 out: ["com/android/providers/media/MediaProviderStatsLog.java"],
129}
Saumya Pathak3054ea52021-03-09 22:14:22 +0000130
131prebuilt_etc {
132 name: "preinstalled-packages-com.android.providers.media.module.xml",
133 src: "preinstalled-packages-com.android.providers.media.module.xml",
134 sub_dir: "sysconfig",
135}
136