137596 Commits

Author SHA1 Message Date
Deepanshu Gupta
85d43f01ed Use BlendComposite for advanced PorterDuff Modes.
Not all PorterDuff modes are supported by Java's AlphaComposite. Use
BlendComposite for such modes.

Change-Id: I51486a40f09186cf8a87ce1e6a3d1cfcf39fb2d3
2014-07-15 18:14:00 -07:00
Deepanshu Gupta
303b908d61 Optimize Blend composites.
Removed redundant array allocations to improve performance for various
blending modes.

Change-Id: Iaba1d6ff3ad03eebdc859c599b610cc593370438
(cherry picked from commit 9ce074610413ce3a5dd0cef9295f0ae9061402b7)
2014-07-15 18:13:53 -07:00
Deepanshu Gupta
e6bf903db9 Add BlendComposite.java
The class is adapted from a demo tool for Blending Modes written by
Romain Guy (romainguy@android.com). The tool is available at
http://www.curious-creature.org/2006/09/20/new-blendings-modes-for-java2d/

Change-Id: I8f7c7ca08d3078106056764a4e2f1ce95d990137
(cherry picked from commit 882e08759137a77090c3c7dff8cba425a3393474)
2014-07-15 18:13:46 -07:00
Baligh Uddin
274a6049ed Merge "Import translations. DO NOT MERGE" into lmp-preview-dev 2014-07-05 02:59:43 +00:00
Baligh Uddin
e6f60bf55c Import translations. DO NOT MERGE
Change-Id: Icdc14f6d978d7a4efc32326b9e40cabd8133e342
Auto-generated-cl: translation import
2014-07-05 14:04:26 -07:00
Baligh Uddin
1ae374d95d Merge "Import translations. DO NOT MERGE" into lmp-preview-dev 2014-07-05 02:59:43 +00:00
Baligh Uddin
99c686ba21 Import translations. DO NOT MERGE
Change-Id: If81d0c4fa3f54f621472e3b188fa9b3fce8c38f2
Auto-generated-cl: translation import
2014-07-05 15:34:02 -07:00
Baligh Uddin
ad0d4f8456 Import translations. DO NOT MERGE
Change-Id: I767513b0d247eb29325b3e512e2b95e720152570
Auto-generated-cl: translation import
2014-07-05 15:13:27 -07:00
Deepanshu Gupta
37e5ceac65 Merge "Add nameID 4 to AndroidEmoji" into lmp-preview-dev 2014-07-01 23:33:37 +00:00
Deepanshu Gupta
1f1a71bed1 Merge "Support Typeface.createFromFile()" into lmp-preview-dev 2014-07-02 18:11:52 +00:00
Deepanshu Gupta
778e1cd834 Add nameID 4 to AndroidEmoji
The nameID 4 (Full font name) is required to load the fonts on a desktop
Java VM. This change adds the nameID as "Android Emoji".

Change-Id: I67d37f387776e667f45794d6d0372ec35d61b4d3
2014-07-01 17:32:15 -07:00
Deepanshu Gupta
3c937cf5c7 Support Typeface.createFromFile()
Add support for Typeface.createFromFile() for platform fonts. The
feature existed in the KitKat LayoutLib but was dropped for the L
preview. This change adds it back.

Change-Id: Ib1abe67a32c28a1fb0e2a4f3061c358b55129434
2014-07-01 17:32:12 -07:00
Deepanshu Gupta
7ea293bc6a Change font family name.
During the SDK build, rename the Font's Family name and not just the
PS Name. Updating the PS name doesn't work.

Change-Id: I997b5eec9f493ce97b95c33101ee426e773890c1
2014-07-01 17:13:32 -07:00
Deepanshu Gupta
19c5349b73 Merge "Change font family name." into lmp-preview-dev 2014-07-01 23:33:37 +00:00
Deepanshu Gupta
9abd58257a Merge "Update system icon resolution in LayoutLib." into lmp-preview-dev 2014-07-02 18:11:52 +00:00
Deepanshu Gupta
1076be31f1 Update system icon resolution in LayoutLib.
This fixes some bugs with the resolution of icons for Status Bar and
Navigation Bar by separating the icons into v21 and v11 directories. An
icon is searched in v21 directory by default. For simulating older
platforms, v11 directory is searched first and then v21 is used as a
fallback.

