2063 Commits

Author SHA1 Message Date
Alan Viverette
327710e36f Merge "Preserve inner drawable bounds and level on mutate" into lmp-dev 2014-08-27 22:29:19 +00:00
Alan Viverette
719da6ba9b Merge "Fix NPE in RippleDrawable" into lmp-dev 2014-08-27 20:04:28 +00:00
Alan Viverette
d7853e5763 Preserve inner drawable bounds and level on mutate
Also includes a tiny change to progress bar background alpha, which was
too dark to see.

BUG: 17285057
Change-Id: I8b0cc1c2c9405558b8163d8db9374d7c748317a2
2014-08-27 17:45:28 +00:00
Raph Levien
772d576b97 Merge "New weight-aware font config" into lmp-dev 2014-08-27 16:24:37 +00:00
Raph Levien
117cbebe81 New weight-aware font config
Parse new fonts.xml config file, and resolve weight selection based on
the base weight of the font (as defined by a weight alias specified in
the config file) and the requested bold flag. This change improves the
appearance of bold spans for alternate weights of Roboto.

In addition, this patch enables weight selection for fallback fonts.
For example, if an additional font with a weight of 100 is added to the
Hebrew font family in the fallback list, then requesting
"sans-serif-thin" would select that font for Hebrew text.

Bug: 14538154
Change-Id: I99a04fad4f7bf01c75726e760d42735dd9003496
2014-08-26 19:37:45 -07:00
Alan Viverette
40e38d4367 Fix NPE in RippleDrawable
Invalidate was called while we were busy clearing the list of
animating ripples, which led to an inconsistency between the
ripple count and actual state of the ripple list.

BUG: 17136636
BUG: 17281011
Change-Id: Ifb7be7eb334ad9a44cc3a1e6f55ad1e35218989a
2014-08-26 17:08:21 -07:00
Chris Craik
b34eeb70a6 Merge "Notify VM of native pixelref allocations" into lmp-dev 2014-08-26 21:47:46 +00:00
Chris Craik
4cd7dbc90f Notify VM of native pixelref allocations
bug:17178931
Change-Id: I0de22bb0d2ae8233d392b7e222f72391aaa12ce8
2014-08-26 13:10:33 -07:00
ztenghui
ae82e604fa Merge "VD: Update the fillColor default as transparent" into lmp-dev 2014-08-26 18:18:16 +00:00
Chris Craik
8afd0f245c Create z reordering boundaries around dispatchDraw
bug:16012254

This means rendernodes with a Z will no longer be drawn at the end of
their parent's DisplayList, but at the end of the associated reorder
region (DisplayListData::Chunk).

Change-Id: Ia033fee9d9a4db567b2a8d5e90fc57a4d0a64544
2014-08-25 15:35:40 -07:00
ztenghui
a70b4742a7 VD: Update the fillColor default as transparent
b/17208473

Change-Id: I52ff3d335094f0a95f138640eb24ef5dba2ef864
2014-08-25 11:16:06 -07:00
ztenghui
a94900e587 Merge "Fixing AVD animation with startOffset" into lmp-dev 2014-08-22 20:23:24 +00:00
ztenghui
14aedd1fbf Fixing AVD animation with startOffset
b/17160751

Change-Id: If030ca04f5a7dd7e732dcc5dfb18d51faa7e7b79
2014-08-22 12:41:06 -07:00
John Reck
01edef10b9 Revert immutable Shader change
Bug: 16733996

Change-Id: I51686aaf8f6ae8d0e390e298ad70f98f81c5f555
2014-08-22 11:15:37 -07:00
Alan Viverette
04e723c1af Merge "Jump drawable state (including ripples) on view detach" into lmp-dev 2014-08-21 20:03:03 +00:00
Alan Viverette
d78a44576c Jump drawable state (including ripples) on view detach
BUG: 15350931
Change-Id: I09928f59fb7b9f6d87b1f5219353a41ae6b5681d
2014-08-21 12:57:45 -07:00
John Spurlock
38b5f597de Implement GradientDrawable getColorFilter.
Otherwise the value in setColorFilter is unavailable.

