This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.
Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.
Test: make relevant packages
Bug: 73535841
Change-Id: I4233b9091d9066c4fa69f3d24aaf367ea500f760
Android Instant Apps in its current iteration does not use namespaces,
but due to limitations on the Android resource runtime, needs to make
it look like it does.
This is due to a bug that treats any package ID that's not 0x01 or 0x7F
as a shared library. Shared libraries require unique package names.
As a workaround, and since Android Instant Apps can not have a feature
depend on another feature, we can alter the resource package name of a
feature split just before writing it out to disk. This avoids using a
unique package name while linking, thereby avoiding namespace issues.
Bug: 68820737
Test: manual
Change-Id: Ic553ed42656436bbb949393d0248ee7bb9d37860
This updates the FeatureSplit test sample to reflect the current
way of doing correct feature splits.
This is not final, as aapt2 will be gaining some improvements to
make access of private resources across feature splits valid by default.
Bug: 65096694
Test: manual
Change-Id: I4524dc161d46c5479b5abe340eb93844078ed316
The dynamic ref table used to map build-time IDs to runtime IDs
is mainly used for shared resource libraries and has a few built-in
mappings (app 0x7f and framework 0x01).
Using a non-standard package ID like 0x80 causes a failure in package ID
lookup. The solution is to ship the dynamic_ref_table with an identity mapping
with any resource table that uses a non-standard package ID.
Adds some tests to ensure this works correctly.
Bug: 37498913
Test: make libandroidfw_tests
Test: make aapt2_tests
Change-Id: Ic3f67942384d34e7fdcbc94ded360e940e3ebc8a
This change allows the developer to add a base package for
which to build a feature split. The generated resource types
will begin after the base APK's defined types so as not
to collide or override resources.
Multiple features can be generated by first choosing an
arbitrary order for the features. Then for each feature,
the base APK and any preceding features are specified
with the --feature-of flags.
So with a base APK 'A' and features, 'B', and 'C',
'B' would be built with
aapt package [...] --feature-of A [...]
and 'C' would be built with
aapt package [...] --feature-of A --feature-of B [...]
Change-Id: I1be66e3f8df9a737b21c71f8a93685376c7e6780