This also adds xxhdpi versions of home, back and recent icons.

Change-Id: Ia6eafc83856eacafc4fb0b13d87793d4aa24f106
2014-06-27 11:52:45 -07:00
Baligh Uddin
65caf07805 Merge "Import translations. DO NOT MERGE" into lmp-preview-dev 2014-06-27 16:52:20 +00:00
Baligh Uddin
850bf628a4 Merge "Import translations. DO NOT MERGE" into lmp-preview-dev 2014-06-27 15:56:14 +00:00
Baligh Uddin
312f305da2 Import translations. DO NOT MERGE
Change-Id: I6f1b0c684d15150f598538fcb34c0815586ba54a
Auto-generated-cl: translation import
2014-06-26 11:48:06 -07:00
Baligh Uddin
f7ec99c0b4 Import translations. DO NOT MERGE
Change-Id: I50530b52ca1c14368396a80aee19d527b9b0648e
Auto-generated-cl: translation import
2014-06-26 11:12:27 -07:00
Baligh Uddin
8517bf0225 Import translations. DO NOT MERGE
Change-Id: I3c34ec05468c932b02ac3ef79cb88bff26957252
Auto-generated-cl: translation import
2014-06-26 11:05:01 -07:00
Deepanshu Gupta
48d41ea0be Merge "Improve PorterDuff support." into lmp-preview-dev 2014-06-25 01:36:21 +00:00
Baligh Uddin
8c53c68b32 Merge "Import translations. DO NOT MERGE" into lmp-preview-dev 2014-06-25 01:41:07 +00:00
Baligh Uddin
db7c9cf439 Merge "Import translations. DO NOT MERGE" into lmp-preview-dev 2014-06-25 01:36:21 +00:00
Baligh Uddin
0f54dcd90d Merge "Import translations. DO NOT MERGE" into lmp-preview-dev 2014-06-25 01:36:21 +00:00
Deepanshu Gupta
7a139f3fc9 Improve PorterDuff support.
1. Don't cache the src image used for applying the filter. The filter
delegate is not always cleared. This probably results in slighly slower
rendering, but doesn't run Studio out of memory.
2. Support more PorterDuff modes.
3. Fix a bug where the alpha was applied twice and thus the filter had
less effect than it should have had.

Change-Id: I2a481a64ba7f1ff8e9683bbc46ae110433e82ebc
2014-06-24 17:42:34 -07:00
Deepanshu Gupta
a2c96d5406 Merge "Temporarily change PorterDuff mode MULTIPLY to SRC_IN" into lmp-preview-dev 2014-06-23 21:44:43 +00:00
Deepanshu Gupta
ead9ce3ff6 Temporarily change PorterDuff mode MULTIPLY to SRC_IN
Overflow pop up dialog for action bar uses PorterDuff color filters in
mode SRC_IN. The mode is not supported by AlphaComposite currently. So,
in order to render something, we swap it out with SRC_IN.

Change-Id: I987e101728ecb76b5e3d5cd91f831e6f63a4321f
2014-06-23 19:26:32 -07:00
Deepanshu Gupta
16af3691f5 Fix bug to render status bar icons
Change-Id: I653c765105dafb02e30322384ca8e4791ac185d2
2014-06-23 19:25:38 -07:00
Deepanshu Gupta
e1d04d5421 Fix NPE in Ninepatch creation.
Change-Id: Icead69cd8503e90aeb54ff42f9ec297e7af2b518
2014-06-23 18:40:47 -07:00
Deepanshu Gupta
8dcfd4abe8 Resource resolution bug fix.
Fix a bug where "?attr/foo" in framework resources wasn't resolved
properly.

Change-Id: I9a56974f526774fde79685f668f01021136d68f1
2014-06-23 16:48:56 -07:00
Deepanshu Gupta
42c7ce02f4 Add navigtaion bar icons to simulate older platforms.
LayoutLib can simulate older versions of the platform to a very limited
extent. This change adds the old navigtaion bar icons back and moves the
latest ones to directories suffixed with "-v21". The code handles this
resolution in a very crude way.

This also removes a bunch of unused code and fixes some style warnings.

