AVD will fall back to UI thread animation if the host view is
rendering onto a SW layer.
BUG: 27617346
Change-Id: I5b644529048a0c30aada3abf2f4e95e40760936d
Previously, wrong valueType error is swallowed in jni. As a result,
some animations are quietly skipped without letting developers know.
This CL maintains that behavior for pre-N, and throws Exception
to notify developers of the error for N and above.
Bug: 29009391
Change-Id: I3e8f003cdb97d214da72af3f93a84f64797b1c2c
(cherry picked from commit 94db09917a17976135e2c63d8e4171c54730c079)
This CL changes the target of VD specific animators to VectorDrawable,
instead of RenderNode. The benefit of doing so is that animators can
now detect whether the animation is meaningful by checking whether
their VD target is in the display list. If not, that means the VD is
not drawing for the current frame, in which case we can be smarter
and more power efficient by removing the animator from the list and
posting a delayed onFinished listener callback.
By setting VD as the animation target, when an ImageView decides to
update its drawable from one AVD to something else, we'll be able
to detect that the previous AVD is no longer in the display list,
and stop providing animation pulse to the stale AVD, which is
something we couldn't do previously. This change also
handles the case where one AVD instance could be drawn in two
different views.
Bug: 27441375
Change-Id: Iaad1ed09cfd526276b95db0dd695275c28e074e8
Previously, the VectorDrawable animators modify the VD properties by
doing reflection based on the property name. This CL avoids the overhead
of calling reflection by wrapping the setters of VD objects in
Float/IntProperty.
Bug: 28124049
Change-Id: I562c8d749fdfe508564c82a700a92e835cdd9ff4
(cherry picked from commit 9f3b31b9530a2121b4557fc312972c4faa133d5e)
Previously, wrong valueType error is swallowed in jni. As a result,
some animations are quietly skipped without letting developers know.
This CL maintains that behavior for pre-N, and throws Exception
to notify developers of the error for N and above.
Bug: 29009391
Change-Id: I3e8f003cdb97d214da72af3f93a84f64797b1c2c
* commit '93c1d3aa6e20b52a37548af0bf9f9a66948a7611':
docs: Refinements for testing
Fix toast with accessibility and app pinning
Updated link to material design page.
Change overdraw test to use windowbackground
Prevent callbacks during DrawableContainer child initialization
Fixing crash in SysUI due to invalid group.
Cherry pick: docs: Edited "Features Reference" section in "<uses-feature>" page.
Fix Activity Transition mess-up.
Time to #NameAndroidN!
Prevent use of a null sCallbackObj by Hardware FLP
Fixed the relative time spoken with accessibility
Use backstop timeouts on asynchronous countdown during preflight
When mutating vector drawables, we need to not only copy over
the VD tree structure, but also the properties of the VD tree,
such as alpha.
Bug: 28974071
Change-Id: I265e7e3cb92455b876cae248bcb9811230cb34f9
When mutating vector drawables, we need to not only copy over
the VD tree structure, but also the properties of the VD tree,
such as alpha.
Bug: 28974071
Change-Id: If793f5f2b6e116472a1c6da0fb60d8278a78b03f
This CL changes the target of VD specific animators to VectorDrawable,
instead of RenderNode. The benefit of doing so is that animators can
now detect whether the animation is meaningful by checking whether
their VD target is in the display list. If not, that means the VD is
not drawing for the current frame, in which case we can be smarter
and more power efficient by removing the animator from the list and
posting a delayed onFinished listener callback.
By setting VD as the animation target, when an ImageView decides to
update its drawable from one AVD to something else, we'll be able
to detect that the previous AVD is no longer in the display list,
and stop providing animation pulse to the stale AVD, which is
something we couldn't do previously. This change also
handles the case where one AVD instance could be drawn in two
different views.
Bug: 27441375
Change-Id: Id4b3b37f28274c917cb9beb9dcd3d1e6991b5c5d
Collect child invalidations during layer bounds change, then dispatch a
single invalidation if any children requested invalidation. This prevents
re-entrance from, for example, a LayerDrawable.updateLayerBounds() call
invoking setBounds() on a child, which necessarily calls invalidateSelf()
and immediately propagates up to ImageView.invalidateDrawable(), which
then calls configureBounds() and puts us back in updateLayerBounds().
Bug: 28636072
Change-Id: I36c9eefc18904d493292d51b37e4b05cfddcf794
Previously, the VectorDrawable animators modify the VD properties by
doing reflection based on the property name. This CL avoids the overhead
of calling reflection by wrapping the setters of VD objects in
Float/IntProperty.
Bug: 28124049
Change-Id: I562c8d749fdfe508564c82a700a92e835cdd9ff4
Since LocaleList needs to depend on android.os.Parcelable, we cannot let
that class belong to "android.util" package, which causes layering
violation.
Bug: 28819696
Change-Id: Ia8de2ee9df3dd0a42b1fe84574439519b680fe18
This hopefully handles the remaining finalizers in frameworks/base
that didn't guard against calls from other finalizers after being
finalized.
The goal here is to reduce the possible corruption causes we have
to think about by a few.
If any of theses are either very frequently used, or use large
Java (as opposed to native) objects, we should probably convert them
to NativeAllocationRegistry instead. But that's more work.
Bug: 18178237
Change-Id: I79bc0e8fa20af8f340418a6226022e0294d77f02
(cherry picked from commit ad3cc3c63c6d0f637d2ece3935b5b01b19473299)
Don't save matrix if we just need clip saved
Early-reject the easy-to-reject cases in Canvas
before hitting JNI
Change-Id: I385ef90a31efbda31ce37837152f626aad553ee7
Pdfium is not thread safe and uses global variables, hence no
parallel call pdfium is safe
Fixes: 28705066
Change-Id: I04309ee691bd9cea37587e0af5be2c07ce8c9f2c
am: caacf332a1
* commit 'caacf332a1e568e065c9245565c135a7450cc941':
Update and add attributes to the JavaDoc for VectorDrawable
Change-Id: I4d7de86055da3dcd581a7497de7f7d516fbf6ed2
This hopefully handles the remaining finalizers in frameworks/base
that didn't guard against calls from other finalizers after being
finalized.
The goal here is to reduce the possible corruption causes we have
to think about by a few.
If any of theses are either very frequently used, or use large
Java (as opposed to native) objects, we should probably convert them
to NativeAllocationRegistry instead. But that's more work.
Bug: 18178237
Change-Id: I79bc0e8fa20af8f340418a6226022e0294d77f02
So that the native library isn't unloaded before we have a chance to
call the freeFunction.
Bug: 28406866
Change-Id: I889f1ccd91bba70e31fb8d09c0ec6d471fc35841
There are two parts to VD's native allocation:
1) VD's internal data structure (i.e. groups, paths, etc that make
up of the VD tree). This structure can change, when a VD is used
to load a different drawable resource.
2) Two bitmap caches, not both of which will necessarily be allocated
The size of the bitmap cache depends on canvas matrix and drawable
bounds, and therefore can often change.
We need to count the native allocation from the above against Java heap.
Bug: 26269056
Change-Id: If833aedcf7f3efe00ea73a41ddccb1b48066ffd8
Bug: 28428970
Test for video sources and fix a bug where
we should throw an IAE for surfaces that are invalid
at request time.
Change-Id: I891a2b1568f583300433c7aca6de36d2e2621c63