11162 Commits

Author SHA1 Message Date
Adam Cohen
b02eb4bb7d Merge "Pushing state persistence to a background thread" into jb-mr1.1-dev 2012-11-15 13:53:53 -08:00
Adam Cohen
a1a2f967e2 Pushing state persistence to a background thread
Change-Id: If776bc22c48525ba91dc7e4dd0e27de92612f2f5
2012-11-15 13:44:34 -08:00
Jeff Sharkey
f5377a7242 Merge "Useful annotations for code documentation." into jb-mr1.1-dev 2012-11-15 11:48:38 -08:00
Jeff Sharkey
a319d655e3 Merge "Avoid runtime restart after vold reconnects." into jb-mr1.1-dev 2012-11-15 11:46:19 -08:00
Jeff Sharkey
f6ba84b424 Merge "Reduce verbosity of service event logging." into jb-mr1.1-dev 2012-11-15 11:44:13 -08:00
Daniel Sandler
020d65290a Merge "Do not vibe when the default notification sound is Silent." into jb-mr1.1-dev 2012-11-15 05:05:44 -08:00
Daniel Sandler
83b2596155 Merge "Notification vibration improvements:" into jb-mr1.1-dev 2012-11-15 05:03:11 -08:00
Zhihai Xu
681ae7fc5e Cannot enable Bluetooth after using airplane and Bluetooth tethering sequentially
The root cause is we can't unbind blue service when bluetooth isnot disbaled
Otherwise the bluedroid stack will be out of sync with bluetooth service
only unbind bluetoothservice, when bluetooth is at OFF state.

bug 7376846

Change-Id: If5a11926f77a1ac29e75cdddbf5e90d492179f43
2012-11-14 18:05:29 -08:00
Jeff Sharkey
0be607cda1 Avoid runtime restart after vold reconnects.
Rely on behavior of already-released CountDownLatch instead of
clearing the reference.

Bug: 7290521
Change-Id: I787e673b97d18be412d5b37e279fbf1275b49151
2012-11-14 14:39:19 -08:00
Daniel Sandler
d4d2de2a77 Do not vibe when the default notification sound is Silent.
(This relates to the new vibration fallback behavior, where
notifications that expect to make a sound should always
vibrate in vibrate mode. We should not vibrate if the
notification's sound is silent, but we should also not
vibrate if the notification uses the default sound and the
default is silent.)

Bug: 7537077
Change-Id: I08e149c8c00ef2d2f61e418d88a086cb5e9cf241
2012-11-14 16:42:04 -05:00
Victoria Lease
75819a9cdd Merge "Resolve LocationManager + ActivityManager conflict" into jb-mr1.1-dev 2012-11-14 13:18:58 -08:00
Daniel Sandler
edbb380950 Notification vibration improvements:
- When notifications vibrate as a fallback (that is,
   because they want to play a sound but the device is in
   vibrate mode), this no longer requires the VIBRATE
   permission.
 - As a bonus, if your notifications use DEFAULT_VIBRATE,
   you don't need the VIBRATE permission either.
 - If you specify a custom vibration pattern, you'll still
   need the VIBRATE permission for that.
 - Notifications vibrating in fallback mode use a different
   vibration pattern.
 - The DEFAULT_VIBRATE and fallback vibrate patterns are now
   specified in config.xml.

Bug: 7531442
Change-Id: I7a2d8413d1becc53b9d31f0d1abbc2acc3f650c6
2012-11-14 11:50:11 -08:00
Victoria Lease
61ecb02f54 Resolve LocationManager + ActivityManager conflict
LocationManagerService was serially stuffing the same Location into
multiple Intents, which it would immediately hand off to
ActivityManagerService, running as a different thread in the same
process. LocationManager would continue to work with that Location
while ActivityManagerService worked with a Parceled version of it.

However, Location.mExtras is also a Bundle, and both
ActivityManagerService and LocationManagerService ended up working
with references to the same Bundle. ActivityManagerService needs
it in Parceled form (ie mParceledData != null), but
LocationManagerService was triggering Bundle.unparcel() when
referencing the data contained within.

As a result, LocationManagerService was able to trigger NPE (or
worse) in ActivityManagerService by manipulating the mExtras
member of a Location that was in the process of being reported to
listeners.

