Replace ApiStrToNum uses with ApiLevel.
Test: treehugger
Bug: http://b/154667674
Change-Id: I2954bb21c1cfdeb305f25cfb6c8711c930f6ed50
diff --git a/cc/compiler.go b/cc/compiler.go
index f745820..18a2f62 100644
--- a/cc/compiler.go
+++ b/cc/compiler.go
@@ -354,7 +354,9 @@
flags.Global.CommonFlags = append(flags.Global.CommonFlags, "-D__ANDROID_APEX_NAME__='\""+ctx.apexVariationName()+"\"'")
}
if ctx.Device() {
- flags.Global.CommonFlags = append(flags.Global.CommonFlags, "-D__ANDROID_SDK_VERSION__="+strconv.Itoa(ctx.apexSdkVersion()))
+ flags.Global.CommonFlags = append(flags.Global.CommonFlags,
+ fmt.Sprintf("-D__ANDROID_SDK_VERSION__=%d",
+ ctx.apexSdkVersion().FinalOrFutureInt()))
}
}