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
Two new attributes for <uses-permission>: android:requiredFeature and
android:requiredNotFeature.
Also update aapt to include this information in badging:
uses-permission: name='android.content.cts.REQUIRED_NOT_FEATURE_UNDEFINED' requiredNotFeature='android.software.cts.undefined'
uses-permission: name='android.content.cts.REQUIRED_MULTI_DENY' requiredFeature='android.software.cts.undefined' requiredNotFeature='android.software.cts'
Test: new PermissionFeatureTest suite.
Change-Id: Icc1f815a4675ae9dd2cb7f61730ab28b5c11228a
Apps that expect to use the current SDK don't specify anything in their
manifest and the build system rightfully injects the current SDK.
Any apps that specify their own <uses-sdk> or versionCode are telling
the build system that they are purposely using some other minSdkVersion,
etc (support library demos).
Test: None
Change-Id: I0aba3a71e15703c7bcafcf4d35608a1851dd8567
Fixes: 34901699
The color mode lets an application request a wide color gamut for
a specific window. This will also be used in the future to request
HDR. The color mode is currently either default (sRGB) or an undefined
wide gamut color space chosen by the platform. These attributes could
later be used to choose a specific color space if we deem this important
or useful.
This change also renames the various "colorimetry" attributes and
constants to "color mode" for consistency. These symbols were
added in O and can be safely renamed.
Test: CtsColorModeTestCases
Bug: 32984164
Change-Id: I4d4691dd12dbe3f3aa6a5cf893cff39aa16c739e
Add a new flag to disable versioning of Transition related XMLs.
Transition support library will use this to handle these XMLs on older
API levels.
Test: make libaapt_tests AaptTestAppOne
Bug: 34427868
Change-Id: I66e81cca049e71ef6704177b2ca21c9cdeaff78f