We don't need to create futures for drawables without constant state,
since we only copy on mutate and we don't need to do any work on mutate()
for drawables without shared constant state. Also we would crash in that
case, so avoiding the NPE is nice too.
Rider: Also fixes elevations again.
BUG: 18696100
Change-Id: I4d7737f39ce3efc5830704e5ce412c540603e6ac
There was a weird disconnect between setPressed() and hotspot propagation
behavior. This makes hotspot propagation work like setPressed(). Also
fixes ripple animation during drag-to-open.
BUG: 18631557
BUG: 18593243
Change-Id: Id4adf5d815e4d426b4182aac4d0c780f04472ae4
Only calling VectorDrawable's mutate here will miss all the animator setup,
when the VectorDrawable has a new state.
So we just deep copy everything and setup the animators again.
b/18521582
Change-Id: Id164312750bb548f9c2d21cc0b5806cd2bafcf0d
Also fixes opacity returned from InsetDrawable to accurately reflect
the transparent inset area and updates button to correctly use tint.
BUG: 18226391
Change-Id: Ia9a88d9d663990a6829d2f251c7f59ea2a79d816
Previously we were failing to update references to drawables that had
been pulled from constant state, so we were drawing the wrong ones.
Also fixes button Z translation on press, which was WAY too high.
BUG: 18542282
Change-Id: Ifde7d64e31d31737854cfcbe75777e5b07a06e3a
DrawableContainer's internal state was getting out of sync with the
internal state of child classes because we failed to call set state.
BUG: 18542282
Change-Id: Iacaa12042e99c1b9e9eaf08f0ab879d82260e7ee
Previously, a new state would only be created on newDrawable(), which
caused the first drawable loaded for a resource to share constant state
with the cached version. Even if mutate() was called, the constant
state was still shared and any changes were applied to the cached copy.
BUG: 18504919
Change-Id: I40d257867eb0a092ce580b9c4338ddc7406a031d
Previously, a new state would only be created on newDrawable(), which
caused the first drawable loaded for a resource to share constant state
with the cached version. Even if mutate() was called, the constant
state was still shared and any changes were applied to the cached copy.
BUG: 18504919
Change-Id: I1ce76fbbc144e9c0c93261e3a12cc613d0c74b83
Pivot value can not be changed once they have been set to default.
To be changed "==" -> "!=" in if()
BUG: 18474532
Change-Id: Iacd16eb951154ea97c241566b704e0ad3f225bd1
Previously, the android:reversible flag behaves like a suggestion.
Now it is used to enforce no reverse when set to false. In this way, user can
safely setup one direction animation only.
When set to true, but AVD can't reverse , then it will show a warning.
At the same time, update the tests to show different cases, including
AnimationDrawable.
b/18413484
Change-Id: I5552c49dcbd76b0724b4d5593bce8388b27bd905
The canvas drawText() methods on CharSequence arguments didn't check
whether the start and end offsets were within bounds, which triggered
native crashes. This patch checks the bounds and throws
IndexOutOfBoundsException when invalid.
Bug: 18282500
Change-Id: I1935bf21f828b960c817b40ebce6affd4ce8bb99
Add a non-public API to Canvas/GLES20Canvas to provide a way to draw
the touch ripple animation without using a save layer.
Change-Id: I6e2095adffe515194f669fb75bb67abf813bd518
Reverts default scales to correct value of -1, uses existing state
values when updating from typed array.
BUG: 18351309
Change-Id: I45d21fe017a7bea10e3cbda50f6db65d053aa2ec
Also updates child element inflation code in AnimationDrawable so
that color resources can be used in the <item> drawable attribute.
BUG: 18322272
Change-Id: I8d13643c5cbdb76d69634a7bac3cead9e9fba4e8
We should treat all the animator as a group, we should not start again unless
all the previous animations have stopped.
b/18320770
Change-Id: I5b0c2c165cd314745ee6c7152aea3c666e9dff10
Removes an extra saveLayer call by rendering ripples as overlapping. We
are now down to zero saveLayers when drawing unmasked ripples or ripples
masked against opaque content/masks, one saveLayer for ripples masked
against content and two saveLayers when masked against an explicit mask
layer.
BUG: 18226391
Change-Id: I0fc09d21fbc462fbcfe4c26fc7b18737f584043e
Also adds support for specifying drawable as a color since getDrawable()
automatically wraps colors to ColorDrawable. Does not currently allow
themed item elements to be used in Zygote preload, but we can add that
at some point in the future.
BUG: 18208662
Change-Id: I4c9721ffd100da4b9db7743a46c914828b943dae
If apps are writing malformed content (typically not a PDF file) or if the
PDF content they provide to the print system is password protected, are now
crashed as both of these are app bugs.
bug:17636435
Change-Id: Ifce6a3199e587448dd38f6a84290a965c24b698b
When rendering a PDF file for print preview we take into account
the selected print options such as paper size, orientation, etc
without modifying the document. To print we send the doc in its
original form and the print options so the print service can apply
the necessary transforms in addition to the optional custom options
it supports. When saving to PDF we have to actually change the
document as we act as a print service.
bug:13545980
Change-Id: Icdcecf962bec6ff742cc6015df5af9d9086ce760