2558 Commits

Author SHA1 Message Date
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
John Spurlock
eb8d1be6ac Add a BIND_DREAM_SERVICE signature-level permission.
Starting in api 21, will be required to bind to a
declared dream or doze service.

Also added to aapt dump badging output.

Bug:15862654
Change-Id: Ifa0a594eeecf21e6146176c7810a847e1d08fe3b
2014-06-27 18:33:42 -04: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
baffd0f85b am ac626a67: Merge "Improve PorterDuff support." into lmp-preview-dev
* commit 'ac626a6724bc239fcf3d5b2e207de02c59595c5a':
  Improve PorterDuff support.
2014-06-25 02:49:48 +00:00
Adam Lesinski
9d5b08ea8c Dump more info about behaviors an APK offers
Behaviors include things like print services,
custom launchers, camera apps, etc.

Bug:13748429

Change-Id: I9fb83bac95b1be61fc630c1e74daf0f4a8b9b27f
2014-06-24 22:07:47 +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
091208709a am 699f7221: Merge "Temporarily change PorterDuff mode MULTIPLY to SRC_IN" into lmp-preview-dev
* commit '699f7221dc0719b1ceb03a03183dc742a5bcdf3c':
  Temporarily change PorterDuff mode MULTIPLY to SRC_IN
2014-06-24 10:33:55 +00:00
Deepanshu Gupta
d8ef316f1f am 91977396: Merge "Fix bug to render status bar icons" into lmp-preview-dev
* commit '9197739603eb34df6cbc85c6a7fa0ea359e4776b':
  Fix bug to render status bar icons
2014-06-24 10:33:49 +00:00
Deepanshu Gupta
09348a10be am 3a812f47: Merge "Fix NPE in Ninepatch creation." into lmp-preview-dev
* commit '3a812f4755015a7384a8d28bbdeca445c87598b3':
  Fix NPE in Ninepatch creation.
2014-06-24 10:33:44 +00:00
Deepanshu Gupta
2b46b7eed7 am cd4b38ea: Merge "Resource resolution bug fix." into lmp-preview-dev
* commit 'cd4b38ea1d3605e0e62e5ddc70c052e221fef73c':
  Resource resolution bug fix.
2014-06-24 10:33:38 +00:00
Deepanshu Gupta
08b59fcb21 am 04703acd: Merge "Add navigtaion bar icons to simulate older platforms." into lmp-preview-dev
* commit '04703acdd214cd17aaf5757da75a862fb1797d1e':
  Add navigtaion bar icons to simulate older platforms.
2014-06-24 10:33:33 +00:00
Deepanshu Gupta
3510c58ad6 am e558d180: Merge "LayoutLib: Support PorterDuffColorFilter" into lmp-preview-dev
* commit 'e558d1806b29385aa14ba60f18e103e2c9aeef1b':
  LayoutLib: Support PorterDuffColorFilter
2014-06-24 10:33:26 +00:00
Deepanshu Gupta
e2f83fac78 am 52abbced: Merge "Fix SurfaceView in LayoutLib." into lmp-preview-dev
* commit '52abbced58ace68f8a91c4d092061d115af3b268':
  Fix SurfaceView in LayoutLib.
2014-06-24 10:33:21 +00: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
a88738ff52 am 3daec197: Merge "LayoutLib: Better support for compact/elegant fonts." into lmp-preview-dev
* commit '3daec1972493c1e867c6cac7f4a2a43a157d52b9':
  LayoutLib: Better support for compact/elegant fonts.
2014-06-21 23:35:51 +00:00
Deepanshu Gupta
4a2ff7a4d8 am f791b120: Merge "Material navigation bar for layoutlib." into lmp-preview-dev
* commit 'f791b1205192e525590f72c465e7e4c185112eb0':
  Material navigation bar for layoutlib.
2014-06-21 23:35:43 +00:00
Brian Carlstrom
80f1fe5f7c am f8077cf2: am 8e21e215: Merge "Switch from core to core-libart"
* commit 'f8077cf2d7ee55dbf02ec0c65a05db7e5c2fabfc':
  Switch from core to core-libart
2014-06-19 02:08:10 +00:00
Brian Carlstrom
f8077cf2d7 am 8e21e215: Merge "Switch from core to core-libart"
* commit '8e21e21550eddce01ad06fdf05b342993bf44c6a':
  Switch from core to core-libart
2014-06-19 02:03:35 +00:00
Brian Carlstrom
dbcae5ceb7 Switch from core to core-libart
Bug: 14298175
Change-Id: I89db18bf3d88f9511cb2ad943c64ecdbaf09d96f
2014-06-18 17:43:27 -07:00
Deepanshu Gupta
17f6f35f90 Material navigation bar for layoutlib.
Change-Id: Id65600e5f4ffb3cd0f90c3c710f88d9b668f754f
2014-06-18 15:27:02 -07:00
Deepanshu Gupta
5ba5ab3111 am 1595c61d: am 5a49fc33: am c57b410c: Add a script to rename fonts for SDK. [DO NOT MERGE]
* commit '1595c61d2f1f081111958b4a22e8fec25402f3cd':
  Add a script to rename fonts for SDK. [DO NOT MERGE]
2014-06-18 00:20:35 +00:00
Deepanshu Gupta
1595c61d2f am 5a49fc33: am c57b410c: Add a script to rename fonts for SDK. [DO NOT MERGE]
* commit '5a49fc331ec7d5aa2532d650c32ea68733cbd5c0':
  Add a script to rename fonts for SDK. [DO NOT MERGE]
