2635 Commits

Author SHA1 Message Date
Deepanshu Gupta
bf59e8974d am de4ee0f1: am 75bf1b1c: Merge "Skip loading animations." into lmp-dev
* commit 'de4ee0f1be350a52d642a447269a91f6d28e73fc':
  Skip loading animations.
2014-10-29 18:51:32 +00:00
Deepanshu Gupta
122ccfb08f am 916d7796: am c55eb170: Merge "Fix multiple styles case in resource resolution." into lmp-dev
* commit '916d779650352059b08b7257f71a7aab8b333eba':
  Fix multiple styles case in resource resolution.
2014-10-29 18:51:28 +00:00
Deepanshu Gupta
62cf56cf99 am 6fb2fda8: am 92a52142: Merge "Use right theme for drawable inflation." into lmp-dev
* commit '6fb2fda85c410e23a1b9366c025fe288447bf027':
  Use right theme for drawable inflation.
2014-10-29 18:51:23 +00:00
Deepanshu Gupta
75bf1b1c6a Merge "Skip loading animations." into lmp-dev 2014-10-29 00:13:54 +00:00
Deepanshu Gupta
c55eb170cc Merge "Fix multiple styles case in resource resolution." into lmp-dev 2014-10-29 00:07:59 +00:00
Deepanshu Gupta
92a52142fd Merge "Use right theme for drawable inflation." into lmp-dev 2014-10-29 00:07:42 +00:00
Deepanshu Gupta
0b42936d86 Skip loading animations.
This is a temporary fix until Path.approximate() is supported.

Bug: http://b.android.com/77865
Change-Id: I28739e58f51fabaaf1dcc1c9be61cd0b17e84eec
2014-10-28 15:07:25 -07:00
Deepanshu Gupta
b6444c4309 Fix multiple styles case in resource resolution.
When multiple styles are applied to a theme, we only remembered the last
one. This change fixes the issue.

Change-Id: I46490e882edc3eabe522a641c83366234b5bb25d
2014-10-28 11:11:10 -07:00
Deepanshu Gupta
4a605c6fa0 Use right theme for drawable inflation.
The theme information was lost when inflating drawables. As a result,
drawables inflated in the ActionBar did not have the right tint.

Change-Id: I13d5c78039e35085ed4902289fcb735bb15d972e
2014-10-28 11:11:09 -07:00
Tim Kilbourn
d9b1cad71e aapt updates for Android TV
- Output whether an app claims to be a game (android:isGame)
- Output android:banner if it is specified at the application level.

Change-Id: I7118b524f62cdfc4effeef21b32b3cdd814d9bfa
2014-10-24 12:59:24 -07:00
Adam Lesinski
2bf92530ee Merge "First commit of split-select tool" into lmp-mr1-dev 2014-10-23 17:54:47 +00:00
Adam Lesinski
40e8eefbed First commit of split-select tool
This tool emits a set of rules as JSON for when a Split APK
should match a target device.

Change-Id: I8bfbdfbdb51efcfc645889dd03e1961f16e39645
2014-10-23 10:39:31 -07:00
Deepanshu Gupta
01c80f155d am 37779f07: Merge "Check Bridge init before disposing." into lmp-dev automerge: 568f16c
* commit '37779f07496462afa4b5d88725e8a004a7e10bc0':
  Check Bridge init before disposing.
2014-10-22 20:47:37 +00:00
Deepanshu Gupta
568f16ccfb Merge "Check Bridge init before disposing." into lmp-dev 2014-10-22 00:57:34 +00:00
Adam Lesinski
6dfe03ae6c am 73a8c596: am 3f8c7dec: Merge "AAPT: Fix path for final generated resources on Windows" into lmp-dev
* commit '73a8c5962d4d28a2e8aa6fa0b0b18e39782ee79c':
  AAPT: Fix path for final generated resources on Windows
2014-10-20 21:05:04 +00:00
Adam Lesinski
aff7c2447d AAPT: Fix path for final generated resources on Windows
Change-Id: Id11ac79b281b51747c73f90406ebd60023c54f92
2014-10-20 12:15:25 -07:00
Deepanshu Gupta
b69ec7708b Check Bridge init before disposing.
In some cases ADT may dispose the Bridge even before init is called on
it. This caused an NPE. Fixed this by checking for the initialization
before disposing resources.

