diff options
author | 2025-02-06 00:25:22 +0000 | |
---|---|---|
committer | 2025-02-12 18:34:40 +0000 | |
commit | 5d3a2cfde6247422c1f788f436d517d9e1d4c7e3 (patch) | |
tree | 6447de6747f22f638152460fe48c5189cc327db9 /apex/builder.go | |
parent | d8db8faba62a3cb77f75294e96deda9e53c15786 (diff) |
Provide min sdk version as ApiLevel instead of string.
Bug: 377723687
Test: Unit tests and compare the ninja and mk files generated.
Change-Id: I8c7b3b493877a9857ca433b015e6e49ad8387f91
Diffstat (limited to 'apex/builder.go')
-rw-r--r-- | apex/builder.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/apex/builder.go b/apex/builder.go index 03a0bb902..842771920 100644 --- a/apex/builder.go +++ b/apex/builder.go @@ -1132,10 +1132,9 @@ func (a *apexBundle) buildApexDependencyInfo(ctx android.ModuleContext) { depInfos[to.Name()] = info } else { toMinSdkVersion := "(no version)" - if info, ok := android.OtherModuleProvider(ctx, to, android.CommonModuleInfoKey); ok { - if v := info.MinSdkVersion; v != "" { - toMinSdkVersion = v - } + if info, ok := android.OtherModuleProvider(ctx, to, android.CommonModuleInfoKey); ok && + !info.MinSdkVersion.IsPlatform && info.MinSdkVersion.ApiLevel != nil { + toMinSdkVersion = info.MinSdkVersion.ApiLevel.String() } depInfos[to.Name()] = android.ApexModuleDepInfo{ To: to.Name(), |