8871 Commits

Author SHA1 Message Date
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
Jeff Brown
12578bde99 Merge "Ensure that apps crash if they throw exceptions." 2012-04-06 18:26:48 -07:00
Jeff Brown
603b445896 Ensure that apps crash if they throw exceptions.
Previously, if an app threw an uncaught exception in an input,
vsync or native activity callback, it would log the exception then
continue limping merrily along.  In the case of input, it
could result in an ANR occurring because we had not drained
all of the pending input events and marked them as finished
(we only marked the most recent one finished).

Bug: 6304124
Change-Id: I87d76f7fd605e1a8af1237c66d8d62973080277e
2012-04-06 18:25:09 -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
Craig Mautner
cd837070f6 Merge "Fix endless looping in layout." 2012-04-06 18:14:15 -07:00
Craig Mautner
3de422fe4f Fix endless looping in layout.
An odd alignment of the stars can end up with all of mAppToken.allDrawn
animating and mAppToken.startingDisplayed all false, and animation not
null. In such a case we can continue returning false but still pass
the test in WindowAnimator.updateWindowsAndRotation setting
wasAnimating to true. The combination continually sets the
FINISH_LAYOUT_REDO_WALLPAPER bit in mPendingLayoutChanges.

Fixes bug 6304838.

Change-Id: Ie7a7b39ea218213f51dc3df3eefe4ff03f1d885d
2012-04-06 18:04:13 -07:00
Dianne Hackborn
b7943811a2 Merge "Fix issue #6242583: ResolverActivity is considered as home activity" 2012-04-06 17:53:59 -07:00
Dianne Hackborn
2d69d49d30 Fix issue #6242583: ResolverActivity is considered as home activity
Change-Id: Ib29908cdfcbbff769d12df1770264ad13ec5337b
2012-04-06 16:24:14 -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
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
Craig Mautner
1ade5ae9c8 Merge "Animate from local list of WindowStateAnimators." 2012-04-06 14:12:46 -07:00
Craig Mautner
bec53f7066 Animate from local list of WindowStateAnimators.
Stop animate() from using the mWindows maintained by
WindowManagerService. Animating WindowStateAnimators are now drawn from
a HashSet maintained by WindowAnimator and containing just those
WindowStateAnimators that have Surfaces.

When starting a move animation do not place parameters directly into
the WindowStateAnimator, instead pass them through the Handler.

Also removed synchronization points from mWindows/mAppTokens
add/remove.
2012-04-06 14:03:25 -07:00
Jeff Sharkey
b52e3e5509 INetworkStatsSession with lifecycle for caching.
Users outside system_server now explicitly communicate their
lifecycle, which keeps a strong-reference chain to any fully loaded
NetworkStatsCollection histories.

Bug: 6236498
Change-Id: I8e22739b6e89a626b676967a736d7117fd000778
2012-04-06 13:38:29 -07:00
Mike Lockwood
9d5a4be05b Add Intents to notify when USB audio devices or accessories are attached
In this change, only the USB audio accessory support is implemented.

Change-Id: Id9b411319b07a96dc56649ca74cc5f3f89a55a7c
Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-04-06 11:00:27 -07:00
Craig Mautner
7a3bc87468 Merge "Fix so that windows again animate when moving." 2012-04-06 08:00:47 -07:00
Jeff Brown
ac14351e16 Move some APIs from window manager to input manager.
Simplified input injection API down to just one call.

Removed all input state reading API.  It was only used by the
window manager policy and required a permission that applications
could not obtain.  READ_INPUT_STATE is now unused and deprecated.

Change-Id: I41278141586ddee9468cae0fb59ff0dced6cbc00
2012-04-05 19:33:11 -07:00
Craig Mautner
6af9b92b75 Fix looping to turn off dimming.
Dimming was constantly being turned off if it wasn't time to turn it
on. This caused endless reentry into the Window Manager and consumed
lots of CPU.

Fixes bug 6293953.

Change-Id: Id87e60c7c70e96e66ce0b6297442f5ac0d2ff477
2012-04-05 19:25:51 -07:00
Dianne Hackborn
42c45856f5 Fix so that windows again animate when moving.
Change-Id: I2441d0c892687b8cda239815caf77837cd21093e
2012-04-05 18:29:35 -07:00
John Wang
2119ade6d7 Merge "Enhance Cell Location Api." 2012-04-05 16:51:32 -07:00
Dianne Hackborn
818e7e9c83 Merge "Dump KSM stats in the meminfo." 2012-04-05 16:46:08 -07:00
Jeff Sharkey
330401243e Merge "Support metered Wi-Fi NetworkPolicy." 2012-04-05 16:17:54 -07:00
Jeff Sharkey
8fc27e8b87 Support metered Wi-Fi NetworkPolicy.
Add networkId field to NetworkIdentity to identify Wi-Fi networks by
SSID.  Add support for policies without usage cycles.

Only apply mobile policies when SIM state is ready, which is cleaner
than just checking for airplane mode.  Also avoids creating no-op
default policies when subscriberId is null.

Bug: 3001465, 3291052
Change-Id: I1f8aaa49a5db306df022c402ea7f3f5d4bc0cfc7
2012-04-05 16:02:25 -07:00
Jeff Brown
e9bdb31ea1 Merge "Refactor input system into its own service." 2012-04-05 15:30:10 -07:00
Dianne Hackborn
d3e677bc50 Dump KSM stats in the meminfo.
Change-Id: I077dcb137ed743ea10fde1dbba4e86c340dec432
2012-04-05 15:03:21 -07:00
Amith Yamasani
2184a985da Merge "Lockscreen settings per user" 2012-04-05 14:43:22 -07:00
Jeff Brown
4532e61584 Refactor input system into its own service.
Extracted the input system from the window manager service into
a new input manager service.  This will make it easier to
offer new input-related features to applications.

Cleaned up the input manager service JNI layer somewhat to get rid
of all of the unnecessary checks for whether the input manager
had been initialized.  Simplified the callback layer as well.

Change-Id: I3175d01307aed1420780d3c093d2694b41edf66e
2012-04-05 14:42:11 -07:00
Amith Yamasani
52c489cd63 Lockscreen settings per user
Move all lockscreen related settings to LockSettingsService.
LockPatternUtils uses this through IPC instead of Secure settings.
Migrate old settings to new database managed by LockSettingsService.
Passwords and patterns are stored in a new per-user location, except
 for the primary user, for backward compatibility.
KeyguardViewMediator and LockPatternKeyguardView listen for changes
to user and updates the lockscreen.

Settings provider will look for Lock settings in the LockSettings
service now for the entries that used to be stored in Settings.

Change-Id: I956cd5b95e2d9d45a6401af7e270e6a5aa2dcc98
2012-04-05 14:03:36 -07:00
Craig Mautner
e4d8a5dd42 Fix failure to animate away exiting AppWindowToken
A previous check in changed the collection we were pulling exiting
AppWindowTokens from. Instead of pulling them from mExitingAppTokens
they came from mAppTokens and hence were not animated away.

Fixes bug 6296433.

Change-Id: I23347085658fce5412abb8ea119ce7e6152cab8b
2012-04-05 13:10:37 -07:00
Adam Powell
9828830611 Merge "TaskStackBuilder and Activity navigation features for framework" 2012-04-05 11:55:06 -07:00
Adam Powell
dd8fab2629 TaskStackBuilder and Activity navigation features for framework
Promote navigation helpers from the support library to the core
platform.

The support library's meta-data element has been replaced with a
first-class parentActivityName attribute. This attribute is valid
on both activity and activity-alias elements. An activity-alias
will inherit the target activity's parentActivityName if one is
not explicitly specified.

Automatic Up navigation for Activities

Add the public method onNavigateUp() to Activity. The default
implementation will use the metadata supplied in the manifest about an
activity's hierarchical parent (parentActivityName) to do the right
thing.

If any activities in the parent chain require special Intent
arguments, the Activity subclass should override onNavigateUp() to
properly implement Up navigation for the app, supplying such arguments
as needed.

If automatic Up navigation within the same task can't find an activity
matching the supplied intent in the current task stack, it will act as
an in-app "home" and return to the root activity (presumably the app's
front page) in that task. (From this state, pressing "back" with
default behavior will return to the launcher.)

Change-Id: If163e27e59587f7af36975a09c986cb117ec3bc6
2012-04-05 11:45:10 -07:00
John Wang
963db55d59 Enhance Cell Location Api.
To boost accurary and enhance capability of cell location api,
two new APIs, TelephonyManager.getAllCellInfo() and
TelephonyManager.listen(LISTEN_CELL_INFO), are added. Two new
Class, CellInfo and CellIdentity, are created.

This API change returns all information of one cell locaiton
at the same time. It also provides additional LTE and timestamp information.

Change-Id: I4d0f813107e625ec4ac88c8d980ffd171aa5fc30
2012-04-05 11:30:37 -07:00
Dianne Hackborn
f87d19621d Clean up status bar, system bar, navigation bar management.
The status bar and navigation bar are two completely separate
elements, with their own semantics.  The system bar now classifies
itself as a navigation bar, since that is really how it behaves.

This required rewriting the HDMI resizing code, so that it is
all done by PhoneWindowManager since that is what is responsible
for the size of the navigation bar (and thus now system bar).  This
actually gets rid of a fair amount of code, and means we can also
do the same thing for a pure navigation bar.

Likewise the system bar now has the navigation bar ability to be
hidden when requested by system UI flags.  To get the behavior
we want on Xoom, we only allow the nav bar to be hidden when it
will help provide a better aspect ratio for showing widescreen
videos.

Finally the nav/system bar now animates when hidden and shown.

Change-Id: Ie927154b68376a0b61802f99171ff56b8da92e7a
2012-04-04 16:00:45 -07:00
Irfan Sheriff
689b741abc Merge "Add initial framework for DNS service discovery" 2012-04-04 12:34:52 -07:00
Irfan Sheriff
7d024d3724 Add initial framework for DNS service discovery
Change-Id: I53c0b7ebfd75e520ebb7553612f1aa8413b6b79b
2012-04-04 12:24:56 -07:00
Craig Mautner
c3a6cf79e3 Merge "First separation of animation from AppWindowToken." 2012-04-04 12:00:48 -07:00
Craig Mautner
0048dc9d55 Merge "Move more items between layout and animate sides." 2012-04-04 11:58:50 -07:00
Craig Mautner
594316361d First separation of animation from AppWindowToken.
New class AppWindowAnimator pulls animation out of AppWindowToken.

Change-Id: Ic1ccb6ec2bf091f1f901fe3c20cbeb242376ae6b
2012-04-04 11:56:44 -07:00
Craig Mautner
d09cc4ba24 Move more items between layout and animate sides.
- Isolate DimAnimator animation from the layout side.
- Isolate mWallpaperForceHidingChanged and mOrientationChangeComplete
  from the animation side.
- Eliminate a redundant setting of mOrientationChangeComplete to true.
  It was already true at that point.
- Synchronize changes to mWindows and mAppTokens on mAnimator. This is
  a nop until we go to multiple threads.
- Synchronize AppWindowToken.freezingScreen on mAnimator.
- Modification to repeat layout debugging including temporary enabling
  of spew on layout repeats.

Change-Id: Ic8d82b1c197144aaf6957caa5f71e175288220f2
2012-04-04 10:23:31 -07:00
Mathias Agopian
66ac90276a Merge "usea socketpair instead of a pipe in BitTube" 2012-04-03 15:38:14 -07:00
Mike Lockwood
69ccdbd78a Merge commit 'bc52ca2'
Conflicts:
	services/java/com/android/server/am/ActivityManagerService.java

Change-Id: I6da33a191a4ac13d08d8350a432b205e3dff85da
2012-04-03 11:53:47 -07:00
Amith Yamasani
15001eafa2 Merge "Dump the uid of a notification, for debugging." 2012-04-03 09:59:55 -07:00
Mathias Agopian
89c30a5486 usea socketpair instead of a pipe in BitTube
Bug: 6252830
Change-Id: I363cc7e9f73a5b7d8bbccee312c6d8938c84e99a
2012-04-02 18:38:02 -07:00
Amith Yamasani
191310b7d3 Merge "Fix a regression in activity manager regarding killing stopped processes." 2012-04-02 16:46:26 -07:00
Amith Yamasani
34db3d65d6 Fix a regression in activity manager regarding killing stopped processes.
Bug: 6275175
Change-Id: Ib1fa80cba9d21799f36fec999899e54a0fe8da51
2012-04-02 16:35:19 -07:00
Craig Mautner
1d60133578 Merge "Refactor to convert four state booleans to int." 2012-04-02 13:57:42 -07:00
Craig Mautner
749a7bb28b Refactor to convert four state booleans to int.
Replace four booleans (mDrawPending, mCommitDrawPending, mReadyToShow
and mHasDrawn) with a single int that can take on the four states.

Move mLastHidden from WindowState to WindowStateAnimator.

Change-Id: Ieff319dfa19123bf5a6cdc98e9ab28fd432b8153
2012-04-02 13:49:53 -07:00
Craig Mautner
ea7ff4d2fe Merge "Defer a couple of Surface actions for WSAnimator." 2012-04-02 13:24:55 -07:00