To resolve this issue, I copy-construct a new Location to report to
each listener. This should prevent ActivityManagerService and
LocationManagerService from referencing the same Bundle data, as
Location's copy constructor also copyconstructs the mExtras member,
rather than simply share references.

Bug: 7518371
Change-Id: I1a92615cba361831494447d5de085a8d910b6b2c
2012-11-13 15:12:51 -08:00
Zhihai Xu
4e22ad3504 Settings shows it is connected to A2DP, though the device is not actually connected
the root cause is the A2dp and Pbap service need receive STATE_TURNING_OFF intent
to shutdown cleanly. So we need send completely state transition intents
in user switch handler.

bug7403171

Change-Id: Ic92bc85c2b74ae7c95440b237ea8851771ee9f04
2012-11-13 15:11:26 -08:00
Craig Mautner
c10914ca5c Merge "Support Wifi display devices that rename themselves." into jb-mr1.1-dev 2012-11-13 10:00:04 -08:00
Jeff Sharkey
8b2c3a1460 Useful annotations for code documentation.
Bug: 6537978
Change-Id: I806c3c09e3255f8789455f13bf37c1dde2a93f1f
2012-11-12 12:42:17 -08:00
Jeff Sharkey
282e9fc62e Merge "Avoid recycling recently removed user IDs." into jb-mr1.1-dev 2012-11-12 10:30:12 -08:00
Jeff Sharkey
bc0edecb73 Merge "Increase readability of connectivity event log." into jb-mr1.1-dev 2012-11-12 10:28:34 -08:00
David Agnew
4c0fc03b5e When in vibrate mode, all notifications will vibrate.
(Unless the notification specifies no ringtone AND no
vibration, in which case it will remain silent.)

Bug: 7516358
Change-Id: I926d0fe0165b9622cd117e6c3ef6e3637772b444
2012-11-10 14:35:02 -05:00
Ed Heyl
4f017e757b Merge "When in vibrate mode, all notifications will vibrate." into jb-mr1.1-dev 2012-11-09 22:49:35 -08:00
David Agnew
71789e11cc When in vibrate mode, all notifications will vibrate.
(Unless the notification specifies no ringtone AND no
vibration, in which case it will remain silent.)

Change-Id: I926d0fe0165b9622cd117e6c3ef6e3637772b444
2012-11-10 00:01:04 -05:00
Jeff Sharkey
9d6d890e0d Reduce verbosity of service event logging.
Omits service name from destroyed events, since it can be derived by
looking back to the created event with the same ServiceRecord.

Change-Id: Ib7ab1031c0859437735e1fc985d58f47629b7ac4
2012-11-09 17:32:43 -08:00
Jeff Sharkey
2528b50b91 Increase readability of connectivity event log.
Bug: 6322766
Change-Id: I556759f5fc1466cdd4db6b4574084a8068dc9909
2012-11-09 15:57:02 -08:00
Jeff Sharkey
86597df79f Emit event log message when switching users.
Change-Id: I8e521e177b0e17e2ab9e033e0ff8bc421cd5f784
2012-11-09 15:09:13 -08:00
Dianne Hackborn
a46a74fcd6 Merge "Remove extraneous logs." into jb-mr1-dev 2012-11-08 13:16:10 -08:00
Dianne Hackborn
7ff30113de Remove extraneous logs.
Change-Id: I4c47d36748de91bd6fddc419afbf59552bf63e9a
2012-11-08 13:13:48 -08:00
Jim Miller
4eeb4f664a Add mechanism to kick keyguard to show the assistant
Fixes bug 7499778

Change-Id: Ic9ea514feb489feeee6716f40bdb9792842f9515
2012-11-08 00:39:04 -08:00
Amith Yamasani
3fe2cb4db6 Merge "Don't cancel any notifications that are meant for all users, if no package is specified." into jb-mr1-dev 2012-11-07 21:12:54 -08:00
Jeff Brown
74da109102 Support Wifi display devices that rename themselves.
Some Wifi display devices like to rename themselves after a
connection completes (or at other times).  Make sure to update
the name of the display when we detect that it changed in
our scan results.

This problem is somewhat complicated by the fact that we remember
the display name persistently, so we need to update our list
of remembered displays too.

Improve the state machine to avoid redundant attempts to
disconnect or cancel connection.

