Merge changes Ib07d4410,I0b306292
* changes: ApexInfo doesn't pass MinSdkVersion as string, but as ApiLevel Remove nativeApiLevelFromUserWithDefault
This commit is contained in:
@@ -53,14 +53,6 @@ func nativeApiLevelFromUser(ctx android.BaseModuleContext,
|
||||
return value, nil
|
||||
}
|
||||
|
||||
func nativeApiLevelFromUserWithDefault(ctx android.BaseModuleContext,
|
||||
raw string, defaultValue string) (android.ApiLevel, error) {
|
||||
if raw == "" {
|
||||
raw = defaultValue
|
||||
}
|
||||
return nativeApiLevelFromUser(ctx, raw)
|
||||
}
|
||||
|
||||
func nativeApiLevelOrPanic(ctx android.BaseModuleContext,
|
||||
raw string) android.ApiLevel {
|
||||
value, err := nativeApiLevelFromUser(ctx, raw)
|
||||
|
2
cc/cc.go
2
cc/cc.go
@@ -2499,7 +2499,7 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps {
|
||||
c.apexSdkVersion = android.FutureApiLevel
|
||||
apexInfo := ctx.Provider(android.ApexInfoProvider).(android.ApexInfo)
|
||||
if !apexInfo.IsForPlatform() {
|
||||
c.apexSdkVersion = apexInfo.MinSdkVersion(ctx)
|
||||
c.apexSdkVersion = apexInfo.MinSdkVersion
|
||||
}
|
||||
|
||||
if android.InList("hwaddress", ctx.Config().SanitizeDevice()) {
|
||||
|
@@ -20,6 +20,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/google/blueprint"
|
||||
"github.com/google/blueprint/proptools"
|
||||
|
||||
"android/soong/android"
|
||||
)
|
||||
@@ -142,8 +143,8 @@ func (this *stubDecorator) initializeProperties(ctx BaseModuleContext) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
this.unversionedUntil, err = nativeApiLevelFromUserWithDefault(ctx,
|
||||
String(this.properties.Unversioned_until), "minimum")
|
||||
str := proptools.StringDefault(this.properties.Unversioned_until, "minimum")
|
||||
this.unversionedUntil, err = nativeApiLevelFromUser(ctx, str)
|
||||
if err != nil {
|
||||
ctx.PropertyErrorf("unversioned_until", err.Error())
|
||||
return false
|
||||
|
Reference in New Issue
Block a user