This change allows RROs to reference their own internal resources as
expected.
Overlays are loaded as shared libraries so they can have their own
resource id space that does not conflict with the resource id space of
the target or other overlays.
References to overlay resources that override target resources now
appear as references to the target resources.
Overlay values that are inlined into the xml file specified using
android:overlayResources are now able to be used at runtime.
See go/rro-references for more information.
Bug: 135943783
Test: idmap2_tests
Test: libandroidfw_tests
Change-Id: Ie349c56d7fd3f7d94b7d595ed6d01dc6b59b6178
This reverts commit 60c71cee6ec064a0d2f4c6608fdb54bf95545d45.
Reason for revert: Rolling forward for Q-Finalization
Bug: 131429032
Bug: 129975435
Change-Id: Idd812d93b767d8a672b9ada58c8bcc2441395847
This reverts commit 8a3d1f96e1736c7e0493ebb71ed2904dffdebbfd.
Reason for revert: QT SDK Finalization. Will be merged again on/after May 13th
Bug: 131429032
Bug: 129975435
Change-Id: I7a48ef6a057a97ebd9903b7e934a7d95ec97f00e
Time may be eternal, Captain, but our patience is not. It's time to put
an end to your trek through the stars.
Test: Builds, boots.
Bug: 131429032
Bug: 129975435
Change-Id: Ia2367124afb642dac0fb365e4fa096db1c648adb
AaptAsssets intentinally falls through in a switch statement.
This change adds [[fallthrough]]; to suppress this implicit fallthrough.
frameworks/base/tools/aapt/AaptAssets.cpp:305:17: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 5:
^
frameworks/base/tools/aapt/AaptAssets.cpp:305:17: note: insert '[[fallthrough]];' to silence this warning
case 5:
^
[[fallthrough]];
frameworks/base/tools/aapt/AaptAssets.cpp:305:17: note: insert 'break;' to avoid fall-through
case 5:
^
break;
Test: make -j aapt
Change-Id: Ia9d2ca3b59eb804e20c6295791f6a19f0f5f63ab
* Add explicit to conversion constructors/operators
* Use NOLINT or NOLINTNEXTLINE to suppress warnings on intended converters
Bug: 28341362
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor
Change-Id: Ie02101ea7c422e8add535c111a30a2f21ead0ace
It will be a global error by default.
Test: make checkbuild
Bug: 112564944
Change-Id: I26616fd50ccf3639fa7c01d850a14d079273ede7
Exempt-From-Owner-Approval: do not block on new warnings
See build/soong/README.md for more information.
Test: cd frameworks/base/tools/aapt; mma
Test: aapt version
Change-Id: Ice97e9b32c53cfed30d68acd5717d8c66712df4c
Bug: http://b/69933068
This is a partial revert of
https://android-review.googlesource.com/c/platform/frameworks/base/+/109433
so we can use Clang for windows cross compilation.
Clang does not allow a cast to 'signed size_t' and both Clang and
current MinGW accept a ssize_t to the '%zd' format specifier.
Test: m native-host, m native-host-cross with both MinGW and Clang
Change-Id: I5366622b91be1433f6c533c55a9ae429b57c7a27
This is the desired behavior if resource IDs may overlap, and also happens to
improve the behavior of:
aapt dump -I base.apk badging feature.apk
when both APKs use the same package name with different package IDs
(base=0x7F, feature=0x80). Previously, the final call to
DynamicRefTable::addMapping was for base.apk, and all references to 0x80 were
rewritten in DynamicRefTable::lookupResourceId to 0x7F. After this
change resources defined in both APKs are resolved correctly.
Note that this is a bit of kludge, and APKs should use different names
to avoid conflating the package IDs.
Fixes: 67070085
Bug: 64058531
Test: manual with sample in b/67070085#comment2
Change-Id: I285adb6f44a297440b08fc7a1f9ad73c700eb9bc
This fixes the warning
Call to function 'strcpy' is insecure as it does not provide bounding of
the memory buffer. As a side effect, it sliences the warning
frameworks/base/tools/aapt/Images.cpp:1270:50: warning: Potential leak
of memory pointed to by field 'data' [clang-analyzer-unix.Malloc]
frameworks/base/tools/aapt2/compile/Png.cpp:562:42: warning: Potential
leak of memory pointed to by field 'data' [clang-analyzer-unix.Malloc].
Bug: None
Test: The warning is gone.
Change-Id: I25f68ff85bea7069c21549c7deb7920d1877069e
A bug in the dump badging command caused strings to be looked up in the
first loaded package only.
Bug: 64948230
Bug: 65645766
Test: none
Change-Id: Ia804777fe3f963004a5c053129ef6e0c94b7f6a3
Merged-In: Ia804777fe3f963004a5c053129ef6e0c94b7f6a3
Only do that for the aapt binary itself. This will allow libaapt to be
converted to Soong.
Also remove a few lines that weren't doing anything: aaptCppflags was
never set, LOCAL_C_INCLUDES := $(LOCAL_PATH) is implied.
Test: m aapt
Test: aapt version
Change-Id: Ia3bcece14921417e1bfd3406630961c013bd497c
Instead of using the system libz (-lz), include our copy as a static
library. This is safer in case the system version isn't compatible.
Also removes references to -ldl -lrt -lpthread, which are now implied.
Test: m -j
Test: out/host/linux-x86/nativetest64/libaapt_tests/libaapt_tests
Test: out/host/linux-x86/nativetest64/aapt2_tests/aapt2_tests
Test: out/host/linux-x86/nativetest64/libsplit-select_tests/libsplit-select_tests
Change-Id: Icd26dc1e0d011e5b5f158e562640533c5ac34e33
A bug in the dump badging command caused strings to be looked up in the
first loaded package only.
Bug: 64948230
Test: none
Change-Id: Ia804777fe3f963004a5c053129ef6e0c94b7f6a3
Characted sequences \n and \t are now treated as word separators
by BiDi pseudolocalizer. This solves issues when text rendering
engine breaks a line in the middle of a text chunk marked with
RLM+RLO and PDF+RLM sequences.
Bug:34064580
Change-Id: I52e6018785fae25479fa167440f24c534b0e3253
Fixes:34064580
Test: make aapt2_tests
Test: Run aapt2_tests binary
Feature splits depend on their base. The dump badging command
does resource resolution, and needs to be able to find resources
located in the base APK of a feature split.
Bug: 38038608
Test: manual
Change-Id: I8c22f0083c46a853a3a56a4049715409ac2723fe
Adaptive icons were versioned correctly, but skipped the compilation
/ resource ID assignment phase. This CL fixes the glitch.
Bug: 34829129
Test: manual
Change-Id: I93739a8b10fac53a048d95b330edf381684a807c
When a developer specifies an adaptive application icon,
and a non-adaptive round application icon, create an alias
from the round icon to the regular icon for v26 APIs and up.
We do this because certain devices prefer android:roundIcon over
android:icon regardless of the API levels of the drawables set for
either.
This auto-aliasing behaviour allows an app to prefer the
android:roundIcon on API 25 devices, and prefer the adaptive icon on
API 26 devices.
An app developer can override this behaviour by explicitly setting the
android:roundIcon to a drawable that has a v26 qualifier.
Bug: 34829129
Test: manual
Change-Id: Iaaaa5d8367e4f3f9e9f2e3b51c782d3be6a3bb71
bug:33527757
Test: replace the AAPT in local SDK, and make sure the propertyX/YName
still works within ObjectAnimator.
Change-Id: Ic9bb14cd228dcf7e4d250bd0f6cb5f0c31a14183
Mipmap directories should be treated like drawables.
They are just a convention that prevents them from
being split or stripped for multi-apk.
Bug: 36068314
Test: manual
Change-Id: I93ab3871c7d9d403b77989bcc88304e9939866c4