Commit Graph

1417 Commits

Author SHA1 Message Date
Romain Guy
d643bb56fd Correctly mark layers dirty when drawing WebView.
Change-Id: I7ae0c3cfa0916d8fbeaf01e8da127c621a06a0f4
2011-03-01 14:55:21 -08:00
Jeff Brown
33bbfd2232 Add support for mouse hover and scroll wheel.
Dispatch ACTION_HOVER_MOVE and ACTION_SCROLL through the View
hierarchy as onGenericTouchEvent.  Pointer events dispatched
this way are delivered to the view under the pointer.  Non-pointer
events continue to be delivered to the focused view.

Added scroll wheel support to AbsListView, ScrollView,
HorizontalScrollView and WebView.  Shift+VSCROLL is translated
to HSCROLL as appropriate.

Added logging of new pointer events in PointerLocationView.

Fixed a problem in EventHub when a USB device is removed that
resulted in a long stream of ENODEV errors being logged until INotify
noticed the device was gone.

Note that the new events are not supported by wallpapers at this time
because the wallpaper engine only delivers touch events.

Make all mouse buttons behave identically.  (Effectively we only
support one button.)

Change-Id: I9ab445ffb63c813fcb07db6693987b02475f3756
2011-02-25 17:06:07 -08:00
Chet Haase
53c7b1d544 Merge "ViewPropertyAnimator cancels prior animations" 2011-02-25 16:02:34 -08:00
Gilles Debunne
0277c17128 Merge "Code clean-up around ScrollView." 2011-02-25 13:48:19 -08:00
Chet Haase
ba592d2003 ViewPropertyAnimator cancels prior animations
The initial approach of VPA was to cancel previous animations
on the same exact set of properties. This worked in most cases,
but if the new animation had a different set of properties
(like animating alpha, x, and y instead of just x and y), then
there was a possible artifact as the old animation continued to
run in the background and could show the button in the wrong
location as a result.

The new approach is to search all running animations for
a property when a new animation is requested on it and to
remove that property from the list of properties being animated
by that previous animation. The prior animations continue to
run, but will no longer update that property, which will now be
controlled solely by the new animation requested.

Change-Id: Ib35d54a5e91be0a1310725be6e2acbaa6ead4a4e
2011-02-25 12:44:42 -08:00
Gilles Debunne
2ed2eacd7e Code clean-up around ScrollView.
Change-Id: Ia110f30279a93c96741e9afbd93ed6231aa97ef1
2011-02-25 11:01:49 -08:00
Chet Haase
a00f3865f5 Add ViewPropertyAnimator for easy animation of View properties
Change-Id: I2bc52ca16507d8d20004d2d6823e587791272aac
2011-02-25 06:47:53 -08:00
Adam Powell
78b1dc594e Merge "Ensure WebView passes a complete/in-order event stream to ScaleGestureDetector. Prerequisite for several ScaleGestureDetector bugfixes." 2011-02-24 17:19:20 -08:00
Romain Guy
a5364ee894 Add an API to control the distance between a View and its camera.
Change-Id: Ibaf4e7dc827933f7ad2bb7ab50c1dcef45fee83c
2011-02-24 16:49:47 -08:00
Adam Powell
e33cef8037 Ensure WebView passes a complete/in-order event stream to
ScaleGestureDetector. Prerequisite for several ScaleGestureDetector
bugfixes.

Bugfixes for ScaleGestureDetector.

Make ScaleGestureDetector properly support >2 pointers. Track the most
recent two pointers for scale gestures.

