Merge "Set the usesNonSdk manifest attribute whan targeting module SDKs." am: 4238c5fe07
am: c952e7fad6
am: 855b5768cc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1657320 Change-Id: I4b500f3da2e6c39832ae4c93de6b4eb8667096d7
This commit is contained in:
@@ -380,7 +380,11 @@ func (a *AndroidApp) renameResourcesPackage() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (a *AndroidApp) aaptBuildActions(ctx android.ModuleContext) {
|
func (a *AndroidApp) aaptBuildActions(ctx android.ModuleContext) {
|
||||||
a.aapt.usesNonSdkApis = Bool(a.Module.deviceProperties.Platform_apis)
|
usePlatformAPI := proptools.Bool(a.Module.deviceProperties.Platform_apis)
|
||||||
|
if ctx.Module().(android.SdkContext).SdkVersion().Kind == android.SdkModule {
|
||||||
|
usePlatformAPI = true
|
||||||
|
}
|
||||||
|
a.aapt.usesNonSdkApis = usePlatformAPI
|
||||||
|
|
||||||
// Ask manifest_fixer to add or update the application element indicating this app has no code.
|
// Ask manifest_fixer to add or update the application element indicating this app has no code.
|
||||||
a.aapt.hasNoCode = !a.hasCode(ctx)
|
a.aapt.hasNoCode = !a.hasCode(ctx)
|
||||||
|
Reference in New Issue
Block a user