-
Notifications
You must be signed in to change notification settings - Fork 2
/
Android.bp
132 lines (111 loc) · 3.47 KB
/
Android.bp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
package {
default_applicable_licenses: ["packages_providers_MediaProvider_license"],
}
// Added automatically by a large-scale-change
// See: http://go/android-license-faq
license {
name: "packages_providers_MediaProvider_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-Apache-2.0",
],
license_text: [
"NOTICE",
],
}
android_app {
name: "MediaProvider",
manifest: "AndroidManifest.xml",
static_libs: [
"androidx.appcompat_appcompat",
"androidx.core_core",
"guava",
"modules-utils-build",
],
libs: [
"unsupportedappusage",
"app-compat-annotations",
"framework-annotations-lib",
"framework-mediaprovider.impl",
"framework-media.stubs.module_lib",
"framework-statsd",
],
jni_libs: [
"libfuse_jni",
"libfuse"
],
resource_dirs: [
"res",
],
srcs: [
":mediaprovider-sources",
],
optimize: {
proguard_flags_files: ["proguard.flags"],
},
plugins: [
"java_api_finder",
"error_prone_mediaprovider",
],
sdk_version: "module_current",
min_sdk_version: "30",
target_sdk_version: "30",
certificate: "media",
privileged: true,
aaptflags: ["--custom-package com.android.providers.media"],
errorprone: {
javacflags: [
"-Xep:FallThrough:ERROR",
"-Xep:GuardedBy:ERROR",
"-Xep:StreamResourceLeak:ERROR",
// Local checkers specific to this module
"-Xep:MediaProviderLocaleRoot:ERROR",
"-Xep:MediaProviderMimeType:ERROR",
],
},
required: ["preinstalled-packages-com.android.providers.media.module.xml"],
}
// Used by MediaProvider and MediaProviderTests
filegroup {
name: "mediaprovider-sources",
srcs: [
"src/**/*.aidl",
"src/**/*.java",
":mediaprovider-database-sources",
":statslog-mediaprovider-java-gen",
],
}
// This is defined to give LegacyMediaProvider the bare minimum it needs
// to keep the legacy database schema working while also building
// against "system_current"
filegroup {
name: "mediaprovider-database-sources",
srcs: [
"src/com/android/providers/media/DatabaseHelper.java",
"src/com/android/providers/media/util/BackgroundThread.java",
"src/com/android/providers/media/util/DatabaseUtils.java",
"src/com/android/providers/media/util/FileUtils.java",
"src/com/android/providers/media/util/ForegroundThread.java",
"src/com/android/providers/media/util/HandlerExecutor.java",
"src/com/android/providers/media/util/Logging.java",
"src/com/android/providers/media/util/MimeUtils.java",
"src/com/android/providers/media/playlist/*.java",
],
}
platform_compat_config {
name: "media-provider-platform-compat-config",
src: ":MediaProvider",
}
genrule {
name: "statslog-mediaprovider-java-gen",
tools: ["stats-log-api-gen"],
cmd: "$(location stats-log-api-gen) --java $(out) --module mediaprovider" +
" --javaPackage com.android.providers.media --javaClass MediaProviderStatsLog" +
" --minApiLevel 30",
out: ["com/android/providers/media/MediaProviderStatsLog.java"],
}
prebuilt_etc {
name: "preinstalled-packages-com.android.providers.media.module.xml",
src: "preinstalled-packages-com.android.providers.media.module.xml",
sub_dir: "sysconfig",
}