AAPT automatically versions XML files according to the SDK level
in which their attributes were introduced. Support libraries
know how to handle resources built against newer SDKs, so offer
the option to disable some of the automatic versioning, namely
vectors.
Bug:19336994
Change-Id: I9f9d0ae8f2a0c28404f82e27de416f80e38493c9
* commit '1f3c7f3f500bdbfd790c20872961d84ef617f066':
Update golden image for tests.
Update to using LayoutlibCallback.
Remove implementation of deprecated method.
Add @empty support.
* commit 'f18ceefcf0d3cc91e74737e0a93f16775e3bf18b':
Update golden image for tests.
Update to using LayoutlibCallback.
Remove implementation of deprecated method.
Add @empty support.
Added two new options to the wm command.
1. Set the screen size based on dips rather than pixels using the
current screen density.
eg. adb shell wm size 320dpx320dp
2. Disable automatic scaling of the contents of the display.
When combined with the previous command, this is useful for seeing
how the UI would behave if the screen remained at its current density
but changed physical size.
eg. adb shell wm scaling off
Bug: 19899223
Change-Id: I545f893ba4861494e995cf0457ebeba1050d28dc
BridgeResources.getDrawable(int) is not needed anymore, since the super
method is deprecated and it calls the alternative
getDrawable(int, Theme), which we override.
Change-Id: I00c0bfaef6c4167a787bb74990b91cebb951c847
The InputDevice used to trigger the search is saved in a SearchEvent
so an application implementing onSearchRequested determine the device
triggering the search.
Bug: 15374820
Change-Id: If2cd14f77ce572a5ee131697cd63145fbea63f27
Makefile that uses zip for assembling the final APK. This is temporary and
helps speed up the rest of development.
Has to add a new 'manifest' phase that simply compiles the AndroidManifest.xml.
Manifests are handled differently and must be validated.
Change-Id: I0d8255b3ad0d0b0a322683077e3331ca93e37fa0
This is incomplete. Still requires:
- filling in layout information in the resulting .bind.xml
- processing elements with <view class=""/>
- processing imports
Change-Id: Ie5d4c5e6435591bbed3248129a548736244894eb
This rule was catching simple getters ("getIntent") as errors even if
the method is a true property get method. Relax to warning until we
can make this a bit more clever.
Change-Id: If183ad5bdc076ce2252399d4abcc8a3a6cbb55c3
-Wall and -Werror were lost during a merge when they were added to
aaptCFLAGS instead of aaptCFlags. Fix the typo, and the warnings
that crept in while it was disabled.
Change-Id: Ib944b8d6149278e4f3861c1acac277bcd95cc7c2
This CL fixes an issue about ternary expressions where
a ternary expression would be evaluated with its last
evaluated dependency. This would create a problem where
ternary expressions would not be evaluated if other branch
of the conditional is chosen, This bug is fixed by checking
outher flags such that we'll still calculate it together
if all dependencies are behind the same flag vs we'll
calculate it independently if its dependency flags are different.
This CL also improves the generated code in two ways:
- When there is an if inside if, we don't add flag check (the if)
if all of its conditions are covered in the parent if.
- I replaced flag names with binary values. This looks more
readable then generated names.
Bug: 20073197
Change-Id: I9d07868206a5393d6509ab0a205b30a796e11107
Don't throw exceptions for malformed version strings in font files, and
try to rename the font as is.
Change-Id: Ib4f74e68593abb5b551fbcb049484efc925a3d6e
This CL fixes two bugs.
1) When a Ternary operation was inside another operation, we were
not handling dependecies properly and model would think that
the container expression can be evaluated before Ternary is evaluated,
eventually causing an exception in code-gen because Ternay is not
calculated yet.
2) This also fixes another bug where when ?? is used, we would put
ifTrue and ifFalse statements in wrong order and eventually evaluate
!??.
Bug: 19939148
Change-Id: I3e1d2bee172e47412bb8ef9e7c785aef47337155
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
setTag(id, val) leaks on versions before ICS. When the
minimum SDK is before ICS, setTag(val) must be used
for bindings. However, this prevents the developer from
using the tag for his or her own purposes. Therefore,
if the minimum SDK is ICS and greater, setTag(id, val)
is used.
Change-Id: I46327084bde4bafc05a64f82ad5ebcf710820ecc
By having a concrete implementation of DataBinderMapper in the
library and then stripping it out, the generated DataBinderMapper
may be instantiated without reflection.
We want to get all Views with IDs in the Binding to save the
developer effort in calling findViewById.
Change-Id: Ib7dd85ae9ecc0fd31b235364c0eadc2303dd1780