2240 Commits

Author SHA1 Message Date
Deepanshu Gupta
352d84fb07 Merge "Remove lxml dependency." into lmp-preview-dev 2014-06-10 22:12:51 +00:00
Deepanshu Gupta
125714173b Remove lxml dependency.
The encoding for the .ttx file generated is now hard-coded to be utf-8.

Change-Id: I71c208327995651fcf44b6961510f84bafb05848
2014-06-10 17:00:29 -07:00
Deepanshu Gupta
b54b78e215 LayoutLib: Support more ContextThemeWrappers
ContextThemeWrapper may be the base context for another
ContextThemeWrapper. We now extract the base context till we reach the
final context.

Change-Id: I034444a2d1579241543fd24248530b299e72498a
2014-06-10 17:44:37 -07:00
Deepanshu Gupta
1160e6d2f7 LayoutLib: Fix EditText rendering
Framework has overloaded java.lang.System.arraycopy() for char[]. The
method is not present on the Desktop VMs. This change replaces the calls
to this method by its more general alternative - the one using Objects.

TODO: Make it more configurable and flexible to allow rewrite of any
such methods in the future.

Change-Id: I6823b13e52b1c555eb257d02b79707d84e73236f
2014-06-10 17:44:14 -07:00
Jeff Brown
709ce0a4c6 Add support for @SystemApi annotation to aapt. (DO NOT MERGE)
When aapt sees @SystemApi in the XML comment associated with a resource,
it will now remove this tag from the comment (since is it not meaningful as
a Javadoc tag) and instead add an @android.annotation.SystemApi annotation
to the declared type or member.  This enables easy downstream processing of
this annotation from generated code.

Change-Id: If984908477648c0c90be52fdc955fbb891d99b28
2014-06-09 14:28:42 -07:00
Bryan Mawhinney
2386bd5de4 Merge "Fix issue preventing aapt from stripping all unwanted densities" into lmp-preview-dev 2014-06-08 17:03:04 +00:00
Deepanshu Gupta
acb119f0a2 Merge "Build LayoutLib with Java 6" into lmp-preview-dev 2014-06-07 23:32:10 +00:00
Deepanshu Gupta
f4058c8d6b Build LayoutLib with Java 6
Add source and target flags to LayoutLib Bridge to enable compatibility
with Java 6.

Change-Id: I81266af758bb57df037541d6e82600e5020a3c0d
2014-06-07 11:19:03 -07:00
Amith Yamasani
da8738fabd Add missing abstract method override in BridgePowerManager.
Change-Id: I28a24f33f8a598e487ec21861e918a39a8875d43
2014-06-06 12:28:27 -07:00
Dianne Hackborn
421e2fd044 Merge "Improvements to low power mode." into lmp-preview-dev 2014-06-06 17:46:11 +00:00
Dianne Hackborn
eb94fa7975 Improvements to low power mode.
Add new public API for monitoring low power mode.

BatteryService now puts device in to low power mode when
battery level is low.

Window manager now watches low power mode to turn off
animations.

Modifying the animator scale now gets propagated to all
processes.

Change-Id: I8fa566994764ddd4e1977631e28381ab9409f8ee
2014-06-06 10:25:36 -07:00
Bryan Mawhinney
b0db8de73e Fix issue preventing aapt from stripping all unwanted densities
Bug: 15463874
Change-Id: I9d1e289f1db2ed3c9a41d91caea6d07b69fcb84f
2014-06-06 13:27:11 +01:00
Deepanshu Gupta
a19b8c111b LayoutLib: Add assertions for typeface.
Framework passes typeface along with the paint object at many places.
Paint_Delegate is supposed to have the typeface object with it. Add
assertions to ensure that the two typefaces are indeed the same.

Change-Id: I68193513c2d99f269c0458d6493f23025bbda385
2014-06-05 14:42:14 -07:00
Deepanshu Gupta
ad69aee5ed LayoutLib: Font variants
Update to support font variants properly.

Change-Id: Iabe37babd9ddce80a9ba9eca7e0e5a0ffb090646
2014-06-05 10:34:12 -07:00
Deepanshu Gupta
c8e2d0a4f8 LayoutLib: Add capability to simulate old versions
Let the IDE know that we can simulate older versions of platform.

