Set the bounds on the drawable before getting the view outline for
shadow. Also, reuse the temp outline object in AttachInfo rather than
allocating a new one each time.
Change-Id: I69793d38d60c5b9f9050569f2b22fbc7b90620bf
Duration scale based on screen size was using the area of the screen
excluding system bars to compare with our reference device's screen
size. This caused the following issues:
1) On baseline device (i.e N5) a scaling factor that is not 1 will be
applied to the duration.
2) Scaling on the same device will be different in landscape vs.
portrait, as the system bars take different amounts of space in
different orienations.
This CL fixes both of the above issues.
Bug: 20309042
Change-Id: I9d1d0a471d968bee1330b80f0f69a0066d6a1860
The DisplayEventReceiver and SensorManager event queue both get
leaked when the Looper thread they are attached to dies because
the Java object holds a strong reference to its native peer and
meanwhile the native peer holds a strong reference to the Java
object through JNI.
Fixed the issue by indirecting through a weak reference as was
done for InputEventReceiver some time ago.
Bug: 12455729
Change-Id: I3d80a2a190192d1a2981bf5ae0cad30f0f7688a5
This change allows clients to add temporary (transient) views to a
list of such views in any layout container. These views will be drawn at
the specified index when the container is being rendered, but will otherwise
not participate in the normal events of child views, such as focus,
input, and accessibility. The purpose of this functionality is to
enable better animations when views have been removed, such that clients
can add them back into containers temporarily while an animation runs,
then remove them when the animation finishes. This functionality is similar,
albeit a subset, of the what ViewGroupOverlay provides, but this API
allows clients to interleave these views with the other children in
the container, which allows correct drawing order. ViewGroupOverlay,
and the older internal mechanism used by the old animation package,
draw all of their views after a container is drawn, which pops
these temporary views on top of the other children in the container.
Issue #18621099 Enable View overlay to respect elevation and shadows
Change-Id: I530df69b406aa27b9f551f5724384f4dd1215a6f
When a view doesn't call setMeasuredDimension, note the view ID
and class name as part of the exception message.
Bug 18037248
Change-Id: I1c5ed823378ad92a067801dc8c3be31b07c6f463
Hand-waves the default interpolators for efficiency's sake until we can
implement interpolator caching or preloading.
Change-Id: Ibc618a0c092b08a33fb91265ec15665c94831b6b
These four new navigation keycodes are intended to be used to
navigate a tree hierarchy or list of items. They should be used to
allow the user to advance forward or backward within a list of
sibling items, expand the currently selected item to navigate the
item's children, or back out from the current item to its parent
item or state.
Change-Id: Ie2b85b3e4c682b0698599d7bcf64a53f6a52d776
Added two new options to the wm command.
1. Set the screen size based on dips rather than pixels using the
current screen density.
eg. adb shell wm size 320dpx320dp
2. Disable automatic scaling of the contents of the display.
When combined with the previous command, this is useful for seeing
how the UI would behave if the screen remained at its current density
but changed physical size.
eg. adb shell wm scaling off
Bug: 19899223
Change-Id: I545f893ba4861494e995cf0457ebeba1050d28dc
Guard a call to a new method for Window.Callback for apps that have
provided their own preexisting implementations of this interface. Fall
back to the older, 0-arg method if this is the case.
Bug 20254504
Change-Id: If8a731c36de43b333e63455d78376af32ccb86ea
TYPE_APPLICATION_ABOVE_SUB_PANEL will be displayed on top of their
attached window and any TYPE_APPLICATION_SUB_PANEL panels.
Bug: 20135562
Change-Id: I711de3c19c01432c44de205bf09934a8b23b53fd
If there is a listener and the user touches the screen with the stylus
and presses the stylus button, onStylusButtonPress is called.
Bug: 19620479
Change-Id: If9246436ee465fd7299d0efb2d2f934944f59971
Switch a few places to using android::canvas
instead of SkCanvas as well which eliminated
some JNI
Change-Id: I8f98b56442a06362b82b984cd1bd3a92398d8dbc
Simplify DisplayList / RenderNode state management in
View#draw (the ugly one).
Now, we simply differentiate between drawing with a RenderNode, and
drawing without it. This is because we expect drawing a view while
detached, or to a SW canvas should function the same.
Change-Id: I8b519222b651c4ec8211071c0a7b9b70b0a6a5cf
The current firstStrong value of textDirection is locale-dependent,
and can create problems when consistent display of text across
locales of potentially different direction is desired.
This adds two new values for textDirection, firstStrongLtr and
firstStrongRtl, which don't use the locale or the view's direction as
fallback, but explicit values of LTR or RTL.
Using firstStrongLtr also guarantees the exact algorithm defined in
the Unicode Bidirectional Algorithm to be used for determining
direction.
Bug: 13428339
Change-Id: I450d4f6b5197763ace7f9506c72cf87a90da4218