Merge "Set the usesNonSdk manifest attribute whan targeting module SDKs."

This commit is contained in:
Treehugger Robot
2021-04-06 18:25:12 +00:00
committed by Gerrit Code Review

View File

@@ -380,7 +380,11 @@ func (a *AndroidApp) renameResourcesPackage() bool {
}
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.
a.aapt.hasNoCode = !a.hasCode(ctx)