Bug: http://b.android.com/77726
Change-Id: I741d6ea3595a3b7cb816abd0417f23aecca6370e
2014-10-20 11:12:53 -07:00
Adam Lesinski
effd416ee3 am 83fae208: am 3cd840f4: Merge "AAPT: Fix an issue where a resource name was incorrectly derived on Windows" into lmp-dev
* commit '83fae208fee402d8a6a51362f99660f9a49bd5a4':
  AAPT: Fix an issue where a resource name was incorrectly derived on Windows
2014-10-17 23:01:44 +00:00
Adam Lesinski
9306a474e1 AAPT: Fix an issue where a resource name was incorrectly derived on Windows
Calling String8::getLeaf() will assume the system's file path separator,
however the source string was already converted to a unix path.
getLeaf() would therefore not find any occurence of '\' and would
return the full path.

Bug:18036805
Change-Id: Ic2bfac0cc553406740204a296327e266b05c0eff
2014-10-17 21:46:52 +00:00
Adam Lesinski
9086562a6a Minor resource notation/compatibility fixes
- Change the format of mnc/mcc when printing a resource-qualifier
  formatted string from a Configuration object.
- Correctly bump the SDK to 21 when using anydpi in a resource qualifier.

Change-Id: I3c31e344dc5384d45398d6e9f264a073abab65d1
2014-10-17 01:21:50 +00:00
Jerome Dochez
0757e5fd6d am c9c512e0: am f47f8855: Merge "Added a daemon mode to aapt to receive streams of commands from gradle." into lmp-dev
* commit 'c9c512e0ff2faf86eb544bf175a1d177f9b7ba6d':
  Added a daemon mode to aapt to receive streams of commands from gradle.
2014-10-10 22:53:16 +00:00
Jerome Dochez
f47f885517 Merge "Added a daemon mode to aapt to receive streams of commands from gradle." into lmp-dev 2014-10-10 19:21:49 +00:00
Elliott Hughes
b913af5408 Track change to private libcore data structure.
Bug: 15476051

(cherry picked from commit d47acaeecd991ecd01ecc9a37e60011f545712d7)

Change-Id: Iac79ce3602282a2780dd895995f42ab03f346ad4
2014-10-09 11:20:56 -07:00
Deepanshu Gupta
908a4f9a43 am 4f133894: Exclude KXmlParser from LayoutLib.
* commit '4f133894a6e98d8d30557ea42cec92cfb21fa5c9':
  Exclude KXmlParser from LayoutLib.
2014-10-08 17:34:12 +00:00
Deepanshu Gupta
4f133894a6 Exclude KXmlParser from LayoutLib.
The class was incorrectly being included in the LayoutLib.

Change-Id: I3c86662efa068019fe9165f2fc49a00d0a1b7f2d
2014-10-08 10:12:11 -07:00
Deepanshu Gupta
11b14e3996 LayoutLib: Use ICU's line break algo. [DO NOT MERGE]
Change-Id: I7e5b0ab7423a72f5a4b0e1163d0a537f0b03ba07
(cherry picked from commit 760f6394d0f65fbb5365186e8e068d53c506b653)
2014-10-08 02:05:05 +00:00
Adam Lesinski
a80aba7072 Merge "AAPT: Gate v21 resource synthesizing logging behind -v flag" into lmp-dev 2014-10-03 22:06:03 +00:00
Adam Lesinski
f15de2e215 AAPT: Gate v21 resource synthesizing logging behind -v flag
This is verbose information and should be hidden behind the -v flag.

Bug:17822471
Change-Id: I36e2c6beb54669a31cde73416427477a80ded8a6
2014-10-03 14:57:28 -07:00
Deepanshu Gupta
c74a2b3435 Merge "Minor style changes." into lmp-dev 2014-10-03 20:30:45 +00:00
Jerome Dochez
6f1280cf17 Added a daemon mode to aapt to receive streams of commands from gradle.
When crunching png, we used to spawn a separate aapt process from java
which is slow and resource intensive.
Introduced a daemon mode to appt which when invoked with -m parameter
will listen from commands on stdin and give report of command execution
on stdout.

