apex/apk: enforce min_sdk_version of all deps
Enforce min_sdk_version for every payload dependency of updatable APEX/APKs. android.CheckMinSdkVersion() calls ApexModule.ShouldSupportSdkVersion for every transitive dependency from APEX/APK modules to see if it meets the min_sdk_version requirements. The common implementation for apex/android_app is provided in android/apex.go. Bug: 145796956 Bug: 152655956 Bug: 153333044 Test: m nothing Change-Id: I4a947dc94026df7cebd552b6e8ccdb4cc1f67170
This commit is contained in:
@@ -1905,6 +1905,11 @@ func (module *SdkLibraryImport) DepIsInSameApex(mctx android.BaseModuleContext,
|
||||
return false
|
||||
}
|
||||
|
||||
func (module *SdkLibraryImport) ShouldSupportSdkVersion(ctx android.BaseModuleContext, sdkVersion int) error {
|
||||
// we don't check prebuilt modules for sdk_version
|
||||
return nil
|
||||
}
|
||||
|
||||
func (module *SdkLibraryImport) OutputFiles(tag string) (android.Paths, error) {
|
||||
return module.commonOutputFiles(tag)
|
||||
}
|
||||
@@ -2071,6 +2076,11 @@ func (module *sdkLibraryXml) DepsMutator(ctx android.BottomUpMutatorContext) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
func (module *sdkLibraryXml) ShouldSupportSdkVersion(ctx android.BaseModuleContext, sdkVersion int) error {
|
||||
// sdkLibraryXml doesn't need to be checked separately because java_sdk_library is checked
|
||||
return nil
|
||||
}
|
||||
|
||||
// File path to the runtime implementation library
|
||||
func (module *sdkLibraryXml) implPath() string {
|
||||
implName := proptools.String(module.properties.Lib_name)
|
||||
|
Reference in New Issue
Block a user