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
This commit is contained in:
@@ -77,6 +77,7 @@ type aapt struct {
|
||||
isLibrary bool
|
||||
uncompressedJNI bool
|
||||
useEmbeddedDex bool
|
||||
usesNonSdkApis bool
|
||||
|
||||
aaptProperties aaptProperties
|
||||
}
|
||||
@@ -184,7 +185,7 @@ func (a *aapt) buildActions(ctx android.ModuleContext, sdkContext sdkContext, ex
|
||||
manifestSrcPath := android.PathForModuleSrc(ctx, manifestFile)
|
||||
|
||||
manifestPath := manifestMerger(ctx, manifestSrcPath, sdkContext, staticLibManifests, a.isLibrary,
|
||||
a.uncompressedJNI, a.useEmbeddedDex)
|
||||
a.uncompressedJNI, a.useEmbeddedDex, a.usesNonSdkApis)
|
||||
|
||||
linkFlags, linkDeps, resDirs, overlayDirs, rroDirs := a.aapt2Flags(ctx, sdkContext, manifestPath)
|
||||
|
||||
|
Reference in New Issue
Block a user