SdkSpec = Scope + ApiLevel
SdkSpec.Version was an int type. Now it becomes ApiLevel type which is a better abstraction of the version (or api level). Bug: 1655587 Test: m Change-Id: I4d67b9b9eae45f653b6af4f5b73da9e091b3dfab
This commit is contained in:
@@ -1156,7 +1156,7 @@ func (j *Import) TargetSdkVersion() android.SdkSpec {
|
||||
}
|
||||
|
||||
func (j *Import) MinSdkVersionString() string {
|
||||
return j.MinSdkVersion().Version.String()
|
||||
return j.MinSdkVersion().ApiLevel.String()
|
||||
}
|
||||
|
||||
func (j *Import) Prebuilt() *android.Prebuilt {
|
||||
@@ -1370,7 +1370,7 @@ func (j *Import) ShouldSupportSdkVersion(ctx android.BaseModuleContext,
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if ver.ApiLevel(ctx).GreaterThan(sdkVersion) {
|
||||
if ver.GreaterThan(sdkVersion) {
|
||||
return fmt.Errorf("newer SDK(%v)", ver)
|
||||
}
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user