By default, AVD animates on RT thread. But since in some cases there's a
need for a finer control on when the frame update for the animation should
happen, such as coordiating the AVD animation with other animations that
run on UI thread, we are providing a way to force the AVD to run on UI
thread.
Bug: 27278616
Change-Id: I372ecd3dc52e3fa0bdce3a1e9c19443f9b199027
Scaling is now manually applied when the canvas density is not set.
Removes set/getNinePatch accessors that were added in N, since these
are not used and setting the nine patch directly will break padding.
Also removes local NinePatch, which was not necessary.
Bug: 27038114
Change-Id: Ie8b2e485b54d1ed1521081b329a09915fd0a95c1
This is reverting the revert of what reverts the revert of the original
implementation. Fourth revert is a charm!
This reverts commit df7fdb1e0bdb5c289bbc08047e5c710185503309.
Change-Id: I6fc3a5accfd8b79c3da31bbc101ad9e9b4d6e7dd
-Only add animators to a RenderNode when its owning view is attached
-When changing animator's target RenderNode, remove the animator from
the old target RenderNode that it's currently running on, if any.
Bug: 27141983
Bug: 27145149
Change-Id: I9c9592382d64ecc0390f7ec743a59ce1ad7d9798
With ttc and gx variation fonts, it is now possible and common that a
number of fonts will use the same font file for data but with different
parameters. In the current code each font will map the font file data,
taking up an unecessary amount of virtual address space and is
inefficient with respect to memory management (like the tlb). This CL
deduplicates these file mappings so that a given font file will only be
mapped into memory once.
DO NOT MERGE
Change-Id: I5ca69f963a434c72ec4028402ecbf9e0f0ee7148
(cherry picked from commit fffcf0a31fd4c9a4ec8aa7de70b1eda0d48fb337)
This adds an 'axis' child element to the 'font' element. The 'axis'
element has attributes 'tag' (a four byte identifier) and 'stylevalue'
(a float value) to the parser. This also modifies reading the font file
name in a backwards compatible fashion by using only the direct #text
children of the 'font' element. (Both the Minikin and Skia parsers now
allow the font file name on a separate line in the fonts.xml file).
This information is then passed through to Skia in order to select the
desired variation. The Skia parser already parses this way and has for
some time, so Chrome and WebView can already read this format.
Change-Id: I15623fe864fa92b2bf0705af5e389daedfb77e5c
(cherry picked from commit b8e367fb7428076ff2e4aa2a97adaed1ef806e92)
Bug 24810682
There was no hover state for bounded ripples and it was decided
that a solid background color exactly like the focus state
was desired. This change triggers the RippleDrawable to act as
if it is focused when it is hovered.
Change-Id: I94b2a4d03dd4c47fc021c84bb0ba4b4be82f3e95
Also added API check so that for pre-N we ignore invalid VD animation,
in order to avoid breaking old apps.
Bug: 26975469
Bug: 26949340
Change-Id: I498539ad6a05de3d886e7dcdc8a167e78333ab11
- Remove the LocaleList#getPrimary() API. It had become confusing
after locale negotiation was completely implemented. For example,
it could create the confusion that calling getPrimary() on the
default locale list would provide the default locale, etc.
- Use the adjusted locale list from LocaleList.getAdjustedDefault()
in Paints created with no locale list provided.
- Change LocaleList#get() to treat out of bound indexes from both
negative indexes and too large indexes the same way.
Bug: 26984092
Bug: 26193251
Bug: 26834387
Change-Id: I75f77aea6b75e38793ed8477e5e5a4420d5e6d85
* changes:
Hide swipe-up gesture behind tuner flag
When long pressing recents and already docked, undock
More multi-window fixes
Use separate flag to suppress resizes
Only treat "null" bounds as fullscreen
Exclude stable insets from task config
Fix bug where surface was not clipped off during resizing
Fix crash in SysUI when configuration changes
When a app is in fullscreen, we exclude navigation bar and status bar
size when calculating the config. However, when in multi-window, and
the task was almost fullscreen, the height/width reported to the app
was actually larger than when it was in fullscreen. In order to fix
this, exclude the stable insets when calculating the task
configuration, and also fix a bug when calculating the screen layout.
Change-Id: I843ae012fb3050c79643d125550aacb6e73d27da
b/26949340 and b/26975469, b/26975079 as well
This reverts commit f276acd98457bcaabc9e79a17a736b3b484f005e.
Change-Id: I4b55177daf0d289bc03604c71fd4bf579f65073a
This CL runs VectorDrawable animation on RenderThread. The changes in this CL
include:
- Convert all the animators in AnimatorSet for AVD into a set of RenderNodeAnimators.
- Hook up the new animators with RenderThread
- Add drawOp in RecordingCanvas for drawing VD so that during the animation
on RenderThread, all the property changes on VD can be reflected on the screen.
TODO:
- Implement reverse and reset for AVD.
Change-Id: I2df1d754f2db0ad098d9c15dde4bb2bdfafc2315
Add ComplexColor interface for both GradientColor and ColorStateList.
Set up constant state, factory, theme attrs for GradientColor, while
refactoring the ColorStateList's similar code. (Functionality in CSL should
be the same).
Support themeing in both the root and item level in GradientColor.
For example, both startColor in <gradient> tag or color in <item> tag can
have theme color.
Add tests for both simple and complex cases with themeing etc.
Hook up the native VectorDrawable implementation using 2 extra JNI calls for
simplicity. Such calls only happen at inflate and applyTheme call.
b/22564318
Change-Id: Ibdc564ddb4a7ee0133c6141c4784782f0c93ce0e
There was an issue with some vector drawables, particularly those with more
than one underlying, sequential animators, where the final frame would not be
drawn when battery saver mode was enabled (or animators were set to have durations
of 0). This resulted in an incorrect fingerprint graphic on the lockscreen, because
the animation effectively didn't run at all.
The fix is to always invalidate whenever the AnimatedVectorDrawble draws itself. This
causes us to constantly invalidate() the view while the animation is running.
Issue #26591987 Fingerprint icon displayed as dots when batter saver mode is on
Change-Id: I13cbd71fd229db09418c6dcacfec5a13bbb44b2e
Uses consistent naming and ordering for padding and inset calculations.
Updates documentation to include UNDEFINED_INSET as public API, since we
return the value and will accept the value as a valid param. Flattens
out RTL logic for readability.
Change-Id: Ie704e2e5fc7f5763500ebe1217ddbbf4d0c5ef86