3432 Commits

Author SHA1 Message Date
Deepanshu Gupta
8381e2cdcc Merge "Fix view outline for shadows in LayoutLib." into mnc-dev 2015-04-27 23:20:35 +00:00
Raph Levien
c6abf5bff6 Expose drawTextRun publicly
For correct low-level drawing of low level text, a method that
includes context for shaping is necessary, and it's similarly useful
to provide the direction explicitly rather than running the BiDi
algorithm on the text. The drawTextRun method (in both char[] and
CharSequence variants) has provided this functionality for several
major releases but has been internal. This patch exposes the
methods publicly, and also improves the doc strings for both
the new method and some related ones.

Bug: 20193553
Change-Id: I9be33ca5ae3e7db2b69a56298400671d5ef8ad05
2015-04-27 15:33:03 -07:00
Chris Craik
1b60cc0529 Anti-alias by default
Change-Id: I19434717dd3af4fdcffbfcca2ffbb485dfebe644
2015-04-27 18:11:57 +00:00
Deepanshu Gupta
dbc7ca0bac Fix view outline for shadows in LayoutLib.
Set the bounds on the drawable before getting the view outline for
shadow. Also, reuse the temp outline object in AttachInfo rather than
allocating a new one each time.

Change-Id: I69793d38d60c5b9f9050569f2b22fbc7b90620bf
2015-04-27 17:19:35 +00:00
Adam Lesinski
58ffaf9061 Merge "Properly mangle file names" 2015-04-25 01:21:00 +00:00
Kenny Root
22335a9730 am 6c1af7ea: am 8652bce1: am c71f2648: Merge "frameworks/base: switch to using NativeConstants."
* commit '6c1af7ea497b1a2f04bdf45a19d2147f5b9665b9':
  frameworks/base: switch to using NativeConstants.
2015-04-24 22:13:26 +00:00
Kenny Root
8652bce137 am c71f2648: Merge "frameworks/base: switch to using NativeConstants."
* commit 'c71f264847eb75d53c0f99e6e1c42a8a1527d3b4':
  frameworks/base: switch to using NativeConstants.
2015-04-24 21:49:47 +00:00
Adam Langley
6bf52c4271 frameworks/base: switch to using NativeConstants.
NativeCrypto is a conscrypt class that contained several OpenSSL
constants. NativeConstants is the new class that contains the same
thing, but the latter is automatically generated and thus won't drift
from the C headers.

Bug: 20521989

Change-Id: I45c7b9a6844a06e3ffd09be692ebf733e1ebbbcc
2015-04-24 10:00:45 -07:00
Adam Lesinski
d5c4f8723c Properly mangle file names
Change-Id: I49c0f82e8c06f056198eb64b8369d83403b74321
2015-04-22 17:34:55 -07:00
Adam Lesinski
6e46056abc AAPT: Add flag to disable versioning of vector related XML
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
2015-04-21 14:27:02 -07:00
Svet Ganov
e8b6debd9b Fix build for real
Change-Id: I5742226e9b873cd5a035f11be0e228188e215365
2015-04-17 15:49:53 -07:00
Svet Ganov
6762301a10 Fix build
Change-Id: If469dce767b492c3fcc1ad8cf7ab1041eb61096f
2015-04-17 15:14:54 -07:00
Jeff Brown
f647832bd4 Merge "Add support for disabling display scaling for development." 2015-04-16 22:55:58 +00:00
Deepanshu Gupta
4967201a2c resolved conflicts for merge of 186fe7b1 to master
Change-Id: I60886d3e44ae23a11c8f129517df87ee29625ada
2015-04-16 11:18:41 -07:00
Deepanshu Gupta
c4affce9df am 1f3c7f3f: am f18ceefc: am cd6e00c6: Merge changes from topic \'layoutlib-api-15\' into lmp-mr1-dev
* commit '1f3c7f3f500bdbfd790c20872961d84ef617f066':
  Update golden image for tests.
  Update to using LayoutlibCallback.
  Remove implementation of deprecated method.
  Add @empty support.
2015-04-16 17:41:54 +00:00
Deepanshu Gupta
1f3c7f3f50 am f18ceefc: am cd6e00c6: Merge changes from topic \'layoutlib-api-15\' into lmp-mr1-dev
* commit 'f18ceefcf0d3cc91e74737e0a93f16775e3bf18b':
  Update golden image for tests.
  Update to using LayoutlibCallback.
  Remove implementation of deprecated method.
  Add @empty support.