One one command is supported so far :
s f1 f2

This command perform a single png crunch, f1 pointing to the input
png file to crunch, and f2 pointing to the path for the resulting
crunced file.

Expected output from the command is "Done" or "Error".

Change-Id: Iaf1d865e8d5ee5d36abe39dea6443715865a98d3
2014-10-02 15:43:55 -07:00
Deepanshu Gupta
3c8140ab4b Minor style changes.
Addressing code review comments on previous change: 171804201dd

Change-Id: I2c9e0ce35e755c23d8292749828d15a87109d6dc
2014-10-02 11:45:07 -07:00
Deepanshu Gupta
7b13c4d8ec Merge "Always resolve enum when resolving resources." into lmp-dev 2014-10-02 03:27:42 +00:00
Deepanshu Gupta
409bd3d774 Resource resolution bug fix. [DO NOT MERGE]
Fix a bug where "?attr/foo" in framework resources wasn't resolved
properly.

Change-Id: I9a56974f526774fde79685f668f01021136d68f1
(cherry picked from commit 19c7842082d831ad432abe906f4c37c6ed08e414)
2014-10-01 12:45:26 -07:00
Deepanshu Gupta
fea51feb5c Fix Tests after cherry picks. [DO NOT MERGE]
1. Updated the intelliJ run configuration for the layoutlib_create tool.
2. Updated the code to search for the platform.dir.
3. Update tests to use AppTheme and Target SDK 19

Change-Id: I6f1cc6ff2a53e4474c746537029c7f89c6dd6dc1
(cherry picked from commit 8592eeafd01370d1a17e34602290becf7f611c75)
2014-10-01 12:44:24 -07:00
Deepanshu Gupta
98a03e771e Update intelliJ copyright profile [DO NOT MERGE]
Change-Id: Ib9386b686cb24e1f187d0b636b59b4b13d59bbcd
(cherry picked from commit 91fa62ac67a5e294124b5bfb70b35addc7687c34)
2014-10-01 12:44:14 -07:00
Deepanshu Gupta
039d5849ea Build layoutlib create tests as part of sdk build. [DO NOT MERGE]
LayoutLib Create tests are now built whenever LayoutLib create is built.

Change-Id: Id215e8690e435019579dba1734090a0d585f37e1
(cherry picked from commit 4efe6264f1251fa200427f54ea6f5dd4c4d03665)
2014-10-01 12:44:05 -07:00
Deepanshu Gupta
6fb5fdc233 Add layoutlib tests to DIST_DIR [DO NOT MERGE]
Add the layoutlib and layoutlib-create tests to DIST_DIR for sdk
targets. These can be used for continuous testing on the build server.

Change-Id: I747dddcddfd8009937668bec4d75cb99bf63235f
(cherry picked from commit f9c749c9901c459f77ffc6f4fbbc15f4142c6e0a)
2014-10-01 12:43:52 -07:00
Deepanshu Gupta
bd4133133a Build layoutlib_create tests. [DO NOT MERGE]
Change-Id: Ia13a090f8ec29b2b2a107825b6a13d7db77e6d61
(cherry picked from commit 2294f939bc79ce902a40db37def64cc28394d56b)
2014-10-01 12:43:43 -07:00
Deepanshu Gupta
3f0e467a06 Remove ANDROID_BUILD_TOP from intelliJ path variables. [DO NOT MERGE]
The variable is not actually needed and it makes working with different
API levels a lot easier since everything now depends on $PROJECT_DIR$.

This change also makes the tests more robust by improving the way it
tries to find the SDK.

Change-Id: I3502ad4a0ba85fd88b497e47964fddb2a89e520c
(cherry picked from commit 5377695d4ecf3cc6dc1abe59bbfca63f6137b722)
2014-10-01 12:43:32 -07:00
Deepanshu Gupta
2f3715aaaa Get filename from File faster [DO NOT MERGE]
Use the direct call from a File object to get the filename instead of
going through Path which depends on Java 7 making the LayoutLib tests
incompatible with Java 6.

