diff options
| author | 2022-01-11 12:02:06 -0500 | |
|---|---|---|
| committer | 2022-01-14 19:56:28 -0500 | |
| commit | ab1f1ac6e8e67a4f752620e420763e38dc6ebfec (patch) | |
| tree | 6f990ea16b4b17e87540d4b263089f7a64b3452a /rust/rust.go | |
| parent | b6b3b0d2292df7365db1a376c00abd4ed82511ac (diff) | |
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
Bug: 214625677
Test: m
Change-Id: I4fecfba711c0d3d7a22f4fdf7684924a9457b464
Merged-In: I4fecfba711c0d3d7a22f4fdf7684924a9457b464
Diffstat (limited to 'rust/rust.go')
| -rw-r--r-- | rust/rust.go | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/rust/rust.go b/rust/rust.go index f068b3d7b..cdeecc191 100644 --- a/rust/rust.go +++ b/rust/rust.go @@ -328,10 +328,6 @@ func (mod *Module) SdkVersion() string { return "" } -func (mod *Module) MinSdkVersion() string { - return "" -} - func (mod *Module) AlwaysSdk() bool { return false } @@ -1276,15 +1272,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 } |