Change-Id: Idec6d24296dd0ae04a2d808c14604629e265d458
2014-06-04 17:08:48 -07:00
Deepanshu Gupta
58ff7de971 Fix build.
Change-Id: I877532b5056a035dbd4b0c6c55b5969d6292846a
2014-06-04 16:50:07 -07:00
Deepanshu Gupta
648a309d9b Merge "Add basic support for simulating older versions." into lmp-preview-dev 2014-06-04 23:37:37 +00:00
Deepanshu Gupta
e43dcc1d64 Merge "Distinguish between menus in ActionBar and popup." into lmp-preview-dev 2014-06-04 22:11:37 +00:00
Craig Mautner
8a0da0184f Force all windows to redraw before unblanking screen
The screen turning on would show windows as they were when the screen
turned off. This fix forces all showing windows to redraw first and
only then allow the screen to turn on.

Fixes bug 15092354.

Change-Id: I52c3f47438176a5ac00ba9a4d5205b56a5aa48f9
2014-06-03 17:08:02 -07:00
Jeff Sharkey
2ee3c1e189 Per-app media directories on external storage.
This change defines per-app directories on external storage that
will be scanned and included in MediaStore.  This gives apps a way
to write content to secondary shared storage in a way that can
easily be surfaced to other apps.

Bug: 14382377
Change-Id: I4cb367c870509e76f0c2c598f01e2f699780030a
2014-05-30 16:26:45 -07:00
Deepanshu Gupta
3885220ed5 Distinguish between menus in ActionBar and popup.
Mark the menus in the ActionBar and the ones in the Overflow popup
separately. This enables the IDE to differentiate between the two and
enable gestures such as double-click to open the menu xml for menus in
the ActionBar and single click for the menus in the Overflow popup.

Change-Id: I7a23f87d34d618a134ffbe3a665be695915d4bae
2014-05-29 18:22:04 -07:00
Craig Mautner
8bd94d502d implement keyguardGoingAway() fixes build.
Fix bug 15326529.

Change-Id: I9095fe70721bfb031dd1080da1d61ff4e1a8c8ab
2014-05-29 10:53:46 -07:00
Deepanshu Gupta
85c69944bd Merge "Recurse into directories to find fonts. [DO NOT MERGE]" into lmp-preview-dev 2014-05-29 15:38:17 +00:00
Deepanshu Gupta
f251b06089 Merge "Parallel processing of the fonts. [DO NOT MERGE]" into lmp-preview-dev 2014-05-29 15:37:55 +00:00
Deepanshu Gupta
28b13b2332 Merge "Add multiple dir support to build_font.py [DO NOT MERGE]" into lmp-preview-dev 2014-05-29 15:37:45 +00:00
Deepanshu Gupta
2cb50d45a8 Merge "Layoutlib: Fix FontFamily_Delegate use after unref" into lmp-preview-dev 2014-05-29 15:37:24 +00:00
Deepanshu Gupta
1a5b0de877 Merge "Update delegates" into lmp-preview-dev 2014-05-29 15:37:07 +00:00
Xavier Ducrohet
7ee26070ea Merge "Stopgap fix for layoutlib." into lmp-preview-dev 2014-05-29 05:27:32 +00:00
Brian Carlstrom
312da405eb Tracking ActionBarView change 1181f77bdfaa7bf8a8250cdd13c7b7a1d6ee0c44
Change-Id: I29a486557428806f26f900974e74f42f3afa4ad4
2014-05-28 21:43:35 -07:00
Brian Carlstrom
8c9360f3aa Tracking IWindowManager change 2ea3814083f27567ae07a1b449da3d596dd4d9d5
Change-Id: I6945cc9b4be174b55173ac2081edc5ee1bee6e67
2014-05-28 21:37:52 -07:00
Deepanshu Gupta
dc62340f18 Stopgap fix for layoutlib.
This is a temporary fix for changes made to TypedArray regrading theme
attributes.

Change-Id: I173fde6d8d3259479b0654ff331bc27bf2814fb0
2014-05-28 16:52:01 -07:00
Deepanshu Gupta
5a73454845 Add basic support for simulating older versions.
This adds rudimentary support for older versions of layoutlib by
changing the color of the status bar to white for froyo and earlier and
omitting the navigation bar for pre-ICS devices.

The color of the icons in the status bar is not changed yet.

Change-Id: I56a16b206ad357b6f3bc5c3d10701d03551847bc
2014-05-28 16:37:39 -07:00
Deepanshu Gupta
9113968f95 Layoutlib: Fix FontFamily_Delegate use after unref
FontFamily_Delegate was being reused after the nUnref call. The issue is
fixed by storing the reference to the FontFamily_Delegate directly in
the Typeface_Delegate rather than storing the native pointer.

Change-Id: I0db724a83c4be3d7b64ccba0989cd64129f2a785
2014-05-28 16:15:32 -07:00
Deepanshu Gupta
79ee46172b Update delegates
Update layoutlib delegates in response to commit
a631a36de986acea2ef6fdfbaf3441a28b914b15

