diff options
author | Ryan Mitchell <rtmitchell@google.com> | 2020-04-30 20:29:11 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-04-30 20:29:11 +0000 |
commit | 0e360fad3b06a110101533bba4ee9fa22b47649b (patch) | |
tree | 3b1b247fed06c375995b0fe488e9ae88e22d1bcd | |
parent | eae3cdf4f06bb128d879d0189b22d545ab18aa13 (diff) | |
parent | 7adb6a1c58c804f900d1c71fe258acbc18f23f59 (diff) |
Merge "Treat non-integer target SDK as version 10000" into rvc-dev am: 7adb6a1c58
Change-Id: I67f066baf0b850817fda00c68a21ace85f6bfb3d
-rw-r--r-- | tools/aapt2/dump/DumpManifest.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/aapt2/dump/DumpManifest.cpp b/tools/aapt2/dump/DumpManifest.cpp index e7a82034c77a..4a6bfd031284 100644 --- a/tools/aapt2/dump/DumpManifest.cpp +++ b/tools/aapt2/dump/DumpManifest.cpp @@ -91,6 +91,7 @@ enum { }; const std::string& kAndroidNamespace = "http://schemas.android.com/apk/res/android"; +constexpr int kCurrentDevelopmentVersion = 10000; /** Retrieves the attribute of the element with the specified attribute resource id. */ static xml::Attribute* FindAttribute(xml::Element *el, uint32_t resd_id) { @@ -325,7 +326,7 @@ class ManifestExtractor { ConfigDescription config; config.orientation = android::ResTable_config::ORIENTATION_PORT; config.density = android::ResTable_config::DENSITY_MEDIUM; - config.sdkVersion = 10000; // Very high. + config.sdkVersion = kCurrentDevelopmentVersion; // Very high. config.screenWidthDp = 320; config.screenHeightDp = 480; config.smallestScreenWidthDp = 320; @@ -622,6 +623,8 @@ class UsesSdkBadging : public ManifestExtractor::Element { } if (target_sdk) { extractor()->RaiseTargetSdk(*target_sdk); + } else if (target_sdk_name) { + extractor()->RaiseTargetSdk(kCurrentDevelopmentVersion); } } |