Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a91ba254 authored by Ivan Lozano's avatar Ivan Lozano
Browse files

rust: Fix exported MinSdkVersion

The exported rust.MinSdkVersion always returns an empty string. Instead
it should return the Min_sdk_version property like rust.minSdkVersion.

This CL renames minSdkVersion to MinSdkVersion so the exported function
has the correct behavior.

Bug: 211858959
Test: m
Change-Id: I4fecfba711c0d3d7a22f4fdf7684924a9457b464
Merged-In: I4fecfba711c0d3d7a22f4fdf7684924a9457b464
parent 865d5e6c
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -366,10 +366,6 @@ func (mod *Module) SdkVersion() string {
	return ""
}

func (mod *Module) MinSdkVersion() string {
	return ""
}

func (mod *Module) AlwaysSdk() bool {
	return false
}
@@ -1497,15 +1493,13 @@ func (mod *Module) HostToolPath() android.OptionalPath {

var _ android.ApexModule = (*Module)(nil)

func (mod *Module) minSdkVersion() string {
func (mod *Module) MinSdkVersion() string {
	return String(mod.Properties.Min_sdk_version)
}

var _ android.ApexModule = (*Module)(nil)

// Implements android.ApexModule
func (mod *Module) ShouldSupportSdkVersion(ctx android.BaseModuleContext, sdkVersion android.ApiLevel) error {
	minSdkVersion := mod.minSdkVersion()
	minSdkVersion := mod.MinSdkVersion()
	if minSdkVersion == "apex_inherit" {
		return nil
	}