summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
author Alix <agespino@google.com> 2023-03-06 21:04:30 +0000
committer Alix <agespino@google.com> 2023-03-31 14:55:13 +0000
commitfb502512cbe375d9cc586d51a63e01a79ac75d36 (patch)
treef72b882bac9a22827cbabb7a530ebb2d4087e8f0 /java
parentb72610665cea143f470e02b2230b3e8f198acbd2 (diff)
Simplify logic in Soong ApiLevelFromUserWithConfig
Currently, ApiLevelFromUser calls ReplaceFinalizedCodename(raw). This function checks whether raw is in the getFinalCodenamesMap which is equivalent to ApiLevelsMapReleasedVersion with an additional entry for current. Since ApiLevelFromUserWithConfig already returned on the raw = "current" we only care about ApiLevelsMapReleasedVersion and can avoid the unecessary use of strconv.Atoi(strconv.Itoa(raw)) that calling ReplaceFinalizedCodename ends up doing. Also makes the function look more like the Bazel version in build/bazel/rules/common/api.bzl Change-Id: I8c03fc159d7f63298273624f030d1956e2307615 Test: m bp2build
Diffstat (limited to 'java')
0 files changed, 0 insertions, 0 deletions