summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorRyan Mitchell <rtmitchell@google.com>2021-05-03 11:42:52 -0700
committerRyan Mitchell <rtmitchell@google.com>2021-05-03 12:20:22 -0700
commit424db431bef6bec118fe1aa65fb1b93d3c164319 (patch)
tree31f29587e86236ba9bd5ca8fe831f1054b35f5da /tools/aapt2/java/JavaClassGenerator_test.cpp
parentff68a9adc3454b7cddb2501d8e82bd4b10b2037c (diff)
AAPT: Only print last uses-sdk tag
When an APK defines multiple "uses-sdk" tags, the Android runtime only uses the minSdkVersion and targetSdkVersion values from the last occurrence of the "uses-sdk" tag. For example an application with the following tags: <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29"/> <uses-sdk android:maxSdkVersion="28"/> Will have the following version codes at runtime: minSdk=1 targetSdk=1 Another example: <uses-sdk android:minSdkVersion="5" android:targetSdkVersion="28"/> <uses-sdk android:minSdkVersion="5" android:targetSdkVersion="19"/> Will have the following version codes at runtime: minSdk=5 targetSdk=19 AAPT must print the version data from only the last tag, skipping other occurrences of the tag. Bug: 175789289 Test: manual Change-Id: Ic855ff920d0b7abedd250d977bfa55189f4c8946
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions