commit | 23776499cdc8ad703ff401659e864f1f9ae37b73 | [log] [tgz] |
---|---|---|
author | David Su <dysu@google.com> | Wed Aug 26 11:26:47 2020 -0700 |
committer | David Su <dysu@google.com> | Wed Sep 02 09:49:12 2020 -0700 |
tree | f2cb8da45f644a8432245b5ae13e3c3cc9391bbc | |
parent | cde031845ef9a71297bd3c6d6904b1251daa79cd [diff] |
Create SdkLevelUtil for Mainline Mainline modules should disable new APIs on older SDK levels by checking the Build.VERSION constants. Before S SDK finalization, checking `VERSION.SDK_INT >= VERSION_CODES.S` doesn't work on S development builds, because SDK_INT = R = 30, while VERSION_CODES.S = 10000. Thus, check Build.VERSION.CODENAME as a workaround. Bug: 154742276 Test: tested on S dev build Change-Id: I51cb8136f6700fc93eb24f1941717b41d344dba4