Bob Badour | 45b6e7d | 2021-02-12 18:09:33 -0800 | [diff] [blame] | 1 | package { |
Bob Badour | 19bda64 | 2022-01-27 18:29:56 -0800 | [diff] [blame] | 2 | // See: http://go/android-license-faq |
| 3 | default_applicable_licenses: ["Android-Apache-2.0"], |
Bob Badour | 45b6e7d | 2021-02-12 18:09:33 -0800 | [diff] [blame] | 4 | } |
| 5 | |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 6 | android_app { |
| 7 | name: "MediaProvider", |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 8 | manifest: "AndroidManifest.xml", |
| 9 | |
Jeff Sharkey | b6781bc | 2019-07-18 18:45:52 -0600 | [diff] [blame] | 10 | static_libs: [ |
William Escande | 5ca7e76 | 2021-09-01 14:20:09 +0200 | [diff] [blame] | 11 | "modules-utils-backgroundthread", |
Jeff Sharkey | b6781bc | 2019-07-18 18:45:52 -0600 | [diff] [blame] | 12 | "androidx.appcompat_appcompat", |
Jeff Sharkey | 7ea24f2 | 2019-08-22 10:14:18 -0600 | [diff] [blame] | 13 | "androidx.core_core", |
Ivan Chiang | fe204ba | 2021-04-27 13:57:25 +0800 | [diff] [blame] | 14 | "androidx.legacy_legacy-support-core-ui", |
Sahana Rao | 1e8923d | 2021-04-26 00:03:55 +0100 | [diff] [blame] | 15 | "androidx.lifecycle_lifecycle-extensions", |
Ivan Chiang | fe204ba | 2021-04-27 13:57:25 +0800 | [diff] [blame] | 16 | "androidx.recyclerview_recyclerview", |
| 17 | "com.google.android.material_material", |
Jeff Sharkey | cc5c31d | 2019-10-08 16:10:53 -0600 | [diff] [blame] | 18 | "guava", |
Ivan Chiang | 7fce4a5 | 2021-01-25 16:53:54 +0800 | [diff] [blame] | 19 | "modules-utils-build", |
Corina | f0319fb | 2022-02-03 11:10:37 +0000 | [diff] [blame] | 20 | "modules-utils-uieventlogger-interface", |
Sahana Rao | c70976a | 2021-06-20 13:24:20 +0100 | [diff] [blame] | 21 | "glide-prebuilt", |
Biswarup Pal | d06af0b | 2021-08-25 20:05:41 +0000 | [diff] [blame] | 22 | "glide-gifdecoder-prebuilt", |
| 23 | "glide-disklrucache-prebuilt", |
| 24 | "glide-annotation-and-compiler-prebuilt", |
Ivan Chiang | 0e3e557 | 2021-09-02 16:12:15 +0800 | [diff] [blame] | 25 | "androidx.fragment_fragment", |
| 26 | "androidx.vectordrawable_vectordrawable-animated", |
| 27 | "androidx.exifinterface_exifinterface", |
Santiago Seifert | 679c81c | 2022-03-28 17:36:17 +0000 | [diff] [blame] | 28 | "exoplayer-mediaprovider-ui", |
Jeff Sharkey | b6781bc | 2019-07-18 18:45:52 -0600 | [diff] [blame] | 29 | ], |
| 30 | |
Artur Satayev | 2bb438d | 2020-01-23 15:26:14 +0000 | [diff] [blame] | 31 | libs: [ |
| 32 | "unsupportedappusage", |
atrost | cee0181 | 2020-01-29 13:37:19 +0000 | [diff] [blame] | 33 | "app-compat-annotations", |
Anton Hansson | 9258dba | 2021-03-30 13:38:15 +0100 | [diff] [blame] | 34 | "framework-annotations-lib", |
Paul Duffin | a3b3786 | 2020-05-14 00:40:43 +0100 | [diff] [blame] | 35 | "framework-mediaprovider.impl", |
Chong Zhang | d335864 | 2020-12-08 15:37:50 -0800 | [diff] [blame] | 36 | "framework-media.stubs.module_lib", |
Paul Duffin | dc5abff | 2020-05-31 11:54:42 +0100 | [diff] [blame] | 37 | "framework-statsd", |
Artur Satayev | 2bb438d | 2020-01-23 15:26:14 +0000 | [diff] [blame] | 38 | ], |
| 39 | |
Narayan Kamath | 88203dc | 2019-08-30 17:19:38 +0100 | [diff] [blame] | 40 | jni_libs: [ |
| 41 | "libfuse_jni", |
Santiago Seifert | 679c81c | 2022-03-28 17:36:17 +0000 | [diff] [blame] | 42 | "libfuse", |
Narayan Kamath | 88203dc | 2019-08-30 17:19:38 +0100 | [diff] [blame] | 43 | ], |
Zim | 3e45d9b | 2019-08-19 21:14:14 +0100 | [diff] [blame] | 44 | |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 45 | resource_dirs: [ |
| 46 | "res", |
| 47 | ], |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 48 | srcs: [ |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 49 | ":mediaprovider-sources", |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 50 | ], |
| 51 | |
Jeff Sharkey | 10b4d8d | 2019-02-04 21:53:22 -0700 | [diff] [blame] | 52 | optimize: { |
Sahana Rao | d845560 | 2022-01-13 08:31:09 +0000 | [diff] [blame] | 53 | shrink: true, |
| 54 | optimize: false, |
| 55 | obfuscate: false, |
Jeff Sharkey | 10b4d8d | 2019-02-04 21:53:22 -0700 | [diff] [blame] | 56 | proguard_flags_files: ["proguard.flags"], |
| 57 | }, |
| 58 | |
atrost | 2cf251d | 2019-10-10 19:32:30 +0100 | [diff] [blame] | 59 | plugins: [ |
Jeff Sharkey | 75b789d | 2019-10-30 10:24:44 -0600 | [diff] [blame] | 60 | "java_api_finder", |
Jeff Sharkey | c4a5f81 | 2020-05-03 21:07:14 -0600 | [diff] [blame] | 61 | "error_prone_mediaprovider", |
Biswarup Pal | d06af0b | 2021-08-25 20:05:41 +0000 | [diff] [blame] | 62 | "glide-annotation-processor", |
atrost | 2cf251d | 2019-10-10 19:32:30 +0100 | [diff] [blame] | 63 | ], |
Andrei Onea | ce30a2c | 2022-01-14 23:33:46 +0000 | [diff] [blame] | 64 | jarjar_rules: "jarjar-rules.txt", |
Anton Hansson | 65958d0 | 2020-03-31 21:05:53 +0100 | [diff] [blame] | 65 | sdk_version: "module_current", |
Nikita Ioffe | 0bf6f89 | 2020-11-03 22:58:11 +0000 | [diff] [blame] | 66 | min_sdk_version: "30", |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 67 | |
| 68 | certificate: "media", |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 69 | privileged: true, |
atrost | 2cf251d | 2019-10-10 19:32:30 +0100 | [diff] [blame] | 70 | |
Jeff Sharkey | 56c34e8 | 2019-11-21 15:56:37 -0700 | [diff] [blame] | 71 | aaptflags: ["--custom-package com.android.providers.media"], |
Jeff Sharkey | b3e6603 | 2020-05-03 11:34:41 -0600 | [diff] [blame] | 72 | |
| 73 | errorprone: { |
| 74 | javacflags: [ |
| 75 | "-Xep:FallThrough:ERROR", |
| 76 | "-Xep:GuardedBy:ERROR", |
| 77 | "-Xep:StreamResourceLeak:ERROR", |
Jeff Sharkey | c4a5f81 | 2020-05-03 21:07:14 -0600 | [diff] [blame] | 78 | |
| 79 | // Local checkers specific to this module |
| 80 | "-Xep:MediaProviderLocaleRoot:ERROR", |
| 81 | "-Xep:MediaProviderMimeType:ERROR", |
Jeff Sharkey | b3e6603 | 2020-05-03 11:34:41 -0600 | [diff] [blame] | 82 | ], |
| 83 | }, |
Saumya Pathak | 3054ea5 | 2021-03-09 22:14:22 +0000 | [diff] [blame] | 84 | |
Andrei Onea | 03d4d76 | 2022-02-24 13:46:36 +0000 | [diff] [blame] | 85 | required: [ |
| 86 | "preinstalled-packages-com.android.providers.media.module.xml", |
| 87 | "privapp_allowlist_com.android.providers.media.module.xml", |
| 88 | ], |
Corina Grigoras | ca99ec4 | 2021-07-20 10:22:44 +0000 | [diff] [blame] | 89 | |
| 90 | lint: { |
| 91 | strict_updatability_linting: true, |
| 92 | }, |
Jeff Sharkey | 56c34e8 | 2019-11-21 15:56:37 -0700 | [diff] [blame] | 93 | } |
| 94 | |
Anton Hansson | 65958d0 | 2020-03-31 21:05:53 +0100 | [diff] [blame] | 95 | // Used by MediaProvider and MediaProviderTests |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 96 | filegroup { |
| 97 | name: "mediaprovider-sources", |
| 98 | srcs: [ |
| 99 | "src/**/*.aidl", |
| 100 | "src/**/*.java", |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 101 | ":statslog-mediaprovider-java-gen", |
| 102 | ], |
| 103 | } |
| 104 | |
| 105 | // This is defined to give LegacyMediaProvider the bare minimum it needs |
| 106 | // to keep the legacy database schema working while also building |
| 107 | // against "system_current" |
William Escande | 5ca7e76 | 2021-09-01 14:20:09 +0200 | [diff] [blame] | 108 | java_library { |
| 109 | name: "mediaprovider-database", |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 110 | srcs: [ |
| 111 | "src/com/android/providers/media/DatabaseHelper.java", |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 112 | "src/com/android/providers/media/util/DatabaseUtils.java", |
| 113 | "src/com/android/providers/media/util/FileUtils.java", |
Jeff Sharkey | e04e2c6 | 2020-03-05 10:53:33 -0700 | [diff] [blame] | 114 | "src/com/android/providers/media/util/ForegroundThread.java", |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 115 | "src/com/android/providers/media/util/Logging.java", |
Ivan Chiang | be571c9 | 2019-12-03 18:09:00 +0800 | [diff] [blame] | 116 | "src/com/android/providers/media/util/MimeUtils.java", |
Martijn Coenen | db78202 | 2021-12-09 11:25:45 +0100 | [diff] [blame] | 117 | "src/com/android/providers/media/util/StringUtils.java", |
Sahana Rao | 9f4c1fa | 2020-09-09 15:06:04 +0100 | [diff] [blame] | 118 | "src/com/android/providers/media/playlist/*.java", |
Dipankar Bhardwaj | 4932010 | 2022-04-12 16:57:38 +0000 | [diff] [blame] | 119 | "src/com/android/providers/media/dao/*.java", |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 120 | ], |
William Escande | 5ca7e76 | 2021-09-01 14:20:09 +0200 | [diff] [blame] | 121 | sdk_version: "module_current", |
| 122 | min_sdk_version: "30", |
| 123 | static_libs: [ |
| 124 | "modules-utils-backgroundthread", |
| 125 | "modules-utils-build", |
| 126 | "guava", |
| 127 | ], |
| 128 | libs: [ |
| 129 | "androidx.annotation_annotation", |
| 130 | "framework-annotations-lib", |
| 131 | "framework-mediaprovider", |
| 132 | ], |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 133 | } |
| 134 | |
atrost | 2cf251d | 2019-10-10 19:32:30 +0100 | [diff] [blame] | 135 | platform_compat_config { |
| 136 | name: "media-provider-platform-compat-config", |
| 137 | src: ":MediaProvider", |
| 138 | } |
Jeff Sharkey | 3c0a6c6 | 2019-11-15 20:45:41 -0700 | [diff] [blame] | 139 | |
| 140 | genrule { |
| 141 | name: "statslog-mediaprovider-java-gen", |
| 142 | tools: ["stats-log-api-gen"], |
Muhammad Qureshi | 71b395e | 2020-12-11 14:59:11 -0800 | [diff] [blame] | 143 | cmd: "$(location stats-log-api-gen) --java $(out) --module mediaprovider" + |
Santiago Seifert | 679c81c | 2022-03-28 17:36:17 +0000 | [diff] [blame] | 144 | " --javaPackage com.android.providers.media --javaClass MediaProviderStatsLog" + |
| 145 | " --minApiLevel 30", |
Jeff Sharkey | 3c0a6c6 | 2019-11-15 20:45:41 -0700 | [diff] [blame] | 146 | out: ["com/android/providers/media/MediaProviderStatsLog.java"], |
| 147 | } |
Saumya Pathak | 3054ea5 | 2021-03-09 22:14:22 +0000 | [diff] [blame] | 148 | |
| 149 | prebuilt_etc { |
Santiago Seifert | 679c81c | 2022-03-28 17:36:17 +0000 | [diff] [blame] | 150 | name: "preinstalled-packages-com.android.providers.media.module.xml", |
| 151 | src: "preinstalled-packages-com.android.providers.media.module.xml", |
| 152 | sub_dir: "sysconfig", |
Saumya Pathak | 3054ea5 | 2021-03-09 22:14:22 +0000 | [diff] [blame] | 153 | } |