Jeff Sharkey | 56c34e8 | 2019-11-21 15:56:37 -0700 | [diff] [blame] | 1 | |
Bob Badour | 45b6e7d | 2021-02-12 18:09:33 -0800 | [diff] [blame] | 2 | package { |
| 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 |
| 8 | license { |
| 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 Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 19 | android_app { |
| 20 | name: "MediaProvider", |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 21 | manifest: "AndroidManifest.xml", |
| 22 | |
Jeff Sharkey | b6781bc | 2019-07-18 18:45:52 -0600 | [diff] [blame] | 23 | static_libs: [ |
| 24 | "androidx.appcompat_appcompat", |
Jeff Sharkey | 7ea24f2 | 2019-08-22 10:14:18 -0600 | [diff] [blame] | 25 | "androidx.core_core", |
Jeff Sharkey | cc5c31d | 2019-10-08 16:10:53 -0600 | [diff] [blame] | 26 | "guava", |
Ivan Chiang | 7fce4a5 | 2021-01-25 16:53:54 +0800 | [diff] [blame] | 27 | "modules-utils-build", |
Jeff Sharkey | b6781bc | 2019-07-18 18:45:52 -0600 | [diff] [blame] | 28 | ], |
| 29 | |
Artur Satayev | 2bb438d | 2020-01-23 15:26:14 +0000 | [diff] [blame] | 30 | libs: [ |
| 31 | "unsupportedappusage", |
atrost | cee0181 | 2020-01-29 13:37:19 +0000 | [diff] [blame] | 32 | "app-compat-annotations", |
Anton Hansson | 9258dba | 2021-03-30 13:38:15 +0100 | [diff] [blame] | 33 | "framework-annotations-lib", |
Paul Duffin | a3b3786 | 2020-05-14 00:40:43 +0100 | [diff] [blame] | 34 | "framework-mediaprovider.impl", |
Chong Zhang | d335864 | 2020-12-08 15:37:50 -0800 | [diff] [blame] | 35 | "framework-media.stubs.module_lib", |
Paul Duffin | dc5abff | 2020-05-31 11:54:42 +0100 | [diff] [blame] | 36 | "framework-statsd", |
Artur Satayev | 2bb438d | 2020-01-23 15:26:14 +0000 | [diff] [blame] | 37 | ], |
| 38 | |
Narayan Kamath | 88203dc | 2019-08-30 17:19:38 +0100 | [diff] [blame] | 39 | jni_libs: [ |
| 40 | "libfuse_jni", |
| 41 | "libfuse" |
| 42 | ], |
Zim | 3e45d9b | 2019-08-19 21:14:14 +0100 | [diff] [blame] | 43 | |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 44 | resource_dirs: [ |
| 45 | "res", |
| 46 | ], |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 47 | srcs: [ |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 48 | ":mediaprovider-sources", |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 49 | ], |
| 50 | |
Jeff Sharkey | 10b4d8d | 2019-02-04 21:53:22 -0700 | [diff] [blame] | 51 | optimize: { |
| 52 | proguard_flags_files: ["proguard.flags"], |
| 53 | }, |
| 54 | |
atrost | 2cf251d | 2019-10-10 19:32:30 +0100 | [diff] [blame] | 55 | plugins: [ |
Jeff Sharkey | 75b789d | 2019-10-30 10:24:44 -0600 | [diff] [blame] | 56 | "java_api_finder", |
Jeff Sharkey | c4a5f81 | 2020-05-03 21:07:14 -0600 | [diff] [blame] | 57 | "error_prone_mediaprovider", |
atrost | 2cf251d | 2019-10-10 19:32:30 +0100 | [diff] [blame] | 58 | ], |
| 59 | |
Anton Hansson | 65958d0 | 2020-03-31 21:05:53 +0100 | [diff] [blame] | 60 | sdk_version: "module_current", |
Nikita Ioffe | 0bf6f89 | 2020-11-03 22:58:11 +0000 | [diff] [blame] | 61 | min_sdk_version: "30", |
Corina | 7648e1a | 2021-01-27 09:43:03 +0000 | [diff] [blame] | 62 | target_sdk_version: "30", |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 63 | |
| 64 | certificate: "media", |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 65 | privileged: true, |
atrost | 2cf251d | 2019-10-10 19:32:30 +0100 | [diff] [blame] | 66 | |
Jeff Sharkey | 56c34e8 | 2019-11-21 15:56:37 -0700 | [diff] [blame] | 67 | aaptflags: ["--custom-package com.android.providers.media"], |
Jeff Sharkey | b3e6603 | 2020-05-03 11:34:41 -0600 | [diff] [blame] | 68 | |
| 69 | errorprone: { |
| 70 | javacflags: [ |
| 71 | "-Xep:FallThrough:ERROR", |
| 72 | "-Xep:GuardedBy:ERROR", |
| 73 | "-Xep:StreamResourceLeak:ERROR", |
Jeff Sharkey | c4a5f81 | 2020-05-03 21:07:14 -0600 | [diff] [blame] | 74 | |
| 75 | // Local checkers specific to this module |
| 76 | "-Xep:MediaProviderLocaleRoot:ERROR", |
| 77 | "-Xep:MediaProviderMimeType:ERROR", |
Jeff Sharkey | b3e6603 | 2020-05-03 11:34:41 -0600 | [diff] [blame] | 78 | ], |
| 79 | }, |
Saumya Pathak | 3054ea5 | 2021-03-09 22:14:22 +0000 | [diff] [blame] | 80 | |
| 81 | required: ["preinstalled-packages-com.android.providers.media.module.xml"], |
Jeff Sharkey | 56c34e8 | 2019-11-21 15:56:37 -0700 | [diff] [blame] | 82 | } |
| 83 | |
Anton Hansson | 65958d0 | 2020-03-31 21:05:53 +0100 | [diff] [blame] | 84 | // Used by MediaProvider and MediaProviderTests |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 85 | filegroup { |
| 86 | name: "mediaprovider-sources", |
| 87 | srcs: [ |
| 88 | "src/**/*.aidl", |
| 89 | "src/**/*.java", |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 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" |
| 98 | filegroup { |
| 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", |
Jeff Sharkey | e04e2c6 | 2020-03-05 10:53:33 -0700 | [diff] [blame] | 105 | "src/com/android/providers/media/util/ForegroundThread.java", |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 106 | "src/com/android/providers/media/util/HandlerExecutor.java", |
| 107 | "src/com/android/providers/media/util/Logging.java", |
Ivan Chiang | be571c9 | 2019-12-03 18:09:00 +0800 | [diff] [blame] | 108 | "src/com/android/providers/media/util/MimeUtils.java", |
Sahana Rao | 9f4c1fa | 2020-09-09 15:06:04 +0100 | [diff] [blame] | 109 | "src/com/android/providers/media/playlist/*.java", |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 110 | ], |
| 111 | } |
| 112 | |
atrost | 2cf251d | 2019-10-10 19:32:30 +0100 | [diff] [blame] | 113 | platform_compat_config { |
| 114 | name: "media-provider-platform-compat-config", |
| 115 | src: ":MediaProvider", |
| 116 | } |
Jeff Sharkey | 3c0a6c6 | 2019-11-15 20:45:41 -0700 | [diff] [blame] | 117 | |
| 118 | genrule { |
| 119 | name: "statslog-mediaprovider-java-gen", |
| 120 | tools: ["stats-log-api-gen"], |
Muhammad Qureshi | 71b395e | 2020-12-11 14:59:11 -0800 | [diff] [blame] | 121 | cmd: "$(location stats-log-api-gen) --java $(out) --module mediaprovider" + |
| 122 | " --javaPackage com.android.providers.media --javaClass MediaProviderStatsLog" + |
| 123 | " --minApiLevel 30", |
Jeff Sharkey | 3c0a6c6 | 2019-11-15 20:45:41 -0700 | [diff] [blame] | 124 | out: ["com/android/providers/media/MediaProviderStatsLog.java"], |
| 125 | } |
Saumya Pathak | 3054ea5 | 2021-03-09 22:14:22 +0000 | [diff] [blame] | 126 | |
| 127 | prebuilt_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 | |