Change-Id: I815895eedbc10245ee09bdb53b11e5548b076aad
(cherry picked from commit 7dbf91fee96790fbeb9858740be1bb375f29ecb5)
2014-10-01 12:43:19 -07:00
Deepanshu Gupta
b6a37d897a Add testing framework to LayoutLib. [DO NOT MERGE]
This change adds an end to end test which loads the framework resources
and a test app and ensures that no exceptions or warnings are thrown.

The change also adds project configuration for intelliJ.

Change-Id: I7b67c0f1a2af2dac95df7f3231cab537b9826d7d
(cherry picked from commit a8e9517470869fa29946ae1fa1ceeb24c7970391)
2014-10-01 12:43:11 -07:00
Deepanshu Gupta
23f09423cb Add tests to the layoutlib eclipse project. [DO NOT MERGE]
Specify the test folder in the layoutlib/bridge eclipse project.

Also add the sourcepath for layoutlib-api-prebuilt.jar

Change-Id: I194ed182618e564388d6df645e2de7f59897fa1e
(cherry picked from commit 36acf8baebc9ab72b3b5fe75d865399ddf7b0132)
2014-10-01 12:42:49 -07:00
Andrew Hsieh
c9d32390e5 include direct.h for _mkdir
Bug: 14416410

The new mingw-w64 toolchain x86_64-w64-mingw32-4.8 no longer
declares _mkdir in io.h.

Change-Id: I624b52d2f35db54a7f28df09f997fc883b0f0557
2014-09-30 02:28:05 -07:00
Deepanshu Gupta
171804201d Always resolve enum when resolving resources.
Enums were resolved only for integers and dimensions. This change
resolves enums for all resource types. Well, almost all. For color and
colorStateList, enums are still not referenced.

Bug: http://b.android.com/76091
Change-Id: Ie43bd1b54fb9877655d31773bdf71d9a6a65c473
2014-09-29 12:01:37 -07:00
Deepanshu Gupta
8d5a15b691 Update time in layout preview
Change-Id: Ic32a9cb1f20b472c6898a5f370d8578c011a09bf
2014-09-29 09:38:59 -07:00
Deepanshu Gupta
803a59cae7 Fix error when using list as actionBarNavMode. [DO NOT MERGE]
A bug in the framework leads to the wrong argument being passed to
defStyleRes when obtaining styled attributes. The framework however just
ignores the attribute in such a case. LayoutLib logs an error to help
developers find bugs in their code.

The bug was seen when using list as the actionBarNavMode.

This change ignores the attribute if it detects that it's the framework
bug. Also, we change the error to a warning.

Change-Id: I58e1fe4469de0329a27b577d75c0a59c48d0381b
2014-09-25 23:01:38 +00:00
Adam Lesinski
978ab9d929 AAPT: Fix issue with synthesized resource not actually showing up
AAPT keeps around a few pieces of state that are disjoint, so
simply adding to a collection won't add the resource to the final
flattened output. Instead, we create the resource from the top
and then copy over the values into the newly created resource.

Bug:17647890
Change-Id: I214263e84c18f9370c6e6a5aa53aa2d833fc842d
2014-09-24 19:02:52 -07:00
Adam Lesinski
2b7ee9a18e Merge "AAPT: Continuation of public/private attribute fix" into lmp-dev 2014-09-22 18:00:31 +00:00
Adam Lesinski
e572c011fe AAPT: Continuation of public/private attribute fix
XML files like layouts are now scanned and checked
for v21 attributes. If those kinds of attributes
are found, then we remove them in the original
version and synthesize a new xml file under the
v21 configuration.

Bug:17520380
Change-Id: Icf984cb96134180a2e35349c1dbf2cef9a8f0bda
2014-09-22 10:51:20 -07:00
Adam Lesinski
b6812b64c4 Merge "Fix backwards compat problem with AAPT public attrs" into lmp-dev 2014-09-19 18:19:58 +00:00