Bug: 7478895
Change-Id: I35a9e2c6a8deadbe892dacd5e3b4a5a2b12d6cf0
2012-11-07 18:43:32 -08:00
Amith Yamasani
5ec00e930f Don't cancel any notifications that are meant for all users, if no package is specified.
Bug: 7490028

Otherwise notifications such as the USB debugging and OTA notifications will be
dismissed when any user is stopped.

Change-Id: I0ae0c1136a999dd3aade99ca9e71c714b359eab4
2012-11-07 16:58:30 -08:00
Victoria Lease
ad84f7f46b Merge "disable geofences for secondary users" into jb-mr1-dev 2012-11-07 13:56:46 -08:00
Jeff Sharkey
ffe0cb49d1 Avoid recycling recently removed user IDs.
Currently, installd doesn't correctly evict VFS cache entries for
FUSE emulated external storage.  This means zygote processes have an
inconsistent view of the FUSE daemon when the system rapidly
recycles user IDs.

To work around this, only consider recycling a user ID after its
VFS cache entries have expired.  The emulated storage FUSE daemon
currently uses a 'entry_valid' timeout of 10 seconds.

Bug: 7407902
Change-Id: Id80cbdd2215d8456467fb31e4c209ca12a505e16
2012-11-07 11:30:39 -08:00
Victoria Lease
8d803258ca am e6299d5a: Merge "Fires geofence if the device is already in the geofence area." into jb-mr1-dev
* commit 'e6299d5af702dd17eb3585dbe84d29c289bfa8da':
  Fires geofence if the device is already in the geofence area.
2012-11-06 15:09:38 -08:00
Victoria Lease
56e675b3a1 disable geofences for secondary users
Geofences are broken in multiuser, and need to be fixed before
reenabling the feature for secondary users.

Change-Id: Ief3008a294deed47760ee25efcf1cdef5371b038
2012-11-06 10:53:56 -08:00
Victoria Lease
4cd0a50b26 Fires geofence if the device is already in the geofence area.
Process the location of the fence as soon as it is added.

Clarified how the distance to the fence was being used.

Added more debug logs (disabled by default).

Fixed a numerical overflow in the location request if the
distance to the border of the nearest fence was greater
than about 2000Km.

Removed a useless call to request location updates passively
when the geofence manager is initialized.  We have no need
of location updates unless there are active geofences.
The effect of this call was undone the next time the location
request was updated anyhow.

Changed the location request to always request a fastest update
interval of 0 which accomplishes the goal of passively
monitoring all updates.  This does not increase the power
consumption because we are conservative about choosing
a minimum location update interval.  We're simply stating
that the geofence manager is willing to handle a higher
report rate which is very important.

Subject location to a "freshness test" - only use relatively
recent locations for geofence testing.

Run all geofence updates on the handler and avoid making
multiple redundant calls into the location manager when
updating the provider requirements.

Ensure that we update geofences correctly even if we don't
know the initial location of the device at the time the
geofence is created.

Pin update interval value to the range [1m..2hr].

Distance to fence is now distance to fence's border, not
distance to fence's centre.

Bug: 7466334
Change-Id: I28e571ecfc508d5ceb9bb2afcabaaf05abb26369
2012-11-06 10:01:33 -08:00
Jim Miller
bfec0a8616 Add isSafeModeEnabled() API to WindowManagerService
This adds a means of determining when the device is in safe mode,
as required by keyguard to disabled some features.

Change-Id: I31d357e6738c92e1837f9e0263e5f3f4de66315a
2012-11-05 20:27:38 -08:00
Dianne Hackborn
47eb0c103a am 2ea9bae7: Fix issue #7457380: IME leaves a mark after user switching
* commit '2ea9bae7121f1df5461437d7d08fa550cdf6e0b0':
  Fix issue #7457380: IME leaves a mark after user switching
2012-11-03 23:37:36 -07:00
Dianne Hackborn
2ea9bae712 Fix issue #7457380: IME leaves a mark after user switching
The gnarly stuff where we keep track of the old input method
window as if it was still there was sitting around leaving things
in a stuck state.  Now we clear this out at key points in the
window manager (freezing screen, user change), and the input
method manager service is less aggressive about asking the window
manager to do it.