Bug:17137319
Change-Id: Ief973abfa129d935aa45336275337e19a3eb0f6a
2014-08-21 14:53:05 -04:00
Behdad Esfahbod
9f6ba7af56 Merge "Throw exception on nonexistent font" into lmp-dev 2014-08-21 16:01:54 +00:00
Behdad Esfahbod
bf8d5620f7 Throw exception on nonexistent font
In K, this used to throw RuntimeException.  Before this patch, NULL
was returned and no exceptions thrown.  With this patch,
FileNotFoundException is thrown.  This might be considered API
change and be undesirable as callers need to either catch it or
declare it to be thrown.

Bug: 16180181
Change-Id: If83d76857f640c6293a3d5d08fb89ceddbaf41bc
2014-08-20 16:11:59 -04:00
Alan Viverette
06cd7dce24 Forward additional drawable methods in AVD
BUG: 17156349
Change-Id: I1d7b41fc8d0399b31db4cf21aa47180e96bfbcfe
2014-08-20 13:44:44 -07:00
Chris Craik
aba9715ae7 Merge "Make getOutline account for gravity BitmapDrawable" into lmp-dev 2014-08-19 22:53:25 +00:00
Chris Craik
fe7a18eead Make getOutline account for gravity BitmapDrawable
bug:17112454

Also cleans up several subtle bugs in updating gravity/tile mode/insets.

Change-Id: Idbd2c52e5f572d11b651f5e93d000535880f5708
2014-08-19 17:44:20 -07:00
Chris Craik
13600f9ed4 Merge "Don't cast shadows from gradients with transparent parts" into lmp-dev 2014-08-19 15:47:37 +00:00
Chris Craik
c49e3ce6c6 Don't cast shadows from gradients with transparent parts
bug:17070982
Change-Id: I607dd3c9397845fce53b7f097ec0b57246077ea1
2014-08-19 11:11:11 -07:00
Alan Viverette
b19fe38840 Merge "Update toggle switch asset to include content area" into lmp-dev 2014-08-19 22:53:25 +00:00
Alan Viverette
a5e1301bf5 Update toggle switch asset to include content area
Remove optical bounds workaround from NinePatchDrawable, which was
incorrect anyway since we were missing a content area rather than
missing padding.

BUG: 17114103
Change-Id: I51461be666f59534dfdea7ab79bc867ee3eb3c92
2014-08-19 16:55:47 -07:00
Chris Craik
d1d7389880 Update setShadowLayer doc
bug:17134528
Change-Id: I436bb0163b18d0b88954bf9dac16e51d14a533eb
2014-08-19 22:40:41 +00:00
Alan Viverette
04019ee91b Merge "Throw exception when inset drawable is missing drawable attribute" into lmp-dev 2014-08-18 21:31:41 +00:00
Chet Haase
32e966ccb3 Merge "Fix crash in AnimationDrawable" into lmp-dev 2014-08-18 21:31:41 +00:00
Chet Haase
030435773d Fix crash in AnimationDrawable
When a drawable becomes invisible, it unschedule itself, which
sets mCurrentFrame to -1. Later, when it becomes visible, it
calls setFrame() with either 0 (if 'restart' is true) or
mCurrentFrame. Calling setFrame() with a value of -1 causes a crash
later as we dereference an invalid location in the state durations
array.

This fix also checks mCurrentFrame and calls setFrame with 0 when the
current frame is invalid. This takes the code back closer to what it
used to be when setFrame was always called with 0, although now it will
use a valid frame when it is set.

Issue #16489419 Google Translate crashes whenever hitting done button on keyboard to get translation result.

Change-Id: I1f5b8672d209017aa8a4eaa15bd7ddd2f3ae38d1
2014-08-18 10:33:58 -07:00
Chris Craik
9745de0f05 Fix BitmapDrawable outline crash
bug:17103753

Change-Id: Ia3d2c7d61b3f3b9ea8879f941d726d8627e155bb
2014-08-18 11:32:13 -07:00
Alan Viverette
0bece71ee2 Throw exception when inset drawable is missing drawable attribute
BUG: 17068252
Change-Id: I3f5757966c1bb723311a2e2c41d419ed41369061
2014-08-15 19:12:28 -07:00
Jeff Brown
c13ff2e4f5 Merge "Revert "Throw exception when inset drawable is missing drawable attribute"" into lmp-dev 2014-08-15 21:23:40 +00:00
Jeff Brown
2e1c9b517e Revert "Throw exception when inset drawable is missing drawable attribute"
This reverts commit b16a6331cce2c3559ed9414c6aca238c5042e919.

Bug: 17072675
Change-Id: Ie2403095df10aa0dd18545a3d2a323ae463037e4
2014-08-16 02:06:16 +00:00
Alan Viverette
0a9614f5fb Throw exception when inset drawable is missing drawable attribute
BUG: 17068252
Change-Id: Id9c9791501ce9d56fdd67236c84775550c89032c
2014-08-15 14:28:30 -07:00
Alan Viverette
7ca0bb5d4d Merge "Better handling of unresolved theme attributes" into lmp-dev 2014-08-15 21:23:40 +00:00
Alan Viverette
34a14f967a Better handling of unresolved theme attributes
Also adds a (very obviously wrong) default color to RippleDrawable

Change-Id: I6d29b371f4e59accbebf25eb059b1f372b9184b0
2014-08-15 17:15:39 -07:00
Alan Viverette
cf8f58350b Merge "Throw exception when inset drawable is missing drawable attribute" into lmp-dev 2014-08-15 21:23:40 +00:00
Chet Haase
a4888fbac9 Merge "Minor doc fixes from API council recommendations." into lmp-dev 2014-08-15 08:11:59 +00:00
Chet Haase
6beeb75723 Minor doc fixes from API council recommendations.
Issue #17008236 API review: android.graphics

Change-Id: I171d376b642707858198d8a1379c732fcfcab4dd
2014-08-15 11:14:48 -07:00
Chris Craik
e222e359a0 Disable shadow casting for transparent BitmapDrawables
bug:17013977
Change-Id: I26328c21360432bb34d3f19858dfdc0e6aede057
2014-08-15 00:57:52 +00:00
Alan Viverette
03d30a573b Make sure we're obtaining themed drawables correctly
Change-Id: I446a3492f7bf5a897c5d698e61327af4b7840d85
2014-08-14 19:59:50 +00:00
Raph Levien
e07465fafd Merge "Resolve invalid Typeface style to default" into lmp-dev 2014-08-13 01:30:28 +00:00
Alan Viverette
2adf8902ce Merge "Prevent re-entry when clearing animating hotspots" into lmp-dev 2014-08-12 23:14:35 +00:00
Alan Viverette
27cede8777 Prevent re-entry when clearing animating hotspots
BUG: 16651728
Change-Id: I2b1b1501a4adfded833d0ed95ec3537ae217a6d7
2014-08-12 15:03:01 -07:00
Alan Viverette
1725f94124 Merge "Fix NPE in NinePatchDrawable, propagate theme in StateListDrawable" into lmp-dev 2014-08-12 19:31:43 +00:00
Alan Viverette
ad55abdc74 Fix NPE in NinePatchDrawable, propagate theme in StateListDrawable
BUG: 16979150
BUG: 16957778
Change-Id: I5e7116fe7fd3d5d177bafa88aad08ab21ae1677d
2014-08-12 11:16:01 -07:00
Raph Levien
ff86bcd088 Resolve invalid Typeface style to default
Setting a textAppearance that specified a fontFamily but not a textStyle
results in a styleIndex of -1 being passed to the Typeface.create()
call. This patch resolves such invalid style indices to the default.

Fix for bug 16880318 "Applying TextAppearance To TextView with custom
font family incorrectly adds italics style on LMP"

Change-Id: I05c9cfc4d76161be21b58abdb4037c51a23cae37
2014-08-11 14:26:37 -07:00
ztenghui
0670f029a4 VD: Fix Canvas save leak
bug:16965998

Change-Id: I367388b270748e2ce114b468940966d78de07465
2014-08-12 10:35:49 -07:00
ztenghui
6661341596 Don't double count the left/top when using bitmap cache in VectorDrawable.
bug:16861184

Change-Id: I0530602957a434b222725b6fcbc1af165ee05835
2014-08-11 10:16:22 -07:00