21673 Commits

Author SHA1 Message Date
Jeff Brown
af9e8d3818 Notify applications when input devices change.
This change allows the InputManager to keep track of what input
devices are registered with the system and when they change.
It needs to do this so that it can properly clear its cache of
input device properties (especially the key map!) when changes
occur.

Added new API so that applications can register listeners for
input device changes.

Fixed a minor bug in EventHub where it didn't handle EPOLLHUP
properly so it would spam the log about unsupposed epoll events
until inotify noticed that the device was gone and removed it.

Change-Id: I937d8c601f7185d4299038bce6a2934fe4fdd2b3
2012-04-12 18:54:54 -07:00
Adam Powell
db13a6bf78 Merge "Invalidate for scrolling animations on the animation timer" 2012-04-11 15:22:37 -07:00
Jeff Brown
879392fe31 Merge "Unhide new animation runnable API on View." 2012-04-11 15:19:31 -07:00
Chris Craik
cae80b2563 Merge "Unify composited layer/base layer draw path" 2012-04-11 14:26:11 -07:00
Jeff Brown
4d6a82d79e Unhide new animation runnable API on View.
Change-Id: Id626688d6c7d632c01d9897777c854cb601d3301
2012-04-11 14:23:51 -07:00
Adam Powell
df3ae4f3ae Invalidate for scrolling animations on the animation timer
Change View methods awakenScrollBars and scrollTo to post their
invalidation on the animation timer. Since these are often used in
computeScroll or similar to continue scrolling or flinging it should
not prevent other posted events from being processed before the frame
is actually drawn. (All changes in scroll position, etc. are
immediately reflected after the calls and do not need a draw to
present correct data about scroll position to apps.)

Don't accumulate floating point error while dragging
ScrollView/HorizontalScrollView.

Change-Id: I05b57d75f89a806488e46a8fb79b85d80f56d45d
2012-04-11 13:01:24 -07:00
Amith Yamasani
cc43a7216f Merge "Fix a race condition in SyncManager.onAccountsUpdated()" 2012-04-11 12:17:01 -07:00
Amith Yamasani
f29f2369cf Fix a race condition in SyncManager.onAccountsUpdated()
Get the full list of accounts from AccountManagerService in one shot
instead of getting them per user.

Bug: 6263091

Change-Id: I488f24749a96281ef1e2a620820399c97f471024
2012-04-11 10:29:18 -07:00
Jeff Brown
9f25b7fdf2 Request key maps from input manager service.
Instead of each application loading the KeyCharacterMap from
the file system, get them from the input manager service as
part of the InputDevice object.

Refactored InputManager to be a proper singleton instead of
having a bunch of static methods.

InputManager now maintains a cache of all InputDevice objects
that it has loaded.  Currently we never invalidate the cache
which can cause InputDevice to return stale motion ranges if
the device is reconfigured.  This will be fixed in a future change.

Added a fake InputDevice with ID -1 to represent the virtual keyboard.

Change-Id: If7a695839ad0972317a5aab89e9d1e42ace28eb7
2012-04-10 18:23:58 -07:00
Mangesh Ghiware
54ae14749b Merge "On double-tap, simply zoom in if content is too wide." 2012-04-10 18:00:06 -07:00
Adam Powell
b874e5ba81 Merge "Avoid potential leaks with Runnables posted from ProgressBar" 2012-04-10 17:58:25 -07:00
Adam Powell
a050663feb Avoid potential leaks with Runnables posted from ProgressBar
Bug 6093695

Handle pending progress updates when a view is not attached when the
view becomes attached again. Batch pending progress updates together
rather than posting separate runnables for each.

Change-Id: I5dea671d5b9fbe1302912ca4734a63955e77ff4d
2012-04-10 17:52:13 -07:00
Mangesh Ghiware
518e83b8c6 On double-tap, simply zoom in if content is too wide.
Bug: 6257654
Change-Id: I6963476300619d6f0d6af46630f9a86d95ad0dfc
2012-04-10 17:42:49 -07:00
Chris Craik
00ed0fd27f Unify composited layer/base layer draw path
Multiple paths were redundant, as they both synchronized the layers, and drew
the base if needed.

Depends on external/webkit change: https://android-git.corp.google.com/g/#/c/179965/

Change-Id: I1c355510f6edda4631190f2d26df8171e795a6ac
2012-04-10 17:29:35 -07:00
Dianne Hackborn
9944ecd28e Hide the callback for activity animation options.
Not something I want to be stuck reporting forever.

Change-Id: Iab13fb7abb23d466492230242bfbae29f1fd01f3
2012-04-10 15:54:19 -07:00
Dianne Hackborn
2a854c13f8 Merge "Some small tweaks to improve memory management." 2012-04-10 15:25:43 -07:00
Dianne Hackborn
162bc0ea0d Some small tweaks to improve memory management.
We now allow processes that currently have stopping activities to
be managed as if they were done stopping, so that memory trimming
can be done before the process goes to the background.  Hopefully
this will reduce cases where the processes goes to the background
and immediately gets killed, but wouldn't have had to be killed if
it had a chance to trim its memory.

Also change window memory trimming to always do the aggressive
trimming when memory is critical, even if not on a low-end device.

And tweak web view trimming to not trim for foreground UI events.

Change-Id: I241b3152b52d09757bd14a202477cf69c9b78786
2012-04-10 14:43:58 -07:00
George Mount
1bee28f4c8 Merge "Revert "Revert "Keep selection handles in edit fields.""" 2012-04-10 14:23:07 -07:00
George Mount
7102eb2d30 Revert "Revert "Keep selection handles in edit fields.""
This reverts commit 90c08eafad72454a31282fd887ec23d357c904a4
2012-04-10 13:41:51 -07:00
Gilles Debunne
34ec2b54da Removed exception from SpannableStringBuilder
Bug 6312196

Change-Id: I9cece36b40d8948e0e85bd433954818991009ad5
2012-04-10 13:31:11 -07:00
George Mount
f5711ab0fe Merge "Revert "Keep selection handles in edit fields."" 2012-04-10 13:16:03 -07:00
George Mount
90c08eafad Revert "Keep selection handles in edit fields."
This reverts commit 5d84368a7577c5d53ce885cd2d095cc5ba40d924
2012-04-10 13:14:48 -07:00
George Mount
ad0ef21011 Merge "Keep selection handles in edit fields." 2012-04-10 12:33:58 -07:00
Gilles Debunne
d3ce6f50c1 Merge "Faster and simpler replace in SSB, take two" 2012-04-10 11:00:57 -07:00
Dianne Hackborn
79af6063d5 Merge "Hide the optional permission stuff, not making it in to JB." 2012-04-10 10:31:28 -07:00
Daniel Sandler
c38cf4c7db Merge "New Android Dreams architecture, disabled for now." 2012-04-10 05:33:07 -07:00
Jesse Hall
3da2dc9d4c Merge "Release the scratch pbuffer surface after use" 2012-04-09 22:41:04 -07:00
Gilles Debunne
0249b43f6c Faster and simpler replace in SSB, take two
This is a new version of CL 179343 which had to be reverted.

This problem of the previous CL is that the ComposingSpan that
was part of the replacement text was correctly added during the
replace but was immediately removed because it had a zero-length
size.

Swapping the add and remove blocks solves the problem.

The new non-zero length enforcement also revealed a bug in the
spell checker where we were creating useless range spans.

Change-Id: I59cebd4708af3becc7ab625ae41bc36837f1a1cf
2012-04-09 16:08:37 -07:00
George Mount
5d84368a75 Keep selection handles in edit fields.
Bug 6264769
 Webkit Change: Ie937a8c55da0f8aef66cfcee11beb961669b7168

Change-Id: I9ee89f8b1d4e6954092b8c4d677fb75b79354b36
2012-04-09 15:49:03 -07:00
George Mount
d408048641 Remove composing span after setting text.
Bug 5070241

Change-Id: I8cf7e5f119c7a828df603e91ba4bcf0f571bbc72
2012-04-09 15:46:55 -07:00
Gilles Debunne
425c726ae0 Merge "More minor refactoring in SpannableStringBuilder" 2012-04-09 13:27:11 -07:00
Victoria Lease
63b81472a3 Merge "Make WebView.findAllAsync() and WebView.setFindListener() public." 2012-04-09 13:14:28 -07:00
Daniel Sandler
7d276c377c New Android Dreams architecture, disabled for now.
Rather than normal Activities (which have a host of problems
when used for this purpose), screen savers are now a
special kind of Service that can add views to its own
special window (TYPE_DREAM, in the SCREENSAVER layer).

Dreams are now launched by the power manager; whenever it is
about to turn the screen off, it asks the window manager if
it wants to run a screen saver instead. (http://b/5677408)

Also, the new config_enableDreams bool allows the entire
feature to be switched on or off in one place. It is
currently switched off (and the APIs are all @hidden).

Change-Id: Idfe9d430568471d15f4b463cb70586a899a331f7
2012-04-09 15:33:26 -04:00
Victoria Lease
0b8413bbeb Make WebView.findAllAsync() and WebView.setFindListener() public.
Deprecate WebView.findAll() while we're at it.

Bug: 6052412
Change-Id: I2f7116786109b4d6a01d24ac892c13b5d1f498f4
2012-04-09 11:48:18 -07:00
Jeff Sharkey
bfdd680ab4 Migrate to @Override to remove warnings.
Bug: 6303344
Change-Id: I0d33b2ed448467379d576ccd71fb5ae20c878852
2012-04-09 10:57:21 -07:00
Adam Powell
081cc9a1f5 Merge "Tweaks to Activity up navigation" 2012-04-09 10:52:26 -07:00
Jeff Sharkey
4b3c523210 Merge "Splice operations before collapsing ifaces." 2012-04-09 10:31:20 -07:00
Adam Powell
04d5811500 Tweaks to Activity up navigation
Be more explicit in docs about getParentActivityIntent and guard against
calls when a parent has not been declared in the manifest.

Move automatic up navigation to happen after dispatch of the menu
selection event of id android.R.id.home to fragments. (Last.)

Fixes bug 6305357

Change-Id: I944e5c40774121f9a28250d8d98da6aa646f9357
2012-04-09 10:31:15 -07:00
Jeff Sharkey
21a547823d Splice operations before collapsing ifaces.
Bug: 6241038
Change-Id: Ide9058703f7305df8fb070af149ddce0653a0abf
2012-04-09 10:27:55 -07:00
Eric Laurent
079f09c6ca Merge "Added support for USB audio devices" 2012-04-09 08:39:05 -07:00
Daniel Sandler
d1404465df Merge "Remove Chronometer logspew." 2012-04-09 08:35:00 -07:00
Daniel Sandler
4879f1f183 Remove Chronometer logspew.
Change-Id: Ie9ea1ac9fb0b8053b00ce162c191dfa44c1ff6ab
2012-04-09 10:18:28 -04:00
Daniel Lehmann
63c115c4aa Merge "Expose NORMALIZED_NUMBER in the API" 2012-04-06 20:22:57 -07:00
Eric Laurent
59f482764e Added support for USB audio devices
Two types of USB audio devices are defined:
- USB audio device: the audio device in USB device mode while
the Android device is in USB host mode.
- USB audio accessory: the audio device in USB host mode while
the Android device is in USB device mode.

Renamed intents for analog and digital docks to avoid confusion:
 - ACTION_USB_ANLG_HEADSET_PLUG to ACTION_ANALOG_AUDIO_DOCK_PLUG
 - ACTION_USB_DGTL_HEADSET_PLUG to ACTION_DIGITAL_AUDIO_DOCK_PLUG

Factorized code in AudioService broadcast receiver.

Change-Id: I1b6d0257a9d68ecb9495c78c98bac8c67fec7891
2012-04-06 18:24:48 -07:00
Jeff Brown
69bba1dfb7 Merge "Add a unique input device descriptor." 2012-04-06 15:04:53 -07:00
Jeff Brown
e38fdfae91 Add a unique input device descriptor.
The purpose of the input device descriptor is to make it possible
to associate persistent settings for each input device, such as the
keyboard layout.

The descriptor is a hash of the information we have about the
device, such as its vendor id, product id, unique id, name,
or location.

Bug: 6110399
Change-Id: Idb80f946819b3f0dbf4e661bb0a753dbc2b60981
2012-04-06 14:57:19 -07:00
Gilles Debunne
43de94a943 Merge "Revert "Faster and simpler replace in SSB"" 2012-04-06 14:46:24 -07:00
Gilles Debunne
bc6862300f Revert "Faster and simpler replace in SSB"
Bug 6300658

This change reveals a weird race condition where sometimes the
text is entered twice. Adding a debugger slows down everything,
and the problem is no longer reproducable. Reverting for now.

This reverts commit ebd9a23817052c4d2aaa1058efa2b80b08003d4a.
2012-04-06 14:37:46 -07:00
Christopher Tate
bf64e70f9b Merge "Attribute alarm broadcast wakelocks to the sender" 2012-04-06 14:35:16 -07:00
Christopher Tate
c4a07d1caa Attribute alarm broadcast wakelocks to the sender
Wakelock usage for the purpose of sending an alarm broadcast is now
attributed to the application which posted the alarm, not to the OS.

Bug 5911317

Change-Id: I8cb79c3bd5db467388716ab68285f4ab0bfe468b
2012-04-06 14:23:12 -07:00