1207 Commits

Author SHA1 Message Date
Deepanshu Gupta
1840e8f2c7 Fix Delegates
Change-Id: I2b6a6b679b7a5b2532b76b723155bc2763b70768
2014-08-04 23:00:43 +00:00
Deepanshu Gupta
d2a411840c Fix LayoutLib Create tests.
Change-Id: Ica3efe417d54da7dc74b21d28215199d37600744
2014-08-04 22:59:38 +00:00
Deepanshu Gupta
86eb8b4e29 Add testing framework to LayoutLib.
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
2014-08-04 22:58:39 +00:00
Sander Alewijnse
a87863a8bd Fix deadlock window manager and device policy manager.
Removed all communication from wm to device policy manager.
Added initialization of cache in wm by dpms.

Change-Id: Ifa0b8bfcd625464b156d5cc0fb66d342deda1c27
2014-07-31 09:16:46 +00:00
Deepanshu Gupta
72c60ab7d4 Fix classpath for AndroidLocale
Change-Id: I9af9ac05ec26f12529d51e566bf38789a2579390
2014-07-31 05:10:03 +00:00
Sander Alewijnse
549d39e549 am f3c523e0: am ce1088a6: am fcb490a2: Merge "Add Device Policy API to disable screen capture." into lmp-dev
* commit 'f3c523e06217b19ae8389f9ca8be71ed2cd9fe7b':
  Add Device Policy API to disable screen capture.
2014-07-23 17:18:27 +00:00
Sander Alewijnse
d2a1eec400 Add Device Policy API to disable screen capture.
WindowManager will set secure flag on SurfaceControl for
all windows of a flagged user to prevent screen capture.
API is consistent with the camera disable API.

Change-Id: Ib180f67f1ad827b6f4aca2af615274256cce58f4
2014-07-23 13:44:28 +00:00
Ying Wang
871296d976 am 044a4fc9: am 7c5fe1db: am 1e976fd5: Build framework.jar with multidex support.
* commit '044a4fc9d4b4e13c509be5a0929fd785dd98e178':
  Build framework.jar with multidex support.
2014-07-21 22:42:04 +00:00
Ying Wang
88e199045b Build framework.jar with multidex support.
We don't need the framework/framework2 split now with the multidex
support.

Change-Id: I30ee5c7e24df87b2c54e854f17fbf0b5adef4c60
2014-07-21 15:23:14 -07:00
Deepanshu Gupta
e32bac5ef0 am 37423bbb: am db2a5ff1: am 78d85419: Fix missing initial moveto in path definition.
* commit '37423bbbeab2822b39d859412aa80117a4b85282':
  Fix missing initial moveto in path definition.
2014-07-21 19:23:58 +00:00
Deepanshu Gupta
3b37956010 Fix missing initial moveto in path definition.
The Path_Delegate was missing a moveTo call which resulted in
IllegalPathStateException when rendering the ProgressBar.

Change-Id: Ibdae5f90ffd0a71a3de4ba945238239faa0b18b2
2014-07-21 17:36:45 +00:00
Deepanshu Gupta
43aab0f419 am cdcebcef: Merge "Fix style resolution for styles with \'.\'" into lmp-preview-dev
* commit 'cdcebcefed9a9bbf6835025d722ae31da1a93c85':
  Fix style resolution for styles with '.'
2014-07-18 21:41:59 +00:00
Deepanshu Gupta
4f8500594f Merge "Fix style resolution for styles with '.'" into lmp-preview-dev 2014-07-17 21:04:20 +00:00
Ying Wang
4b8aa28ef2 Fix sdk build.
Change-Id: I9073747f7a12f826fabf99c34dce813edf6462c1
2014-07-17 14:30:54 -07:00
Deepanshu Gupta
76dd54b64f Merge "Use BlendComposite for advanced PorterDuff Modes." into lmp-preview-dev 2014-07-15 20:35:01 +00:00
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
Deepanshu Gupta
f94ecba403 Merge "Optimize Blend composites." into lmp-preview-dev 2014-07-15 20:35:01 +00:00
Deepanshu Gupta
8ee6bcf809 Use BlendComposite for advanced PorterDuff Modes. [DO NOT MERGE]
Not all PorterDuff modes are supported by Java's AlphaComposite. Use
BlendComposite for such modes.