Change-Id: Ib6e7bfd8dfb34b2ccd87f660ca979eb5ef14bae7
2014-06-23 14:49:01 -07:00
Deepanshu Gupta
b0419c8c4f Merge "Fix bug to render status bar icons" into lmp-preview-dev 2014-06-23 21:44:43 +00:00
Deepanshu Gupta
a0e37aebca Merge "Fix NPE in Ninepatch creation." into lmp-preview-dev 2014-06-24 00:22:15 +00:00
Deepanshu Gupta
d6bb082055 Merge "Resource resolution bug fix." into lmp-preview-dev 2014-06-23 21:50:10 +00:00
Deepanshu Gupta
425998a586 Merge "Add navigtaion bar icons to simulate older platforms." into lmp-preview-dev 2014-06-24 00:22:15 +00:00
Deepanshu Gupta
54c1c0db93 Merge "LayoutLib: Support PorterDuffColorFilter" into lmp-preview-dev 2014-06-24 00:22:15 +00:00
Deepanshu Gupta
083f271429 Merge "Fix SurfaceView in LayoutLib." into lmp-preview-dev 2014-06-24 00:22:15 +00:00
Chris Wren
47c20a163a Update javadocs for heads up behavior.
The heads up notification is influences by full screen, sound,
vibration and priority. Update the documentation on those APIs to
explain this.

Also add some draft documentation for hidden API surfaces.

Bug: 15509793
Change-Id: Ie7dc99d9c1acf873782bdd010cdf28d11da256d7
2014-06-23 16:48:41 -04:00
Baligh Uddin
ea0a68c8fd Import translations. DO NOT MERGE
Change-Id: I5838e3d2a666385101210aa9028268f211c2112c
Auto-generated-cl: translation import
2014-06-23 10:09:42 -07:00
Baligh Uddin
63c488eb34 Import translations. DO NOT MERGE
Change-Id: I7dba3731b7a68d03db38e1c216968d9928f98434
Auto-generated-cl: translation import
2014-06-23 09:33:51 -07:00
Baligh Uddin
fb6aaafd9b Import translations. DO NOT MERGE
Change-Id: I93ec91fb5f39c20823c305588cd189aabf32423e
Auto-generated-cl: translation import
2014-06-23 09:27:49 -07:00
Deepanshu Gupta
f2af1f5d8a LayoutLib: Support PorterDuffColorFilter
Add support for select modes for PorterDuffColorFilter.

Change-Id: Ia7b4a6a92c326be977dd87a70f54c1f8954b546d
2014-06-22 13:02:54 -07:00
Deepanshu Gupta
367a0ce902 Fix SurfaceView in LayoutLib.
Added missing constructor.

Change-Id: I3dc8eb510bf4210568d4bb71ad551446d6835ae2
2014-06-21 19:47:25 -07:00
Deepanshu Gupta
b337295654 Merge "LayoutLib: Better support for compact/elegant fonts." into lmp-preview-dev 2014-06-20 21:00:34 +00:00
Deepanshu Gupta
0a1335d770 Merge "Material navigation bar for layoutlib." into lmp-preview-dev 2014-06-20 20:43:34 +00:00
Ji-Hwan Lee
8865275ebc DO NOT MERGE: Use main looper for PackageMonitor
This is to work-around the issue that TvInputManagerService does not
receive package change callbacks from PackageMonitor.

In ATV emulator build, the background thread is blocked at
android_location_GpsLocationProvider_init(), and PackageMonitor that uses
background thread fails to handle broadcast intent.

Bug: 15767453
Change-Id: Ieef00cedf1357d57e4217ec202d50655ba3aa35a
2014-06-21 06:31:12 +09:00
Ji-Hwan Lee
0ceb7e4755 Register PackageMonitor when system services are ready
Bug: 15767453
Change-Id: I191b20dfa31eee0e37ba7df67cbf906ccbfc0f4e
2014-06-21 06:30:49 +09:00
Deepanshu Gupta
17f6f35f90 Material navigation bar for layoutlib.
Change-Id: Id65600e5f4ffb3cd0f90c3c710f88d9b668f754f
2014-06-18 15:27:02 -07:00
Baligh Uddin
6ef41d58c9 Merge "Import translations. DO NOT MERGE" into lmp-preview-dev 2014-06-18 18:28:24 +00:00