• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2package {
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
19android_app {
20    name: "MediaProvider",
21    manifest: "AndroidManifest.xml",
22
23    static_libs: [
24        "androidx.appcompat_appcompat",
25        "androidx.core_core",
26        "guava",
27        "modules-utils-build",
28    ],
29
30    libs: [
31        "unsupportedappusage",
32        "app-compat-annotations",
33        "framework-annotations-lib",
34        "framework-mediaprovider.impl",
35        "framework-media.stubs.module_lib",
36        "framework-statsd",
37    ],
38
39    jni_libs: [
40        "libfuse_jni",
41        "libfuse"
42    ],
43
44    resource_dirs: [
45        "res",
46    ],
47    srcs: [
48        ":mediaprovider-sources",
49    ],
50
51    optimize: {
52        proguard_flags_files: ["proguard.flags"],
53    },
54
55    plugins: [
56        "java_api_finder",
57        "error_prone_mediaprovider",
58    ],
59
60    sdk_version: "module_current",
61    min_sdk_version: "30",
62    target_sdk_version: "30",
63
64    certificate: "media",
65    privileged: true,
66
67    aaptflags: ["--custom-package com.android.providers.media"],
68
69    errorprone: {
70        javacflags: [
71            "-Xep:FallThrough:ERROR",
72            "-Xep:GuardedBy:ERROR",
73            "-Xep:StreamResourceLeak:ERROR",
74
75            // Local checkers specific to this module
76            "-Xep:MediaProviderLocaleRoot:ERROR",
77            "-Xep:MediaProviderMimeType:ERROR",
78        ],
79    },
80
81    required: ["preinstalled-packages-com.android.providers.media.module.xml"],
82}
83
84// Used by MediaProvider and MediaProviderTests
85filegroup {
86    name: "mediaprovider-sources",
87    srcs: [
88        "src/**/*.aidl",
89        "src/**/*.java",
90        ":mediaprovider-database-sources",
91        ":statslog-mediaprovider-java-gen",
92    ],
93}
94
95// This is defined to give LegacyMediaProvider the bare minimum it needs
96// to keep the legacy database schema working while also building
97// against "system_current"
98filegroup {
99    name: "mediaprovider-database-sources",
100    srcs: [
101        "src/com/android/providers/media/DatabaseHelper.java",
102        "src/com/android/providers/media/util/BackgroundThread.java",
103        "src/com/android/providers/media/util/DatabaseUtils.java",
104        "src/com/android/providers/media/util/FileUtils.java",
105        "src/com/android/providers/media/util/ForegroundThread.java",
106        "src/com/android/providers/media/util/HandlerExecutor.java",
107        "src/com/android/providers/media/util/Logging.java",
108        "src/com/android/providers/media/util/MimeUtils.java",
109        "src/com/android/providers/media/playlist/*.java",
110    ],
111}
112
113platform_compat_config {
114    name: "media-provider-platform-compat-config",
115    src: ":MediaProvider",
116}
117
118genrule {
119    name: "statslog-mediaprovider-java-gen",
120    tools: ["stats-log-api-gen"],
121    cmd: "$(location stats-log-api-gen) --java $(out) --module mediaprovider" +
122         " --javaPackage com.android.providers.media --javaClass MediaProviderStatsLog" +
123         " --minApiLevel 30",
124    out: ["com/android/providers/media/MediaProviderStatsLog.java"],
125}
126
127prebuilt_etc {
128      name: "preinstalled-packages-com.android.providers.media.module.xml",
129      src: "preinstalled-packages-com.android.providers.media.module.xml",
130      sub_dir: "sysconfig",
131}
132
133