1// This looks a bit awkward, but we need our tests to run against either 2// MediaProvider or MediaProviderGoogle, and we don't know which one is 3// on the device being tested, so we can't sign our tests with a key that 4// will allow instrumentation. Thus we pull all the sources we need to 5// run tests against into the test itself. 6android_test { 7 name: "MediaProviderTests", 8 test_suites: [ 9 "device-tests", 10 "mts", 11 ], 12 compile_multilib: "both", 13 14 manifest: "AndroidManifest.xml", 15 16 resource_dirs: [ 17 "main_res", 18 "res", 19 ], 20 srcs: [ 21 ":framework-mediaprovider-sources", 22 ":mediaprovider-sources", 23 "src/**/*.java", 24 ], 25 26 libs: [ 27 "android.test.base", 28 "android.test.mock", 29 "android.test.runner", 30 "unsupportedappusage", 31 ], 32 33 static_libs: [ 34 "androidx.appcompat_appcompat", 35 "androidx.core_core", 36 "androidx.test.rules", 37 "guava", 38 "mockito-target", 39 "truth-prebuilt", 40 ], 41 42 certificate: "media", 43 44 aaptflags: ["--custom-package com.android.providers.media"], 45 46 errorprone: { 47 javacflags: [ 48 "-Xep:CatchFail:ERROR", 49 "-Xep:MissingFail:ERROR", 50 ], 51 }, 52} 53