2075 Commits

Author SHA1 Message Date
Alan Viverette
a2362c9251 Clear ripple animations on cancel/end
This prevents subsequent calls to end() from snapping the background
opacity (among others) back to 1.

BUG: 17357749
BUG: 17349157
Change-Id: I2a4870ed588ba98986428983bf29b556cdc9a701
2014-09-04 12:16:40 -07:00
Alan Viverette
94b88e7103 Merge "Remove partial support for hotspot changes on focus movement" into lmp-dev 2014-09-03 18:31:47 +00:00
Chet Haase
90ab047540 Merge "Fix behavior of inflating InsetDrawable" into lmp-dev 2014-09-03 14:55:30 +00:00
Alan Viverette
36bdc9fe9a Merge "Make sure ripple background bounds are used for invalidation" into lmp-dev 2014-09-02 23:56:15 +00:00
Chet Haase
014e14b242 Fix behavior of inflating InsetDrawable
A recent change to InsetDrawable changed the behavior of inflating
an InsetDrawable when it already had a valid bitmap. The new behavior
avoids throwing an exception with a bad resource where it used to
throw, because the existence of the bitmap makes it avoid trying to
load the resource at all.

The fix is to reintroduce the old behavior of forcing it to load the
resource regardless of the state of its bitmap.

Issue #17068252 InsetDrawable inflation CTS test is failing

Change-Id: I941388730d4479f8f4747a7985754ffdf5133f04
2014-09-02 16:28:48 -07:00
Alan Viverette
a8a8ff000b Remove partial support for hotspot changes on focus movement
Also removes unused x/y position and tween values on RippleBackground. The
background is now always centered within the hotspot area.

BUG: 17300399
Change-Id: I1904c9f44e6bebb2b434d2b092205edd42204263
2014-09-02 15:58:03 -07:00
Alan Viverette
be0dd99bac Make sure ripple background bounds are used for invalidation
BUG: 17349157
Change-Id: Ie88fbabbc66349aea9b7d00e28ca12f93776a4a7
2014-09-02 15:05:27 -07:00
Svet Ganov
561b893174 Merge "Move print rendering in an isolated process." into lmp-dev 2014-09-02 21:51:47 +00:00
Svet Ganov
13f542cabd Move print rendering in an isolated process.
Security review of the PDF rendering code revealed that it is
not sercure. Therefore, this code must be run in a sandbox.
This change moves the rendering code in an isolated process.

bug:16897933

Change-Id: I711ce42a56892db1837950137bfaa79e1d61a7c4
2014-09-02 11:40:44 -07:00
Alan Viverette
be50bd76a9 Merge "Fix disappearing ripple background, treat active ripple separately" into lmp-dev 2014-08-30 00:19:51 +00:00
Alan Viverette
7ff48839b0 Variety of small UI tweaks
Updates dialog padding, text opacities on dark theme, progress bar
opacity, ripple background exit speed, remove unnecessary text color
attribute from action menu item layout, fix secondary and tertiary
disabled state text colors.

BUG: 17321765
BUG: 17333263
BUG: 17322159
BUG: 17330086
Change-Id: I14473a985b2c6b853afe7db535a2443e934238e9
2014-08-29 15:20:13 -07:00
Alan Viverette
fdbb98e56d Fix disappearing ripple background, treat active ripple separately
There is only a single background, and it did not correctly handle
enter() being called while exit() was busy animating. We now cancel
all animations when starting an enter or exit. Also separates the
active ripple from the list of animating (exiting) ripples.

BUG: 17042060
BUG: 17281011
Change-Id: I4d4e33560867c7c71c1bdb72b17d52d6fbd86f68
2014-08-29 19:54:59 +00:00
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