Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d228691c authored by Mårten Kongstad's avatar Mårten Kongstad
Browse files

[aapt2] dump badging: rename sdkVersion to minSdkVersion

`aapt2 dump badging` will label the minSdkVersion as "sdkVersion". This
is inconsistent with the labels for targetSdkVersion and maxSdkVersion,
which include the target/max prefixes.

Change the label of of minSdkVersion from "sdkVersion" to
"minSdkVersion" to reduce the risk of confusion.

Bug: 292216817
Test: atest aapt2_tests
Test: aapt2 dump badging <path-to-apk> # manually inspect output, compare with aapt2 dump xmltree --file AndroidManifest.xml <path-to-apk>
Change-Id: Ic9f74636ecd1daa67f62bd8839f7ce095f351ad5
parent dbde61ab
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -837,9 +837,9 @@ class UsesSdkBadging : public ManifestExtractor::Element {

  void Print(text::Printer* printer) override {
    if (min_sdk) {
      printer->Print(StringPrintf("sdkVersion:'%d'\n", *min_sdk));
      printer->Print(StringPrintf("minSdkVersion:'%d'\n", *min_sdk));
    } else if (min_sdk_name) {
      printer->Print(StringPrintf("sdkVersion:'%s'\n", min_sdk_name->data()));
      printer->Print(StringPrintf("minSdkVersion:'%s'\n", min_sdk_name->data()));
    }
    if (max_sdk) {
      printer->Print(StringPrintf("maxSdkVersion:'%d'\n", *max_sdk));
+1 −1
Original line number Diff line number Diff line
package: name='com.aapt.app' versionCode='222' versionName='222' platformBuildVersionName='12' platformBuildVersionCode='32' compileSdkVersion='32' compileSdkVersionCodename='12'
sdkVersion:'22'
minSdkVersion:'22'
targetSdkVersion:'32'
application: label='App' icon=''
feature-group: label=''
+1 −1
Original line number Diff line number Diff line
package: name='com.example.bundletool.minimal' versionCode='1' versionName='1.0' platformBuildVersionName='12' platformBuildVersionCode='31' compileSdkVersion='31' compileSdkVersionCodename='12'
sdkVersion:'21'
minSdkVersion:'21'
targetSdkVersion:'31'
uses-configuration: reqTouchScreen='3' reqKeyboardType='2' reqHardKeyboard='-1' reqNavigation='3' reqFiveWayNav='-1'
supports-gl-texture:'GL_OES_compressed_paletted_texture'
+1 −1
Original line number Diff line number Diff line
package: name='com.lato.bubblegirl' versionCode='33' versionName='1.0.0' platformBuildVersionName='8.1.0' platformBuildVersionCode='27'
sdkVersion:'19'
minSdkVersion:'19'
targetSdkVersion:'26'
application-label:'Bubble Girl'
application-label-ar:'Bubble Girl'
+1 −1
Original line number Diff line number Diff line
package: name='com.test.e17wmultiapknexus' versionCode='107' versionName='14' platformBuildVersionName='2.3.3' platformBuildVersionCode='10'
sdkVersion:'1'
minSdkVersion:'1'
application-label:'w45wmultiapknexus_10'
application-icon-120:'res/drawable-ldpi-v4/icon.png'
application-icon-160:'res/drawable-mdpi-v4/icon.png'