Jeff Sharkey | 56c34e8 | 2019-11-21 15:56:37 -0700 | [diff] [blame] | 1 | |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 2 | android_app { |
| 3 | name: "MediaProvider", |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 4 | manifest: "AndroidManifest.xml", |
| 5 | |
Jeff Sharkey | b6781bc | 2019-07-18 18:45:52 -0600 | [diff] [blame] | 6 | static_libs: [ |
| 7 | "androidx.appcompat_appcompat", |
Jeff Sharkey | 7ea24f2 | 2019-08-22 10:14:18 -0600 | [diff] [blame] | 8 | "androidx.core_core", |
Jeff Sharkey | cc5c31d | 2019-10-08 16:10:53 -0600 | [diff] [blame] | 9 | "guava", |
Jeff Sharkey | b6781bc | 2019-07-18 18:45:52 -0600 | [diff] [blame] | 10 | ], |
| 11 | |
Artur Satayev | 2bb438d | 2020-01-23 15:26:14 +0000 | [diff] [blame] | 12 | libs: [ |
| 13 | "unsupportedappusage", |
atrost | cee0181 | 2020-01-29 13:37:19 +0000 | [diff] [blame] | 14 | "app-compat-annotations", |
Paul Duffin | a3b3786 | 2020-05-14 00:40:43 +0100 | [diff] [blame] | 15 | "framework-mediaprovider.impl", |
Anton Hansson | 65958d0 | 2020-03-31 21:05:53 +0100 | [diff] [blame] | 16 | "framework_mediaprovider_annotation", |
Paul Duffin | a51de64 | 2020-05-31 11:54:42 +0100 | [diff] [blame] | 17 | "framework-statsd", |
Artur Satayev | 2bb438d | 2020-01-23 15:26:14 +0000 | [diff] [blame] | 18 | ], |
| 19 | |
Narayan Kamath | 88203dc | 2019-08-30 17:19:38 +0100 | [diff] [blame] | 20 | jni_libs: [ |
| 21 | "libfuse_jni", |
| 22 | "libfuse" |
| 23 | ], |
Zim | 3e45d9b | 2019-08-19 21:14:14 +0100 | [diff] [blame] | 24 | |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 25 | resource_dirs: [ |
| 26 | "res", |
| 27 | ], |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 28 | srcs: [ |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 29 | ":mediaprovider-sources", |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 30 | ], |
| 31 | |
Jeff Sharkey | 10b4d8d | 2019-02-04 21:53:22 -0700 | [diff] [blame] | 32 | optimize: { |
| 33 | proguard_flags_files: ["proguard.flags"], |
| 34 | }, |
| 35 | |
atrost | 2cf251d | 2019-10-10 19:32:30 +0100 | [diff] [blame] | 36 | plugins: [ |
Jeff Sharkey | 75b789d | 2019-10-30 10:24:44 -0600 | [diff] [blame] | 37 | "java_api_finder", |
Jeff Sharkey | c4a5f81 | 2020-05-03 21:07:14 -0600 | [diff] [blame] | 38 | "error_prone_mediaprovider", |
atrost | 2cf251d | 2019-10-10 19:32:30 +0100 | [diff] [blame] | 39 | ], |
| 40 | |
Anton Hansson | 65958d0 | 2020-03-31 21:05:53 +0100 | [diff] [blame] | 41 | sdk_version: "module_current", |
Nikita Ioffe | 8851c7c | 2020-11-03 22:58:11 +0000 | [diff] [blame^] | 42 | min_sdk_version: "30", |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 43 | |
| 44 | certificate: "media", |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 45 | privileged: true, |
atrost | 2cf251d | 2019-10-10 19:32:30 +0100 | [diff] [blame] | 46 | |
Jeff Sharkey | 56c34e8 | 2019-11-21 15:56:37 -0700 | [diff] [blame] | 47 | aaptflags: ["--custom-package com.android.providers.media"], |
Jeff Sharkey | b3e6603 | 2020-05-03 11:34:41 -0600 | [diff] [blame] | 48 | |
| 49 | errorprone: { |
| 50 | javacflags: [ |
| 51 | "-Xep:FallThrough:ERROR", |
| 52 | "-Xep:GuardedBy:ERROR", |
| 53 | "-Xep:StreamResourceLeak:ERROR", |
Jeff Sharkey | c4a5f81 | 2020-05-03 21:07:14 -0600 | [diff] [blame] | 54 | |
| 55 | // Local checkers specific to this module |
| 56 | "-Xep:MediaProviderLocaleRoot:ERROR", |
| 57 | "-Xep:MediaProviderMimeType:ERROR", |
Jeff Sharkey | b3e6603 | 2020-05-03 11:34:41 -0600 | [diff] [blame] | 58 | ], |
| 59 | }, |
Jeff Sharkey | 56c34e8 | 2019-11-21 15:56:37 -0700 | [diff] [blame] | 60 | } |
| 61 | |
Anton Hansson | 65958d0 | 2020-03-31 21:05:53 +0100 | [diff] [blame] | 62 | // Used by MediaProvider and MediaProviderTests |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 63 | filegroup { |
| 64 | name: "mediaprovider-sources", |
| 65 | srcs: [ |
| 66 | "src/**/*.aidl", |
| 67 | "src/**/*.java", |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 68 | ":mediaprovider-database-sources", |
| 69 | ":statslog-mediaprovider-java-gen", |
| 70 | ], |
| 71 | } |
| 72 | |
| 73 | // This is defined to give LegacyMediaProvider the bare minimum it needs |
| 74 | // to keep the legacy database schema working while also building |
| 75 | // against "system_current" |
| 76 | filegroup { |
| 77 | name: "mediaprovider-database-sources", |
| 78 | srcs: [ |
| 79 | "src/com/android/providers/media/DatabaseHelper.java", |
| 80 | "src/com/android/providers/media/util/BackgroundThread.java", |
| 81 | "src/com/android/providers/media/util/DatabaseUtils.java", |
| 82 | "src/com/android/providers/media/util/FileUtils.java", |
Jeff Sharkey | e04e2c6 | 2020-03-05 10:53:33 -0700 | [diff] [blame] | 83 | "src/com/android/providers/media/util/ForegroundThread.java", |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 84 | "src/com/android/providers/media/util/HandlerExecutor.java", |
| 85 | "src/com/android/providers/media/util/Logging.java", |
Ivan Chiang | be571c9 | 2019-12-03 18:09:00 +0800 | [diff] [blame] | 86 | "src/com/android/providers/media/util/MimeUtils.java", |
Sahana Rao | 9d8771a | 2020-09-09 15:06:04 +0100 | [diff] [blame] | 87 | "src/com/android/providers/media/playlist/*.java", |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 88 | ], |
| 89 | } |
| 90 | |
atrost | 2cf251d | 2019-10-10 19:32:30 +0100 | [diff] [blame] | 91 | platform_compat_config { |
| 92 | name: "media-provider-platform-compat-config", |
| 93 | src: ":MediaProvider", |
| 94 | } |
Jeff Sharkey | 3c0a6c6 | 2019-11-15 20:45:41 -0700 | [diff] [blame] | 95 | |
| 96 | genrule { |
| 97 | name: "statslog-mediaprovider-java-gen", |
| 98 | tools: ["stats-log-api-gen"], |
| 99 | cmd: "$(location stats-log-api-gen) --java $(out) --module mediaprovider --javaPackage com.android.providers.media --javaClass MediaProviderStatsLog", |
| 100 | out: ["com/android/providers/media/MediaProviderStatsLog.java"], |
| 101 | } |