AAPT2: Fix long version code bugs
Refactoring areas in AAPT2 that use android:versionCode to also use
abdroid:versionCodeMajor. Does not add versionCodeMajor command line flag yet.
Bug: 109883459
Test: aapt2_tests
Change-Id: I573fbea37491cf8c5742f9e385c66ee64c4e5166
diff --git a/tools/aapt2/AppInfo.h b/tools/aapt2/AppInfo.h
index d6f5995..7512353 100644
--- a/tools/aapt2/AppInfo.h
+++ b/tools/aapt2/AppInfo.h
@@ -31,9 +31,12 @@
// The app's minimum SDK version, if it is defined.
Maybe<int> min_sdk_version;
- // The app's version code, if it is defined.
+ // The app's version code (the lower 32 bits of the long version code), if it is defined.
Maybe<uint32_t> version_code;
+ // The app's version code major (the upper 32 bits of the long version code), if it is defined.
+ Maybe<uint32_t> version_code_major;
+
// The app's revision code, if it is defined.
Maybe<uint32_t> revision_code;