Change-Id: I966319ad438c1c8e1103f245b53b3862c2d4e3c0
2011-02-24 16:27:50 -08:00
Romain Guy
47b8adec39 Add a new Camera API to control the camera's location
Change-Id: Id9a082d2def803eb527e1987875e0d8a22c6e8aa
2011-02-23 19:51:42 -08:00
Gilles Debunne
0c4650b4d5 Merge "Cursor does not jump back to its previous position when IME is showed up." 2011-02-22 13:57:00 -08:00
Mike Lockwood
3c85a4e639 Merge "KeyguardManager: Add isKeyguardLocked() and isKeyguardSecure()" 2011-02-22 13:11:11 -08:00
Romain Guy
795e42e91a Merge "Add more info to View.getLayoutParams()" 2011-02-22 11:50:32 -08:00
Romain Guy
01c174bce3 Add more info to View.getLayoutParams()
Change-Id: I9abc64c9bbf726a02256a9ab692d9c555a6e3525
2011-02-22 11:51:06 -08:00
Jeff Brown
cc0c159e9b Add new hover move action and scroll wheel plumbing.
Added support for tracking the mouse position even when the mouse button
is not pressed.  To avoid confusing existing applications, mouse movements
are reported using the new ACTION_HOVER_MOVE action when the mouse button
is not pressed.

Added some more plumbing for the scroll wheel axes.  The values are
reported to Views but they are not yet handled by the framework.

Change-Id: I1706be850d25cf34e5adf880bbed5cc3265cf4b1
2011-02-19 06:14:21 -08:00
Jeff Brown
6f2fba428c Add new axes for joysticks and mouse wheels.
Added API on InputDevice to query the set of axes available.
Added API on KeyEvent and MotionEvent to convert keycodes and axes
to symbolic name strings for diagnostic purposes.
Added API on KeyEvent to query if a given key code is a gamepad button.
Added a new "axis" element to key layout files to specify the
mapping between raw absolute axis values and motion axis ids.
Expanded the axis bitfield to 64bits to allow for future growth.
Modified the Makefile for keyboard prebuilts to run the keymap
validation tool during the build.
Added layouts for two game controllers.
Added default actions for game pad button keys.
Added more tests.
Fixed a bunch of bugs.

Change-Id: I73f9166c3b3c5bcf4970845b58088ad467525525
2011-02-19 05:23:10 -08:00
Adam Powell
e7c943926d Merge "Add an API to listen for window attach/detach events on a View." 2011-02-18 15:17:16 -08:00
Adam Powell
4afd62b18c Add an API to listen for window attach/detach events on a View.
Fix bug 3312949 - inconsistent state in MenuPopupHelper

Change-Id: Ie802ada3f8de4cf71c92fcc7c6abce9ba85e7b75
2011-02-18 15:03:20 -08:00
Mike Lockwood
520d8bc1d8 KeyguardManager: Add isKeyguardLocked() and isKeyguardSecure()
BUG: 3402847

Change-Id: I725838c9d96617dd4497f9c80417cd623eceb846
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-18 13:27:02 -05:00
Gilles Debunne
ad8484b379 Cursor does not jump back to its previous position when IME is showed up.
Bug 3441308

This behavior may be restored for phones if appropriate.

Change-Id: Ibc2de587d64d372521da2d54f239cab56f04b407
2011-02-17 17:37:51 -08:00
Eric Laurent
e2ad901f4a Added bluetooth SCO stream to VolumePanel
This is a preliminary change to enable control of BLUETOOTH_SCO stream
volume while in a video chat with a bluetooth headset.
The complete change requires a new icon for BT SCO volume.

Change-Id: I6cd22f0c73d80a9b404b228650b9a30ef144cedc
2011-02-17 17:31:51 -08:00
Jeff Brown
45708bf2f0 Merge "Add support for arbitrary axes in MotionEvents." 2011-02-16 20:00:21 -08:00
Chet Haase
e9140a72b1 Fix invalidation bug with View bounds properties
When setLeft/Right/Top/Bottom() functions were called on View,
invalidation was only happening at the parent level. When an
app is hardware accelerated, this means that the view's display
list is not being recreated. So views that were changing size due
to these calls were not getting redrawn properly, causing some
artifacts in animations (especially LayoutTransition, which
calls these setters).

Fix is to invalidate the child instead of just the child's bounds
in the parent.

Change-Id: Ic8b2a5db519345dce617f914c2214738f22031b2
2011-02-16 16:30:21 -08:00
Jeff Brown
91c69ab015 Add support for arbitrary axes in MotionEvents.
This change makes it possible to extend the set of axes that
are reported in MotionEvents by defining new axis constants.

The MotionEvent object is now backed by its C++ counterpart
to avoid having to maintain multiple representations of the
same data.

Change-Id: Ibe93c90d4b390d43c176cce48d558d20869ee608
2011-02-15 19:14:37 -08:00
satok
9c4cc03a35 Add a method to check a string contained in ExtraValue of InputMethodSubtype
Change-Id: I34390537eaacd3ff8cfd336eaf5b9ca0d3e4b802
2011-02-15 17:53:58 +09:00
Christopher Tate
93a4dc6c3f Merge "Disable cross-app drag/drop" 2011-02-14 18:14:49 -08:00
Christopher Tate
7f9ff9d191 Disable cross-app drag/drop
@hides the View constant that designates a drag as cross-app, and also
forcibly ignores that flag on the system_server side even if it's passed
to startDrag() as a literal.

Change-Id: I6f321bdf0389db5bb44131fd0f8d6b92f049be52
2011-02-14 17:31:13 -08:00
Romain Guy
0211a0a10d Gracefully handle drawing caches allocation failure.
Bug #3431451

This bug was causing ListView to not render properly when showing an item
larger than the maximum drawing cache size. ListView relies on the drawing
cache to correctly mask all the background pixels. However, if the cache
is not properly created, the background will show through even though
ListView.isOpaque() == true. This change detects this case and falls
back to the default non opaque behavior.

Change-Id: I30a45e7a03fb7ebb2b12f0e85c075c2901954c44
2011-02-14 16:34:59 -08:00
Romain Guy
676b17391f Deprecate ARGB_4444.
It looks awful.
Don't use it.
Use ARGB_8888, it's much better.
If you think you need ARGB_4444, you are wrong.
You are.

Change-Id: I4d6963cf98b6a8fb34cebcd0d24b9fd66b5a0fbf
2011-02-14 14:45:33 -08:00
satok
7265d9bd6d Add sort method to InputMethodSubtype
Bug: 3364167

Change-Id: I94ad55b8eab49dc9b233dcb4e74429863b406fb4
2011-02-14 18:48:02 +09:00
Amith Yamasani
e3361b8d08 Fix over-eager locking of volume dialog's primary stream.
Bug: 3427027

Don't lock in the active stream if visual feedback was not requested.
This fixes a transient problem after the notification volume was modified
by an API call.

Change-Id: I2227d8fdf6cc565713d9bbcc66748805e04ae163
2011-02-10 18:20:50 -08:00
Glenn Kasten
8b4b97a14a Bug 3352047 Wrong message when adjusting volume
Add hidden AudioManager.getDevicesForStream and output device codes.

Change-Id: I4d1c1d3b6a077cd117720817d1f733dda557b947
2011-02-10 14:37:42 -08:00
Chet Haase
add6577a01 Fix animation and layoutTransition issues.
There were some subtle timing issues in animators with ending animations that
were not completely initialized (possibly because a startDelay'd animator
was ended before the delay elapsed).
Also, LayoutTransition had bugs around running a transition on a container
while a previously-started transition was still in progress. This could result
in some minor artifacts or crash bugs, depending on the durations and delays set
on the transition animations.

Change-Id: Ic6a69601f1ce9a55db15fff6b8ed25950b354491
2011-02-09 16:47:29 -08:00
Romain Guy
069ea0e31a Better handling of EGL_SWAP_BEHAVIOR_PRESERVED_BIT
Bug #3410832
Bug #3410834

Change-Id: I6025d6b7200e4d23e43f783e9401df13a13e7b63
2011-02-08 12:24:52 -08:00
Eric Laurent
3da2538aa1 am bdb23c26: am 2e96f15d: Merge "Fix issues 3425035 and 3423785." into honeycomb
* commit 'bdb23c26759089e29eb2f379e296bd006bc32b97':
  Fix issues 3425035 and 3423785.
2011-02-07 13:46:31 -08:00
Mike Cleron
85cabc2eb3 am 9cfa9c7a: am f6141980: Merge changes I46acd27a,I70b322e1 into honeycomb
* commit '9cfa9c7a3f5f23dec6ef4575407c1076d1b3c479':
  aa is better than cc
  Prevent ProgressBar from slowing down everything. bug #3422568
2011-02-07 13:41:21 -08:00
Eric Laurent
ced2c59678 am a37a81d7: am e6955f8e: Merge "Issue 3371080: fix VolumePanel in mute state" into honeycomb
* commit 'a37a81d705bd9abaf1110fecd176a74d32ac2016':
  Issue 3371080: fix VolumePanel in mute state
2011-02-07 11:40:51 -08:00
Amith Yamasani
9edc5c056f am 9589ac6c: am 823fbbba: Merge "Expanded volume panel with sliders and mute buttons." into honeycomb
* commit '9589ac6c3f63a632e078adcc8ef742412af2014c':
  Expanded volume panel with sliders and mute buttons.
2011-02-07 11:36:32 -08:00
Eric Laurent
bdb23c2675 am 2e96f15d: Merge "Fix issues 3425035 and 3423785." into honeycomb
* commit '2e96f15d8c6608c6bcb49c73fe13078a57245b28':
  Fix issues 3425035 and 3423785.
2011-02-04 14:08:25 -08:00
Eric Laurent
402f7f2963 Fix issues 3425035 and 3423785.
- Make sure that STREAM_MUSIC is affected by ringer mode on non voice capable
devices whatever the saved settings say.

- Added a hidden method to AudioManager for VolumePanel to override
the stream selection logic while the panel is showing.

Change-Id: Ib2ff2a7af63decb4e29c45700c41e5058f79d877
2011-02-04 12:39:14 -08:00
Mike Cleron
9cfa9c7a3f am f6141980: Merge changes I46acd27a,I70b322e1 into honeycomb
* commit 'f6141980c84f64618f083297bc37cfae7e0fca84':
  aa is better than cc
  Prevent ProgressBar from slowing down everything. bug #3422568
2011-02-03 21:19:33 -08:00
Mike Cleron
f6141980c8 Merge changes I46acd27a,I70b322e1 into honeycomb
* changes:
  aa is better than cc
  Prevent ProgressBar from slowing down everything. bug #3422568
2011-02-03 21:17:09 -08:00
Eric Laurent
a37a81d705 am e6955f8e: Merge "Issue 3371080: fix VolumePanel in mute state" into honeycomb
* commit 'e6955f8e38dfe7c0d748c3b55bbcfc5640c968c5':
  Issue 3371080: fix VolumePanel in mute state
2011-02-03 19:38:27 -08:00
Eric Laurent
d72d51c77a Issue 3371080: fix VolumePanel in mute state
VolumePanel must take stream mute state into account before displaying
the update stream volume.

Change-Id: I03a1697c25fca3fa56f892e3d426d00906abeb79
2011-02-03 18:47:47 -08:00
Michael Jurka
bb01f8a2d0 am d51e0820: am 8275c608: Merge "adding fast setters for translationx/y" into honeycomb
* commit 'd51e0820b3b7a71f2b3e0447bdf05188588c6003':
  adding fast setters for translationx/y
2011-02-03 18:08:17 -08:00
Romain Guy
8b113cf6d7 am cb2c84fd: am 3b66e43e: Merge "Refresh display lists when turning off layers rendering. Bug #3420565" into honeycomb
* commit 'cb2c84fd81a0891071e8ed0237927ad785751850':
  Refresh display lists when turning off layers rendering. Bug #3420565
2011-02-03 18:08:03 -08:00
Romain Guy
2f57ba56b3 Prevent ProgressBar from slowing down everything.
bug #3422568

Change-Id: I70b322e140a8fdbe504c6984c54a22bcb7b753e7
2011-02-03 18:03:29 -08:00
Romain Guy
b0905c998d am 20bf23e5: am ac14db72: Merge "Fast transform properties setters. Bug #3413510" into honeycomb
* commit '20bf23e5e4172f5f80ce6c4cc16168355b107f0d':
  Fast transform properties setters. Bug #3413510
2011-02-03 17:17:21 -08:00
Romain Guy
9bd32c235d am 109da7df: am 5bfd1aff: Merge "Allocate layers from the layers pool. Bug #3413433" into honeycomb
* commit '109da7dfd4c0766274b17467880ee673c731735c':
  Allocate layers from the layers pool. Bug #3413433
2011-02-03 17:16:19 -08:00