In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.
(cherry picked from 6387604f9e672ece85e07c4bcbd7be396867f06f)
Bug: 30188076
Test: make checkbuild
Merged-In: I13e88297731253420e4e5f5291d503f13a39a156
Change-Id: I58446eb8c45d8ac2bcdbc9fa40d1321e811bdd4b
Also fixes progress bar sample tile to reflect density and ensures
that ProgressBar.tileify() clones inner drawables into the correct
density.
Bug: 31841123
Test: BitmapDrawableTest#testPreloadDensity()
Test: ThemeHostTest
Test: Visual inspection of ApiDemos
Change-Id: I9dcb9817d8d91d61ff0215987247e9e7fb089c46
This CL changes the AVD xml parsing to parsing only within the current
element, which prevents AVD parsing from always skipping to the end of
the doucment. So things that are defined after AVD in the same document
can be picked up by the xml parser.
The same fix has been applied to VD as well.
BUG: 31865175
Test: Manually following comment #1 in the bug above
Change-Id: I4ebdce1eb2e92d6f6e2c37caed9607253d24602f
This CL adds a summary of what developers can expect from running
AVD on RenderThread.
Also re-structure the class level Javadoc summary to better organize
the examples.
Test: make offline-sdk-docs
BUG: 30402908
Change-Id: I7111f67db5f2ec352730f633bb34f2e89e1c70e9
Previously we would skip setting the changing configurations and callback
if the drawable had been loaded post-inflation from a theme attribute.
Bug: 30756548
Change-Id: Ia5457723ae8a62506a7562299d3fe78ec21f8030
Don't set the callback until we're all done making changes.
Bug: 30902893
Change-Id: Ia1560692a83ecb2c50f5e77fa4d1e8155a78a204
(cherry picked from commit b46ba3b2b0268688852cdf3d1fb4afe4873d63be)
Pdfium is not thread safe and uses global variables, hence no
parallel call pdfium is safe
Fixes: 28705066
Change-Id: I04309ee691bd9cea37587e0af5be2c07ce8c9f2c
(cherry picked from commit 0768a7dc450caf4c873c5b0883a75135536e1546)
When AVD fall back on UI thread, in addition to transfer the pending
actions from RT animator to UI animator, we also need to transfer
the listener, if any.
BUG: 30901495
Change-Id: Ib4a7ebb2996a02596bb5789704617c894a5dd474
Bug: 30342017
Upload recents thumbnails in the
dead gaps between frames instead of
at the start of a frame. This eliminates
jank caused by the large texture
upload.
Change-Id: I507cd286d199109c7a9a1511d68ba5ab5d28069f
This CL fixes an issue where one of the constructors creates a
native tree object without registering the allocation of its
root group with the NativeAllocationRegistry.
BUG: 28943866
Change-Id: Ic8db3f2fa8036dfabdbc1a1fcbd58d08a0379e2d
In another word, create another cached bitmap, when the current VectorDrawable
will look differently when state changed.
Bug: 29870392
Bug: 29854240
Change-Id: I7a5ef91091e547a930368286defc7ab96aeb9471
(cherry picked from commit 4f1acfb5f507798daaff2ff0da47d2b15607ded4)
In another word, create another cached bitmap, when the current VectorDrawable
will look differently when state changed.
b/29870392
Change-Id: I7a5ef91091e547a930368286defc7ab96aeb9471
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)
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
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
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