| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Themes now use an array of applied styles rather than a String to store
their history. They are keyed based on a hash code computed from the
history of applied styles. The themed drawable cache has been abstracted
out into its own class.
Also updates system context to use DayNight as the default and ensures
that GlobalActions uses the correct context, which exercises the change.
CTS tests have been added in another CL.
Bug: 20421157
Change-Id: I9eb4b7dffd198ad24d02f656eaf0839570b59caa
|
|
|
|
|
|
|
|
| |
Required to know when to reload the system context's theme in response
to configuration changes, and thus needed to support the DayNight theme.
Bug: 20267825
Change-Id: I7df5e28b7a6d8b611ea030032544cf4800788514
|
|\
| |
| |
| |
| |
| |
| | |
ResourceTable::stringToInt."
* commit '7b09e7a9f3ef804e9cd159023b64eac1ef8b7931':
Fix UB in ResourceTable::stringToInt.
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Was here because UBsan found integer overflow in the parsing for hex
numbers, since hex numbers here are actually unsigned but assigned to
a signed integer.
Also fixes a number of missing error conditions.
Change-Id: Iaea576daedfc6c75521cde02de3fe9dd0198a3b7
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
Res_png_9patch."
* commit 'e24d36b7b744540ccd3401609248ed9d48be4cc9':
Ensure alignment of Res_png_9patch.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This doesn't alter the alignment of the data within the struct, but
enforces that this structure will be appropriately aligned when used.
The image_info struct has this struct preceded by a bool, which causes
odd alignment for the members of this struct.
Change-Id: Ia2ef5c81b2f961c0f61858a10a7821d82f600919
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
First checking of AAPT2. The individual phases of AAPT2 work, but there
are some missing pieces.
For early testing we are missing:
- Need to properly mark file references and include them in package
- Need to package into zip
Final AAPT for apps we are missing:
- Need to crush PNGs
- Need to parse 9-patches
- Need to validate all of AndroidManifest.xml
- Need to write align method to align resource tables for splits.
Final AAPT for apps + system we are missing:
- Need to handle overlays
- Need to store comments for R file
- Need to handle --shared-lib (dynamic references too).
New AAPT features coming:
- Need to import compiled libraries
- Name mangling
- R file generation for library code
Change-Id: I95f8a63581b81a1f424ae6fb2c373c883b72c18d
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We now peform a total-size preflight pass before committing data to the
wire. This is to eliminate the large superfluous network traffic that
would otherwise happen if the transport enforces internal quotas: we
now instead ask the transport up front whether it's prepared to accept
a given payload size for the package.
From the app's perspective this preflight operation is indistinguishable
from a full-data backup pass. If the app has provided its own full-data
handling in a subclassed backup agent, their usual file-providing code
path will be executed. However, the files named for backup during this
pass are not opened and read; just measured for their total size. As
far as component lifecycles, this measurement pass is simply another
call to the agent, immediately after it is bound, with identical
timeout semantics to the existing full-data backup invocation.
Once the app's file set has been measured the preflight operation
invokes a new method on BackupTransport, called checkFullBackupSize().
This method is called after performFullBackup() (which applies any
overall whitelist/blacklist policy) but before any data is delivered
to the transport via sendBackupData(). The return code from
checkFullBackupSize() is similar to the other transport methods:
TRANSPORT_OK to permit the full backup to proceed; or
TRANSPORT_REJECT_PACKAGE to indicate that the requested payload is
unacceptable; or TRANSPORT_ERROR to report a more serious overall
transport-level problem that prevents a full-data backup operation
from occurring right now.
The estimated payload currently does not include the size of the
source-package metadata (technically, the manifest entry in its
archive payload) or the size of any widget metadata associated with
the package's install. In practice this means the preflighted size
underestimates by 3 to 5 KB. In addition, the preflight API currently
cannot distinguish between payload sizes larger than 2 gigabytes;
any payload estimate larger than that is passed as Integer.MAX_VALUE
to the checkFullBackupSize() query.
Bug 19846750
Change-Id: I44498201e2d4b07482dcb3ca8fa6935dddc467ca
|
|/
|
|
|
|
|
| |
We expect to be able to parse the output of ResTable_config::toString(),
so it should use modified bcp47 (b+en+Latn+US).
Change-Id: I597a1779a1fa5cff171c473e6a0368d93b9c7722
|
|\
| |
| |
| |
| | |
* commit '3523e4fcb3c74a5dee2f4497e2b8ec7b9e2b5e57':
Handle bad ninepatch data.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Changes proposed by Ben Hawkes of Google Project Zero.
NinePatchPeeker.cpp:
Instead of asserting, return false for bad data.
ResourceTypes.h:
Store ninepatch values as unsigned.
BUG:19151999
Change-Id: Ibe35e7569f632c6bb8a34a7701e26bb6ed547ec2
|
|\ \
| |/
| |
| |
| |
| |
| | |
automerge: 554a6f5
* commit '554a6f5278ec05077d8252249afc911897fbfe76':
Process base APK
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The base APK may have resources with configurations that compete
against some splits. The base APK must be involved in the selection
of splits.
Bug:18982001
Change-Id: Ieb29b5a36cf2c68e7831484d98a9fd275acd97e8
|
|\ \
| |/
| |
| |
| | |
* commit '9568307cf32c8abc6703dc7a1b0b0fee56c4f8f5':
Fix redundant file backups
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We'd observed a bug in which an unchanged file was nevertheless
being redundantly transmitted for backup on every backup pass.
The underlying issue turns out to have been the FileBackupHelper
base implementation's logic for diffing the prior-state file
set against the current state, in the case when there had been
deletions of prior files. In addition, there was also a
parallel bug in which file checksums were not calculated
properly in some cases, leading to at least one additional
redundant backup of the file in question.
Bug 18694053
Change-Id: Ie0dec06486b5fef4624561737019569c85d6b2a0
|
|\ \
| |/
| |
| |
| |
| |
| | |
would cause obtainStyleAttributes to fail" into lmp-mr1-dev
* commit '740acf213c56c406132294790fa2fadd0380cfa7':
Fix issue where non-resource attributes would cause obtainStyleAttributes to fail
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
fail
A sentinal value of 0x00000000 was used to mark the first time an AttributeFinder
was used. If the resource ID of an attribute was also 0x00000000 (which occurs with
non-resource attributes, like 'style'), then it would be mistaken as the sentinel
start value.
Bug:18421787
Change-Id: I4be353e0f8c940cb6f262d155129f048dcc444ae
|
|\ \
| |/
| |
| | |
Change-Id: I36dea45f7571096136ea7bda5e2680bd85a0df32
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Private attributes are typically placed after public
attributes in the resource table. Each time a new version
of the Android framework is released, new public attributes
take the place of the private attributes, and the private
attributes are shifted after the new public ones.
This means that any apps built against the newer SDK
may inadvertently be using private attributes on older
devices.
This change moves all private attributes to a completely
different type ID, so there will never be collisions across
versions.
These private attributes are automatically moved to a synthesized
type only for the system resources.
Bug:18263655
Change-Id: I7a850512953fadcc9f3524d509cea30249782db8
|
|\ \
| | |
| | |
| | |
| | | |
* commit '503071ae41374a66f61e53e05a91243473db83b9':
RRO: prevent duplicate system overlays
|
| |\ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
System overlays, ie overlays with targetPackage="android", were loaded
twice, which caused all sorts of issues. Ensure they are only loaded
once, which will be during Zygote initialization.
Bug: 17765434
Change-Id: Ia5064045c77f713c58fb78adc3942f6af1abdc93
|
|\ \ \ \
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
core/jni/android_util_AssetManager.cpp
Change-Id: I77b72d0d3ec8184ccd97419e4c76b7d55b1a52ca
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Shared libraries have their package ID assigned at run-time, so some
of the guarantees we used to have about sort order of attributes in
bags or XML elements no longer hold.
This CL adds back-tracking and can jump to the nearest attribute with the
same package ID and continue searching.
This means that attributes with the same package ID must be sorted by increasing
resource ID, as was the case before.
Attributes with the same package ID must be grouped together, but the groups can
be in any order. Ex: 0x02010001, 0x02010002, 0x01010000, 0x01010010, 0x7f010032
Bug:17666947
Change-Id: I9c198bbb6ca788849aac85b6323606ea5d9550d6
|
|\ \ \ \
| | |/ /
| |/| |
| | | |
| | | | |
* commit 'f89a2fdacb2ba907f180188dc79f9de81e3eb254':
Frameworks/base: Fix two warnings in cmds
|
| | | |
| | | |
| | | | |
Change-Id: Ifb9c7fb7a2d28c13010ddc186bea5f5f0daefb4a
|
|\ \ \ \
| |/ / /
| | / /
| |/ /
|/| | |
Change-Id: I395f184d885a7ef30aa113ab01fcaacc94243008
|
| |/
| |
| |
| |
| |
| |
| | |
Turn on -Wall -Werror in libs/androidfw. Fix warnings. Refactor
some code.
Change-Id: I66fe54ace433c15dee5de328b149ca142f74b2dd
|
| |\
| | |
| | |
| | |
| | |
| | |
| | | |
public attrs" into lmp-dev
* commit '8bdb265f0a73bc6f2114ca70f141c214a23696c7':
Fix backwards compat problem with AAPT public attrs
|
| |\ \
| | | |
| | | |
| | | | |
Change-Id: I5a25f2bac44ac5efcd7462af91005e09680a1d96
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When compiling in C++ mode, the compiler will complain about conversions
from uint16_t to char16_t. Be consistent in using char16_t for strings.
Change-Id: I052b6176ced635162920b31560052d9a64f92764
|
|\ \ \ \ |
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- char16_t is a distinct type, so stay consistent
with it throughout the code base.
- char16_t is defined as minimum size of 16 bits.
Since we mmap and cast data structures onto raw memory,
we need a precise definition (uint16_t), so we cast between
that (and static_assert that they are the same size).
Change-Id: I869c32637543bbcfb39d2643e7d9df10d33acd3c
|
|/ / /
| | |
| | |
| | |
| | | |
BUG: 17919345
Change-Id: Ic4f04f7dd0f986f58a749b5950d80c1cfdb074ea
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
AAPT has traditionally assigned resource IDs to public attributes,
and then followed those public definitions with private attributes.
--- PUBLIC ---
| 0x01010234 | attr/color
| 0x01010235 | attr/background
--- PRIVATE ---
| 0x01010236 | attr/secret
| 0x01010237 | attr/shhh
Each release, when attributes are added, they take the place of the private
attributes and the private attributes are shifted down again.
--- PUBLIC ---
| 0x01010234 | attr/color
| 0x01010235 | attr/background
| 0x01010236 | attr/shinyNewAttr
| 0x01010237 | attr/highlyValuedFeature
--- PRIVATE ---
| 0x01010238 | attr/secret
| 0x01010239 | attr/shhh
Platform code may look for private attributes set in a theme. If an app
compiled against a newer version of the platform uses a new public
attribute that happens to have the same ID as the private attribute
the older platform is expecting, then the behavior is undefined.
We get around this by detecting any newly defined attributes (in L),
copy the resource into a -v21 qualified resource, and delete the
attribute from the original resource. This ensures that older platforms
don't see the new attribute, but when running on L+ platforms, the
attribute will be respected.
We still need to address this problem in the platform moving forward,
as this will only help us in the transition from pre L to L.
Bug:17520380
Change-Id: Ia2a985798b50006c21c7c3431d30d9598f27cd91
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The versionCode of theframework resources that an app is built against
gets stamped inside an app's AndroidManifest.xml in the <manifest>
tag as "platformBuildVersionCode" and "platformBuildVersionName"
attributes.
Bug:17207635
Change-Id: Id573c3dffcbca38eec9c0eb3e89f4a547e3361d3
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is meant to be used with scaleable vector
drawables, and are chosen as the best match unless
there is a configuration that matches the density
requested exactly.
Bug:17007265
Change-Id: Ic3288d0236fe0bff20bb1599aba2582c25b0db32
|
| |
| |
| |
| |
| |
| | |
AAPT stopped generating dynamic reference tables for shared libraries.
Change-Id: Ib0025811bdca1a4756eb21080dd6b6bb3fc1ca3d
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| | |
BUG: 11505352
Change-Id: Ifa290580a6dc63c2f471d0bbf5f066db14aed4d7
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In order to support APK split features, the resource
table needs to support loading multiple resource
tables with the same package but potentially new set
of type IDs.
This adds some complexity as the type ID space changes
from dense and ordered to potentially sparse.
A ByteBucketArray is used to store the type IDs in
a memory efficient way that allows for fast retrieval.
In addition, the IDMAP format has changed. We no longer
need random access to the type data, since we store the
types differently. However, random access to entries of
a given type is still required.
Change-Id: If6f5be680b405b368941d9c1f2b5d2ddca964160
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
qualifier." into klp-modular-dev
* commit '642421aa7f284817cc1a972a7f9c7a64696a0116':
Introduce new UI_MODE_TYPE_WATCH and qualifier.
|
| |\ \
| | |/
| |/|
| | |
| | |
| | |
| | | |
klp-modular-dev
* commit '5c31e487c4577e1c47ee7c949325d6a13f0d462e':
Introduce new UI_MODE_TYPE_WATCH and qualifier.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Default ui mode to watch if we have FEATURE_WATCH.
Bug:13395758
Change-Id: Ie5ff95de60e69e91ad3612c7d2f1fca7f49061bd
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Shared libraries can now export resources for applications
to use.
Exporting resources works the same way the framework exports
resources, by defining the public symbols in res/values/public.xml.
Building a shared library requires aapt to be invoked with the
--shared-lib option. Shared libraries will be assigned a package
ID of 0x00 at build-time. At runtime, all loaded shared libraries
will be assigned a new package ID.
Currently, shared libraries should not import other shared libraries,
as those dependencies will not be loaded at runtime.
At runtime, reflection is used to update the package ID of resource
symbols in the shared library's R class file. The package name of
the R class file is assumed to be the same as the shared library's
package name declared in its manifest. This will be customizable in
a future commit.
See /tests/SharedLibrary/ for examples of a shared library and its
client.
Bug:12724178
Change-Id: I60c0cb8ab87849f8f8a1a13431562fe8603020a7
|
|\ \ \
| |/ /
| | |
| | | |
Change-Id: I3036ef9f1251c756092dc5ee2c4fed8146855e1e
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The Res_png_9patch struct had several pointer members
whose size differed between 32 and 64 bit platforms.
These members have been replaced by uint32_t offsets
to serialized data. The serialized form for 9patches
places a Res_png_9patch object at the beginning of
serialized data, followed by int32_t arrays of xDivs,
yDivs and colors.
Note that these offsets are not strictly required,
since they can be computed from the values of numXDivs,
numYDivs & numColors, however they are called in tight
loops so having them computed once is a beneficial.
This change also removed the unused patch_equals function
from aapt's Image.cpp.
Change-Id: I3b9ac8ae5c05510d41377cae4dff1c69b40c2531
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Support 3 letter language codes, script codes &
variants. The bulk of the changes are related to
the implementation of command line filtering of
locales etc. The previous code assumed that the
value of each "axis" (locale, density, size etc.)
could be represented by a 4 byte type. This is
no longer the case.
This change introduces a new class, AaptLocaleValue
which holds a (normalized) locale parsed from a
directory name or a filter string. This class takes
responsibility for parsing locales as well as
writing them to ResTable_config structures, which is
their representation in the resource table.
This includes minor changes at the java / JNI level
for AssetManager. We now call locale.toLanguageTag()
to give the native layer a well formed BCP-47 tag.
I've removed some duplicated parsing code in
AssetManager.cpp and replaced them with functions on
ResTable_config. The native getLocales function has
been changed to return well formed BCP-47 locales as
well, so that the corresponding java function can use
Locale.forLanguageTag to construct a Locale object
out of it.
Finally, this change introduces default and copy
constructors for ResTable_config to prevent having
to memset() the associated memory to 0 on every
stack allocation.
(cherry-picked from commit 91447d88f2bdf9c2bf8d1a53570efef6172fba74)
Change-Id: I1b43086860661012f949fb8e5deb7df44519b854
|