Change-Id: I51486a40f09186cf8a87ce1e6a3d1cfcf39fb2d3
(cherry picked from commit b15709cd36d28c47660b0ae30918642bfd3d85f7)
2014-07-16 19:53:38 +00:00
Deepanshu Gupta
47fa5c920d Optimize Blend composites. [DO NOT MERGE]
Removed redundant array allocations to improve performance for various
blending modes.

Change-Id: Iaba1d6ff3ad03eebdc859c599b610cc593370438
(cherry picked from commit 9ce074610413ce3a5dd0cef9295f0ae9061402b7)
2014-07-16 19:52:48 +00:00
Deepanshu Gupta
3dfc1c21d5 Add BlendComposite.java [DO NOT MERGE]
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-16 19:52:24 +00:00
Deepanshu Gupta
a17674319d Merge "Add BlendComposite.java" into lmp-preview-dev 2014-07-15 20:35:01 +00:00
Jeff Sharkey
4ed745d359 Add code cache directory for apps.
This provides a directory where apps can cache compiled or optimized
code generated at runtime.  The platform will delete all files in
this location on both app and platform upgrade.

Bug: 16187224
Change-Id: I641b21d841c436247f35ff235317e3a4ba520441
2014-07-15 22:13:26 -07:00
Deepanshu Gupta
d8176941eb Merge "Enable assertions in LayoutLib create" into lmp-dev 2014-07-15 16:04:58 +00:00
Deepanshu Gupta
197d488d58 Enable assertions in LayoutLib create
Change-Id: Ia74285ae50f5caf118aab9eca4123f8aa71f27b4
2014-07-15 13:15:15 -07:00
Deepanshu Gupta
5cd9dde5a2 Support Locale.toLanguageTag on Java 6
Change-Id: I255e79e2c288cd24b350b7c26128bbbb0b2cb9a3
2014-07-15 12:56:04 -07:00
Deepanshu Gupta
c97b4d3996 Merge "Support Locale.toLanguageTag on Java 6" into lmp-dev 2014-07-15 16:05:01 +00:00
Craig Mautner
bb74246278 Launch activity behind launching task.
Use ActivityOptions.makeLaunchTaskBehindAnimation() to launch tasks
behind the current task. Includes animations for launching and
launched tasks.

Fixes bug 16157517.

Change-Id: I0a94af70b4748592e94673b958ee824cfb3d7ec0
2014-07-15 11:36:25 -07:00
Christopher Tate
65665aac63 Fix build
BridgeContext didn't show up in the working tree as a build participant.
Tsk tsk.

Change-Id: I2b52d99f319b43c2906a7fb9b25139a3df5b3676
2014-07-14 17:11:53 -07:00
Deepanshu Gupta
c5a58437e6 Style improvements to LayoutLib create.
This change doesn't change the functionality but removes dead code and
simplifies various places to remove warnings.

Change-Id: I371e06bfbd587dbf0eeafc69787b9805f7008f62
2014-07-11 21:40:46 +00:00
Deepanshu Gupta
26e32ea559 Update delegates
Change-Id: Icd93c31b4e8c8ee5ea242fb8295578937f48ff2a
2014-07-11 21:40:27 +00:00
Deepanshu Gupta
e1960cc0b5 LayoutLib: Fix System.arraycopy()
Framework has specialized versions of java.lang.System.arraycopy() for
all primitive data types. These versions are not present on the Desktop
VM. This change replaces calls to any of the specialized versions with
the more general alternative - the one using Objects.

Note that this was already being done for char.