Also fixed a problem that was causing flickers during some
wallpaper transitions -- when we are animating two things on
top of the wallpaper and one of them disappears, we need to
make sure the wallpaper target points to whatever the current
target should be (if any), not left pointing to the old target
that has gone away.

Change-Id: I2fb9600f569a5bd5e3528aaf24cde9340af56cb0
2012-11-02 18:56:01 -07:00
Baligh Uddin
841ce670b2 Merge commit '81af21e67cd842d16d4b45e8a2d1ec56ff8d764f' into jb-mr1-dev 2012-11-02 16:46:18 -07:00
Svetoslav Ganov
f74d0c39b6 Merge "Polish user selector accessibility." into jb-mr1-lockscreen-dev 2012-11-02 15:55:11 -07:00
Svetoslav Ganov
fc9c4cd51b Polish user selector accessibility.
1. The current user was not announced as such.

2. The event for a user switch was not sent.

Change-Id: Ib3caf1f9e93ea1f0b5450246601bc37f416be6da
2012-11-02 15:32:25 -07:00
Laurent Tu
35e01866d8 am 685cc8c7: Merge "Decrement number of updates in LocationRequest" into jb-mr1-dev
* commit '685cc8c7cba0bef5257bf00e9821e82a2dbbfc91':
  Decrement number of updates in LocationRequest
2012-11-02 15:18:46 -07:00
Laurent Tu
685cc8c7cb Merge "Decrement number of updates in LocationRequest" into jb-mr1-dev 2012-11-02 15:15:28 -07:00
Dianne Hackborn
78bc99001f am 8ae0420e: Merge "Fix issue #7343200: Fails to show wallpaper in the background for..." into jb-mr1-dev
* commit '8ae0420e4b4169855608d404e389a66ce7253a36':
  Fix issue #7343200: Fails to show wallpaper in the background for...
2012-11-02 15:13:36 -07:00
Dianne Hackborn
8ae0420e4b Merge "Fix issue #7343200: Fails to show wallpaper in the background for..." into jb-mr1-dev 2012-11-02 15:10:16 -07:00
Dianne Hackborn
98129739af Fix issue #7343200: Fails to show wallpaper in the background for...
...lockscreen sometimes and remains black / blank

The problem was that we were using the animation-side wallpaper state
in cases where it was not updated yet.

The mWallpaperTarget variable is propagated over to the animation
side when the main window manager state updates.  On the animation
side, this is used by hideWallpapersLocked() to determine if the
current wallpaper should be hidden.

The problem is that various paths to hideWallpapersLocked() can
come from the layout side of the window manager instead of the
animation side.  This causes the problem here because in this case
the wallpaper state may not have yet been propagated to the
animation side, so it could incorrectly decide to hide the wallpaper
because it thinks there is not a target when in fact a target is
set in the layout side.  This won't get fixed until some time way
later that the layout side decides that a new window is being shown
that may need to have the wallpaper shown.

The fix here is pretty gross, but as safe as possible -- the
hideWallpapersLocked() function now uses either the animation or
layout wallpaper state depending on where the call to it is coming
from.

Change-Id: I9250bfeae6e11c1761760bcc696fdb33fb5c8a5f
2012-11-02 14:19:59 -07:00
Svetoslav Ganov
b8e58bb6ed am 28e8f76c: Merge "Cannot click on partially visible views in touch exploration." into jb-mr1-dev
* commit '28e8f76c50b26efd657bc0740fee25ac18520f9e':
  Cannot click on partially visible views in touch exploration.
2012-11-02 11:54:36 -07:00
Svetoslav Ganov
28e8f76c50 Merge "Cannot click on partially visible views in touch exploration." into jb-mr1-dev 2012-11-02 11:51:36 -07:00
Laurent Tu
75defb6f88 Decrement number of updates in LocationRequest
Decrement the number of updates after a location fix has been sent to a
a listener. This is necessary for respecting calls such as
requestSingleUpdate().

Bug: 7460868
Change-Id: Iea207ab494b93b936ca434d59652bb2cb6404cef
2012-11-02 09:22:48 -07:00
Michael Jurka
9de90c1c57 Merge "Use clock's widget as the default keyguard widget" into jb-mr1-lockscreen-dev 2012-11-01 18:59:54 -07:00