aboutsummaryrefslogtreecommitdiffstats
path: root/java/app.go
diff options
context:
space:
mode:
authorDavid Brazdil <dbrazdil@google.com>2019-02-18 18:24:16 +0000
committerDavid Brazdil <dbrazdil@google.com>2019-02-18 19:21:02 +0000
commitd25060aa2d6e4468f1b67a70d65623afcefff45a (patch)
treeb2a8b8706056acc5778ce789463dc9011f0bae78 /java/app.go
parentf854d3e4be3282e31cc8de5e8358a7dbf3ed06a3 (diff)
downloadandroid_build_soong-d25060aa2d6e4468f1b67a70d65623afcefff45a.tar.gz
android_build_soong-d25060aa2d6e4468f1b67a70d65623afcefff45a.tar.bz2
android_build_soong-d25060aa2d6e4468f1b67a70d65623afcefff45a.zip
Set usesNonSdkApi in manifest when Platform_apis=true
The Platform_apis field in CompilerDeviceProperties currently has no effect. Unify the behaviour with make and run manifest_fixer.py to encode the information in the manifest. This is used to exempt bundled apps and platform tests from hidden API access checks without having a fixed whitelist of packages. Bug: 113315999 Bug: 124671117 Test: m UbSystemUiJankTests && \ aapt d xmltree \ target/product/taimen/data/app/UbSystemUiJankTests/UbSystemUiJankTests.apk \ AndroidManifest.xml | grep usesNonSdkApi Change-Id: I20c392d91ee6275ef8139fbeb5b9700385abbc80
Diffstat (limited to 'java/app.go')
-rw-r--r--java/app.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/java/app.go b/java/app.go
index 3cb7e8e2..50154688 100644
--- a/java/app.go
+++ b/java/app.go
@@ -186,6 +186,8 @@ func (a *AndroidApp) shouldUncompressDex(ctx android.ModuleContext) bool {
}
func (a *AndroidApp) aaptBuildActions(ctx android.ModuleContext) {
+ a.aapt.usesNonSdkApis = Bool(a.Module.deviceProperties.Platform_apis)
+
aaptLinkFlags := []string{}
// Add TARGET_AAPT_CHARACTERISTICS values to AAPT link flags if they exist and --product flags were not provided.