2015-04-16 17:31:34 +00:00
Adam Lesinski
5886a92eb6 Fix up the command line, add flags.
Change-Id: I420bd0212fc7541668bd095b88295564d3d11f6c
2015-04-15 20:29:48 -07:00
Adam Lesinski
769de98f2d AAPT2: Add library support
Change-Id: I307f56d9631784ab29ee4156d94886f9b2f25b30
2015-04-15 19:56:59 -07:00
Jeff Brown
d46747a1c6 Add support for disabling display scaling for development.
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
2015-04-15 19:02:36 -07:00
Deepanshu Gupta
54862febaf Update golden image for tests.
Change-Id: If07edcbfb7016a6b80f4bd00cffab494f74bfc03
2015-04-15 18:20:57 -07:00
Deepanshu Gupta
37dbb8b7f3 Update to using LayoutlibCallback.
Change-Id: Ia89d418b0d40ca8efef8968a4a2a635616b945ac
2015-04-15 18:20:56 -07:00
Deepanshu Gupta
49ce36e175 Remove implementation of deprecated method.
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
2015-04-15 18:20:55 -07:00
Deepanshu Gupta
9ca9774726 Add @empty support.
Bug: http://b.android.com/162428
Change-Id: Id7a981de2fce21213e12cdabcce4104f146fd4d3
2015-04-15 18:20:47 -07:00
Tim Kilbourn
6a975b3c35 Save search context when dispatching onSearchRequested.
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
2015-04-13 09:39:24 -07:00
Qiwen Zhao
f2834c12a3 Merge "remove data-binding from base/tools. it should not be here since it depends on support lib." 2015-04-11 02:42:43 +00:00
Adam Lesinski
d8d07f1757 Merge "AAPT2: Create Makefile" 2015-04-11 02:10:32 +00:00
Adam Lesinski
c7e2432dec AAPT2: Create Makefile
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
2015-04-10 19:07:51 -07:00
Qiwen Zhao
f73037aee9 remove data-binding from base/tools. it should not be here since it depends on support lib.
Change-Id: Iac90ab2fb797617429a6a4e1e429f085455154e2
2015-04-10 16:04:41 -07:00
Adam Lesinski
105b8a5f4f Merge "AAPT2: Adding basic binding support" 2015-04-10 22:27:38 +00:00
Adam Lesinski
4d3a987694 AAPT2: Adding basic binding support
This is incomplete. Still requires:

- filling in layout information in the resulting .bind.xml
- processing elements with <view class=""/>
- processing imports

Change-Id: Ie5d4c5e6435591bbed3248129a548736244894eb
2015-04-10 15:25:39 -07:00
Adam Powell
539ea12810 Relax apilint FW1 error to a warning
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
2015-04-10 13:07:52 -07:00
Adam Lesinski
a826c4b7a4 Merge "Add PNG and 9-patch support" 2015-04-10 00:32:28 +00:00
Adam Lesinski
98aa3ad6e4 Add PNG and 9-patch support
Change-Id: I9ecdfdf82b82d59084490da518e167e256afd5f2
2015-04-09 17:19:06 -07:00
Colin Cross
88fa96c758 am 106f83ee: am 4cead39a: am 1be312df: Merge "Re-enable -Wall and -Werror that were lost in a merge"
* commit '106f83ee9cc145a6421d21067c44b513cc148e80':
  Re-enable -Wall and -Werror that were lost in a merge
2015-04-09 01:44:38 +00:00
Colin Cross
4cead39a17 am 1be312df: Merge "Re-enable -Wall and -Werror that were lost in a merge"
* commit '1be312dfb02e86731da6ac54a39956db791f4978':
  Re-enable -Wall and -Werror that were lost in a merge
2015-04-09 01:13:50 +00:00
Colin Cross
1be312dfb0 Merge "Re-enable -Wall and -Werror that were lost in a merge" 2015-04-09 00:49:56 +00:00
Colin Cross
01f185633c Re-enable -Wall and -Werror that were lost in a merge
-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
2015-04-08 17:48:23 -07:00
Qiwen Zhao
4e7bb6312f Merge KDataBinder/ from platform/vendor/google/prototypes/data-binding to tools/data-binding/ 2015-04-08 15:58:36 -07:00
George Mount
6ad2715911 Fix merge error. 2015-04-07 13:00:54 -07:00
George Mount
4ec064dff1 Use layout path for the tag on bound layout roots.
Change-Id: I6bda5d5716e749251b27c112865da066ba908509
2015-04-07 11:02:11 -07:00
Yigit Boyar
266aa36b42 Fix ternary handling and generate better code
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
2015-04-06 14:16:54 -07:00
Deepanshu Gupta
1fd5d21e0d Merge "Be lenient in accepting version strings." 2015-04-06 20:56:05 +00:00
Deepanshu Gupta
d654b6f981 Be lenient in accepting version strings.
Don't throw exceptions for malformed version strings in font files, and
try to rename the font as is.

Change-Id: Ib4f74e68593abb5b551fbcb049484efc925a3d6e
2015-04-06 12:52:18 -07:00
Elliott Hughes
dda35c37ea am 66d94512: am dbb5f5d6: am efcbaec1: Merge "Only Windows doesn\'t have %zd."
* commit '66d9451273c4a3775b6b63a0e4b7027bd2eae65d':
  Only Windows doesn't have %zd.
2015-04-03 20:58:25 +00:00
Elliott Hughes
dbb5f5d6c4 am efcbaec1: Merge "Only Windows doesn\'t have %zd."
* commit 'efcbaec14135c42f81e2a8f645584cf7cf542a02':
  Only Windows doesn't have %zd.
2015-04-03 20:40:52 +00:00
Elliott Hughes
b12f2410c7 Only Windows doesn't have %zd.
Change-Id: I0e4b0fdc61641c5ecb724fd096bd2315dcf8ed4a
2015-04-03 12:56:45 -07:00
Adam Lesinski
feefeb4f30 AAPT2 statically link libz on Windows builds
Change-Id: I2abf47273173c470c04e00a54aa619fe1ce0e745
2015-04-03 12:44:40 -07:00
Adam Lesinski
ca2fc353c2 Fix windows build of AAPT2
Change-Id: Ib8e1a4322510b582e9600a08d3118842c9abc73c
2015-04-03 12:33:02 -07:00
Yigit Boyar
3695b1aae9 Fix bugs related to how we handle Ternary ops
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
2015-04-03 10:00:25 -07:00
Greg Hackmann
1fce4f9c89 aapt2: fix definition of G in Util.h
Change-Id: Icbefa425cf543f130deabab9e2e2e6c13ab672d3
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2015-04-02 20:31:17 -07:00