From d05b9130fdbff8062084b566a380c5b058273d75 Mon Sep 17 00:00:00 2001 From: Shane Farmer Date: Wed, 14 Feb 2018 15:40:35 -0800 Subject: AAPT2: Fix compatible-screens element in AndroidManifest.xml Fix an issue where the compatible-screens element was not being populated correctly. The previous version was missing the screenSize attribute which is mandatory. The attributes were also missing the resource ID from the framework library as these are a part of the public API. Change-Id: I2f594c2259831dbbd96c58db4ba55e8288d4231e Test: unit tests Test: manually split an APK and dumped with aapt --- tools/aapt2/ResourceUtils.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/aapt2/ResourceUtils.cpp') diff --git a/tools/aapt2/ResourceUtils.cpp b/tools/aapt2/ResourceUtils.cpp index 02ac86c94b46..628466d0a281 100644 --- a/tools/aapt2/ResourceUtils.cpp +++ b/tools/aapt2/ResourceUtils.cpp @@ -520,6 +520,10 @@ std::unique_ptr TryParseInt(const StringPiece& str) { return util::make_unique(value); } +std::unique_ptr MakeInt(uint32_t val) { + return util::make_unique(android::Res_value::TYPE_INT_DEC, val); +} + std::unique_ptr TryParseFloat(const StringPiece& str) { std::u16string str16 = util::Utf8ToUtf16(util::TrimWhitespace(str)); android::Res_value value; -- cgit v1.2.3-59-g8ed1b