summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2018-06-18 11:47:45 -0700
committerColin Cross <ccross@android.com>2018-06-18 12:58:11 -0700
commitf61f9e3cd9f5a6a609982a73bc65ce107831ff84 (patch)
tree3ea177cbbaf412677b48994f854311a53af9e4a2 /tools/aapt2/java/JavaClassGenerator.cpp
parent0ec0c175969844cf2798b08c0adac28193bd453d (diff)
Don't override targetVers with minCode
If a package contains minSdkVersion="Q" targetSdkVersion="25", targetCode will be initialized to "Q" when reading minCode, but targetVers will be set to "25". targetCode overrides targetVers, so this results in the computed targetSdkVersion being "Q". If minSdkVersion were instead "28", the computed targetSdkVersion would be "Q". Make the computed targetSdkVersion consistent by leaving targetCode and targetVers unset while parsing minSdkVersion, and then setting them to minCode and minVers if there is no targetSdkVersion attribute. Bug: 110167203 Bug: 110353795 Test: install DeviceHealthChecks, verify targetSdk=25 Change-Id: I9547e9b4720543f0c892cbf4de92888c8eead44f
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions