1806 Commits

Author SHA1 Message Date
Dianne Hackborn
4bb6b751fb Revert "resolved conflicts for merge of 47249f2a to mnc-dev"
This reverts commit c7becb7ee78881646251ff4846e63eb6b96bf7ec, reversing
changes made to 8562b08f04c1309cf40db1e749d612b6824f1d12.
2015-05-22 16:34:44 -07:00
Filip Gruszczynski
97b3ae1a87 Fix build.
Cherry picking because automerger is stuck.

Change-Id: I49f669ee8eed53cf2fc30077cf0a066312865733
(cherry picked from commit c1b736a0cdf41ab5863bfe6901e46c95cc396342)
2015-05-22 01:42:32 +00:00
Filip Gruszczynski
91e5b0f598 Merge "resolved conflicts for merge of 47249f2a to mnc-dev" into mnc-dev 2015-05-22 00:02:48 +00:00
Deepanshu Gupta
a5e6298b35 Add LayoutLibDelegate for new Bitmap method.
Original method added in: 721ae5fec5f1fd4f93aa2a361a0ac298e15ce353

Change-Id: Ie14d132459638cf103c390fae3f4c0c02bef2f34
2015-05-21 23:07:15 +00:00
Deepanshu Gupta
6330971ed2 Add documentation about hack in commit: f8ea750455
Change-Id: I9ce871a67fb67e02e0c4df1eb5c3261ea52a914b
2015-05-21 18:51:13 +00:00
Filip Gruszczynski
c7becb7ee7 resolved conflicts for merge of 47249f2a to mnc-dev
This is a merge of chin support.

Change-Id: I436b751b3c4aaa6b46cfcdb475e02eedfa5a5635
2015-05-20 20:15:29 -07:00
Deepanshu Gupta
4d8e078c7c Fix overrides for BridgeResources.
New method overloads have been introduces in android.content.Resources.
Change BridgeResources to overrides the appropriate ones. Also, fix the
implementation to the new behaviour.

Change-Id: I7b83b329f04286512f223c0fafc3f989f1b9a244
2015-05-20 18:49:56 -07:00
Deepanshu Gupta
d5b8284545 Make DatePicker rendering not fail.
Ensures that having a DatePicker in the layout doesn't crash the
complete rendering. The rendering is still not perfect, but at least it
works.

- Return a non-null window token so that ViewPager thinks that it's
  attached to a window and doesn't skip populating the views.
- Fix a style not found issue.

Change-Id: Ied2b71de5b32bcb640bf4ec445e8a39509f800e9
2015-05-20 18:01:48 -07:00
Deepanshu Gupta
10dff451f3 Use non deprecated method for creating ColorStateList
Change-Id: I9fce928276c8a2af55eb0615a4895abb6a973be5
2015-05-20 16:51:22 -07:00
Deepanshu Gupta
719c9b93f1 Fix line breaking.
Essentially moves line breaking measurement later in the process when
character widths have already been computed.

Change-Id: I17c5bc10d373d8906c5caf86604ce8504650cd7f
2015-05-20 16:51:22 -07:00
Deepanshu Gupta
f2049a4fcb Merge "Inject anonymous inner classes of injected classes" into mnc-dev 2015-05-20 23:32:04 +00:00
Deepanshu Gupta
bfc9c3bcbe Inject anonymous inner classes of injected classes
When injecting classes in LayoutLib (eg. CreateInfo), so that LayoutLib
can refer back to the changes, also inject the anonymous inner classes.
Without this, the injected classes are not loadable. Although, LayoutLib
itself doesn't load these classes, but some tests do.

Change-Id: Ib5f6b779ef4d79dec8d614d3dbb26eeac88a1064
2015-05-20 23:31:31 +00:00
Deepanshu Gupta
d45867a498 Merge "Update platformDir search in tests." into mnc-dev 2015-05-20 23:30:14 +00:00
Filip Gruszczynski
47249f2a9e am cb89ac84: Merge "Support for devices with a chin." into cw-d-mr1-dev
* commit 'cb89ac84c621e047d81873428325dfd747b90a6b':
  Support for devices with a chin.
2015-05-20 22:54:14 +00:00
Filip Gruszczynski
3e11bf33a6 Support for devices with a chin.
Information about the chin is now part of the config.xml instead of the
theme. It is retrieved by WindowManagerService and passed to the clients
as insets. Clients can adjust their behavior in a way that makes it
invisible to the user, that part of the surface doesn't actually exist.

Bug: 19908853

Change-Id: Iedf57bf3c848201b854f91ffeb3b59187d375c1f
2015-05-20 14:20:30 -07:00
Deepanshu Gupta
612a05e7e1 Update platformDir search in tests.
When trying to find the SDK Platform Dir for LayoutLib tests, also
test if the dir from which the tests are run is module dir.

Change-Id: Id5c6038d07ebbb122e38f907ad488ed1f2bcde32
2015-05-20 11:28:50 -07:00
Deepanshu Gupta
1c5bf7f1dd Merge "Make Context.getClassLoader() work." into mnc-dev 2015-05-20 03:05:52 +00:00
Deepanshu Gupta
f8ea750455 Make Context.getClassLoader() work.
Context.getClassLoader() is used by the LayoutInflater and can be used
by custom views. However, when called from the LayoutInflater, this
needs to return only the Framework classes. This is so that the IDE gets
a chance to instantiate the custom views, which helps in better error
reporting and better fallback in case of exceptions, like MockView.

To workaround this need of the same method returning different results
based on where it's called from, the method call in LayoutInflater is
renamed to getFrameworkClassLoader() and the new method is injected in
Context. The implementation of getFrameworkClassLoader() maintains the
existing behaviour of getClassLoader().

Context.getClassLoader() is now modified to return classes from both
Framework and the app namespace.

Also, update the list of packages to search for Framework views.

Change-Id: I1a6be4aa1fc5c1c5520b5440a348a52f10b6eb3b
2015-05-19 19:56:20 -07:00
Deepanshu Gupta
5deaa13844 Merge "Fix include tag rendering." into mnc-dev 2015-05-19 19:07:46 +00:00
Deepanshu Gupta
21b5645733 Fix include tag rendering.
A missing catch clause caused rendering to be failed when there is an
include tag that doesn't specify layout_width and layout_height. Also
improve the error messages to make debugging easier next time.

Change-Id: I617762636973a010b34da167c7b5fcd328b7d178
2015-05-19 12:06:22 -07:00
Deepanshu Gupta
9354a3ac00 Merge "Show better error message for color attr not found." into mnc-dev 2015-05-18 22:04:23 +00:00
Deepanshu Gupta
5f1bf49694 Show better error message for color attr not found.
Change-Id: I1ca32989522d30fec336eb607ee81f9e5cb5f48f
2015-05-18 14:46:12 -07:00
Deepanshu Gupta
71dc5ee224 Fix nav bar spacing for tablets.
Change-Id: Ieee2c2174a3041a0f967cc75bbe74d8bf882ced7
2015-05-18 11:58:31 -07:00
Deepanshu Gupta
3dc19883c5 Fix build: udpate parser factory method
Change-Id: I78ad55bc924427b44451ec32fbd1032d6cd77544
2015-05-14 17:00:50 -07:00
Deepanshu Gupta
f2d408b51d Don't keep LayoutlibCallback reference.
Switch to the newer API that enables keeping a reference only to the
ParserFactory which is a much leaner object as compared to
LayoutlibCallback.

Change-Id: I9b7afd93226db23786a00b2951cbf5ae5b8f3e5f
2015-05-14 15:37:29 -07:00
Deepanshu Gupta
fc41c2c02e Move couple of intellij libraries to project level.
Move framework and layoutlib api libraries back to being project
libraries so that other modules can depend on it. This enables custom
widget libraries project to merge through cleanly.

Change-Id: I4f00d6fb378a80662f32491a2b0061d6bf61899f
2015-05-14 15:12:57 -07:00
Deepanshu Gupta
4ebbfd7787 Fix build.
When doing the full build, javalib.jar wasn't created. However, mm had
created the javalib.jar. Fix the build by not depending on javalib.jar,
but on classes.jar

Change-Id: I643676b1d73cbfce42946a065a2ada6c50cc959a
2015-05-13 22:18:37 -07:00
Deepanshu Gupta
1ae505060e Update rendering fidelity tag to use constant.
Change-Id: If6c1076aa1e070c6bda7be16516fe0e18a95fe2d
2015-05-13 21:47:10 -07:00
Deepanshu Gupta
88b92541be Use Balanced line breaker instead of HighQuality.
Fallback to the Balanced line breaker till the time HighQuality one is
implemented.

Change-Id: I51e9882c5c733e5409f932ef740684829340ced9
2015-05-13 20:53:14 -07:00
Deepanshu Gupta
139d6ff12d Update nav bar icons.
- Add a script to copy the icons from the original source.
- Update layout used for the navigation bar to be closer to the original
  layout.
- Update test image with the latest rendering.
- Add a nexus 5 landscape device config to help with testing.

Change-Id: I0b6674955e0970a6a8cce148b1b7aa61e1752ccd
2015-05-13 20:48:58 -07:00
Deepanshu Gupta
eca056926a Load ICU data in LayoutLib
Also return the correct version numbers for ICU data.

Change-Id: I7de973b5553c73948870b97bdc12a880bb2fdd85
2015-05-13 18:15:32 -07:00
Deepanshu Gupta
d77b9ed7dc Add missing delegates for M preview.
- Remove ICU dependency (use the version bundled with platform).
- Restructure intelliJ project to move dependencies to module.
- Minor fixes to layoutlib tests.

TODO:
- Load ICU data.
- Hyphenator doesn't work.
- High quality line breaker not present.

Change-Id: I965e096e17bfc97ee995a649c3f4f6f64bb4f70d
2015-05-13 18:15:20 -07:00
Deepanshu Gupta
a12ec8f1e2 Run setup for full tests only once.
Change-Id: Iee64dbd88d473b7be08581f26ccddf649aed8e56
2015-05-13 18:10:53 -07:00
Deepanshu Gupta
78af255846 Remove kxml dependency.
Create XmlPullParser using callback provided by the client. This enables
clients to choose which XmlPullParser implementation they want.

Change-Id: I9ad97a4777820cdbe5c8fc3716f74ddec9065c70
2015-05-13 18:10:46 -07:00
Jorim Jaggi
11274bb3e4 Merge "Fix build" into mnc-dev 2015-05-13 22:36:01 +00:00
Jorim Jaggi
2bf49b1a9f Fix build
Change-Id: Ia9277c6c983758d301c89312e39b59a2db0b29c4
2015-05-13 15:34:50 -07:00
Jorim Jaggi
645edef483 Merge "Make sure the app can draw a frame before unlocking" into mnc-dev 2015-05-13 22:13:27 +00:00
Jorim Jaggi
827e0facfe Make sure the app can draw a frame before unlocking
- The mechanism to stop windows drawing while window animator was
animating was somehow flaky. It relied on the fact that the client
would call relayout() whenever the animating state changed. This is
mostly the case, but not for lockscreen animations. Instead, we now
use a push model, where window manager tells the app that the state
has changed.
- In addition, it only stopped drawing if that window was animating,
but then only resumed drawing after all windows have finished
animating. Now, we do this per window, so we only stop drawing for
windows that are currently animating.
- We resume the top activity now at the very beginning of the
unlocking sequence. This gives the app a chance to draw a frame
before the user sees anything. If it's to slow, then we just use the
outdated framebuffer.

Bug: 19964562
Change-Id: Ifef8abd189a3146d854b81b9b948861e4d38c155
2015-05-13 14:23:05 -07:00
Chris Craik
caa6226b17 Revert "Anti-alias by default"
bug:20948129

Keep HIDDEN_DEFAULT_PAINT_FLAGS name.

This reverts commit 1b60cc0529161b5eca6407b551d67d355994c567.

Change-Id: I97cd9c556375c74c52b006bda4fc7b3a2cfa89e1
2015-05-13 13:44:30 -07:00
Alan Viverette
78f12e43f0 Update LayoutLib for theme key changes to fix build
Change-Id: I47b400b320f16688cd32c1d8955a660637d93f4d
2015-05-07 16:24:10 -07:00
Seigo Nonaka
14e139179b Retry "Always show auxiliary subtypes from NavBar keyboard icon."
This CL relands I1e50ee42838a1bf64a612da4904aa93458d44ea4, which was
reverted by I3decaf37198e5864a1763a059df4a36ebc70c5a7 due to the build
breakage in 'layoutlib' target, with a proper fix.

Hereafter the original CL description is repeated.

The auxiliary subtypes should be listed if the input method picker is
opened from NavBar keyboard icon.  However there is only
IMM#showInputMethodPicker() API to open input method picker and this is
also used from LockScreen or Settings UI.  Auxiliary subtypes should not
be listed there(Id7cf5d122).  Thus framework shows auxiliary subtypes
based on IMMS#mInputShown and LockScreen state, but it is not a perfect
solution.  If a physical keyboard is connected, the soft input may be
gone.  As the result, auxiliary subtypes won't be listed even if it is
opened from NavBar keyboard icon.

To fix this issue, this CL introduces IMM#showInputMethodPicker(boolean)
to be able to decide showing auxiliary subtypes by caller.
Note that IMM#showInputMethodPicker(boolean) is still hidden with @hide.
There is no public API change in this CL.

Bug: 20763994
Change-Id: Id156c85535a221235737ea6dcc15a67f1c4b9f71
2015-05-06 21:34:07 -07:00
Diego Perez
70280a20f3 am 0fe14486: am 2021c877: am 33e54563: am 4b125836: Merge "Added function to render a drawable in all available states" into lmp-mr1-dev
* commit '0fe14486211e3ade7f29ea76e16211853fe9cd7a':
  Added function to render a drawable in all available states
2015-05-07 03:14:30 +00:00
Diego Perez
0fe1448621 am 2021c877: am 33e54563: am 4b125836: Merge "Added function to render a drawable in all available states" into lmp-mr1-dev
* commit '2021c8773150dd47d8781375af94143cb22afd9d':
  Added function to render a drawable in all available states
2015-05-07 03:02:34 +00:00
Diego Perez
2021c87731 am 33e54563: am 4b125836: Merge "Added function to render a drawable in all available states" into lmp-mr1-dev
* commit '33e54563daa0db610f9dc8b9d4fca8f826ffec73':
  Added function to render a drawable in all available states
2015-05-07 02:49:50 +00:00
Diego Perez
4b12583653 Merge "Added function to render a drawable in all available states" into lmp-mr1-dev 2015-05-07 02:28:51 +00:00
Andrew Shulaev
681c7d142a Added function to render a drawable in all available states
This reverts commit 01cdf8b135be3bf67b9386dc929109c3db82c730.

Change-Id: I596855047d78c3c718744ad61432fc45e1239634
(cherry picked from commit 1f158819bc7cf58f97e47fabfaf23b2fb838f2eb)
2015-05-07 02:05:48 +01:00
Diego Perez
c000db78d7 am 9af506fb: am 143eaa81: am 2ea82244: am 263e6dfa: Merge "Make status and navigation bars widgets and usable from layouts" into lmp-mr1-dev
* commit '9af506fb5b5f1c7f36fb439c2b120ad2b0cda602':
  Make status and navigation bars widgets and usable from layouts
2015-05-07 00:49:57 +00:00
Diego Perez
9207b8567a am ae4619dd: am df4c977d: am 24e10c0b: am 19dbe50b: Merge "Move StatusBar to use statusBarColor theme attribute" into lmp-mr1-dev
* commit 'ae4619dd7f3d48cae2e9b83681849a77a8201142':
  Move StatusBar to use statusBarColor theme attribute
2015-05-07 00:49:51 +00:00
Deepanshu Gupta
790f6925a7 am a131bfe0: am 3dbd18cd: am 872e9950: am 1f8e3de4: Merge "More layoutlib tests." into lmp-mr1-dev
* commit 'a131bfe094c007721d006fc9ca21cfa74f41dfef':
  More layoutlib tests.
2015-05-07 00:49:40 +00:00
Diego Perez
c2ba739170 am 613aef87: am 86bff0bb: am 0e20bd8e: Merge changes I60c09f33,Ie0134c2b into lmp-mr1-dev
* commit '613aef87cf6a5958ff2fd255348f92f8d3de152e':
  Add new parameter to the render method to allow forcing a measure pass.
  Avoid caching mImage on the main render loop and use clipping.
2015-05-07 00:47:08 +00:00