2014-06-18 00:15:35 +00:00
Deepanshu Gupta
5a49fc331e am c57b410c: Add a script to rename fonts for SDK. [DO NOT MERGE]
* commit 'c57b410c8ef41e269f82f3b42a8d22a15c08755b':
  Add a script to rename fonts for SDK. [DO NOT MERGE]
2014-06-18 00:10:34 +00:00
Brian Carlstrom
7f047f02ad am 80f1fe5f: am f8077cf2: am 8e21e215: Merge "Switch from core to core-libart"
* commit '80f1fe5f7cc80b6f1da142c782ccbbad45d878a8':
  Switch from core to core-libart
2014-06-19 02:16:34 +00:00
Adam Lesinski
f90f2f8dc3 Support multiple resource tables with same package
In order to support APK split features, the resource
table needs to support loading multiple resource
tables with the same package but potentially new set
of type IDs.

This adds some complexity as the type ID space changes
from dense and ordered to potentially sparse.

A ByteBucketArray is used to store the type IDs in
a memory efficient way that allows for fast retrieval.

In addition, the IDMAP format has changed. We no longer
need random access to the type data, since we store the
types differently. However, random access to entries of
a given type is still required.

Change-Id: If6f5be680b405b368941d9c1f2b5d2ddca964160
2014-06-18 19:20:08 +00:00
Deepanshu Gupta
21b0aab838 Add a script to rename fonts for SDK. [DO NOT MERGE]
Create a script that will rename the PS name encoded in the font that is
to be shipped with the SDK.

Change-Id: I675a98db39fea4525e3673656af1764eb7e5bb96
(cherry picked from commit b49e21e153c59b31503a376d62257e4fc6e7ce4f)
2014-06-12 16:16:51 -07:00
Deepanshu Gupta
b49e21e153 Add a script to rename fonts for SDK. [DO NOT MERGE]
Create a script that will rename the PS name encoded in the font that is
to be shipped with the SDK.

Change-Id: I675a98db39fea4525e3673656af1764eb7e5bb96
(cherry picked from commit c57b410c8ef41e269f82f3b42a8d22a15c08755b)
2014-06-12 16:13:18 -07:00
Deepanshu Gupta
c57b410c8e Add a script to rename fonts for SDK. [DO NOT MERGE]
Create a script that will rename the PS name encoded in the font that is
to be shipped with the SDK.

This commit is a combination of 5 commits:
e0660d31c256e02e5f5e2967508a7205d1f62f86
7e149f02c4e4403101e7e0e88af36cd4ab6f3554
66d3314301a8983c7070a15ea68daacc7300b7f2
c6364fd90de1600526d3431ce0740b6b856e48f0
2d8c52dc4502b8407705d5b6efe628cb657b20b4

Change-Id: I675a98db39fea4525e3673656af1764eb7e5bb96
2014-06-12 15:08:46 -07:00
Deepanshu Gupta
1434ea749f am 92b7c67e: Merge "LayoutLib fixes for API 20 [DO NOT MERGE]" into klp-modular-dev
* commit '92b7c67e719fa125a5af368eb9e00f724c88601d':
  LayoutLib fixes for API 20 [DO NOT MERGE]
2014-06-12 20:04:12 +00:00
Deepanshu Gupta
86837dc24a LayoutLib: Better support for compact/elegant fonts.
Change-Id: I67439924bc6323490ea0c7d7864985b400906f8c
2014-06-12 11:11:28 -07:00
Deepanshu Gupta
9c80488e11 LayoutLib fixes for API 20 [DO NOT MERGE]
Fixes a bunch of issues with delegate method signatures.

Also cherrypicked commit 664d6f1fe4d6dfa742b3e98051f924dbc190f8ca
which is needed in this branch also.

Bug: 15492736
Change-Id: If99ff279b0d0cabe22942da27388ecb4b800c330
2014-06-12 19:48:38 +00:00
Ji-Hwan Lee
a3874f0ac6 LayoutLib: Fix broken sdk builds
Change-Id: I301b312195eb3e57cb581d015e7c0b0492084b3e
2014-06-13 20:34:54 +09:00
Deepanshu Gupta
9ad11ca07f am e3e1591c: Merge "Remove lxml dependency." into lmp-preview-dev
* commit 'e3e1591cd8d748ba5da228fe857dd785ec7965a9':
  Remove lxml dependency.
2014-06-11 17:43:36 +00:00
Deepanshu Gupta
6370c7f554 am fe01ace8: Merge "LayoutLib: Support more ContextThemeWrappers" into lmp-preview-dev
* commit 'fe01ace8ac5da2c9716a0eb0cb53fdda823b3910':
  LayoutLib: Support more ContextThemeWrappers
2014-06-11 17:43:32 +00:00
Deepanshu Gupta
3e950680c4 am 0a89c1b0: Merge "LayoutLib: Fix EditText rendering" into lmp-preview-dev
* commit '0a89c1b00762b404966e32beef1ea9a53e4a8b08':
  LayoutLib: Fix EditText rendering
2014-06-11 17:43:26 +00: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
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
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
Jeff Brown
96c2e9f1cb Merge "Add support for @SystemApi annotation to aapt." 2014-06-09 21:05:17 +00:00
Bryan Mawhinney
aa00ae0a67 am 99017c01: Merge "Fix issue preventing aapt from stripping all unwanted densities" into lmp-preview-dev
* commit '99017c01bac525ca4b5b10768052ced398b4a493':
  Fix issue preventing aapt from stripping all unwanted densities
2014-06-09 15:55:43 +00:00