AAPT would attempt to warn if an unprefixed 'id'
attribute was used in an XML resource file even
if that XML file failed to compile. The result
was undefined behaviour, including crashing the
process.
Change-Id: I1a9464ec937760e8d38bbe1af8d1b5d6b2c105a2
Cookies are really indices into vectors and arrays, so
they don't need to be void*. We choose int32_t instead
of size_t to allow their width to be well specified.
(cherry picked from commit ebfdd0f467e39c3af8d92cade78263935340acb7)
(cherry picked from commit a7fa2e592e2e579e5acdb903dba83fc074ebc215)
(cherry picked from commit a9d5701b034ed2d9771b3f0943e1add00741d7cd)
Change-Id: I2aed3db568b6fdc487bf99e2c5dd123206736fda
This lets us share zip archive processing code with both
the runtime (Art, dalvik) and critical java code
(StrictJarFile).
This change also moves several utility methods to ZipUtils
and dedups code across several zip inflation methods.
One of the side effects of this change is that several
processing loops are now O(n) instead of O(n^2).
bug: 10193060
Change-Id: I3c7188496837a47246c4f342e45485a70fef3169
When a preferred density is specified, prune all but the
closest matching density when the exact density resource does not
exist.
If a preferred density resource does not exist and a higher density
resource exists, prune all but the resource with the next highest
density relative to the preferred density.
If a preferred density resource does not exist and there is no
higher density resource, prune all but the resource with the next
lowest density relative to the preferred density.
bug:11224465
Change-Id: I99b3950fe3d8116a5625968ed383442315ae8526
Rather than ignoring resources that do not match the specified
product, we keep track of the ignored ones and make sure that
some variant of the resource that matches the product was processed.
bug:10860838
Change-Id: I804cd04a053269a35b7e1c1cc743b77493337bf9
HCE apps that declare themselves as payment apps will receive
that badge when running aapt dump badging.
bug:10899864
Change-Id: I7c095214412465ad7a925285d6167e12de16b600
APKs with AccessibilityServices, PrintServices, and or DeviceAdmin
will have those services dumped when running 'aapt dump badging'.
bug:10899864
Change-Id: I9c1f1f36c397b128dca802510368573a54977459
Issue #10460684 KLP API Review: android.view.transition and android.animation
Issue #10570740 Transitions: inflate transition targets from xml
Change-Id: I7a3f6d3aece2fcafc5efd555d033f79e86635c98
This adds support for operators with MNC (Mobile Network Code) zero
to add customized resources. For example, it makes it possible to
add a folder called "/res/values-mnc00/" in an application. This will
cause resources in that folder to be used when MNC is zero.
(There is a total of 14 countries that have an operator with MNC
zero.)
Without this fix, the resource framework gets confused, because MNC 0
is normally used when the MNC is undefined (not set).
Bug: 7170488
Change-Id: Icfd39fd0c739216e89446252ea0e7ceba6f002c6
No longer compile libandroidfw as a static library on the device
since it already exists as a shared library. Keeping the static
library would force us to provide a static library version of
libinput for the device as well which doesn't make sense.
Change-Id: I3517881b87b47dcc209d80dbd0ac6b5cf29a766f
This code is only used on the host for MacOS X compatibility.
Apparently, glibc and Apple's libc disagree on the parameter
ordering.
Change-Id: I214edcf2870b6ac88316306ac5af43f1dadf9b2e
Signed-off-by: Dima Zavin <dima@android.com>
Changes:
- The static device version of libandroidfw now includes
the extra functions needed by aapt. I could only find
a few host tools that use the static library, so this is
hopefully not a problem.
- The pseudolocalization code is moved into aapt.
It was previously in libhost, but only used by aapt.
Change-Id: Ib393ebb7dcebee8abbb628cbe5255ea1679674ac
This change required fixing some bugs in how AAPT handles
qualified symbols such as "android:layout_height"
when generating JavaDoc links. The links were being
generated using the package name of the generated R file
rather than the package name of the referenced symbol.
These broken links caused the JavaDoc build to fail.
Bug: 8175766
Change-Id: I52fbef27825a25abca960cb44b59c2132267e9d6
This checkin has preliminary API (in flux, definitely changes still
to be made) and implementation for a new "Scenes & Transitions" feature.
The current implementation allows you to define different Scenes
(via layout resource IDs or callbacks) and Transitions to be used when
changing to those scenes. By default, scene changes will use AutoTransition,
which generally does the right thing.
There are no overview docs or tutorials yet. The best way to learn how things
work is to see the code for the various tests in
frameworks/base/tests/TransitionTests.
Expect the API to change. Expect the implementation to change (mostly to add
more functionality). Expect bugs, but tell me if things do not work
as expected.
Change-Id: Ib025a9f565678b225afa4759325cf6d496cc7215
This was already done for all other types of resources, but not
for styleable (or the constants for the styleable array indices).
This fixes this. This only affects the SDK as this is used by the
SDK toolchain only.
Change-Id: Idfc2f7915be2b0e88590f38fd660610ffc7e160c
Applications can request a permission with android:required="false".
For example:
<uses-permission android:name="android.permission.READ_PHONE_STATE" android:required="false" />
Make aapt understand such permissions.
Bug: 8522021
Change-Id: I7d3af64e7c3eca608316d5bea19c4ea639dd2b7a