Change-Id: I897a7e3a61286bfae9054415d555febe16410106
2014-05-28 15:04:50 -07:00
Deepanshu Gupta
baef8c1ffe Layoutlib fixes for L [DO NOT MERGE]
This adds the new delegates that were missing. This starts the work on
changes related to Minikin Fonts.

There are some changes related to TypedArray that still need to be
fixed.

Change-Id: Ic2397b64aa3f1f48926e849b14689c47d9ee7f8c
(cherry picked from commit 7ca3612094270183243938e79337c84effea7ad0)
2014-05-27 18:01:34 -07:00
Deepanshu Gupta
46eff27c32 Recurse into directories to find fonts. [DO NOT MERGE]
We now recurse into directories to find all fonts. This change is needed
to prevent having to list all fonts in external/google-fonts
individually.

As a side effect, we now only copy xml files over.

Change-Id: Ifdea3b8451878c2449ac7c5e17ef3d1b00d1b955
(cherry picked from commit c6364fd90de1600526d3431ce0740b6b856e48f0)
2014-05-27 17:57:05 -07:00
Deepanshu Gupta
d23417ab5d Parallel processing of the fonts. [DO NOT MERGE]
Font renaming for the SDK is now done in parallel.

This now reduces the running time for this script from about 30 mins to
about 5 to 10 mins. More speedup is expected when fonttools is updated.

Change-Id: I2c405f6d3e637e3067c8a1653e3cae206c32c0c3
(cherry picked from commit c6364fd90de1600526d3431ce0740b6b856e48f0)
2014-05-27 17:56:29 -07:00
Deepanshu Gupta
49a60d4d6d Add multiple dir support to build_font.py [DO NOT MERGE]
Change-Id: I705d3fbad688a0db309d3062463bf206442b2709
(cherry picked from commit 7e149f02c4e4403101e7e0e88af36cd4ab6f3554)
2014-05-27 17:55:40 -07:00
Adam Lesinski
e34b8abf3a Merge "Don't dump data from a bad ResTable" 2014-05-21 21:59:33 +00:00
Jeff Brown
e665221764 am c2871696: am 6099fd21: Merge "Fix build." into klp-modular-dev
* commit 'c28716964c4525bf9a291404d7f14e74de23f36f':
  Fix build.
2014-05-21 11:16:58 +00:00
Jeff Brown
c28716964c am 6099fd21: Merge "Fix build." into klp-modular-dev
* commit '6099fd21e190ffdf8e03ba6d96cce0d53c2765fd':
  Fix build.
2014-05-21 08:40:39 +00:00
Jeff Brown
61116acdc6 Fix build.
Change-Id: I00f040ab16cf8a3b7a995b4626d49e70b97fb294
2014-05-20 22:16:25 -07:00
Adam Lesinski
25e9d55e96 Don't dump data from a bad ResTable
AAPT dumps data from a bad ResTable, which
causes crashes. Prevent this by checking if
there were errors when creating the ResTable.

Bug:14902008
Change-Id: I5e04ebf967c60b78c511dd175785a13bca52f09a
2014-05-19 15:01:43 -07:00
Deepanshu Gupta
779b59ced2 Merge "Add a script to rename fonts for SDK." 2014-05-16 20:27:11 +00:00
Amith Yamasani
891e65c5ce Merge "Variant of sendBroadcast with appOp flag for cross-user." 2014-05-16 19:40:20 +00:00
Amith Yamasani
3cf75729d5 Variant of sendBroadcast with appOp flag for cross-user.
Needed for delivering SMS notifications to multiple users.

Change-Id: Ib772292699aba37144621742e6f0ee5c68aadd78
2014-05-16 12:37:29 -07:00
Deepanshu Gupta
ad3f288311 Add a script to rename fonts for SDK.
Create a script that will rename the PS name encoded in the font that is
to be shipped with the SDK.

Change-Id: I675a98db39fea4525e3673656af1764eb7e5bb96
2014-05-16 12:31:24 -07:00
Deepanshu Gupta
528d876821 Merge "LayoutLib: Correctly resolve ?attr/foo" 2014-05-16 18:04:15 +00:00
Deepanshu Gupta
fba1dd24bf LayoutLib: Correctly resolve ?attr/foo
?attr/foo in platform files wasn't resolved properly. The IDE checked
the app namespace for the attribute even though it is being referenced
from a platform file.

Change-Id: I7db6dfef5b540d99804c298120578da9d060b886
2014-05-15 17:37:34 -07:00
Deepanshu Gupta
14c9b688fc Merge "Layoutlib: Update delegates for L" 2014-05-15 22:36:41 +00:00