Commit Graph

4350 Commits

Author SHA1 Message Date
Svetoslav
c6eeacd934 am c38bc5ab: Merge "Lockscreen widgets not always announced." into jb-mr2-dev
* commit 'c38bc5ab6b55804c7a8d440cf2bf249baa2efc98':
  Lockscreen widgets not always announced.
2013-04-25 16:57:56 -07:00
Michael Wright
f652551b3b am b044c40c: Merge "Fixed javadoc in input related classes" into jb-mr2-dev
* commit 'b044c40c154ba8abe62154608812ad87993ca0d8':
  Fixed javadoc in input related classes
2013-04-25 16:57:52 -07:00
Svetoslav
c38bc5ab6b Merge "Lockscreen widgets not always announced." into jb-mr2-dev 2013-04-25 21:49:00 +00:00
Michael Wright
b044c40c15 Merge "Fixed javadoc in input related classes" into jb-mr2-dev 2013-04-25 21:43:03 +00:00
Svetoslav
4293e233dc Lockscreen widgets not always announced.
1. The accessibility events for switching a widget were dispatched
   before we update the important for accessibility property. We
   were lucky to get events in some cases since the pages in the
   pager had alpha grater than zero, i.e. the page was already
   set as important for accessibility, due to a running animation.

2. Accessibility focus clear event not fired if we give focus to
   another view. The old focus was correctly cleared just the
   events were not dispatched.

bug:8599670

Change-Id: Ia2647d77eaa4e10fbaf3a047dc9ea5b728f9c3c3
2013-04-25 13:25:11 -07:00
Michael Wright
072137c80a Fixed javadoc in input related classes
Change-Id: Ie415f812a0f473488d74119dab18296a488db6b9
2013-04-24 20:41:20 -07:00
Chet Haase
6b4d0f2110 am 42689769: Merge "Document behavior and usage of ViewGroup.bringChildToFront()" into jb-mr2-dev
* commit '4268976929979ffcc54122f8090c39a8c6799273':
  Document behavior and usage of ViewGroup.bringChildToFront()
2013-04-24 14:58:38 -07:00
Chet Haase
0187a5d424 Document behavior and usage of ViewGroup.bringChildToFront()
A call to ViewGroup.bringChildToFront() or View.bringToFront()
(which delegates to the parent's bringChildToFront() method) needs
to be followed by a call to requestLayout() and invalidate() on the
parent container in order for the changes to
actually happen. That is, the order of the child views would change, but
the parent container would not run layout or even invalidation without
being told to, so there would be no visible change until something else
caused a layout and invalidation to occur.

This change clarifies this requirement in the javadocs.

Issue #8667065 bringtoTop does not work

Change-Id: Ibe41a6318dddf9fb79382e1c9fd1d21ab4510976
2013-04-24 12:37:36 -07:00
Svetoslav
939ff0acff am 4c783066: Merge "Fixing bugs exposed when moving accessibility CTS tests to UiAutomation." into jb-mr2-dev
* commit '4c78306617dd67b92fdf19101c5dfde4e21172d9':
  Fixing bugs exposed when moving accessibility CTS tests to UiAutomation.
2013-04-23 18:07:04 -07:00
Svetoslav
4c78306617 Merge "Fixing bugs exposed when moving accessibility CTS tests to UiAutomation." into jb-mr2-dev 2013-04-24 01:05:38 +00:00
Svetoslav
db7da0eb8b Fixing bugs exposed when moving accessibility CTS tests to UiAutomation.
1. UiAutomation#executeAndWaitForEvent method was invoking the passed
   runnable while holding the lock which may lead to a deadlock. For
   example: a runnable that calls getActivity() gets us into a state
   like this.

2. UI automation services did not get all capabilities such a
   service can have. Now a UI test service gets all of them.

3. When UiAutomation was exiting for event fired as a result of a
   performed action, it was checking whether the received evnet time
   is strictly before the time of executing the command that should
   fire the event. However, if the execution is fast enough, i.e.
   less than one millisecond, then the event time and the execution
   time are the same. This was leading to a missed signal in rare
   cases.

4. AccessibilityNodeInfoCache was not clearing the relevant state
   for accessibility focus clearing event.

5. Accessibility text traversal in TextView was partially using text
   and partially content description - broken. Now we are using the
   text since for text view and content desc for other views. In other
   words, we are using the most precise text we have.

6. AccessibilityManagerService was not granting capabilities of a
   UiAutomation service - plainly wrong.

CTS change:https://googleplex-android-review.googlesource.com/#/c/300693/

bug:8695422
bug:8657560

Change-Id: I9afc5c3c69eb51f1c01930959232f44681b15e86
2013-04-23 17:44:00 -07:00
Chet Haase
393abb1c54 am 5e650cef: Merge "Expand invalidation rectangle when clipChildren == false" into jb-mr2-dev
* commit '5e650cef53cf1eb33f9c8b2f8e5c8b1bb24b32d9':
  Expand invalidation rectangle when clipChildren == false
2013-04-23 03:52:28 -07:00
Michael Wright
585000515f am 5fe6e4c4: Merge "Rewrite input handling for native applications" into jb-mr2-dev
* commit '5fe6e4c4c9de523fa9e74902473996ce5ee8b298':
  Rewrite input handling for native applications
2013-04-23 03:51:53 -07:00
Svetoslav
7bf02d1255 am a61464d7: Merge "Making new node id APIs return strings." into jb-mr2-dev
* commit 'a61464d7adc26c291a5f9de48c9aff8b76a56b1f':
  Making new node id APIs return strings.
2013-04-23 03:51:50 -07:00
Chet Haase
5e650cef53 Merge "Expand invalidation rectangle when clipChildren == false" into jb-mr2-dev 2013-04-23 02:50:54 +00:00
Michael Wright
5fe6e4c4c9 Merge "Rewrite input handling for native applications" into jb-mr2-dev 2013-04-23 00:04:44 +00:00
Michael Wright
a44dd26a75 Rewrite input handling for native applications
Bug: 8473020
Change-Id: Ic4353d8924ab877bec21aff8c2dba9fe725bf906
2013-04-22 17:01:51 -07:00
Svetoslav
9fa1ee563b Making new node id APIs return strings.
The node id does not have to be decorated with spans like spannable
so it makes no sense to have these APIs use anything else but string.

bug:8657338

Change-Id: I2e7c31128ee9f2933bd0d58beac4ba31a498bb09
2013-04-22 12:43:07 -07:00
Chet Haase
a4f14ebe29 Expand invalidation rectangle when clipChildren == false
The current invalidation logic does not take into account the clipChildren
flag. When this flag is set to false on a container (an uncommon but
possible case), it is possible for views in the child hierarchy of
the container to be draw outside of the container's bounds. But invalidations
on that view hiearrchy can be clipped to the container's bounds, causing us to
not redraw views outside of those bounds.

Fix is to expand the dirty rect of an invalidation to encompass the complete
bounds of any container with clipChildren==false.

Issue #680037 Some transform combinations can leave old pixel values on the screen

Change-Id: I426beee15d04145fac2f6b4203748ae309e392b4
2013-04-22 11:11:39 -07:00
Michael Wright
076e1f4c56 am abc2763e: Merge "KeyEvent: update comment"
* commit 'abc2763e4587c3326d160f25666e933cc6888884':
  KeyEvent: update comment
2013-04-20 22:43:56 -07:00
Chet Haase
339ac85483 Merge "Fix quickReject logic to account for setClipChildren() setting" into jb-mr2-dev 2013-04-20 21:02:21 +00:00
Chet Haase
dd671599be Fix quickReject logic to account for setClipChildren() setting
The rendering code optimizes by rejecting drawing operations that
lie outside of the bounds of their views. This works in most
situations, but breaks down when containers have called
setClipChildren(false), because we reject drawing that is outside
of that container, but which should be drawn anyway.

Fix is to pass in the value of that flag to the DisplayList drawing
routines which take that flag into account when deciding whether
to quickReject any particular operation.

Issue #8659277 animation clipping

Change-Id: Ief568e4db01b533a97b3c5ea5ad777c03c0eea71
2013-04-19 15:36:37 -07:00
Craig Mautner
c1876b256c Merge "Improve javadoc for rotationAnimation." into jb-mr2-dev 2013-04-19 21:30:21 +00:00
Craig Mautner
bdcc9a5811 Improve javadoc for rotationAnimation.
Clarified use of rotationAnimation. Did not add a comment
for ROTATION_ANIMATION_CHANGED as that would be inconsistent
with the other twelve <parameter>_CHANGED flags that it
follows in the source code.

Fixes bug 8657715.

Change-Id: I03b5caf3d6a93ca0044f58485c94c7a600e835a8
2013-04-19 13:08:47 -07:00
Fabrice Di Meglio
2623a24ffa Merge "Fix bug #8654490 android:paddingStart doesn't override android:paddingLeft" into jb-mr2-dev 2013-04-19 17:56:22 +00:00
Ying Wang
4e0eb22fdf Fix doc build.
Change-Id: Ibf0d998721a2851c31529d5b44bf86b1b3df5791
2013-04-18 20:39:48 -07:00
Fabrice Di Meglio
1ae3b6aedd Fix bug #8654490 android:paddingStart doesn't override android:paddingLeft
- in RTL mode only and if you have left/start or right/end at the same time,
the initial left/right padding (coming from the background drawable or from
some explicit definition) was still used.

- now, override the background left/right initial pading by the left/right one
only and only if there is no start/end padding defined at the same time
(because when start/end are defined, we do not care about left/right padding
except the background ones)

Change-Id: Icc6e69c95ace1307b0c5e9673cbdf3b611b62733
2013-04-18 18:23:01 -07:00
Mathias Agopian
bb7b315cdd Merge "add javadoc for SurfaceView {unL|l}ockCanvas{AndPost}()" into jb-mr2-dev 2013-04-18 01:29:07 +00:00
Chet Haase
bc09a364c3 Merge "Fixes for setClipBounds()" into jb-mr2-dev 2013-04-17 22:13:50 +00:00
Mathias Agopian
9ddf32aa8a add javadoc for SurfaceView {unL|l}ockCanvas{AndPost}()
Bug: 8593591
Change-Id: I152281ddca8716aee97147cb1b3fb483ed46b053
2013-04-17 15:04:47 -07:00
Chet Haase
8bba7510bc Fix build - remove obsolete import of Animatable
Change-Id: I3133669386f50177c863f8a58733be771f819a17
2013-04-17 06:44:08 -07:00
Chet Haase
21f9a3608d Fixes for setClipBounds()
The invalidate region when the clip bounds are set needs to encompass both
the old clip bounds and the new bounds, to make sure that the right area
of the view gets erased as well as drawn.

Also, we need to keep our own internal copy of the bounds, not just use the
instance passed into the setter.

Issue #8634060 setClipBounds() problems

Change-Id: I123c49cff16e3debe8866974a5612a4efd010de4
2013-04-16 17:57:11 -07:00
Chet Haase
b2488931cb Merge "Avoid repositioning unattached overlay views" into jb-mr2-dev 2013-04-16 17:58:37 +00:00
Chet Haase
face742d31 Avoid repositioning unattached overlay views
Adding a view to an overlay usually entails removing the
view from its current parent, if it has one. ViewOverlay.add() will
do this automatically. At the same time, it will check to see whether
the parent view is in a different global location than the overlay's
host view, and will adjust the added view accordingly. This enables
the caller to simply toss a view into an overlay and have it end up
at the same global position on the screen.

the problem is that the current code doesn't bother to check whether
the old parent is attached. If that parent has been removed from the
view hierarchy before this overlay operation, then it will show up as
being at (0,0) in the window, not its old location. This results in the
view being mis-positioned in the overaly.

Fix is simple: if the view's old parent is not attached, simply remove
it from that parent before adding it to the overlay; don't try to compensate
for its position which is based on wrong information.

Issue #8620319 Overlay should only use relative window locations for onscreen parents

Change-Id: I414038a6c355dfd58f9766b007ac44d535ef1889
2013-04-15 15:15:59 -07:00
Dianne Hackborn
1c5383ce0b Fix issue #8512015: VideoView's window animates when its position changes
Change-Id: I79eee6b9672b7d72eabe5d20be639c05a6f3d72b
2013-04-15 15:07:21 -07:00
Chirayu Desai
61c37ae7ca KeyEvent: update comment
Change-Id: I1ea491e7e23670bf0ea83392710010b557803178
2013-04-15 20:12:30 +05:30
Mathias Agopian
1763d6f957 Merge "always trigger a re-draw when updating the transparent region hint" into jb-mr2-dev 2013-04-13 00:28:16 +00:00
Svetoslav
72ab9b8017 Merge "Respect custom view drawing order when dispatching hover events." into jb-mr2-dev 2013-04-13 00:14:56 +00:00
Mathias Agopian
54e3d38490 always trigger a re-draw when updating the transparent region hint
since SF now relies on receiving a frame for latching the
transparent region hint, we make sure we will indeed redraw
something.

Bug: 8581533

Change-Id: Ia12ddf5654a7deeac7628b799bfde4b8c16c992b
2013-04-12 17:01:44 -07:00
Svetoslav
0e5e9aa8e5 Respect custom view drawing order when dispatching hover events.
1. The event dispatch methods should respect the child drawing order.
   Hover event dispatch in ViewGroup was not repsecting this order.

bug:8606799

Change-Id: Ie2fd3aff1292c21df23a04ca0aa03a97813c44ef
2013-04-12 16:59:03 -07:00
Chet Haase
0a41431d69 Merge "API and doc cleanup, plus small animation/UI features" into jb-mr2-dev 2013-04-12 22:18:24 +00:00
Chet Haase
430742f090 API and doc cleanup, plus small animation/UI features
Adding features which round out the animation APIs (missing
getters, etc.). Also fix doc typos.

Issue #8350510 Add APIs needed for future animation capabilities

Change-Id: I063736848ba26e6d6c809b15fc3a103c74222f46
2013-04-12 13:44:22 -07:00
Craig Mautner
d5e7b8bfb4 Merge "Clear test rectangle if previous focus is null." into jb-mr2-dev 2013-04-12 19:02:06 +00:00
Craig Mautner
26a84dfdd0 Clear test rectangle if previous focus is null.
A bug in FolderEditText or DynamicLayout (b/8600683) was causing
the 'rectangle' parameter passed to scrollToRectOrFocus() to be
roughly 1000 feet to the right of the screen.

This bug is normally masked because the focus found in
mLastScrolledFocus never matches the new focus and consequently
the misleading 'rectangle' is nulled. However, on the first
time in to scrollToRectOrFocus when returning to Launcher
from another app, mLastScrolledFocus is null and the code
skips over the place where 'rectangle' is nulled. Without this
clearing it was determined that 'rectangle' was outside the viewable
area and scrolling not required. This is bug 8547155.

This change causes even null values of mLastScrollFocus to be
compared to the new focus thus masking the bug in all situations.
Bug 8600683 will be fixed in a separate CL.

Fixes bug 8547155.

Change-Id: Ic6cb22c42b0e93a9793dd2babc25727c2ba29155
2013-04-11 19:33:54 -07:00
Michael Wright
b9618523ad Send joystick key repeat messages to correct handler
Change-Id: I7f8dbe21c9088553ad2c5efe70585f516ab78141
2013-04-10 15:20:56 -07:00
Romain Guy
5180ed141d Merge "Instrument views inflation in systrace" into jb-mr2-dev 2013-04-10 21:07:09 +00:00
Romain Guy
09f7b93a18 Instrument views inflation in systrace
Change-Id: If3cd80bc430893c701432f165b4c1f5943a4143c
2013-04-10 11:42:44 -07:00
Chet Haase
dacd475163 Merge "Fix Contacts animation jank" into jb-mr2-dev 2013-04-10 17:49:56 +00:00
Chet Haase
58d110afa0 Fix Contacts animation jank
The last frame of an animation stays stuck on the screen for a couple of frames.
Specifically, the "Quick Contact" animation that animates the picture
closed (fades/scales it away) animates all the way to the end... then hangs there
briefly before being taken down.

The problem is a rendering bug where we correctly detect that a DisplayList
has nothing to draw (since the last frame is completely transparent, alpha==0),
but incorrectly ignore the fact that we cleared the transparent-background
window prior to not-drawing that DisplayList. When we detect that there's
nothing to draw, we don't bother swapping buffers. So even though we drew
the right thing (clearing the buffer), we didn't actually post the buffer to the
screen.

This change factors in both the clear and the draw to decide when to swap buffers.

Issue #8564865 Quick contact close animation jank redux

Change-Id: Ib922cff88a94f025b62f7461c1a29e96fe454838
2013-04-10 07:43:29 -07:00
Jeff Brown
4dac901f01 Rewrite touch navigation dpad synthesis.
The new implementation more accurately tracks the velocity
of flings and takes care to avoid obvious discontinuities.
The main goal is for a fling to appear to be a linear
extension of the movement already in progress.  The minimum
fling velocity is set to ensure that flings appear to be
fairly smooth despite being discretized.

Use sequences of repeated key events instead of individual
down/up events to represent continuous motions in one
direction which can be helpful for stopping flings at boundaries
such as when flinging the cursor position within a text view.

Compute the movement thresholds based on the physical
size of the touch pad, if known.  If not known, we assume a
nominal size.

Support stopping flings with a tap just like we do for
normal touch events elsewhere in the framework.

Moved the detection of ASSIST swipes into the InputReader
where it belongs.  These swipes must be detected globally
to ensure consistent behavior across the all applications.

Added a custom protocol in EventHub to enable input device
drivers to override the timestamp of the following events
in a packet.  This change enables input device drivers
that have a better idea of when an input event was actually
generated to pass this information to the input system.
Particularly useful with uinput.

Bug: 8583760
Change-Id: I8ef4e827804786d549cfaa00793a2b9dd0fda465
2013-04-10 03:51:18 -07:00