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", |
| 14 | ], |
| 15 | |
Narayan Kamath | 88203dc | 2019-08-30 17:19:38 +0100 | [diff] [blame] | 16 | jni_libs: [ |
| 17 | "libfuse_jni", |
| 18 | "libfuse" |
| 19 | ], |
Zim | 3e45d9b | 2019-08-19 21:14:14 +0100 | [diff] [blame] | 20 | |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 21 | resource_dirs: [ |
| 22 | "res", |
| 23 | ], |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 24 | srcs: [ |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 25 | ":mediaprovider-sources", |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 26 | ], |
| 27 | |
Jeff Sharkey | 7d832ca | 2020-01-01 14:31:30 -0700 | [diff] [blame] | 28 | // Rewrite our hidden API usage of MediaStore to avoid "Inlined method |
| 29 | // resolution crossed dex file boundary" errors |
| 30 | jarjar_rules: "jarjar-rules.txt", |
| 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: [ |
| 37 | "compat-changeid-annotation-processor", |
Jeff Sharkey | 75b789d | 2019-10-30 10:24:44 -0600 | [diff] [blame] | 38 | "java_api_finder", |
atrost | 2cf251d | 2019-10-10 19:32:30 +0100 | [diff] [blame] | 39 | ], |
| 40 | |
Jeff Sharkey | e275032 | 2020-01-07 22:06:24 -0700 | [diff] [blame] | 41 | sdk_version: "system_current", |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 42 | |
| 43 | certificate: "media", |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 44 | privileged: true, |
atrost | 2cf251d | 2019-10-10 19:32:30 +0100 | [diff] [blame] | 45 | |
Jeff Sharkey | 56c34e8 | 2019-11-21 15:56:37 -0700 | [diff] [blame] | 46 | aaptflags: ["--custom-package com.android.providers.media"], |
| 47 | } |
| 48 | |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 49 | // This is defined to give MediaProviderTests all the source it needs to |
| 50 | // run its tests against |
| 51 | filegroup { |
| 52 | name: "mediaprovider-sources", |
| 53 | srcs: [ |
| 54 | "src/**/*.aidl", |
| 55 | "src/**/*.java", |
| 56 | ":framework-mediaprovider-sources", |
| 57 | ":framework-mediaprovider-annotation-sources", |
| 58 | ":mediaprovider-database-sources", |
| 59 | ":statslog-mediaprovider-java-gen", |
| 60 | ], |
| 61 | } |
| 62 | |
| 63 | // This is defined to give LegacyMediaProvider the bare minimum it needs |
| 64 | // to keep the legacy database schema working while also building |
| 65 | // against "system_current" |
| 66 | filegroup { |
| 67 | name: "mediaprovider-database-sources", |
| 68 | srcs: [ |
| 69 | "src/com/android/providers/media/DatabaseHelper.java", |
| 70 | "src/com/android/providers/media/util/BackgroundThread.java", |
| 71 | "src/com/android/providers/media/util/DatabaseUtils.java", |
| 72 | "src/com/android/providers/media/util/FileUtils.java", |
| 73 | "src/com/android/providers/media/util/HandlerExecutor.java", |
| 74 | "src/com/android/providers/media/util/Logging.java", |
Ivan Chiang | be571c9 | 2019-12-03 18:09:00 +0800 | [diff] [blame] | 75 | "src/com/android/providers/media/util/MimeUtils.java", |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 76 | ], |
| 77 | } |
| 78 | |
atrost | 2cf251d | 2019-10-10 19:32:30 +0100 | [diff] [blame] | 79 | platform_compat_config { |
| 80 | name: "media-provider-platform-compat-config", |
| 81 | src: ":MediaProvider", |
| 82 | } |
Jeff Sharkey | 3c0a6c6 | 2019-11-15 20:45:41 -0700 | [diff] [blame] | 83 | |
| 84 | genrule { |
| 85 | name: "statslog-mediaprovider-java-gen", |
| 86 | tools: ["stats-log-api-gen"], |
| 87 | cmd: "$(location stats-log-api-gen) --java $(out) --module mediaprovider --javaPackage com.android.providers.media --javaClass MediaProviderStatsLog", |
| 88 | out: ["com/android/providers/media/MediaProviderStatsLog.java"], |
| 89 | } |