Change-Id: If1584125fea8ecc080fb39a5ee6cdb4d922d0c98
2014-07-11 10:27:36 -07:00
Yohei Yukawa
69684533cd Fix SDK build breakage
This should have been included in I3c6b69bd9d79b199afe68d838f25effa6

BUG: 15812658
BUG: 16118603
Change-Id: I298206008fc28faa4f6576a77d56251f873f233c
2014-07-12 01:59:07 +09:00
Deepanshu Gupta
3a6cedfe72 Fix default level flags for bidi. [DO NOT MERGE]
Bug: b.android.com/69432
Change-Id: I26ff34a6d1f85c928a9a1cb3dfd739fc7d3a8fb6
2014-07-09 18:13:59 -07:00
Deepanshu Gupta
4f8ce22819 Fix style resolution for styles with '.'
Bug: b.android.com/72698
Change-Id: I96fb549cf5787d9e8cde2245524a8173471a60ca
2014-07-09 17:17:02 -07:00
Deepanshu Gupta
1f1a71bed1 Merge "Support Typeface.createFromFile()" into lmp-preview-dev 2014-07-02 18:11:52 +00: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
cbc13f057f am bdf7f8b0: Merge "Support Typeface.createFromFile()" into lmp-preview-dev
* commit 'bdf7f8b009ca9f276b5368a1cea037c1605f7261':
  Support Typeface.createFromFile()
2014-07-02 18:19:30 +00:00
Deepanshu Gupta
9fe0718492 am 1ae18e43: Merge "Change font family name." into lmp-preview-dev
* commit '1ae18e43e9b3727ce855a2a8a799e703484bc5bf':
  Change font family name.
2014-07-02 18:19:25 +00:00
Deepanshu Gupta
3a57d506e9 am 036557b6: Merge "Update system icon resolution in LayoutLib." into lmp-preview-dev
* commit '036557b60df5e5425b3563e99ffb21685160e4ab':
  Update system icon resolution in LayoutLib.
2014-07-02 18:19:09 +00:00
Adrian Roos
9657804afb Fix layoutlib breakage due to I681b711f6f40a94c25b7acd3a44eb3539486afab
Change-Id: I141f49718c4d538875a68c00101c098fdd7e967b
2014-07-02 16:00:30 +02:00
Deepanshu Gupta
84d1d431cf Update text rendering delegates.
The flags for RTL and LTR are simplified in commit
0a1d91862a3822dcbbb412bcd6d69b0f5f079f8b. This change follows up the
same in LayoutLib.

This also fixes the following bug which incorrectly computed runs with
'en-dash' (\u20132) as RTL.

Bug: http://b.android.com/69432
Change-Id: Iaed62d13ce31f107773576ed2ef412be6037cd04
2014-07-01 12:23:59 -07:00
Deepanshu Gupta
509d860907 Sort delegates in Canvas_Delegate
The order of the methods match the order of the declaration in the
Canvas file. This makes searching for the methods easier.

Change-Id: I230621d3999024cb2ff42a1aacd60908c7f0b161
2014-07-01 12:22:14 -07:00
Deepanshu Gupta
bb5d0cc436 Update LayoutLib delegates.
Change-Id: I64828bfb963048effbc49a622f5f2aa0203665e6
2014-07-01 12:22:13 -07:00
Deepanshu Gupta
3c989eaa0a Add VMRuntime_Delegate
Framework now uses libart which moved the implementation of
newUnpaddedArray() to native. This copies over the implementation of the
method from libdvm to restore the old behaviour.

Change-Id: Ic062aeb01f9ea52b6ed35517f742058d0ba8c804
2014-07-01 12:22:13 -07:00
Deepanshu Gupta
fe2a71bb13 Report all TestDelegate failures in a single run.
Change-Id: I37fa0a6f300ea89c8d0a60380b77b7d61db01cb7
2014-07-01 12:22:13 -07: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