commit | 147c6dc6ad3470b4d315523daf037f9ed2def17c | [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 | 354c4e24db528bf98226faa5da0be29932d10df3 | |
parent | 0e95c30fae8667abc9d58ac0c30082ac4490da48 [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