• Home
  • History
  • Annotate
  • only in /frameworks/base/services/java/com/android/
History log of /frameworks/base/services/java/com/android/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9a7debe5857ffc7c71cfc4082b1b6d72a5cf81cd 10-Nov-2012 David Agnew <dsandler@android.com> 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
a46a74fcd61d2b4e72b6027625a471f10b21b1c9 08-Nov-2012 Dianne Hackborn <hackbod@google.com> Merge "Remove extraneous logs." into jb-mr1-dev
7ff30113de68539ec840c524b8f1561f938f96c5 08-Nov-2012 Dianne Hackborn <hackbod@google.com> Remove extraneous logs.

Change-Id: I4c47d36748de91bd6fddc419afbf59552bf63e9a
4eeb4f664ac6b5901a8e874dcf70c0382295f792 08-Nov-2012 Jim Miller <jaggies@google.com> Add mechanism to kick keyguard to show the assistant

Fixes bug 7499778

Change-Id: Ic9ea514feb489feeee6716f40bdb9792842f9515
3fe2cb4db60827889abd1f971910f807ae346488 08-Nov-2012 Amith Yamasani <yamasani@google.com> Merge "Don't cancel any notifications that are meant for all users, if no package is specified." into jb-mr1-dev
5ec00e930fb4d523ce5784fb336841410d030cef 08-Nov-2012 Amith Yamasani <yamasani@google.com> 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
ad84f7f46b0207a7ad316b4df37c1f02c889cca9 07-Nov-2012 Victoria Lease <violets@google.com> Merge "disable geofences for secondary users" into jb-mr1-dev
8d803258ca1550583d03c1a24c5c6d4b38535ba8 07-Nov-2012 Victoria Lease <violets@google.com> 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.
56e675b3a1c351de34de68a149762d3ad1b308c5 06-Nov-2012 Victoria Lease <violets@google.com> 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
4cd0a50b26eeb68517d03bc0cafc18e98bfc1fec 03-Nov-2012 Victoria Lease <violets@google.com> 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
bfec0a8616bc197ee3b7b71be6fed1939d0c3c4d 06-Nov-2012 Jim Miller <jaggies@google.com> 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
47eb0c103a38fe710381c23284d01840930b93e2 04-Nov-2012 Dianne Hackborn <hackbod@google.com> am 2ea9bae7: Fix issue #7457380: IME leaves a mark after user switching

* commit '2ea9bae7121f1df5461437d7d08fa550cdf6e0b0':
Fix issue #7457380: IME leaves a mark after user switching
2ea9bae7121f1df5461437d7d08fa550cdf6e0b0 03-Nov-2012 Dianne Hackborn <hackbod@google.com> 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
841ce670b29180a157a084a9c0e803b13e92020c 03-Nov-2012 Baligh Uddin <baligh@google.com> Merge commit '81af21e67cd842d16d4b45e8a2d1ec56ff8d764f' into jb-mr1-dev
f74d0c39b62ff542542df69e641477eb1e09b157 02-Nov-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Polish user selector accessibility." into jb-mr1-lockscreen-dev
fc9c4cd51b3bdca27726dd6d8a00d47e388ca2aa 02-Nov-2012 Svetoslav Ganov <svetoslavganov@google.com> 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
35e01866d86ac1d2484afbc82266524d322b6dc3 02-Nov-2012 Laurent Tu <laurentt@google.com> am 685cc8c7: Merge "Decrement number of updates in LocationRequest" into jb-mr1-dev

* commit '685cc8c7cba0bef5257bf00e9821e82a2dbbfc91':
Decrement number of updates in LocationRequest
685cc8c7cba0bef5257bf00e9821e82a2dbbfc91 02-Nov-2012 Laurent Tu <laurentt@google.com> Merge "Decrement number of updates in LocationRequest" into jb-mr1-dev
78bc99001f422c442c76849b575539c88575b300 02-Nov-2012 Dianne Hackborn <hackbod@google.com> 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...
8ae0420e4b4169855608d404e389a66ce7253a36 02-Nov-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #7343200: Fails to show wallpaper in the background for..." into jb-mr1-dev
98129739afcb3786a6ec9f3efe774d8e01f6d632 02-Nov-2012 Dianne Hackborn <hackbod@google.com> 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

Change-Id: I9250bfeae6e11c1761760bcc696fdb33fb5c8a5f
b8e58bb6edb56fd8fef1bc43fa42cc48aecf31d1 02-Nov-2012 Svetoslav Ganov <svetoslavganov@google.com> 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.
28e8f76c50b26efd657bc0740fee25ac18520f9e 02-Nov-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Cannot click on partially visible views in touch exploration." into jb-mr1-dev
75defb6f8840dcd2aaf866a5df9d689413fbe433 02-Nov-2012 Laurent Tu <laurentt@google.com> 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

Bug: 7460868
Change-Id: Iea207ab494b93b936ca434d59652bb2cb6404cef
9de90c1c57b65498afca39c29834ad2bb75f0cbb 02-Nov-2012 Michael Jurka <mikejurka@google.com> Merge "Use clock's widget as the default keyguard widget" into jb-mr1-lockscreen-dev
67a871d85732e582c70a2a1d85ef4419eb658a12 02-Nov-2012 Michael Jurka <mikejurka@google.com> Use clock's widget as the default keyguard widget

Also, if we have no widgets in lockscreen,
reinflate the default widget. If that fails,
inflate the built-in clock (KeyguardStatusView)

Change-Id: I2e90ab0893c993a755700e075e4a8ac5a685e0f2
39912f7fcd5bfc4943bac1746c3ff2a9f1d93043 02-Nov-2012 Ed Heyl <edheyl@google.com> Merge commit '87bb019e57eddcedd4aeca180ac36bdf1d42064a' into jb-mr1-dev
a94c3194ffa896632f025b983ca57095cd4ba277 01-Nov-2012 Svetoslav Ganov <svetoslavganov@google.com> Cannot click on partially visible views in touch exploration.

1. In touch exploration mode the system clicks in the center of the
accessibility focus rectangle. However, if this rectangle is only
partially shown on the window or on the screen the system may not
be able to perform the click, if the accessibility focus center
is not on the screen, or click on the wrong window, if the access
focus center is outside of the window.

This change clips the rectangle to the window bounds which and the
display bounds. This will ensure no clicks are sent to the wrong
window and no clicks are sent outside of the screen.


Change-Id: I79f98971e7ebcbb391c37284467dc76076172c5f
872e3d36eed6f2e01968ce2e8ff18802e2ca50d6 01-Nov-2012 Dianne Hackborn <hackbod@google.com> am b9372de0: Merge "More debugging for issue #7343200 Fails to show wallpaper in the..." into jb-mr1-dev

* commit 'b9372de07d3329928f28104bb997aab57237504c':
More debugging for issue #7343200 Fails to show wallpaper in the...
f19cce180ffad6b2dac60da7b3963c423733c8e7 01-Nov-2012 Adam Cohen <adamcohen@google.com> Merge "Revert "Pushing state persistence to a background thread"" into jb-mr1-lockscreen-dev
b9372de07d3329928f28104bb997aab57237504c 01-Nov-2012 Dianne Hackborn <hackbod@google.com> Merge "More debugging for issue #7343200 Fails to show wallpaper in the..." into jb-mr1-dev
b6f83374cc706e5da95a137e9d0f6bd6bbf3220e 01-Nov-2012 Adam Cohen <adamcohen@google.com> Revert "Pushing state persistence to a background thread"

This reverts commit 039206a9b40d2188eb735f56ee51f131555c9dd3

Change-Id: I30fa07bf55a489562831b6334768b28bed638ef8
529e744d3131b9ebeb6b33c8030230c29a44ad12 01-Nov-2012 Dianne Hackborn <hackbod@google.com> More debugging for issue #7343200 Fails to show wallpaper in the...

...background for lockscreen sometimes and remains black / blank

There was a bunch of state not being put into the dumpsys output.
In particular, the current wallpaper target of the WindowAnimator
was not being included. I think the problem is that these targets
are not being updated from the main window manager state at some
point where they need to be.

Change-Id: Ic795047f6aea9b6f72d5550bccc9f8d76c6ecb67
6917cec8ded216d5a21e7358aaaf7b8b677475ea 01-Nov-2012 Adam Cohen <adamcohen@google.com> Merge "Pushing state persistence to a background thread" into jb-mr1-lockscreen-dev
039206a9b40d2188eb735f56ee51f131555c9dd3 01-Nov-2012 Adam Cohen <adamcohen@google.com> Pushing state persistence to a background thread

Change-Id: If776bc22c48525ba91dc7e4dd0e27de92612f2f5
09452829e6e2d6d90d6baef5442d016373060585 01-Nov-2012 Zhihai Xu <zhihaixu@google.com> am 0de49148: Merge "Fix for BluetoothAdapter.getAddress() when BT is off on some devices" into jb-mr1-dev

* commit '0de49148f07c7f0b3b45cec0ef502db4b9163711':
Fix for BluetoothAdapter.getAddress() when BT is off on some devices
0de49148f07c7f0b3b45cec0ef502db4b9163711 01-Nov-2012 Zhihai Xu <zhihaixu@google.com> Merge "Fix for BluetoothAdapter.getAddress() when BT is off on some devices" into jb-mr1-dev
9767597a74bd9a5a265ff72aa5f77dd7efb93b53 01-Nov-2012 Adam Cohen <adamcohen@google.com> Merge "Stripping dead API related to keyguard widgets" into jb-mr1-lockscreen-dev
d31c32217c17f402c295514a862347dd68c9e16d 01-Nov-2012 Zhihai Xu <zhihaixu@google.com> Fix for BluetoothAdapter.getAddress() when BT is off on some devices

There are two problem, 1.If we have wrong bluetooth address in
global settings db, we never will update it 2. We need enable bluetooth
to get the bluetooth address for some devices. For 1, we fix it by add
a valid flag in global setting db, this flag will be set when we stored
correct address and name to db. We only load the name and address from
global setting db when this valid flag is set during power up.
For2. we will read BT address after bluetooth is at ON state.
bug 7440409

Change-Id: Ic4740b3f0b2fcd214c7ca8393f7331c140eec66d
c4842c11932ea4f60fe7ae09b0a59660207e1587 31-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Accessibility support for the lockscreen - phone.

Change-Id: Idc99f1322a1d635dd07e1f5efa1665a4676267c2
8f697d858098ec1e7bb7f84abcd15ba49e3e8927 01-Nov-2012 Adam Cohen <adamcohen@google.com> Stripping dead API related to keyguard widgets

Change-Id: Ieb6c57ef736712b3266de08027f9626104cdf1bb
fe28ff0d063818762dd585a67fcffd61cabd5a2f 01-Nov-2012 Chet Haase <chet@google.com> Merge "Fix for regression in WindowManager orientation changes" into jb-mr1-dev
d5d11af3d3cefff6267d4e3a19e61a9b03cfbab5 31-Oct-2012 Chet Haase <chet@google.com> Fix for regression in WindowManager orientation changes

A fix yesterday for #7428221 caused a regression where new orientations would
sometimes cause a flash through black on the way to seeing the real static wallpaper.
There is a fundamental problem in WindowManagerService where we show a window before
it has all of the layout/sizing information it needs, which is the cause of the black
flash. The regression yesterday was that we are now less aggressive about layout out
hidden windows, so we won't layout the window until after the window is shown with the
incorrect sizing info.

The fix/workaround is to back off the layout logic specifically for the wallpaper,
ensuring that we will lay it out on orientation changes, even when hidden. This means that
when we finally do show it, it will already have been drawn in the correct orientation/size.

Issue #7444971 Home jank regression

Change-Id: Ib20fdabc43ece9720b261bf04b272c5511e2d902
03f7ebfeaadb3f03c9a9a6405276fb702ad11fe1 31-Oct-2012 Amith Yamasani <yamasani@google.com> Merge "Relax permission requirements for posting notifications across users" into jb-mr1-dev
27f752eb1d5c0f92fb38e7d6d0ea20b3b3b26a02 31-Oct-2012 Chet Haase <chet@google.com> Merge "WindowManager shouldn't layout non-visible windows" into jb-mr1-dev
a07d047f34b28fdf7b3b342ceb31c8c982b24fd8 31-Oct-2012 Amith Yamasani <yamasani@google.com> Merge "Don't clean up wallpaper map entry when stopping a user." into jb-mr1-dev
9cceae9a5f4a2e8b5abc7dc9610dc7e40c7d283c 31-Oct-2012 Chet Haase <chet@google.com> WindowManager shouldn't layout non-visible windows

A recent change in WindowManager made background windows perform layout
(when they should really be left alone). This resulted in artifacts
where rotating the device and then going to a backgrojnd activity (launcher,
Recents) would briefly show that activity in the wrong size/orientation, then
flash to the correct one after a proper layout.

This fix is a simple workaround, leaving in the original fix that the code
change addressed (for keyguard orientation changes), while going back to the
previous (don't layout gone windows) for all other cases.

Issue #7428221 sometimes recents is drawn off-center and then fixes itself

Change-Id: I41b47933c2bd86f29133853d3387bb7294be8f48
2c7ebeae9f2b795c4802b4aa4d7b3d84e8fff239 30-Oct-2012 Amith Yamasani <yamasani@google.com> Relax permission requirements for posting notifications across users

Bug: 7430689
Change-Id: I2430b20137705ed2d6dc0f870690acda0662392b
0c293717126b52e71eaf794394f336b5940fb349 30-Oct-2012 Amith Yamasani <yamasani@google.com> Don't clean up wallpaper map entry when stopping a user.

Sometimes on quickly stopping and starting a user, a race condition
causes the user entry to disappear, causing crashes in Launcher and
SystemUI. Removing this step, since it doesn't really leave much
residue behind.

Bug: 7434849
Change-Id: Ia188602f1a79f75d307397459c2a03fadee4c722
ad09bccfe4cc0a3075e97c0911a02b329023a34a 08-Oct-2012 Craig Mautner <cmautner@google.com> Bring up unlock screen for FLAG_DISMISS_KEYGUARD.

Widgets that did not launch Activitys would not display the unlock
screens when they were tapped. Now any window that is shown with
FLAG_DISMISS_KEYGUARD set while the keyguard is locked will
cause the unlock screen to be displayed.

Bug: 7301530 fixed.
Change-Id: I90d11b52d2b63260bdb5f2b6eb7e98eb7a4d9331
44251a70edba3e950aab1f706e1ff34e2fa4dfae 30-Oct-2012 Dianne Hackborn <hackbod@google.com> Merge "Work on issue #7343200: Fails to show wallpaper in the background..." into jb-mr1-dev
ef03a7f441cf0cbef5a5f7fafb58a7d5aea7ef52 30-Oct-2012 Dianne Hackborn <hackbod@google.com> Work on issue #7343200: Fails to show wallpaper in the background...

...for lockscreen sometimes and remains black / blank

Add some debug output to try to track down what is going on.

Change-Id: I98a96c5da9c04b988e948f6fc2766d927db49ebf
ca60ba1874a6537b42854b52cd766ebf1a8c8189 30-Oct-2012 Kenny Root <kroot@google.com> Merge "Move app-lib definition up for system app scanning" into jb-mr1-dev
7c258505ecfbf726c56814963bee798e74ff4cb4 29-Oct-2012 Amith Yamasani <yamasani@google.com> Merge "Fix for some downloaded apps showing up on all users" into jb-mr1-dev
584c4cdbf36681bee210bffecb81f7900fcfa1b6 29-Oct-2012 Kenny Root <kroot@google.com> Move app-lib definition up for system app scanning

System apps were getting the wrong path because app-lib directory was
defined after the scanning of packages.

Bug: 7425516
Change-Id: I7a7a6b2a74f846c84516440ee950099bdc564d0b
269518e83efc01b387235d6194dcf93726e384ff 29-Oct-2012 Victoria Lease <violets@google.com> Revert "make FLP play nicely with multiuser"

This reverts commit e5601ce9bfa4effbddb84186f0fe1bfe4ad50301

Change-Id: Icd12f2d2c18f2eeeb2c367a885fb6d170ce426ae
99e88721a8bd19f04278e2fdccd224fc7ee705d4 29-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Don't scale screen brightness by electron beam level." into jb-mr1-dev
356bd4cf2c6db38c61c79e81fd5d9d119d299b8d 27-Oct-2012 Jeff Brown <jeffbrown@google.com> Don't scale screen brightness by electron beam level.

This change removes the modulation of the screen brightness
by the electron beam level. The screen brightness remains
constant while the electron beam animation is playing.

Previously we were multiplying the screen brightness by the
electron beam level so as to animate both at the same time.
The problem is that when the screen brightness is already dim
to begin with, it may not be possible to see the electron beam
animation because the modulated screen brightness rapidly
converges on 0. This may manifest give the appearance of
an abrupt transition or a flash as the screen turns off.

Bug: 7387800
Change-Id: I27b90f0098bbdc3de1d66fad819548d1301405cd
319c7e85019350e3a5f26c64803900b945130c3b 27-Oct-2012 Victoria Lease <violets@google.com> Merge "make FLP play nicely with multiuser" into jb-mr1-dev
f031f230f5e42613dab6b30431fac9b2839d68e6 27-Oct-2012 Amith Yamasani <yamasani@google.com> Fix for some downloaded apps showing up on all users

Bug: 7226656

In the case of packages with sharedUserId, the packages were inserted
into mPackages a little later. We were reading the package restrictions
before this happened and so the apps were being removed from the restricted
list, effectively setting installed=true.

Moved the block that reads the restrictions to after the processing of

Also, don't setInstalled for all users in the pending packages processing.

Change-Id: I382787e45fecdb871d80ffb4d854782d8e32e4a7
8a6f6a8ca9824891cc841d8c6ebd72a74c7d2580 27-Oct-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #7419050: Time is not getting updated after launching Clock" into jb-mr1-dev
084824548f9706db8356ed4480c282288ffc0bd0 27-Oct-2012 Amith Yamasani <yamasani@google.com> Merge "Fix the user name for the owner." into jb-mr1-dev
e5601ce9bfa4effbddb84186f0fe1bfe4ad50301 26-Oct-2012 Victoria Lease <violets@google.com> make FLP play nicely with multiuser

Frameworks' FusedLocationProvider runs as a specific user so that it
can join a specific process. The solution that works for NLP, run one
copy per user as that user, does not work for FLP.

To make FLP play nicely with multiuser, I've allowed SYSTEM_UID to
operate in the background and included a hardcoded exception to
prevent ServiceWatcher from trying to launch one FLP per user.

Bug: 7279799
Change-Id: I573ea5226d8d00777421b39c5c3fb0899bf09b4d
db5aca9aa6a3cb70c865e7f825a2826ccef5bb32 26-Oct-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7419050: Time is not getting updated after launching Clock

Change-Id: Iaa8de2d3732bffd63fcd4fafba50955d1776611d
6f34b411144a8202c96d05ff79e8040d3885643a 23-Oct-2012 Amith Yamasani <yamasani@google.com> Fix the user name for the owner.

Use a version number to update the name to Owner, from Primary.
For new installations, use the correct localized string.

Bug: 7417150

Fix a typo in the permission description.

Bug: 7333304
Change-Id: I123741e581c6a02d4597b3cd81f2ca48a8587e2a
92130f6407dc51c58b3b941d28a6daf4e04b8d62 25-Oct-2012 Jeff Brown <jeffbrown@google.com> Add MediaRouter API to get presentation display.

This new API makes it possible for an application to ask on
which Display it should show a Presentation based on the currently
selected media route.

Also added a new API on DisplayManager to query displays that
support a certain category of uses.

Improved the documentation of the Presentation class to explain
how to choose an appropriate Display for presentation.

Bug: 7409073
Change-Id: Iab451215e570ae55f3718fc228303143c800fe51
7fd9882ba3e97423901e06188c6dbaaca661ecbd 25-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Accessibility layer in inconsistent state after running UI test automation tests.

1. The accessibility layer has a back door for a UI test automation code running
from the shell to attach. The unregister code does an incorrect identity check
and as a result the register UI test automation service is not disconnected
until its process is killed. The fix is super safe and simple.


Change-Id: I4b1da18be6c5619dadd4a58fca6724529bc59dea
900e0ba5163bd03becf49922dfdfad07460716f0 24-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Dim the screen quickly in response to user activity timeout." into jb-mr1-dev
5244c93176497f7c151f85a46e46b534379603bc 24-Oct-2012 Jeff Brown <jeffbrown@google.com> Dim the screen quickly in response to user activity timeout.

Reverts a previous change that made the screen dim slowly instead.
The quick transition does a better job of attracting the user's
attention to the fact that the screen is about to turn off
unless the user touches the screen.

Bug: 7386034
Change-Id: I81e4d8939f6791b96352004984a9e5b2aab79788
cd668554417f089aa0ae013a29ab81864b4b4685 24-Oct-2012 Amith Yamasani <yamasani@google.com> Merge "Fix a crash in InputMethodManagerService due to permission failure." into jb-mr1-dev
acf5943c44d34845386afe7946aed086f8b3e87e 24-Oct-2012 Christopher Tate <ctate@google.com> Merge "Fix the Backup Manager's uninstall tracking" into jb-mr1-dev
1202c43685c475158a773d03d70effa01b6bb4ff 24-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Secure windows, secure surface views and secure displays." into jb-mr1-dev
8e080d7e10dd17662750605538a9799af66494e9 24-Oct-2012 Zhihai Xu <zhihaixu@google.com> Merge "License of files Bluetooth package is not updated to ASL2" into jb-mr1-dev
ecf4725ef4e753a2ef08205c922391753eb3803f 24-Oct-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #7401818: Wrong transition animation when clearing task" into jb-mr1-dev
f043de93ebb5178fb4b5c8f14e143c6f08bcc26f 24-Oct-2012 Amith Yamasani <yamasani@google.com> Fix a crash in InputMethodManagerService due to permission failure.

Clear calling identity before sending broadcast to the current user.

Bug: 7403829
Change-Id: If2b27d07d917b892470163e1303883b29a86c0e4
799916e6ac706921e43a3382e5d9e06e13f87525 24-Oct-2012 Dave Burke <daveburke@google.com> Merge "Revert "Check non-primary user dirs during package scan"" into jb-mr1-dev
383fa18b511c195cc51a96c5504442bfec998e9f 24-Oct-2012 Dave Burke <daveburke@google.com> Revert "Check non-primary user dirs during package scan"

This reverts commit 4525f5b69cb44a9a0c92f9c525fc47541f456621

Change-Id: I31b7a0860972532478ab3420556b806bfa78739a
f0681b34dffc1510cbd9c3da5c3a7e695553fa8d 24-Oct-2012 Jeff Brown <jeffbrown@google.com> Secure windows, secure surface views and secure displays.

Add new API to determine whether a display is secure.
Add new API to make a SurfaceView secure.
Clarify documentation.

Bug: 7368436
Change-Id: I7068c34c910e43b4bc72e43fa0dded59a25f0fe2
9622ca4f8870f4e66ecb3ad771410620c950bb5c 24-Oct-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7401818: Wrong transition animation when clearing task

When we are clearing activities off the top of a task, propagate
any activity options down from the top-most one to whatever top
activity we are keeping. This ensures that if we set the activity
options on the top activity of the task previously to give it the
correct animation, we still keep that animation for the activity
that really ends up being the top.

Change-Id: I6919b644a530ac283fe4d320496edc2bf72aa04e
92bc9b3196907a76d4b73c3f361d41c14dfd7f5c 24-Oct-2012 Kenny Root <kroot@google.com> PMS: check outInfo for null during delete

It appears that changing an application's signature during boot can pass
an outInfo of null to this function.

Bug: 7402550
Change-Id: I839fea6c8ee728a352c6b906f0fa6671c85f8694
56e75631bd737e5362309330d4839cc1dddb501c 24-Oct-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #7342364: JellyBean broke Toddler Lock, again" into jb-mr1-dev
fa0fd39a4bf296d254aa398c1b19ec960efa641d 24-Oct-2012 Zhihai Xu <zhihaixu@google.com> License of files Bluetooth package is not updated to ASL2

bug 7385618

Change-Id: I6232f537f4fda979d3aabe3a059c11d3299de9b8
da2509c434ebb2a5a0da1bc270cae7f007cbb0f9 24-Oct-2012 Kenny Root <kroot@google.com> Merge "Check non-primary user dirs during package scan" into jb-mr1-dev
e82f68d0164fa12a36da5ae9c839ab292224c384 24-Oct-2012 Christopher Tate <ctate@google.com> Fix the Backup Manager's uninstall tracking

The bug was that when an app was uninstalled, the Backup Manager was
discarding its bookkeeping about that app being represented in the
device's current live backup dataset. This in turn meant that if the
app was subsequently reinstalled, its data would not be restored from
that most-recent dataset: it would be restored from the *ancestral*
dataset if possible, or not at all.

Now the "ever backed up" state is retained correctly, and the app
will get its most-recent-data restored as expected.

Bug 7394519

Change-Id: I733cf41737765676e0a3a05fb1bcd32b165cb4ba
77119bc6c90a62beb2f83d9496d99199a7aefe14 23-Oct-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7342364: JellyBean broke Toddler Lock, again

Change-Id: I400c02711edc302a1bc7fbf98b62fcb9f76e5e12
6fd394ae799cc81e3b571773819ee99374a25158 23-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Improve auto-brightness hysteresis." into jb-mr1-dev
e941b1e27f6aad8a351c3caa3e0ad5f53dbf3707 23-Oct-2012 Jeff Brown <jeffbrown@google.com> Improve auto-brightness hysteresis.

Reintroduced the stability time heuristic which requires brightness
to remain significantly above or below the currently accepted
ambient brightnes before effecting a brightness change. The
heuristic has the nice property of preventing light sensor noise
from causing oscillations in brightness even when the noise has
a relatively large magnitude (such as in low light environments).

The time bound and filter thresholds are current set so that
brightness increases typically occur within 5 seconds of a change
in the ambient environment. Decreases take somewhat longer and
typically occur within 10 seconds.

Changed the timing for brightness animations when the screen is
being dimmed due to a pending user activity timeout. The screen
now dims slowly but then brightens rapidly when touched.
Previously the screen dimmed quickly and brightened slowly which
felt somewhat unresponsive.

Fixed a problem where a brightness change might not occur because
the light sensor had not reported a new value in a long time.
Now we synthesize measurements when needed to ensure that a
transition will take place if appropriate.

Bug: 7387800
Change-Id: I998df2fec59922042a41a1ba4af97ea52c0bd02a
4525f5b69cb44a9a0c92f9c525fc47541f456621 22-Oct-2012 Kenny Root <kroot@google.com> Check non-primary user dirs during package scan

During package scan, only the primary user data directories were
checked. If the secondary user didn't have an application directory, it
would happily ignore it. The app would then crash upon startup.

Bug: 7391882
Change-Id: I1fa92aa27386104d4ac6bc5dc92bfbf2e7dfac9f
034b386ccfc42bc9b44e728bb39959c81b1d2e8c 22-Oct-2012 Colin Cross <ccross@android.com> Merge "Add ro.revision property to checkin headers" into jb-mr1-dev
8b2c916a8dc2370ce700a577d999f1a0fd848735 22-Oct-2012 Colin Cross <ccross@android.com> Add ro.revision property to checkin headers

Early hardware revisions often have known issues. Add the ro.revision
property to the header for the checkin reports so known issues can
be easily filtered.

Change-Id: I337b09ddfa41ebbe7f8f56223392b0bd491f897b
23d622418b5c67dc43faabd930d1c59c5ce34f6a 22-Oct-2012 Jamie Gennis <jgennis@google.com> Merge "Set the secureness when creating displays" into jb-mr1-dev
cd75706117432e33d11639e675bcff50479a6bb9 20-Oct-2012 Amith Yamasani <yamasani@google.com> System server should always send broadcasts to a specific or all users

Bug: 7368245

Log a warning if the system process calls unqualified sendBroadcast()
and other calls.

As a result of the logging above, found a few more method calls such as
bindService() that would benefit from being more explicit to avoid
future confusion and reduce the log warnings.

Change-Id: I17f15c8be9adf7becd456d6abbab606f19befdbf
d6e3ad54907ec085aa41e5c77296e9f385c22e67 22-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Reduce screen on/off latency." into jb-mr1-dev
f584f1112772fdffce13cba38995b9e28adca191 22-Oct-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #7353900: Brief flash of home screen while dream starts on lock screen." into jb-mr1-dev
8074e98b20ac04fdc032a1ed00dd6763b7e04147 21-Oct-2012 Amith Yamasani <yamasani@google.com> Merge "Fix crashes when quickly adding and removing users" into jb-mr1-dev
7bbf8163fb83afc54b353a8def52bfb87ecce047 20-Oct-2012 Jamie Gennis <jgennis@google.com> Set the secureness when creating displays

This change makes use of the new 'secure' argument to the
ISurfaceComposer::createDisplay method. In this change both the overlay and
wifi displays are hard-coded to be non-secure displays.

Bug: 7368436
Change-Id: Ib65312f2adab5104d8deefbfc32af9dc106a9129
32dafe25ac2e06f127f48d6a5826537e11575f52 20-Oct-2012 Jeff Brown <jeffbrown@google.com> Reduce screen on/off latency.

Reduce latency of screen on/off and improve how it is synchronized with
backlight changes. Screen state changes are no longer posted to vsync
which should save time. What's more, the state change occurs on a
separate thread so we no longer run the risk of blocking the Looper
for a long time while waiting for the screen to turn on or off.

Bug: 7382919
Bug: 7139924
Change-Id: I375950d1b07e22fcb94efb82892fd817e2f780dc
7ad4438414de7b2d4e44798877df1700764c4472 19-Oct-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7353900: Brief flash of home screen while dream starts on lock screen.

Not very clean, this has a special hack in the window manager to
redo layout when a dream window is shown. After MR1 we should clean
this up (and the various other special dream hacks).

Change-Id: Ic1a5a2b10a0a07b4a5dccdbf0736b614ec06dd4a
9bef3294d3660a85442829a25c9777e25d3c3cc8 20-Oct-2012 Kenny Root <kroot@google.com> Merge changes Ie3c8ca8d,Ia175b36d into jb-mr1-dev

* changes:
Try to free cache before giving up on install
Robustly add symlink and add for non-primary users
db6a14cc85cede0769735fdac4da70766989a3ce 18-Oct-2012 Amith Yamasani <yamasani@google.com> Fix crashes when quickly adding and removing users

Make USER_REMOVED an ordered broadcast and send it before the user's
state is completely removed from the system. This gives services the
opportunity to clean up their state, while still having access to the
user's directory and UserInfo object (such as serial number).

Tell SyncManager to skip over dying/partially created users.

Improve UserManager tests, waiting for users to be removed fully.

Bug: 7382252

Change-Id: I93cfb39c9efe6f15087bf83c569a2d154ef27168
9823723d0f0bb47dfd3a6b251d7155dc1eb0918b 19-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Cannot pan in browser if magnification is enabled." into jb-mr1-dev
8c82025650fdbcb2a80be03f8be6dbff430b678c 19-Oct-2012 John Spurlock <jspurlock@google.com> Merge "Frameworks base: Promote dream setting defaults to config." into jb-mr1-dev
0ed07a0a30ef71053d0426956d3c198bb7540d4e 19-Oct-2012 Craig Mautner <cmautner@google.com> Merge "Allow getDisplayContentLocked to return null..." into jb-mr1-dev
ed108f3d125b0a4cc465057e3514caf781cdea19 18-Oct-2012 John Spurlock <jspurlock@google.com> Frameworks base: Promote dream setting defaults to config.

So that:
- the values can be shared (to fix assoc bug)
- the values can be customized in product overlays

Change-Id: I37f037082523a3d975f6014f36afa28c60117372
738cfc91053fc888397ec2d139e0798f8c95b3ca 19-Oct-2012 Michael Jurka <mikejurka@google.com> Fixing wallpaper flash when going in/out of Recents

Bug: 7372516
Bug: 7216872

Change-Id: I2a2308a85caf9f2ad2d382c709e5f8867bd060be
ff6c329f61ea4f00d9cbbe55387adbc2050f4679 19-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Cannot pan in browser if magnification is enabled.

1. We cache some events to see if the user wants to trigger magnification. If no
magnification is triggered we inject these events with adjusted time and down
time to prevent subsequent transformations being confused by stale events.
After the cached events, which always have a down, are injected we need to also
update the down time of all subsequent non cached events.


Change-Id: I41d8b831cc1016a0ee8f9c5ef5f42eb60a6f64d9
1d2b445d7431420b7cfbd9ef3fe4e326e121eeae 19-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Reduce auto-brightness jitter." into jb-mr1-dev
5831159b8d4cf85fa46e2c4cb8e7d9f750014d6f 19-Oct-2012 Jeff Sharkey <jsharkey@android.com> Merge "More migration to Global settings." into jb-mr1-dev
ce78b026179bc041bce9c9e2d8b63b79a97cbf67 19-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Fix deadlock." into jb-mr1-dev
4f0e969eabc336f6dfa31c6218efc1b3dec55139 19-Oct-2012 Jeff Brown <jeffbrown@google.com> Reduce auto-brightness jitter.

Apply additional hysteresis controls to prevent repeated brightness
changes within a short interval.

Bug: 7266090
Change-Id: I73122457f6f3200c80188d3716ce2baf38f6a0a6
66692500344cab2f53cdb6ee1545c567fff7cb16 19-Oct-2012 Jeff Brown <jeffbrown@google.com> Fix deadlock.

The display manager must never call into the activity manager with
its lock held. Make it clear that the adapters are constructed
while holding the syncroot lock.

Bug: 7377631
Change-Id: I1557313cbb31dcad9b5a46919a88a5a1c1af3e9b
cea3743499f4bb8e5f28a2e57686d7af313169c5 18-Oct-2012 Kenny Root <kroot@google.com> Try to free cache before giving up on install

Try to get installd to free up cache before giving up when there is too
little space free.

Bug: 7232123
Change-Id: Ie3c8ca8dfc190abbb9a29a7baee31f32e9de7d69
8d9a1f66d9d3dbbd45a56d441a746ec11dba7645 19-Oct-2012 Jeff Sharkey <jsharkey@android.com> More migration to Global settings.

Bug: 7375796
Change-Id: I3954ce141ad30073896090a28eee743ba15fd736
a3e90798b7ad3ed62e5b31842c699b2f98bd457b 18-Oct-2012 Kenny Root <kroot@google.com> Robustly add symlink and add for non-primary users

Amazingly, some apps still don't use the nativeLibraryPath. So add a lib
symlink for non-primary users to fix that.

Also, there was an error when the symlink existed that it would give up.
This shouldn't really happen, but in that case, just remove it and
create a new one to be safe.

Also, move the downgrade code to the appropriate place. This downgrade
case triggered the above symlink existing bug.

Bug: 7318366
Bug: 7371571
Change-Id: Ia175b36d98f00bdc2f2433b909aafd524eb34d15
80ce3d8746e9bb727ebf37a8963b96be84d82413 19-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Magnifier not respecting RTL/LTR direction and keyguard dialogs not properly centered." into jb-mr1-dev
be2a4a5e629b31071a160d57188219d6a76011fa 18-Oct-2012 Craig Mautner <cmautner@google.com> Merge "When removing windows remove from resize list." into jb-mr1-dev
2d5618c22101cfc4d6478cfe1d846798389540c1 18-Oct-2012 Craig Mautner <cmautner@google.com> Allow getDisplayContentLocked to return null...

... and check for null returns. This prevents DisplayContent objects
from containing null Display references.

Bug: 7368565 fixed.
Change-Id: I830fb4c1349204c366193657a95a92c48ccee66c
e09aed49e3498c9e0f3545ab97f816233d5eac66 18-Oct-2012 Jeff Hamilton <jham@android.com> Merge "Changes to support updating location providers." into jb-mr1-dev
444e8aabc12994316315688cc3674a432424adb9 18-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Magnifier not respecting RTL/LTR direction and keyguard dialogs not properly centered.

1. When magnifier, if a dialog that popped up is wider than the scree we pan to its upper
left corner. We now show the upper right corner if the locale direction is RTL.

2. Keyguard dialogs are not centered since they are used as a sign to recompute the
magnified area but an unnecessary else statement prevents such dialogs from being
properly show via a pan.


Change-Id: I285e46b822a29f0082c502cb642f9da32dabfe6a
1ea75b88b7ac4273b7a5395c5c57c6453d6cd3d1 18-Oct-2012 Christopher Tate <ctate@google.com> Merge "Sanity-check erroneous backup agent instantiations" into jb-mr1-dev
588fb15d16118b848c2d76497861b0e86846486b 18-Oct-2012 Victoria Lease <violets@google.com> Merge "LocationManager permissions cleanup" into jb-mr1-dev
0141faecc3b4a1cb771f38495d42c56eb6852fa8 18-Oct-2012 Amith Yamasani <yamasani@google.com> Merge "Allow services to query the info for a dying user." into jb-mr1-dev
860f660a0f891b44a9f61558d75119184bafa9e3 18-Oct-2012 Craig Mautner <cmautner@google.com> When removing windows remove from resize list.

Windows remained in the resized list if they were removed during

Bug: 7372289 fixed.
Change-Id: I41f949b7836b08b33d4d178e9aa016548328749a
37425c3475877f2fdadb78f669ec57fecf82dca7 17-Oct-2012 Victoria Lease <violets@google.com> LocationManager permissions cleanup

This commit is the result of a comprehensive permissions review for
MR1 release. It addresses a number of deviations from spec and from
MR0's behavior, bringing MR1 into sync with both.

It also cleans up the concept of "location resolution permission",
representing it internally as an enumerated access level to reduce
reliance on cumbersome string manipulation. There's a function to
convert the enum int into a permission string where needed, too.

Additionally, this confines caller-identity-sensitive calls to the
hopefully-obviously-named "getCallerAllowedResolutionLevel()". This
should make it much easier to prove correctness with respect to
accidentally calling functions that depend upon the caller's identity
after identity has already been shed by Binder.clearCallingIdentity().

Change-Id: I446169aee8fb2fde26ac6d04b479b40253782acb
88c66cbb00a572ac8280f0e0ea38079d48ec59f3 18-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Dream when user activity times out while docked if appropriate." into jb-mr1-dev
586503d51fbcc622af62b43b25579ce2f299d68b 18-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Add special mirroring modes for demonstration purposes." into jb-mr1-dev
fbadb69978be578cea9d2bf038de7c79b0787e4f 05-Oct-2012 Jeff Hamilton <jham@android.com> Changes to support updating location providers.

This reverts commit 20de160ca32a8f2936a80ffd70551a22e2371d25.

Bug: 7242814
Change-Id: I9ec49a14feb835b6683186fc6da4a74ae19fbae2
1638931166b7b5571886a8fe6d413ea90d4194b5 18-Oct-2012 Amith Yamasani <yamasani@google.com> Allow services to query the info for a dying user.

This allows services watching for USER_REMOVED to fetch the serialNumber of a dying user.

Also fix an AIOOBE when building the userId array, typically on cleanup.

Bug: 7368826
Change-Id: I24e52278af8353b5744372127da4bf4fafc89baa
ec6aa5945408ce97034d24e1ba5d80bed88cebf4 18-Oct-2012 Jeff Brown <jeffbrown@google.com> Dream when user activity times out while docked if appropriate.

If the user has requested that dreams start when docked and a user
activity timeout occurs, then start dreaming assuming all of the
other usual conditions are appropriate for dreaming (the device is
powered, etc.).

Previously dreams only started when the device was initial docked
but not if the device fell asleep while remaining docked.

Bug: 7281240
Change-Id: I72c3f854fd1ae8e6615f4fa6e4c4ecd8de37c84b
23fa0320b88bd2141742d47eaf2626369cb03b22 18-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Add a notification icon when connected to wireless display." into jb-mr1-dev
27f1d674bf9fb53af7facdcb746912e036d5bf75 18-Oct-2012 Jeff Brown <jeffbrown@google.com> Add special mirroring modes for demonstration purposes.

Assume rotation of HDMI display is portait.
$ adb shell setprop persist.demo.hdmirotation portrait

Don't lock rotation while HDMI is plugged in.
$ adb shell setprop persist.demo.hdmirotationlock false

Hide secondary displays from apps but continue mirroring to them.
$ adb shell setprop persist.demo.singledisplay true

Bug: 7326281
Change-Id: I8f9a3b0bc19821a3a01043b0f516806dac82ce53
a7f9c966bc90e52baaf0cf0c165463e5f44354c5 18-Oct-2012 Jeff Brown <jeffbrown@google.com> Add a notification icon when connected to wireless display.

Bug: 7350174
Change-Id: I18481e2a1445b0aa3340e5d9b02511394521e50e
346acb123dd87396726941b484be6fdd5cd4ea44 16-Oct-2012 Christopher Tate <ctate@google.com> Sanity-check erroneous backup agent instantiations

Two distinct changes:

Fix a bug seen in the wild where a newly-launched application will be
spuriously asked to instantiate a backup agent. What was happening
there is that some Activity Manager state was being left stale in certain
circumstances, and then in combination with app uninstall / install, there
could be a case where uid reuse wound up looking like an app identity

We now positively verify before instantiating the agent that the intended
backup target package is uid-compatible with the app process that the
instantiation was requested of. The incomplete bookkeeping in the
Activity Manager has also been tightened up, and the Backup Manager is
more aggressive about cleaning up pending operations pertaining to
apps being uninstalled.

Bug 5874010

Change-Id: Ic389f4a96c9dcd0ba6b3962b579084033d8ae9f8
b6c171b1afa871aa092dd2ec2ed25f48275ef194 17-Oct-2012 Amith Yamasani <yamasani@google.com> Merge "Do cleanup when Stopping users" into jb-mr1-dev
05ad745ff63ed3bcdb86d42290ddc2ee214fe90f 17-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Long press not working if explore by touch and magnification are on." into jb-mr1-dev
e13ae648504661ca158d15aa415568e351b380c4 17-Oct-2012 Craig Mautner <cmautner@google.com> Merge "Use parent window to evaluate show-to-all-users." into jb-mr1-dev
72e351296046d61ecc5863da2faca0ab4ba0fd62 17-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Long press not working if explore by touch and magnification are on.

1. In the magnifier we are caching the touch events until we figure
out whether the user is triple tapping to enable magnification.
If the user is not trying to engage magnification we deliver the
stashed events. However, these events are stale and the subsequent
transformations such as the touch explorer get confused when trying
to detect a tap since the delay is longer than the tap slop.
This change compensates for the time the events were cached
before sending them to the next transformation in the chain.


Change-Id: Idd8539ffed7ba4892c5a916bd34910fd2ef50f75
de5c3a04517bba3adacd8c6eb2b365cf93c73a69 17-Oct-2012 Laurent Tu <laurentt@google.com> Merge "Handle unknown case in LocationManager.getProvider" into jb-mr1-dev
645b05a6e47ee7052b12a8b4e916d311f4e59e99 17-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Blank all displays including Wifi Display when screen is off." into jb-mr1-dev
8ec0943a7963178da838e4b6b842ec1109707b35 17-Oct-2012 Jeff Brown <jeffbrown@google.com> Blank all displays including Wifi Display when screen is off.

Calling blank() on Surface Flinger to turn the screen off is not
enough to ensure that the content is blanked to all virtual displays.
What's more, the black surface left in place by the ElectronBeam may
not completely hide the content (particularly if the display orientation
changes). To fix this for real, we'll want to move the display power
management code from the power manager into the display manager
but we don't have time for that.

As a work around, force all displays to show an empty layer stack
with no surfaces on it while blanked.

Bug: 7311959
Change-Id: I870c985f9e76f3f2322e5d83cdbbed9ed15b9f10
341220fd099b2e74ac605d417f274537dc4bc749 17-Oct-2012 Craig Mautner <cmautner@google.com> Use parent window to evaluate show-to-all-users.

When a window is attached to another window use the parent window's
attributes to determine whether the child window should be shown
to all users.

Bug: 7328633 fixed.
Change-Id: I9601c149af87f624378e6895063bb3179d4f845e
b7f9d254978b285bf04613f6e69a1afa89240ca9 16-Oct-2012 Laurent Tu <laurentt@google.com> Handle unknown case in LocationManager.getProvider

If a provider is unknown, return null in
LocationManagerService.getProviderProperties() instead of throwing a
security exception, so that LocationManager.getProvider() returns null
in this case, as specified by the javadoc.

Bug: 7359960
Change-Id: I1b8b74745f66717a3439a1d353a46a23272cc313
964629aca8d076826198a21b654ed858618b5619 16-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Occasionally triple tap on the keyboard toggles screen magnification." into jb-mr1-dev
dc9e13b30ab26f8382b7e67dd681dee9b04bdb29 16-Oct-2012 Craig Mautner <cmautner@google.com> Merge "Perform all layouts within first loop." into jb-mr1-dev
417b05912a2eb960d59541d546d1e857f95d906b 16-Oct-2012 Craig Mautner <cmautner@google.com> Merge "Revert app freeze timeout delay." into jb-mr1-dev
a13a41dc0ed049319c3a6b51d1f35b0b1c20d81b 16-Oct-2012 Craig Mautner <cmautner@google.com> Perform all layouts within first loop.

Do not begin animation while layout requests are still

Bug: 7333622 fixed.
Change-Id: I77c2cdc123c1e26f9661feade0d9a1843c75d5f6
55468c64bc4f3c4b16bf144f66907d75bb656b0a 16-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Occasionally triple tap on the keyboard toggles screen magnification.

1. Sometimes unlocking the device when the IME is up and triple tapping on the keyboard
toggles screen magnification. The core reason is that when the kayguard window is
shown we hide all other windows and when it is hidden we show these windows. We did
not notify the screen magnifier for windows being shown and hidden. Also when the
windows are shown we may reassign layers to put the IME or the wallpaper in the
right Z order. The screen magnifier is now notified upon such layer reassignment
since window layers are used when computing the magnified region.


Change-Id: I0931f4ba6cfa565d8eb1e3c432268ba1818feea6
a4942c9fb9cc224bcb1a0a53dcacd13848819951 16-Oct-2012 Craig Mautner <cmautner@google.com> Revert app freeze timeout delay.

Speed up of wallpaper loading on Manta means this workaround is no
longer necessary.

Bug 7354440 fixed.

Change-Id: Ic0ad3c689abb5342fb29c824857db9d5c2d45008
1f0752993ffd4339cdf0e7d69b96093503bd2e24 16-Oct-2012 Daniel Sandler <dsandler@android.com> Merge "Allow any user to clear a notification targeted at USER_ALL." into jb-mr1-dev
f6dbd61b108e586c1db3e61cbfc07d4d750027c0 16-Oct-2012 Craig Mautner <cmautner@google.com> Merge "Always layout Keyguard on config change." into jb-mr1-dev
809bb404da66498f1723279542d2a7d1f4512052 16-Oct-2012 Jamie Gennis <jgennis@google.com> Merge "Flag window animation transactions as animations." into jb-mr1-dev
b6ce6e42cc89864354c7ecb9ae80504a6c9dddcf 16-Oct-2012 Jamie Gennis <jgennis@google.com> Flag window animation transactions as animations.

This change makes WindowManager use the new eAnimation flag when animating
windows. This prevents some of the window updates from being combined with
updates from prior animation frames.

Bug: 7353840
Change-Id: I5a9f8fa2c1a2f5f08363a45cd9f28bb97cd77080
0e082155ef2d7390d7befc139a788d3def94fecc 16-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Stop dreaming if the battery not charging effectively." into jb-mr1-dev
322de606574f45d1a4335b515369ce27c74d2b6b 16-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Cleanup some internal documentation." into jb-mr1-dev
df409231a75c8b2ae976af66c0baec99b280aa33 16-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Update wifi display device name when renamed." into jb-mr1-dev
756901d82b41f50610a63b7cf4c7747a70f1f724 12-Oct-2012 Amith Yamasani <yamasani@google.com> Do cleanup when Stopping users

Mark user 0 as initialized, otherwise it will show up as
uninitialized when viewed from secondary user if never switched to user 0.

Bug: 7301595

Also clean up any users that were in the process of being removed, if device
crashes at a bad time.

Change-Id: Ic16a6c9ccb6a64b7463725f6cc279335a821fcd5
016ff14f12900a12499a434b297b2192b62ff2da 16-Oct-2012 Jeff Brown <jeffbrown@google.com> Stop dreaming if the battery not charging effectively.

If the user activity timeout expired and the battery appears
to be draining faster than it is charging then stop dreaming
and go to sleep.

Bug: 7312455
Change-Id: I1b9d89e5b2647c72c455d2792e3778a2fe6a4e34
ab887a09ad1a0e82d848a91c49449538377f075d 16-Oct-2012 Jeff Brown <jeffbrown@google.com> Cleanup some internal documentation.

Bug: 7312455
Change-Id: Idefd71f2e9d1abe1b2671dac9702edf7f5fbc118
3f840c8c3c1c53f046f6d187b2d3c4120b8d8afe 16-Oct-2012 Victoria Lease <violets@google.com> Merge "fix crashing apps" into jb-mr1-dev
ee4f029ff4905abbdbc1ce47db2cf2c3510949e9 16-Oct-2012 Jeff Brown <jeffbrown@google.com> Update wifi display device name when renamed.

Bug: 7340725
Change-Id: Ia3835a37fa3800371920f863b82f992efe764664
da479c5f8c9675dc11b3d6c4024749064d54bb67 16-Oct-2012 Victoria Lease <violets@google.com> fix crashing apps

Bug: 7349330
Change-Id: Iea61bce23cb197c7a28d574098253823df73a99b
532c9c4543135463ee1f39b282d3156a3e226d50 15-Oct-2012 Jeff Sharkey <jsharkey@android.com> Merge "Protect more service dump() methods." into jb-mr1-dev
a3f4bf531f64c49b6a792368b3e5628fe7cc0e5c 11-Oct-2012 Craig Mautner <cmautner@google.com> Always layout Keyguard on config change.

Add Keyguard to list of windows that can't be hidden by keyguard.

Don't assign Configuration to window until layout has had a chance
to compare it to window's existing Configuration.

Bug: 7094175
Change-Id: I99a9fd4af9a31871fe130db7b6bdf49bd51a6092
321e9c562b9146cf936b3d1ec2f9317e98edd5fe 12-Oct-2012 Daniel Sandler <dsandler@android.com> Allow any user to clear a notification targeted at USER_ALL.

This also adds the userid to notification_* eventlogs.

Bug: 7325802
Change-Id: I48055caf1344acd58b61607bf0be38cc299fc7be
a30d969401a8533a5a341664421ba9b1e150bac3 15-Oct-2012 Robert Greenwalt <rgreenwalt@google.com> Merge "Monitor the right interface re VPN" into jb-mr1-dev
52801aae89196b7ad16ef21b07d2d621e7d0bb61 13-Oct-2012 Jeff Sharkey <jsharkey@android.com> Protect more service dump() methods.

Bug: 6406965
Change-Id: Ia45a580c1e6f403308e7e540f18f2c0505af0f29
53c04bdd35a85aa65d1a1f18ca2ee34970e2c2d0 13-Oct-2012 Robert Greenwalt <rgreenwalt@google.com> Monitor the right interface re VPN

Must remember the outer interface - undoes a change from a
couple months ago that broke things.

Change-Id: Ia4f60862c60f3078853e151980e09cbf22a57222
861a3b2d4f2090d23cc5e135890a0faf091b9e12 13-Oct-2012 Dianne Hackborn <hackbod@google.com> Revert fix to issue #6880627: PendingIntent.getService() returns...

...stale intent of force stopped app

Fixing this caused other problems elsewhere that we don't have time
to address at this point.

Fixes issue #7338275: Tapping clock home screen widget doesn't open
alarms anymore

Change-Id: Iedc1fae5f62b6ead28d1895d709591358e5d6634
810df8951eb4bbe77f150483208f04daadac5dd9 12-Oct-2012 Jeff Sharkey <jsharkey@android.com> Merge "Return ApplicationInfo with requested userId." into jb-mr1-dev
3da6c219a8b1acebbfd8a56ee31b5d91d0425dc4 12-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Do not launch Somnambulator as a dock app." into jb-mr1-dev
11159e9a785a143c9f3765bdf5a5ccfd77842d7a 12-Oct-2012 Jeff Brown <jeffbrown@google.com> Do not launch Somnambulator as a dock app.

Fixes a black flash that occurred when the device was docked
because the UiModeManagerService was launching the Somnambulator
to start the dream when docked. This caused an unnecessary
activity transition and could in fact make dreaming less
reliable than if the UiModeManagerService started the dream itself.

Moved common code from UiModeManagerService and Somnambulator
to Sandman to ensure it is kept in sync.

Bug: 7328545
Change-Id: I46102784e2ab1acc0241d43a48abf0581278af24
38f8688baeb0f610a47c17bb7810349502d62ab6 12-Oct-2012 Jeff Sharkey <jsharkey@android.com> Return ApplicationInfo with requested userId.

Return ApplicationInfo with requested userId instead of trying to
infer it from calling UID.

Bug: 7334712
Change-Id: I9ce0061e2d020b0d74c7c9cd22d89c5ff2466a6c
4cce397c0dab44cf7b1b657d0e5410b5970eef55 11-Oct-2012 Winson Chung <winsonc@google.com> Merge "Letting partial update fall through if the widget has not received a full update yet. (Bug 7214731)" into jb-mr1-dev
2e21bdbe303a8abba406bdb5469944419e3a698a 11-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Ensure MediaRouter correctly handles renamed Wifi displays." into jb-mr1-dev
17026864e846630da7b619b55c5a65311484656c 11-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Ensure Binder in-calls to UiModeManagerService are guarded." into jb-mr1-dev
46fb9e9f226c234c2b95428b8827df3cb0333cde 11-Oct-2012 Craig Mautner <cmautner@google.com> Merge "Check for apps closing and restore mExiting test." into jb-mr1-dev
2444ae7e2b8658a4a90f996e678423558744b4a2 11-Oct-2012 Jeff Brown <jeffbrown@google.com> Ensure MediaRouter correctly handles renamed Wifi displays.

Fix a couple of bugs that cause MediaRouter to disconnect from
the current Wifi display whenever it is renamed.

Added an extra check in WifiDisplayAdapter for identity renames.
The Settings app already handles this case but it's good to have
the service check for it as well so we don't store unnecessary

Bug: 7310777
Change-Id: I8fddd32ca59f9b798ee31b467b81457508c345f8
6611988429d1d70ec429f87bbf2b093cf1e2e31f 11-Oct-2012 Winson Chung <winsonc@google.com> Letting partial update fall through if the widget has not received a full update yet. (Bug 7214731)

Change-Id: I4da99c259df51f8f66d3ade1156040bd0360ca5d
a987d43bc916b6446fe41037d9fcf07e778b3452 11-Oct-2012 Craig Mautner <cmautner@google.com> Check for apps closing and restore mExiting test.

Removal of the mExiting test in a previous CL was a mistake leading
to z-order errors. In particular the auto complete dialog was on top
of the IME and was being dismissed due to touches on the IME.

Restoring mExiting alone missed cases where apps were exiting which
don't set mExiting. Adding a test for membership in mClosingApps
fixes that.

Bug: 7327220 fixed.
Change-Id: I3965b8a07080d1347bdada51ffeafe6ef2e32c8e
ee0d8deb5e4bb9e2d9caef2c988f483afe9f24a7 11-Oct-2012 Winson Chung <winsonc@google.com> Merge "Skip merge and assign RemoteViews directly if updateAppWidget() has not been called. (Bug 7214731)" into jb-mr1-dev
487bb6e20b96aa6920e08669a260118a40e604d5 11-Oct-2012 Jeff Brown <jeffbrown@google.com> Ensure Binder in-calls to UiModeManagerService are guarded.

Fixed a couple of problems where locks were not being taken or
where the calling identity was being clear deep in the call
stack whereas it should be cleared as close to the entry point
possible to ensure code correctness.

Bug: 7328545
Change-Id: I8ff646a772cd7f4025d5604bc35c6372c3d2428e
596b1850f39e6d4b2f4392dbfb591d99a73b7563 11-Oct-2012 Winson Chung <winsonc@google.com> Skip merge and assign RemoteViews directly if updateAppWidget() has not been called. (Bug 7214731)

Change-Id: Ie19b629deea9133800df265a2cebedc8bcb2a74d
0ea16037c7b6db95b3c23180bd88bdf431bf54a3 11-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Screen magnification does not auto-pan when fragment dialog pops up.

1. We auto pan when certain type of window pop up to make sure the user
knows about the context change. This does not happen however for
fragment dialog since its window type is not in the list of one
we auto pan for. Updating the window type list.


Change-Id: I9b097c57df929d2e4e807a948c3a0540f4092a76
ee44fae19664594d4a17dd86723106533f4b218a 04-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Prevent out of range magnification scale to be persisted.

1. If a bad magnification scale is persisted, i.e. it is
not between the min and max, the screen magnifier gets
into a bad state which even a reboot does not fix since
the scale is persisted in settings.

This change ensures that only valid scales are presisted.
In general a bad value should not be attempted to be
persisted but at this point this is the safest change.


Change-Id: I3e9c7c091772fa64128ab8403c2127ce65cb94b8
a517de36c44ab8cad5a267315aedf940aefa44cb 11-Oct-2012 Matthew Xie <mattx@google.com> Donot reset mEnable flag when binding timeout.

During start up, binding could take a while. When binding timeout
only reset mBinding but not mEnable.
bug 7328147

Change-Id: I306a84ca53d9e1d05111395642626e68d19e9663
78eb122450f127d66d4e8cf7f65cad80ea85d3ac 11-Oct-2012 Jeff Brown <jeffbrown@google.com> Dejank electron beam.

On some devices it can take hundreds of milliseconds to get a
brand new EGL surface performing in tip-top shape. To get it
ready make it do a few pushups before the show begins.

Bug: 7318962
Change-Id: I7ae92ce100c368327042a29ffa65faee9b567c8d
3c584f20ac8fe9378c094ad3b63936bca35954ba 10-Oct-2012 Jeff Brown <jeffbrown@google.com> Use exactly the same timings for the ElectronBeam as JB.

Bug: 7318962
Change-Id: Ic04bac5b07ec64fed84a6381ee1916ddeed01255
bcfc1ca8ab8bf057e20d9369af3d007d80ca83e4 11-Oct-2012 Jean-Michel Trivi <jmtrivi@google.com> Merge "Don't play notifications during speech recognition" into jb-mr1-dev
0a75ed0805dd7f97ff058623eb8e4f4b258c44ab 11-Oct-2012 Craig Mautner <cmautner@google.com> Merge "Revert "Remove debugging statements before final ROM."" into jb-mr1-dev
f864401cfa1fdf863003f9d2d624fd742f7b5f4b 11-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge changes I00665385,Ic76db232 into jb-mr1-dev

* changes:
Send accessibility notification events only for the current user.
No sound produced on global actions dialog pops up if no vibrator is present.
c1940167109098b5748cde025e49575c6515e490 11-Oct-2012 Chris Craik <ccraik@google.com> Merge "Use the original caller pid for computing visibility" into jb-mr1-dev
c31ed39e7a5a8c709aa5f356cb5bcb563b059d65 10-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Send accessibility notification events only for the current user.

1. The notification manager service is firing accessibility events
for notification for a background user. Events for the current
user's notifications should be sent.


Change-Id: I00665385ba2106f161928dad1b76536c93c17f27
3198ef3f971384cfb92f7d18b0fc8dae222bd58f 10-Oct-2012 Chris Craik <ccraik@google.com> Use the original caller pid for computing visibility


Make Strict mode violations flicker the screen for visible app correctly.

Change-Id: I293dc9e945cb0366a1cd7b63a5b746159aab7c74
9ea6343fa4dc6c0e2144880594fa7a80f94c31f3 10-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "The active window for accessibility purposes can be miscomputed." into jb-mr1-dev
64ecc0e1015f1c6c1f949bb74ba3f0875178c737 10-Oct-2012 Craig Mautner <cmautner@google.com> Revert "Remove debugging statements before final ROM."

The bug cropped up again. Need these statements to pin it down.

This reverts commit f1f3b49b949af72692f7f85a1c1ef220e8630e30

Change-Id: Ie0548232daff32ee2541249b0950e23bd98c08d2
6ae8a24fc045bc7970f2843fa9baf06aff15e22d 10-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> The active window for accessibility purposes can be miscomputed.

1. The active window is the one that the user touches or the one
that has input focus. We recognize the user touching a window
by the received accessibility hover events and the user not
touching the screen by a call from the touch explorer. It is
possible that the user touches window that does not have
input focus and as soon as he lifts finger the active one
will become the window that has input focus but now we get
he hover accessibility events from the touched window which
incorrectly changes the active window to be the touched one.
Note that at this point the user is not touching the screen.


Change-Id: Ife035a798a6e68133f9220eeeabdfcd35a431b56
fa5bc081593891959c143e0de9e59dd076a47b42 10-Oct-2012 Craig Mautner <cmautner@google.com> Merge "Increase window freeze timeout for bigger screens." into jb-mr1-dev
d677054ca63f55abaa1c478ea3c50f6be665a979 10-Oct-2012 Jean-Michel Trivi <jmtrivi@google.com> Don't play notifications during speech recognition

Add support for querying AudioManager to know whether speech
recognition is currently underway.

Don't play a notification if speech recognition is underway.

Bug 7314859

Change-Id: I1bd013a3168cfe1a6b6dcfd28565e1c3c512eb6a
7dfcb018206abebc45e478ef01465a50532f0f4e 10-Oct-2012 Craig Mautner <cmautner@google.com> Increase window freeze timeout for bigger screens.

More pixels take longer. Timeout was occurring before Status and
Navigation Bars were finished drawing causing them to animate in
during rotations.

Bug 7307718 fixed.

Change-Id: Iccf27b6172d0c9831690cc2fcf93027a40b705d8
251445667ce045c4425c10fb24e3e23f90a210c0 10-Oct-2012 Zhihai Xu <zhihaixu@google.com> Merge "Bluetooth multi-user updates: change bluetooth manager system service to reject background user access. disable and enable Bluetooth when user is switched" into jb-mr1-dev
f6138f0720e678f236fe8c442a7660a955da9d10 10-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Don't consider the boot completed until the animation is over." into jb-mr1-dev
40874a096ba6448ebffea4b17486dbfbc957c0df 09-Oct-2012 Zhihai Xu <zhihaixu@google.com> Bluetooth multi-user updates: change bluetooth manager system service
to reject background user access. disable and enable Bluetooth when user is switched

bug 6925422

Change-Id: I52136e707da2d1ba8228c1bb8beef1414ead1893
20767b2d1ea7af5539e6d3be5e70ce245da34b42 10-Oct-2012 Jeff Brown <jeffbrown@google.com> Don't consider the boot completed until the animation is over.

This fixes a problem where the screen times out shortly after
boot before the user has had a chance to interact with the device.
Now we wait until the boot animation has completed then set
boot completed, poke user activity and start the countdown.

Bug: 7316397
Change-Id: Ie5a0b1012d265e655d33cc8fba49ca349f48f1de
c0bd747b0605af251ff136277f14220a5a4c9818 09-Oct-2012 Dianne Hackborn <hackbod@google.com> Further work on issue #7307399: Framework needs a new pre-user-shutdown...

...phase & callback API

I realized there were a few things wrong with what was there. The new
ACTION_USER_STARTING was not being sent for the first user at boot, and
there was an existing problem where ACTION_USER_STARTED was sent every
time there was a user switch.

Also improved some debug output of broadcasts to make it easier to see
what is going on in this stuff, and better reporting of why a service
couldn't be started.

Change-Id: Id8a536defbbad1f73d94a37d13762436b822fbe3
840590dd642719f402491092944a12475d6d6a8e 10-Oct-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #7311376: Add API to allow apps to know if they are..." into jb-mr1-dev
6f2cdcdbe4096565434c31cf4fe3c782c38f1ce1 10-Oct-2012 Eric Laurent <elaurent@google.com> Merge "fix concurrent headset and HDMI connection" into jb-mr1-dev
0cd641001a152893642b702446bb12c7c0c08e48 10-Oct-2012 Craig Mautner <cmautner@google.com> Merge "Remove debugging statements before final ROM." into jb-mr1-dev
a8a9bd65bf5865d83ef44f54552ca39522bfbcf0 10-Oct-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7311376: Add API to allow apps to know if they are...

...running as the foreground user

Add UserManager.isUserRunning() which is the public version of the
existing method on ActivityManager.

Also add UserManager.isUserRunningOrStopping() since that seems like
it will be useful.

And fix the internal function that returns the array of currently
running users to not include stopped users.

Change-Id: I84672fa8748fc027fd402729586b5603f640e498
f545660dcb54f90ad6a79ef0d7dccb509dc69017 10-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Prevent full wake lock from keeping device awake while dreaming." into jb-mr1-dev
9e6e8355f8d7bd1856e69cb8965087a00f1792bd 10-Oct-2012 Eric Laurent <elaurent@google.com> fix concurrent headset and HDMI connection

Fix a bug in WiredAccessoryManager causing an
HDMI disconnection to be signaled to AudioService when a
headset is connected.

Bug 7313250.

Change-Id: I7c6446104c55f9a4fc146abe7020df45ad6ba5e7
10428748f98518dbaef8c56cf1ad75aabd75da45 10-Oct-2012 Jeff Brown <jeffbrown@google.com> Prevent full wake lock from keeping device awake while dreaming.

A dream may itself hold a wake lock in order to keep the screen
bright as it runs. However this wake lock also causes the device
to stay awake even when it is not plugged in which is undesirable.

This change makes full wake locks behave differently when napping
or dreaming. The wake lock still keeps the screen bright but
it does not prevent the device from falling asleep. This is
similar to our policy of ignoring full wake locks completely when
the device is manually put to sleep by the user.

Bug: 7295909
Change-Id: Id99e82d2143ae1a81629281d6407d7527efb8137
a8a6b0848d1c11c3ed0fcb846e3d6c39b91536a0 10-Oct-2012 Kenny Root <kroot@google.com> Merge "Add fused location provider to real provider list" into jb-mr1-dev
f1b246ddfed6757180768eea080b80c1538333f3 09-Oct-2012 rich cannings <richc@google.com> Merge "Fix verfication bypassed for adb installs" into jb-mr1-dev
36070b414a710dd09a24698699f501d58c5772a4 09-Oct-2012 rich cannings <richc@google.com> Fix verfication bypassed for adb installs

ADB installs appear as UserHandle.USER_ALL, and can only be performed by
UserHandle.USER_OWNER, so use the package verifier for UserHandle.USER_OWNER.
This returns a valid userId to call PackageManagerService.getPackageUid.

Bug: 7293091
Change-Id: I7a5497cfe5fa2e7aa804345cf9f507ec26a0db21
f1f3b49b949af72692f7f85a1c1ef220e8630e30 09-Oct-2012 Craig Mautner <cmautner@google.com> Remove debugging statements before final ROM.

Change-Id: I18afd1a4c4f8f945308edc9b3af48b8c8adb3b9e
c3575188c2f2ad27b1f03b9b9c0705a686a5e42f 09-Oct-2012 Kenny Root <kroot@google.com> Add fused location provider to real provider list

During testing it's possible to mock a location provider, but the fused
location provider wasn't being inserted into the "mRealProviders" map so
when the fused location provider was unmocked, it would disappear
permanently from the list until the next reboot.

Bug: 6949478
Change-Id: I4993aa7fbbd21cea16bdbf2722d637c909b1cd73
c0c0c0e612e1ccf1e55eb2a9338ddfff40d8d7f2 09-Oct-2012 Victoria Lease <violets@google.com> Merge "Multiuser love for LocationManager" into jb-mr1-dev
6be35dd636bd530a781e997ea9f9a43fc82a1fef 09-Oct-2012 Satoshi Kataoka <satok@google.com> Merge "Fix an issue on showInputMethodPickerFromClient" into jb-mr1-dev
c86884cd839123e3be3cc97c8f293ac47d3624a9 09-Oct-2012 Satoshi Kataoka <satok@google.com> Fix an issue on showInputMethodPickerFromClient

Bug: 7302748
Change-Id: Iff4345d26b3d6e4bfedf893bbd6a864c771df01d
9e316a1a2a8d734315bbd56a85308f9657a92913 09-Oct-2012 Jeff Brown <jeffbrown@google.com> Blank or unblank all displays as need.

Ensures that both the internal display and HDMI are blanked
or unblanked in tandem.

Bug: 7309812
Change-Id: Ie8b96d393e8bb20d23c92f3320142d9f7cf42aff
b711d57ca4e2c6a1befbfa1a41f4b8094755a93f 02-Oct-2012 Victoria Lease <violets@google.com> Multiuser love for LocationManager

LocationManagerService now keeps track of the current user ID and
denies location requests made by all but the foreground user.

Additionally, location settings are now user-specific, rather than
global to the device. Location provider services now run as specific
users, and when the device's foreground user changes, we rebind to
appropriately-owned providers.

Bug: 6926385
Bug: 7247203
Change-Id: I346074959e96e52bcc77eeb188dffe322b690879
2aac1a0fe8fe5dea1185374ed914f95101de16ed 09-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Improve the power off fade animation." into jb-mr1-dev
252c206984299d7ce91c27536cafe1bb2fb9628d 09-Oct-2012 Jeff Brown <jeffbrown@google.com> Improve the power off fade animation.

Fixes an issue where the dim surface alpha was not actually being
animated like it was supposed to.

Bug: 7224614
Change-Id: Iffd54367ca97ae7fd4b9603807f4e036750442b2
0fb7e32a0129e9e62d58ea652cc00f8a908d65b5 09-Oct-2012 Victoria Lease <violets@google.com> Merge "Last position improvements for GeofenceManager" into jb-mr1-dev
55c7029312f67a80c658fa84bd404ef7569d02d8 09-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Show the touch explore enable dialog for the current user." into jb-mr1-dev
4efbab480d7e1b770c5515a76b897359730c1a4d 09-Oct-2012 Dianne Hackborn <hackbod@google.com> Merge "Framework side of issue #7302511: GCM client needs to use new framework API..." into jb-mr1-dev
36d337adffa6d1c4c953e83730ad58747f554877 08-Oct-2012 Dianne Hackborn <hackbod@google.com> Framework side of issue #7302511: GCM client needs to use new framework API...

...to fix background->shutdown delivery race

Add ACTION_STOPPING and ACTION_STARTING to allow such apps to keep track of
which users are started/stopped, and be involved in the process of stopping
a user.

Also get rid of the scale part of the wallpaper transitions, since it seems
like I have still failed at getting the user switch to wait until the new
wallpaper is displayed.

Change-Id: If7e8fdae3544a9d7987a1b9274dc8b49022f6f62
318b00bfeefa6dc05913c8eea0052d70185c7910 08-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Show the touch explore enable dialog for the current user.

1. We are showing a warning dialog if the user enables an accessibility
service that requests explore by touch. This dialog was shown only
for the owner but should be shown for the current user.


Change-Id: I692b5112df16405e6d2e4890aafbfde79981f973
847b12295e0a5c9e04f344f04c3540751ef6b9d1 08-Oct-2012 Craig Mautner <cmautner@google.com> Merge "Fix problems with IME layers." into jb-mr1-dev
e6f7d5054a71eeae8c0b10a2305347efdcd8c3d3 08-Oct-2012 Craig Mautner <cmautner@google.com> Fix problems with IME layers.

The query WindowState.isDisplayed did not take into account being
displayed due to app animations.

When an existing input method target was animating away the logic
for detecting if it was still on screen was faulty. This led to
assigning the input method to a layer below its target and obscuring
the input method until the animation was complete.

Bug: 7296703 fixed.
Change-Id: Ib00db4f21b726ed57d25d6a1e796b65a7d45ee97
9c2a38ed10592a54d9bb753ef882632f7a8cd446 08-Oct-2012 Amith Yamasani <yamasani@google.com> Merge "Fix resource reading for secondary users" into jb-mr1-dev
64442c11555d828a41af0b8a58ab933357889061 07-Oct-2012 Amith Yamasani <yamasani@google.com> Fix resource reading for secondary users

Bug: 7086881

Load resources for the correct user.

Also clean up package monitoring and locking.
Added dump method to SearchManagerService.

Sneaking in a change to make crash dialogs visible to current user.

Change-Id: Id56dd15428d66084de995e28be242db27c15fda3
b52b6bf138c9aa5e986c8be95fcd23448792a078 08-Oct-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #7295951: Mako asks which Launcher to use at every re-boot" into jb-mr1-dev
8b9cf1c8000eb581457713a5c0ce41c59f90c353 07-Oct-2012 Jeff Brown <jeffbrown@google.com> Reduce screen on latency, eliminate flashes.

Always use the ElectronBeam now, even when we are only animating
the backlight so that we will have a black surface remaining
on the screen after the screen turns off.

When turning on the screen, keep the black surface showing until
we unblock screen on then dismiss it as usual.

This change eliminates the flashing of old display content when
the screen is turned on. It also helps to conceal some of the
latency of turning the screen on. We always turn the screen on
immediately (even when screen on has nominally been blocked) and
rely on the black surface to hide the screen contents until the
last moment. Dismissing the black surface is practically
instantaneous compared to turning the screen on.

Bug: 7299370
Bug: 7139924
Change-Id: I57d13287acd05bd0a48811095bb02dc7bc7cbeb6
6309271f7b0f27ee725e36bfa48b4d250e44006f 07-Oct-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7295951: Mako asks which Launcher to use at every re-boot

A couple problems:

- We need to clear app preferences later, now that we have encrypted apps.
- The multi-user implementation of this would allow different preferred
apps from different users to potentially interefere with each other.
They are not completely separate data structures.

Change-Id: Id4f1ebb6414fdf30ff1049adaa1efe83dabac01a
138f272bfcd45f233abfd94faf4aabaa5d01b90b 07-Oct-2012 Craig Mautner <cmautner@google.com> Merge "Save resized windows even if freezing." into jb-mr1-dev
33877e15b8bfc50bd874027689a4794aa93b923d 07-Oct-2012 Craig Mautner <cmautner@google.com> Merge "Adds showWhenLocked attribute to Activities." into jb-mr1-dev
140cdb7a5d43e80d1408b05be8dd22c49ad68dfe 07-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Allow the dim brightness to be brighter than the minimum." into jb-mr1-dev
ade0a9a9386a2cd6f11ad3cde257c11fe300d785 06-Oct-2012 Craig Mautner <cmautner@google.com> Save resized windows even if freezing.

During app freezes resized windows were being dropped if the freeze
window timed out. This fix adds windows to the list of resized
windows but does not notify the clients of the resize until freezing
is completed.

Bug: 7094175 fixed.
Change-Id: Iee1f5f532a0e661fbf900e4540146ae4b645d68e
5962b12bedc4a1d0354816c1cd6b06ba04f6d807 05-Oct-2012 Craig Mautner <cmautner@google.com> Adds showWhenLocked attribute to Activities.

The new attribute allows an Activity such as the alarm to appear
on all users screens.

Bug: 7213805 fixed.
Change-Id: If7866b13d88c04af07debc69e0e875d0adc6050a
b76eebff47653daf0c98119aeb68b57cb9a46f9d 06-Oct-2012 Jeff Brown <jeffbrown@google.com> Allow the dim brightness to be brighter than the minimum.

Defines the lower end of the allowable screen brightness range
as the lesser of the dim level, the user brightness setting
minimum value and the lowest auto-brightness level.

Bug: 7295909
Change-Id: I7a72b4611631f9e51578205ff12898c5bae02b1b
1ad0fd9c04ae2e352c59129b979145e662f25cbc 06-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Accessibility active window not updated on time." into jb-mr1-dev
f81dc4c08b2985ef369134b73e1b383b8284e912 06-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Screen magnification cannot be engaged in landscape on a phone." into jb-mr1-dev
52177738e8fa38e2f7769db1bcad40e7405baf17 06-Oct-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #7296314, issue #7296314." into jb-mr1-dev
4c1e3183baf39ab69c0289c1511877a8bb0b0f75 06-Oct-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7296314, issue #7296314.

7296314 Crashing dreams are stuck
7296510 Transition from lock screen to dreaming is really bad

The window layer for dreams is now moved down below the keyguard,
so that some of the expected stuff like crash and ANR dialogs can
be seen on top of them. While doing this, I reorganized how we
define the layers so the constants are just in the switch statement,
so it is much less crazy-making trying to read how things go

We now have some special cases for when a dream is being shown
to turn off its animation if the keyguard is currently shown.
Since we know it will be hiding the keyguard we need it to be
shown immediately so that you don't see whatever is behind it.

Cleaned up some handling of when the lock screen is displayed
while a FLAG_SHOW_WHEN_LOCKED window is displayed, so that the
lockscreen doesn't transiently get shown and mess up the fullscreen
or system UI state. This also fixes problems with any normal
activity that is doing this.

Hid the methods on DreamService for setting lights out mode. It
doesn't make sense to have such methods on DreamService, because
you can just as well do that on your own View that is showing the
dream content, and when you can do that you can fully participate
in the (required) interactions about it such as being told when
the mode goes away.

The DreamService method for going fullscreen now uses the window
flag for doing this, which is what you want, because you want this
state to persistent on that window and not get knocked out if
something above the window tickles the system UI state.

Also fixed the problem where dreams that hid the status bar would
have a jerky animation when going away, since they were causing the
activity behind them to be layed out without the lock screen. This
is a kind-of ugly special case in the window manager right now to
just not layout windows that are behind a dream. Good enough for MR1.

Change-Id: Ied2ab86ae068b1db0ff5973882f6d17b515edbcd
a7bcb546bc4d9492a1e3c994bdc1318db7a3a0c4 06-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Screen magnification cannot be engaged in landscape on a phone.

1. The reason is that the screen magnifier computes that the whole
screen is not magnifiable. The miscalculation was caused due to
an incorrect assumption that the non-magnified area is only at
the bottom. In fact, on a phone in landscape the non-magnified
area is both on the right and at the bottom. This change adds
a correct algorithm for computing the magnified region.

2. Increasing the delay for computing the magnified area when the
keyguard goes away to allow all windows hidden by the keyguard
to be shown. In rare occasions the previous delay was not long
enough resulting in a state where the keyboard is considered
a part of the magnified region.

3. Removed some dead code.


Change-Id: Ic5ff91977df8bcf4afd77071685c3eb20555d4f3
b71ccfcf9b049372cdbd4f3f0bf51159e384f217 06-Oct-2012 Amith Yamasani <yamasani@google.com> Merge "Fix widget cross-talk between users due to Settings widget" into jb-mr1-dev
f772cba59760d1ad9eb5cb9205b2e2e9126e488d 06-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Accessibility active window not updated on time.

1. The active window is the one the user is touching or the one
that has input focus. It has to be made current immediately
after the user has stopped touching the screen because if the
user types with the IME he should get a feedback for the
letter typed in the text view which is in the input focused
window. Note that we always deliver hover accessibility events
(they are a result of user touching the screen) so change of
the active window before all hover accessibility events from
the touched window are delivered is fine.


Change-Id: I1ae87c8419e2f19bd8eb68de084c7117c66894bc
f948500239803b2b7247ff5058e39e4d645c5b70 06-Oct-2012 Satoshi Kataoka <satok@google.com> Merge "Fix the issue on the input method switch picker" into jb-mr1-dev
8320de8e29819963845d3d386d6d087844a5ae31 06-Oct-2012 Amith Yamasani <yamasani@google.com> Fix widget cross-talk between users due to Settings widget

Bug: 7247911
Bug: 7294899

Also did some cleanup of unused code that resulted from refactoring
the app widget service. Fixed a few more ambiguous calls that weren't
using the correct user id.
Added some logging and improved the dump() formatting.

Change-Id: I27abb5c6341458e1e50a2cc9ab67e8de573ab283
fdcb2257d20435326baa41dd713c7ffee322e84c 06-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Fix a deadlock involving BatteryService." into jb-mr1-dev
605ea69ab16dee2047ea43905a9b443896cde121 06-Oct-2012 Jeff Brown <jeffbrown@google.com> Fix a deadlock involving BatteryService.

The PowerManager may call into the BatteryService while
holding its locks. We need to be careful that the BatteryService
doesn't call into other services, particularly the ActivityManager
while holding its own locks.

Bug: 7298218
Change-Id: Ibf8ab13224f204a9857825265e864f93583bce8e
2874a54068af1e7de3c1c046cc0061412daafaf8 06-Oct-2012 Craig Mautner <cmautner@google.com> Merge "Add flag for displaying non-user's Windows to user." into jb-mr1-dev
d7eece3448122fa668cdb386cd47cd1402d12012 06-Oct-2012 Jeff Sharkey <jsharkey@android.com> Merge "Clear identity when requesting current user." into jb-mr1-dev
b78738fa06b092f910ffb39989dfb700d6b21788 06-Oct-2012 Jeff Sharkey <jsharkey@android.com> Clear identity when requesting current user.

Bug: 7298189
Change-Id: Ie9c160f12067f1b9426acbfee67ef81e8f5f7992
0728206a1138698faa171271a81fbe8dd0ddcf73 06-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Ensure that dreams show while docked." into jb-mr1-dev
aa99257dec300c1db99ee0f0d1193e0b301dde39 06-Oct-2012 Jeff Sharkey <jsharkey@android.com> Merge "Only play notification sounds for active user." into jb-mr1-dev
88400d3a31139c40c4014faf86c243647087ef6c 30-Sep-2012 Craig Mautner <cmautner@google.com> Add flag for displaying non-user's Windows to user.

Created a new flag that indicates that a window should be shown
to all users. For the flag to be valid the owner of the window
must have system permissions.

Also separated system window types into those that show to all
users (e.g. StatusBar, Keyguard, ....) and those that appear only
to the owning users (e.g. Drag, ANR, TOAST, ...). Those that appear
only to their owner can override their default behavior using
the new flag (e.g. LowBattery).

Fixes bug 7211965.

Change-Id: I1fdca25d57b7b523f0c7f8bceb819af656c388d4
8637bd9766784473eb3849b4f21fda4a2ea6eed1 06-Oct-2012 Jeff Sharkey <jsharkey@android.com> Only play notification sounds for active user.

Bug: 7298302
Change-Id: I1e176f7b17bb51b878f2e8b345804780df92d487
9fca9e96989bb70c3a5fa9de37681c9228c88ae6 05-Oct-2012 Jeff Brown <jeffbrown@google.com> Ensure that dreams show while docked.

Fixed a race between the UiModeManagerService and PowerManagerService
both of which are trying to wake the device when docked / powered.

Bug: 7281240
Change-Id: Ia41fef48f17f2a2eb56549437d295f9a86c95af2
3f1246a29b58cf78ebe674ec0905ad1795027aac 05-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Coordinate screen on with the window manager." into jb-mr1-dev
c38c9be031ddad5cf551b55458889f11e01dc5b2 04-Oct-2012 Jeff Brown <jeffbrown@google.com> Coordinate screen on with the window manager.

Bug: 7267457
Change-Id: Ic2c322253639e1f0b2e4e72a7b145025d0240f93
7ef38ea9e5ee1d2fd58e818f37191a589793e236 05-Oct-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #7275122: Wall paper jank when switching users" into jb-mr1-dev
bce0cbb40d060f71a7de86d5668eb690e7073c19 05-Oct-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7275122: Wall paper jank when switching users

Change-Id: I2677c7641a01b4afe89db29cb5fc1af876f9d078
3ba439d6481b7f23ade44bfde0700aaa1e076a32 05-Oct-2012 Satoshi Kataoka <satok@google.com> Fix the issue on the input method switch picker

Bug: 7292731
Change-Id: I8cb51dd01e4c467fff511d4ecee79426f9b2ed80
20de160ca32a8f2936a80ffd70551a22e2371d25 05-Oct-2012 Jeff Hamilton <jham@android.com> Revert "Changes to support updating location providers."

This reverts commit c19efc204aee1f0f3164dc21bd2ef3fdd4259c71.
d21b483904057212ab1654b8ef606d41f2d3fe46 05-Oct-2012 Matthew Xie <mattx@google.com> Merge "Add multi user support for bluetooth" into jb-mr1-dev
f5e2b2c26c37d839e6559319d311b62598c6dade 05-Oct-2012 Daniel Sandler <dsandler@android.com> Merge "DreamService API revisions." into jb-mr1-dev
2d78490292090eeab84694330978c9ad7fad2d37 04-Oct-2012 Daniel Sandler <dsandler@android.com> DreamService API revisions.

Reduce reliance on Service interface overrides, instead
steering clients to the DreamService-specific lifecycle

onAttachedToWindow .. onDreamingStarted ..
onDreamingStopped .. onDetachedFromWindow

The old Dream.java is finally gone now too.

Bug: 7281802
Change-Id: Ib7802c3397fde60ad1132fa49831da182eef4d7a
a07b1fffbe7c43485b35ba83c9083a59ff328df1 05-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Support animating just the backlight when turning off." into jb-mr1-dev
29126cf0f7992805b274510420485c95e3741598 05-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Ensure we send at least one wakeup/gotosleep transition." into jb-mr1-dev
a52772ff26e41dbb242a78a1f30619e23fb13dd7 05-Oct-2012 Jeff Brown <jeffbrown@google.com> Support animating just the backlight when turning off.

Bug: 7224614
Change-Id: Ic9fa7a9e458c89d347b03bce6829f952bdf3b6a5
fca9d63635d9603c318a089397b23c17682453e3 04-Oct-2012 Matthew Xie <mattx@google.com> Add multi user support for bluetooth

Create a BLUETOOTH_STACK permission to share between all users of
Bluetooth apk. Bluetooth Manager binds to apk of current user
bug 6925422

Change-Id: I2df5546e977c2d77bc66d97d12479d933826922a
82b946496e2a503b5b21af318af5be828a223a44 05-Oct-2012 Jeff Hamilton <jham@android.com> Merge "Changes to support updating location providers." into jb-mr1-dev
c192c649ba3b79dff70c5ccf981d631b929b5778 05-Oct-2012 Amith Yamasani <yamasani@google.com> Merge "Fix serial number assignment for new user on a freshly wiped device" into jb-mr1-dev
543083593430208af87e51b94cdbbb51cbe2d7b5 05-Oct-2012 Jeff Brown <jeffbrown@google.com> Ensure we send at least one wakeup/gotosleep transition.

This fixes an issue where the device would not lock immediately
when the user quickly pressed power off / power on even if
configured to do so. We were suppressing the screen off
and wake up broadcast in this case.

Now we make sure to always send at least one broadcast to
indicate the transition. We still collapse back-to-back
full cycle transitions though so as not to end up enqueuing
useless broadcasts.

Bug: 7061116
Change-Id: I7211c5fd963c271c2b0aceb4d2f746063c629079
327424d69b99213e872e91f05feba2d0a137d6c7 05-Oct-2012 Adam Cohen <adamcohen@google.com> Merge "Plumbing to allow keyguard to be shown with user switcher (issue 7175023)" into jb-mr1-dev
284b20538764afe2500be6ba5b1f3a057123ffc9 05-Oct-2012 Satoshi Kataoka <satok@google.com> Merge "Support multi-user switch in TextServicesManagerService" into jb-mr1-dev
f752202bee88e31ce765483ba2efa6999ae9c9ad 04-Oct-2012 Adam Cohen <adamcohen@google.com> Plumbing to allow keyguard to be shown with user switcher (issue 7175023)

-> Also reduced calls to lockNow, and moved this call in ActivityManagerService

Change-Id: I9ba34ca902f7c0f71fa4ec302104688ca8d11f55
634cf31345ae843392215237e741d76271a5cfed 05-Oct-2012 Amith Yamasani <yamasani@google.com> Fix serial number assignment for new user on a freshly wiped device

Bug: 7280093

User serial number was not being bumped up from 0 on a freshly wiped device
due to the userlist not existing. This was resulting in the first 2 users
getting the same serial number, messing up C2DM message delivery. This issue
doesn't show up if you boot the device before adding a user, so it wasn't
discovered earlier.

Change-Id: I8a5d99b9ad2ccfb66a16cacac9548ba53f0be387
17f36d154f1a8ebe72fc35af332f5c0069503364 05-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Allow phone to go to sleep while in call." into jb-mr1-dev
82245c199b2bbd2f598ce3c863eea425b4909cac 05-Oct-2012 Amith Yamasani <yamasani@google.com> Merge "Fix dupes in initial wallpaper selection" into jb-mr1-dev
60ec50a850ac7265b662df3c872583b6ef581ef8 05-Oct-2012 Laurent Tu <laurentt@google.com> Last position improvements for GeofenceManager

Use LocationManager.getLastPosition() in GeofenceManager instead of
keeping track of it manually. Keeping track of it in GeofenceManager
doesn't handle the case where we install a fence, and cross it just
after that based on the last position before we installed the fence.

Also shuffle around some code in LocationManagerService to remember the
last position even if there are no UpdateRecords. This is useful in the
GeofenceManager for example.

Bug: 7047435
Change-Id: Ia8acc32e357ecc2e1bd689432a5beb1ea7dcd1c7
dfc8e799ed7500c1a07d4ba1f72e77d3de0f803a 05-Oct-2012 Victoria Lease <violets@google.com> Merge "Handle other providers in isAllowedProviderSafe()" into jb-mr1-dev
7fd1386b8a2b30669e0ffe0bacf17dd1feb5dba5 05-Oct-2012 Robert Greenwalt <rgreenwalt@google.com> Merge "Properly cancel Tether notification." into jb-mr1-dev
a9afaccf303da2b57a47ad16cca559e87e649d15 05-Oct-2012 Victoria Lease <violets@google.com> Merge "multiuser support for LocationBlacklist" into jb-mr1-dev
3cab6b0f1deff1ee4b4b2e048935f2201d2cbc0d 05-Oct-2012 Robert Greenwalt <rgreenwalt@google.com> Properly cancel Tether notification.

When we add a second type of tethering we unify the notifications
into a single generic type. This is done by canceling the first
and replacing it, but this flow was improperly canceling, so
you could end up with orphaned tethering icons.

Change-Id: I1d136f51592b4326d48578cf67b69122e45d4984
93cbbb25a56356cd36523809783a277fe92e312e 04-Oct-2012 Jeff Brown <jeffbrown@google.com> Allow phone to go to sleep while in call.

Bug: 7279383
Change-Id: Ia05490218f40a1843507b95ff48fa07910e582d4
941221c1577a34c922c03b30be7ef0a4afda4278 04-Oct-2012 Laurent Tu <laurentt@google.com> Handle other providers in isAllowedProviderSafe()

Add a case for isAllowedProviderSafe() to handle providers that are not
GPS/Passive/Network/Fused. For example, this is useful for mock

Bug: 7047435
Change-Id: If4799aa90a5338889c47582d45cbfc25772c9c53
6474c4cd939fcb03449e607c7cd06b95c4632aaa 04-Oct-2012 Amith Yamasani <yamasani@google.com> Fix dupes in initial wallpaper selection

Bug: 7281217

Needed to load the settings for the user, in case the user was stopped.

Change-Id: I52d1f59a7681f8c4f7d3596486accb91cb840ecf
8a2291952528303d284878468fe260ec41998db3 04-Oct-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #6968859: home not exiting an ANR'd dream" into jb-mr1-dev
d367b70c4ad5d8e6cdbcc0d6d429428413cd39b3 04-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Accessibility HOVER_ENTER / EXIT without enclosing EXPLORATION_GESTURE_START / END" into jb-mr1-dev
27b3819df0ff3bbfb680b5bac54ef7e9b4d3aac1 04-Oct-2012 John Spurlock <jspurlock@google.com> Merge "Reset status bar in keyguard, fix MU status bar bug." into jb-mr1-dev
5fe7e2a3043d6a8ca933c77ccf95c791b57b221a 04-Oct-2012 Dianne Hackborn <hackbod@google.com> Fix issue #6968859: home not exiting an ANR'd dream

Add a new call to the activity manager for the input dispatcher
to report about any pid having an ANR. This has a new feature
where it can also tell the activity manager that it is above the
system alert layer, so the activity manager can pop its ANR dialog
on top of everything if it needs to. (Normally we don't want
these dialogs appearing on top of the lock screen.)

Also fixed some debugging stuff here and there that was useful
as I was working on this -- windows now very clearly include
their uid, various system dialogs now have titles so you know
what they are in the window manager, etc.

Change-Id: Ib8f5d29a5572542cc506e6d338599ab64088ce4e
dcf5a663cdec5ed1aa6b5d583cdac177a0974fcb 04-Oct-2012 Amith Yamasani <yamasani@google.com> Merge "Read in the disable-keyguard-features flag from the XML file" into jb-mr1-dev
4e6922d89e72e79a8ab31ae2cb8a19d85bee91f8 04-Oct-2012 John Spurlock <jspurlock@google.com> Reset status bar in keyguard, fix MU status bar bug.

Two things going on here, status bar disabled flags need to be reset
on user switch. Also make status bar's internal disable-record lookup
multi-user aware.

Change-Id: I1d7088d956a065330736da4c09cc1874c528c133
18c2b6e730f6d639421e45328f4fb2514683efe5 04-Oct-2012 Victoria Lease <violets@google.com> Merge "throw SecurityException in isProviderEnabled()" into jb-mr1-dev
7077b3c9bb7367bae3e073aa213de51baf3321a9 04-Oct-2012 Amith Yamasani <yamasani@google.com> Read in the disable-keyguard-features flag from the XML file

Bug: 7283501 Exchange Services crash while using Email App after upgrading
Change-Id: I40d13f5d3805ea3139dc3938077a5265ff78c426
83762d22c9bde92d412cf5a263a228d705606721 03-Oct-2012 Victoria Lease <violets@google.com> multiuser support for LocationBlacklist

This allows primary/secondary users to have different "Google
Location Services" preferences. It also reenables LocationBlacklist,
which is fixed elsewhere.

Bug: 7213502
Bug: 7248239
Change-Id: I94837682f95920c225c00b7da2de6dd1418a673e
078a490c2276c91ab84536d603c7848dc244e330 04-Oct-2012 John Spurlock <jspurlock@google.com> Clear notifications properly on ACTION_USER_STOPPED.

Which also takes care of the ACTION_USER_REMOVED case.

Change-Id: I0a6bade11bd0d420df03e16e69a386cfccfa07cc
c19efc204aee1f0f3164dc21bd2ef3fdd4259c71 03-Oct-2012 Jeff Hamilton <jham@android.com> Changes to support updating location providers.

There is now only a single config value pointing
at a list of packages to get certs from. The old
system was a bit confusing.

The fused location provider also now builds
against SDK 17, and the meta data service version
tag was renamed from the overly generic "version"
to "serviceVersion".

Bug: 7242814
Change-Id: I00d27c9cbd5cc31a37bb4a98160435d15a72e19e
f429921e3a8b171771e268f23fc3fa909d791441 04-Oct-2012 Victoria Lease <violets@google.com> throw SecurityException in isProviderEnabled()

In MR0, we did not allow applications to query enabled status of
location providers they did not have permission to use. Some
applications counted on this behavior, using the thrown
SecurityException to determine whether or not they have permission
to use the specified provider.

Reverting to this behavior fixes the regressions seen in those

Bug: 7251459
Change-Id: I8b0cfd5862c80f0c831a4ab544c3fa7408bc84a0
00d2d4125e4944ebcabdecd423573ee00f716293 28-Sep-2012 Satoshi Kataoka <satok@google.com> Support multi-user switch in TextServicesManagerService

Bug: 7231549
Change-Id: I737590688b895ea00d397ddec7702d6d2bec9097
f068fed6c4c3fc2003aec19b6e7e892358179b02 04-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Accessibility HOVER_ENTER / EXIT without enclosing EXPLORATION_GESTURE_START / END

1. The initial implementation was not sending the gesture start and end
events until the the user has moved more than a given slop and did not
do it faster than a given velocity. However, there is the case where
if the user did not move or just taped on the screen an exploration
occurs. The system was not sending the exploration start and end
events for the latter case.

2. The delaued command for long press was not canceled when the pointer
moves more than the slop distance.


Change-Id: I7d98470cd4d9ea9b2519326e5e550ff68b040747
ebf7e2851cab55348153fca299c52042b125924d 04-Oct-2012 Satoshi Kataoka <satok@google.com> Merge "Close the current input method when attached view doesn't have a handler" into jb-mr1-dev
a6cab32d68692f69729195ac69b7f9e9c8d2001f 04-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Events for window's content change should be dispatched only for the active window." into jb-mr1-dev
58fd9f8d6ad6bf1975e834f1a69e68673db9a452 04-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Events for window's content change should be dispatched only for the active window.

1. Accessibility events for changes in the content of a given window, such as
click, focus, etc. are dispatched to clients only if they come from the
active window.

Events for changes in the state of a window, such as window got input focus
or a notification appeared, are always dispatched. The notification events
do not contain source, so a client cannot introspect the notification area
(unless the user explicitly touches it which generates hove events). The
events for a window getting input focus change the active window so they
have to be dispatched.

Events that are a result of the user touching the screen, such as hover
enter, first tocuh, etc. should always be dispatched.


Change-Id: I96b79189f8571285175d9660a22394cc84f39559
c428aae6429c3fd5e2037c3793af399d9f6e23bf 04-Oct-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7267494, issue #7212347

7267494 Calendar is not syncing
Check for whether a content provider is dead before returning
it. This is kind-of a band-aid, but probably the right thing
to do; I'm just not sure exactly the full details of why this
problem is happening. Hopefully this "fixes" it, though I don't
have a way to repro to tell.

7212347 System power off dialog is only visible to user 0
Make it visible. Also turn on some battery debugging stuff and
clean it up so we can just keep it.

Change-Id: I5add25bf2a763c8dfe1df23bc5c753a9ea5d157a
0fd713ca12da9a1ecaaca3a117057b8d94704a99 04-Oct-2012 Mike Cleron <mcleron@google.com> Merge "Exception in the touch explorer when dragging." into jb-mr1-dev
ec33d56300aa417efb4a055786d73d1bf23a6a85 04-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Exception in the touch explorer when dragging.

1. During a drag in touch exploration we have two pointers moving in the same
direction but inject only one of them. If the dragging pointer goes up we
send an up to the view system and wait for all pointers to go up to transition
to touch exploring state. At this point the dragging pointer id is cleared
and if a new pointer goes down we are trying to send up (rather do nothing)
for the dragging pointer which we already did and due to the invalid pointer
id we get an exception when splitting the motion event.


Change-Id: I690bf8bdf6e2e5851ee46a322c4a1bb7d484b53a
8abd7021a681dd9db355ad7b17e0249200d6cc17 04-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Ensure dreams can be started when not powered." into jb-mr1-dev
645832dd2ba63d5328cf934ceaa0ec6339573558 03-Oct-2012 Jeff Brown <jeffbrown@google.com> Ensure dreams can be started when not powered.

Previously dreams could not be started unless plugged in.
Now we allow them to start but they will eventually stop
if a user activity timeout occurs and no screen wakelocks
are held.

Bug: 7253639
Change-Id: I84703e144ca6d4aba1ef9437f04a201c3dde8a49
cdf932e050ba2220025072f37e50cc011d310cad 03-Oct-2012 rich cannings <richc@google.com> Fix PackageInstaller displays with multi-user

With this fix, when all users cancel installing an app they were warned about,
then the "Installing..." screen disappears, as desired.

Bug: 7255231
Change-Id: I2475fa790a5d09abbf94411c696682502fb1e8df
fc6770e748bb69f80b7b68942a273335b165000a 03-Oct-2012 Victoria Lease <violets@google.com> Merge "Remove checkPermission() call in getAllProviders()." into jb-mr1-dev
3f0a57dcd9a060bb3b2b35da4d2ac6cb42733fef 03-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge changes Iccea764b,I624b559e into jb-mr1-dev

* changes:
Improve the screen dim duration calculation.
Implement screen on hack for wireless chargers.
5558b79e7a40adb3ad550e8bdf37996ddbeb714f 03-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Fix some synchronization issues in BatteryService." into jb-mr1-dev
ff532540f18e3b2181da0550fe55045418a3b84e 03-Oct-2012 Jeff Brown <jeffbrown@google.com> Improve the screen dim duration calculation.

Take into account whether the screen off timeout is very short.
If so, we use a shorter dim timeout. Don't allow the dim
time to be more than 20% of the total screen on time so that
the screen remains bright at least 80% of the time even when
the timeout is short.

Bug: 7273646
Change-Id: Iccea764b90f0d8b1df7009d26160c6bcf6eabe5b
f3fb895269deadcda0cf497d421e4b89e8ee8f8f 03-Oct-2012 Jeff Brown <jeffbrown@google.com> Implement screen on hack for wireless chargers.

We can't accurately detect whether the device is resting
on a wireless charger unless it is actually charging.
So we need to tweak the screen on when plugged / unplugged
policy accordingly to avoid spurious wakeups.

Bug: 7234284
Change-Id: I624b559e2e92b8813b12090bc20eca5f5158997e
3573950e0b30178dc963de3fa00aba2ebcfd552d 02-Oct-2012 Satoshi Kataoka <satok@google.com> Close the current input method when attached view doesn't have a handler

Bug: 7187452
Change-Id: Iba4f7ac89f5806e871aaeb97f366935b83b95a5a
75b694f1d6038edee8b071df1e339b81d7960e97 03-Oct-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #7274813: A few sticky broadcasts aren't being sent to all users" into jb-mr1-dev
3e2358a0e677ad1c88d677919aa9b8d7b2fb4eb2 03-Oct-2012 Craig Mautner <cmautner@google.com> Merge "Delay setting hidden until after isVisibleNow test." into jb-mr1-dev
a4d8204e3068b9d8d6908d4cf3440e81967867a3 03-Oct-2012 Jeff Brown <jeffbrown@google.com> Fix some synchronization issues in BatteryService.

Some of the BatteryService state was being locked
sometimes and it wasn't at all consistent.

Bug: 7158734
Change-Id: I46e75f66fde92c5a577a80a6bd99c9573066f3c1
1ed299f822b22998b7236e3147d8cf4707bced08 03-Oct-2012 Jeff Sharkey <jsharkey@android.com> Merge "Make USB services multi-user aware." into jb-mr1-dev
4b5aa78c898a827c3cd65f578d31d3809b61aad6 03-Oct-2012 Craig Mautner <cmautner@google.com> Delay setting hidden until after isVisibleNow test.

Setting hidden prior to test guarantees the test will fail. This
then causes the exit animation to not be loaded and consequently
the window is immediately hidden. Then, when the window is removed
later it reappears in order to animate away. The consequent flash
is undesirable.

Bug: 7242373 fixed.
Change-Id: I56966bd9060124be372702090f86b29b4deea8c0
fc3f24b4b60c10e0d3f41f70df37e11ea311cc2c 02-Oct-2012 Jeff Sharkey <jsharkey@android.com> Make USB services multi-user aware.

USB settings are now isolated per-user, since they revolve around
installed packages. User-specific settings are returned based on
calling user, or referenced by UserHandle passed to SystemUI. Each
settings Context is wrapped as a specific user, so all broadcasts are
sent correctly. Upgrades any existing USB settings to OWNER.

Physical events, like new devices, are routed to the currently active
user. Switch to using AtomicFile when persisting settings.

Bug: 7244888
Change-Id: I8a723ad3d55ac1bff99276c5f3a3f5e8f013432f
031e9d2e21797fd668404be407dcc625f3b149c1 03-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge changes I0ed9ba00,Ia8c6d7fe into jb-mr1-dev

* changes:
Fix bug removing all windows that belong to a display.
Add some missing debug output.
bcbe9cf475835102ae2490dc9f067a3ac78a9551 03-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Add new Display API for secure video capabilities." into jb-mr1-dev
9bfb8bcfeb585c1692830ff91a36afa852455cf7 03-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Up motion event not injected by the touch explorer at the end of a drag." into jb-mr1-dev
cb882f90e4305bd40d7219707bc1796319e9c80e 03-Oct-2012 Jeff Brown <jeffbrown@google.com> Fix bug removing all windows that belong to a display.

Removing one window causes its subwindows to also be removed.
We have to be careful when traversing the window list
because multiple windows may be removed at a time so we
don't get IndexOutOfBoundsException due to the window
list changing in unexpected ways.

Bug: 7273702
Change-Id: I0ed9ba00c325ad178ab28919ce2e763cb6fd38ba
5bc54bf354f6e674a129b2e286b4bd3eefe91c2b 03-Oct-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #7272775: Auto Start Apps Not Starting" into jb-mr1-dev
3ed62adad14c213117c2b869e71abc2474102ad4 03-Oct-2012 rich cannings <richc@google.com> Merge "Fix package verification with multi-user" into jb-mr1-dev
77aebfdbae489c3712ae3f9bca29d01fb1f09dc2 02-Oct-2012 Jeff Brown <jeffbrown@google.com> Add new Display API for secure video capabilities.

Added a new API to determine whether the display supports
protected buffers so that an application can choose a different
content stream or change how it decodes the content so
that it will be viewable on the display.

At present, wifi display does not fully support protected
buffers although this may be enhanced in the future.

Bug: 6986623
Change-Id: If53a53d72b0ec92753cc4b29f99fcb131e00449b
c2726643e74873c544efc2769a5ab2a445c433c4 03-Oct-2012 Jeff Brown <jeffbrown@google.com> Add some missing debug output.

Bug: 7257579
Change-Id: Ia8c6d7fefe6d4c4e6c37f20722c7ffce4bcfcbae
aa4b3c79f28560930e256ec5e2c5a7a4c20f5542 03-Oct-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7274813: A few sticky broadcasts aren't being sent to all users

Change-Id: I2fc89de36be0709946f562f64002d0f6d223401f
0d21e2161f8542db0a54bf80b74b7fd33afef6f6 03-Oct-2012 Laurent Tu <laurentt@google.com> Remove checkPermission() call in getAllProviders().

getAllProviders() should return all locators, including those not
allowed or not enabled (according to the existing javadoc, at least).
The checkPermission() call prevented this behavior by throwing a
security exception. We restore the previous behavior by removing the

Bug: 6950369

Change-Id: I0c6bc676d4c4db482bb68f1ab7fa5c93675118b4
4a9f071f3d3fdd20615167cda6f22da912bc60c7 03-Oct-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7272775: Auto Start Apps Not Starting

Bad defaults were causing stopped state to be set at each

Change-Id: I49b04e9c62f6ac391054201b508fddb6c7985615
d5523dc7b7318f2774109dd30716ff7b74560e61 02-Oct-2012 Craig Mautner <cmautner@google.com> Call Surface.destroy when Display is removed.

Prevents leaked Surfaces.

Bug: 7272421.
Change-Id: I6c87eb11bb0bedcf8de451b04477c70c248f905d
d55deb0a7163a40fe9772ce659f0a3e3ed340de3 02-Oct-2012 rich cannings <richc@google.com> Fix package verification with multi-user

Fixes the porblem of PackageManagerService always sending Intents to user 0.

Bug: 7272549
Change-Id: I25995d8b2b9a24346f4813e6d8d9a84e5d5d2b6b
aeb8d0ed0d98d398a66a092c418f4f2bca8719e0 02-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Up motion event not injected by the touch explorer at the end of a drag.

1. The up event was not injected when the last pointer went up, i.e.
at the end of the drag. This patch sends an up event if the dragging
pointer goes up for both cases, when the dragging pointer goes up
first and when it goes up second.


Change-Id: I708a2b93ee2d0a4c46dbeea002841666e919602d
6e2bee75cea415621165698fdd9ce857bbb8872e 01-Oct-2012 Jeff Sharkey <jsharkey@android.com> Migrate more System and Secure settings to Global.

Includes telephony, WindowManager, PackageManager, and debugging
settings. Update API to point towards moved values.

Bug: 7231764, 7231252, 7231156
Change-Id: I5828747205708872f19f83a5bc821ed0a801cb79
0944d625448209185452eb4e800daec49de51986 02-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Touch explorer and magnifier do not work well together." into jb-mr1-dev
45af84a483165f06c04d74baba67f90da29c6ad2 02-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Touch explorer and magnifier do not work well together.

1. If tocuh exploration and screen magnification are enabled and the screen
is currently magnified, gesture detection does not work well. The reason
is because we are transforming the events if the screen is magnified before
passing them to the touch explorer to compensate for the magnification so
the user can poke what he thinks he pokes. However, when doing gesture
detection/velocity computing this compensating shrinks the gestured shape/
decreases velocity leading to poor gesture reco/incorrect velocity.

This change adds a onRawMotionEvent method in the event transformation chain
which will process the raw touch events. In this method of the touch explorer
we are passing events to the gesture recognized and the velocity tracker.

2. Velocity tracker was not cleared on transitions out of touch exploring state
which is the only one that uses velocity.


Change-Id: I7887fe5f3c3bb6cfa203b7866a145c7341098a02
56925d65fde7f1ac8676ada6f91d0e604645c0a5 02-Oct-2012 Irfan Sheriff <isheriff@google.com> Always update peer list in display controller

Display controller should always stay in sync with peer list to avoid
showing incorrect available status on peers which would
cause connectivity issues.

Bug: 7268307
Change-Id: If04644339c1ee3f567939e4441dd6f6a45e4179a
30ed33b141dd1add916466c193b6735cd0bf8315 02-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Owner should not be announces as a user switch." into jb-mr1-dev
59f07690c2bdd97b9e486b776d2175d914818d06 02-Oct-2012 Svetoslav Ganov <svetoslavganov@google.com> Owner should not be announces as a user switch.

1. The accessibility layer announces user switches. Even though
the initial switch to the owner on a singe user device is a
valid use switch we should not announce it for accessibility.


Change-Id: Idf022fab6b74c84b7a96bc4ed7c7fee2b83029a6
3750db176adbaf3f9779df5eadf335f673b2ac4f 02-Oct-2012 Victoria Lease <violets@google.com> Merge "Route GPS notifications to all users." into jb-mr1-dev
6f354ed9994b4ea7612cc4499413de108dcac7d4 02-Oct-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #7226101: Secure image capture takes 5 seconds to start" into jb-mr1-dev
046cff13fc897e9e958ef387884eb97fd901840b 02-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Fix CTS test failures." into jb-mr1-dev
9ba8d78186647a3f23606b5ccf9adb97b57278fb 02-Oct-2012 Jeff Brown <jeffbrown@google.com> Fix CTS test failures.

Bug: 7001730
Change-Id: I5649b601c310458de5d64b549a407e251d745b7c
b97d8764a0aa600d7bcc6242e7173453c87ee658 02-Oct-2012 Craig Mautner <cmautner@google.com> Merge "Switch from uevent model to /dev/input/event." into jb-mr1-dev
cc5a055613efb463275633d83a04674b0be6d770 02-Oct-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7226101: Secure image capture takes 5 seconds to start

Mostly (turned off) debug output. Main fix is to resume the next
activity if we are pausing while sleeping and the top activity is
not the now pausing activity. Also helped things by fixing a problem
where removing a task would leave around dead destroy timeout

Change-Id: I9d550c216b4d7e2afe3d93553bb680cec41e2ed1
410bc60a77ee3ba6e596e84d44ec23f3325ae310 02-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge changes I790820b1,I3fcf3619,Ia0d5a156 into jb-mr1-dev

* changes:
Enable hardware acceleration for pointer location overlay.
Disable use of twilight mode for auto-brightness.
Use new API to override user activity timeout from keyguard.
cb6f950f15919794d26a55c20090fe5dacd11e4a 02-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "New internal API to eliminate poke locks." into jb-mr1-dev
2961d111570d310b3ba504784e7cff651bc93207 01-Oct-2012 Victoria Lease <violets@google.com> Merge "Avoid NPE in GpsLocationProvider" into jb-mr1-dev
db21284a7fb081065d26137891594bd8495b116f 01-Oct-2012 Jeff Brown <jeffbrown@google.com> Disable use of twilight mode for auto-brightness.

This adjustment is still experimental.

Bug: 7165399
Change-Id: I3fcf361933995d02a5329eeaec80155b39371ba3
1e3b98d47df596d0c4eadbdf60143709f8465b28 01-Oct-2012 Jeff Brown <jeffbrown@google.com> New internal API to eliminate poke locks.

Added a new WindowManager.LayoutParams inputFeatures flag
to disable automatic user activity behavior when an input
event is sent to a window.

Added a new WindowManager.LayoutParams field userActivityTimeout.

Bug: 7165399
Change-Id: I204eafa37ef26aacc2c52a1ba1ecce1eebb0e0d9
1f7a09b5df9f859781d9cfa0053fad44c72c2168 01-Oct-2012 Craig Mautner <cmautner@google.com> Merge "Only inform DisplayManager of visible content." into jb-mr1-dev
65d11b3eeff395011a2c6b56eb117fd3c4881c1a 01-Oct-2012 Craig Mautner <cmautner@google.com> Only inform DisplayManager of visible content.

WindowManager was notifying DisplayManager of content if any window
existed on a display. Now the window must be visible and we must not
be showing a Dream or the Keyguard.

Bug: 7214060.
Change-Id: I9ce4a49aabfbac22ff1e39a837199ce35b9f7503
b525c3cfc7484c87fcf96b48447b2a220b25f519 01-Oct-2012 Amith Yamasani <yamasani@google.com> Merge "Fix broadcast to a specific user" into jb-mr1-dev
2036a94a9004613644bdbdab1b10e476be3f0213 01-Oct-2012 Amith Yamasani <yamasani@google.com> Merge "Fix cache deletion for secondary users" into jb-mr1-dev
5c24fd03426db58b63e1a792c2595447cb722d46 01-Oct-2012 Victoria Lease <violets@google.com> Avoid NPE in GpsLocationProvider

Oops, looks like we were spinning up a secondary thread to run some
tasks that will just happen on the main thread regardless. Removed
the secondary thread and fixed up initialisation order regarding
mHandler and things that post to it. Also reordered GPS and
PASSIVE provider initialisation order since GPS depends on PASSIVE.

This should be both safer and easier to read.

Bug: 7248029
Change-Id: I8630caf0a7bd1b2c401603075676f13dda5be4fa
5e3dcf7210bed65d8f9aec40d9da078daf76dead 01-Oct-2012 Jeff Brown <jeffbrown@google.com> Merge "Remove clearUserActivityTimeout()." into jb-mr1-dev
e98bde011c1a723b1dffa632d7dd3b194fb4084f 01-Oct-2012 Amith Yamasani <yamasani@google.com> Fix broadcast to a specific user

Bug: 7255777
Bug: 7263657

When userId is neither CURRENT nor ALL, the correct list of receivers
was not being built, due to a typo in ActivityManagerService;

Change-Id: Ib1dc627f0dbd1c91d02c718d2e4d2384ad687d1f
54289b8b4a110cc1ae106d79785cc762a2aebd6e 01-Oct-2012 Amith Yamasani <yamasani@google.com> Fix cache deletion for secondary users

Bug: 7249419

Change-Id: Idbc0f9994508059ebf5055aea961b87e08b3673a
c56e5600501a5c376dc13e6a99fcec7782fc8718 01-Oct-2012 Adam Powell <adamp@google.com> Merge "Construct a task stack for picking a wifi network from notification" into jb-mr1-dev
38389b6cf7bd2ef49d2bd20ff1bca8677596590e 30-Sep-2012 Victoria Lease <violets@google.com> Route GPS notifications to all users.

This takes the easy way around notifying the correct users
about GPS state transitions by notifying ALL the users(!).

I've also laid groundwork for proper multiuser support in
LocationManager and did a tiny bit of cleanup in
GpsNetInitiatedHandler while I was looking at notifications.

Bug: 7213552
Change-Id: I2d6dc65c459e55d110ac0f5f79ae7a87ad638ede
13451a25fff12c1429f9ecdc24b2aa7696359f7d 28-Sep-2012 John Spurlock <jspurlock@google.com> Status bar: Keep disabled state per user.

Change-Id: If6f7a41c2516996612aef5e013dd0d2bd23f9084
135e5fb71242b1151929e2ea7bf221ff421e6ad2 28-Sep-2012 Satoshi Kataoka <satok@google.com> Always accept API calls from processes which have INTERACT_ACROSS_USERS_FULL in InputMethodManagerService

Bug: 6931482
Change-Id: I1620413578b9e8da6564664219f65bdc00d5ecfd
d56b4d1db34bd6928f599e7e9a7321c2a81cb995 01-Oct-2012 Adam Powell <adamp@google.com> Construct a task stack for picking a wifi network from notification

Bug 7001327

Change-Id: I5a79e6933cd33386cd0aa4df626f15902deedd67
2f39e9f8333183312b7f7d423c2ea60a93a25e32 21-Sep-2012 Craig Mautner <cmautner@google.com> Switch from uevent model to /dev/input/event.

Headsets are now detected from calls coming in from the input switch
subsystem if a config.xml value is set to true.

Bug: 6548391.

Change-Id: I79259d2742e157b106a746474f32ffd1c171ddf3
71520a68f3906ce2a7e425edd7fe08bac535a967 01-Oct-2012 Jeff Sharkey <jsharkey@android.com> Merge "Handle ISE when physical volume isn't mounted." into jb-mr1-dev
edce6a797878792de2b0bde4360f3171b9e9d9d2 01-Oct-2012 Jeff Brown <jeffbrown@google.com> Remove clearUserActivityTimeout().

This function is not implemented and not needed.

Bug: 7165399
Change-Id: Ib1c50fabad6292ccf670404ba70aeb1242c4614d
2a30547af44536f6b0e2f7020ac1a435c72afc84 01-Oct-2012 Dianne Hackborn <hackbod@google.com> Merge "Work on issue #6949468: android.dpi.cts.ConfigurationScreenLayoutTest..." into jb-mr1-dev
fe37f8f51d90fc4c6230e54dcd1270df5fcc6be3 30-Sep-2012 Dianne Hackborn <hackbod@google.com> Work on issue #6949468: android.dpi.cts.ConfigurationScreenLayoutTest...

...#testScreenLayout failures on JO

This doesn't actually fix it; I have concluded that the test is broken
(the platform is correctly reporting that this is a NOT LONG device
because in portrait once you account for the status bar and system
bar our size is 880dp high and 600dp wide, which is not enough for us
to be in the LONG config).

However while working on this I noticed that the code for computing
the configuration of the external display was wrong. I have fixed
that by putting this code for computing these parts of the configuration
in a common place that both the window manager and external display
code can use.

Change-Id: Ic6a84b955e9ec345a87f725203a29e4712dac0ad
a2064df6ab77f71e9187da380cbe355c5eaf5a64 30-Sep-2012 rich cannings <richc@google.com> Disable package verification in test harness

Bug: 7233608
Change-Id: I521980728f5fb68b42a3906ff4fd25cd59dbbd7a
32ee831eabc43001d756897e57f52f527bd9c431 30-Sep-2012 Jeff Sharkey <jsharkey@android.com> Handle ISE when physical volume isn't mounted.

Bug: 7238149
Change-Id: I85081225a1a43a2c1b6f70b6275c6bbca0b3764e
a6efc965cc6f42ab88c08e48463ea4604d29cc77 30-Sep-2012 Craig Mautner <cmautner@google.com> Merge "Changing debug for b/7094175." into jb-mr1-dev
c36c49ee83123d6083c05a3e333ac43a13f664cd 30-Sep-2012 Craig Mautner <cmautner@google.com> Changing debug for b/7094175.

Fixes bug 7094175 (but not really).

Change-Id: Ice2abb93f479ea0bda931e9643710668c25aa285
9ea8f390dbe8123415b9d64ce1a31683012958d9 29-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Explore by touch enabled when screen magnification is on.

1. A recently added check was preventing touch exploration being
disabled when the last touch exploring service was turned off.
As a consequence enabling explore by touch was initializing the
input filter with the magnification and the not disabled
screen magnification features.

Change-Id: I9ed5457705d625805462e4d316b2c8a5af9aabca
7f813202cb08a829b59e17be749ffee4a2f482b8 29-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "Get rid of preventScreenOn()." into jb-mr1-dev
120664816a9bf325b618d8dd40febae2e3636ec8 29-Sep-2012 Jeff Brown <jeffbrown@google.com> Get rid of preventScreenOn().

Bug: 7165399
Change-Id: I1968265ecd74fff4d85efd2ca03b1983425ea518
84215565dd5dda84db7fd35b8ae4ccb571465cd2 29-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #7255954: API Review: rename Dream to DreamService" into jb-mr1-dev
be87e2f5885b28145a788fd31d1fb5ae88a71100 29-Sep-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7255954: API Review: rename Dream to DreamService

Change-Id: I89ecf2c3ec4fef09c0495aa68de11576f9cfd872
c5211780ce60cd77d31b4df0f708bb760daddd5d 29-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Sending interaction end event at the end of a drag." into jb-mr1-dev
46824214bbe75d7e7e50cb15e3293c703d597a5f 29-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Sending interaction end event at the end of a drag.

1. In explore-by-touch when the user slides two fingers in the same
direction we consider it a drag gesture. We merge the pointers into
one and deliver a touch event. When one of the pointers goes up
we were transitioning into touch exploring state. This means that
were transitioning to another state in the middle of a gesture which
creates complications and leads for interaction end event not being

This change transitions out of dragging state when all pointers go up
- simple and all events are properly sent. Consequentially, staring a
drag the user has to lift all pointers to touch explore. Since usually
users either drags or touch explores this seems the simplest and
*least risky* fix.


Change-Id: Ie8588fbe9b26cb81312bd7fd377c94732e41e3f8
3ff8e1a80058e5557d13693d3223e1aa011c0038 29-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #7211769 and #7244492, thrash around on #7226656." into jb-mr1-dev
925a659d824089d2977b44a6740f793ae65f809a 29-Sep-2012 Robert Greenwalt <rgreenwalt@google.com> Merge "Use updatable file for premium-sms filter" into jb-mr1-dev
d4ac8d7b3de27a9f0e4c6af2496ca71d794e42d1 28-Sep-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7211769 and #7244492, thrash around on #7226656.

Issue #7211769: Crash dialog from background user has non-working "report"

The report button now launches the issue reporter for the correct user.
Also for crashes on background users, either disable the report button,
or simply don't show the dialog depending on the build config.

Issue #7244492: Bugreport button in Quick Settings doesn't actually do anything

Now they do.

Issue #7226656: second user seeing primary user's apps

I haven't had any success at reproducing this. I have tried to tighten up
the path where we create the user to ensure nothing could cause the
user's applications to be accessed before the user it fully created and thus
make them installed... but I can't convince myself that is the actual problem.

Also tightened up the user switch code to use forground broadcasts for all
of the updates about the switch (since this is really a foreground operation),
added a facility to have BOOT_COMPELTED broadcasts not get launched for
secondary users and use that on a few key system receivers, fixed some debug

Change-Id: Iadf8f8e4878a86def2e495e9d0dc40c4fb347021
47c52a873e78d78a73abe85bb5491701a7b39feb 28-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Some accessibility events not sent from touch explorer if apps misbehave." into jb-mr1-dev
fe304b893968887323b93764caafa66ee8ad44de 28-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Some accessibility events not sent from touch explorer if apps misbehave.

1. The touch explorer is relying on the hover exit accessibility event to be sent
from the app's view tree before sending the exploration end and last touch
accessibility events. However, if the app is buggy and does not send the hover
exit event, then the interaction ending events are never sent. Now there is a
timeout in which we wait for the hover exit accessibility event before sending
the gesture end and last touch accessibility events. Hence, we are making a
best effort to have a consistent event stream.

2. Sneaking in the new nine patch for the border around the magnified region
since the current one is engineering art.


Change-Id: Ie64f23659c25ab914565d50537b9a82bdc6a44a0
01996793dd2a70acb0ae006960c23c31f0e39d5f 28-Sep-2012 Amith Yamasani <yamasani@google.com> Merge "Remove user switcher from long-press power menu" into jb-mr1-dev
9dbbfcda81f251f23aded866f7f9d49d8a744c75 28-Sep-2012 Ben Gruver <bgruv@google.com> Merge "Pass the originating uid to the package verifier" into jb-mr1-dev
95841ac3c2d45a839cc3cd0bd420fd9d91ccd583 28-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Inconsistent events on transition from gesture detection to touch exploration." into jb-mr1-dev
ca8688207b68612419213cc8f3afd7abeb03a181 28-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Accessibility services that do not accept events are mismanaged." into jb-mr1-dev
c6fa237daeaae6107174a9b9d4f591ea8cd26d86 24-Sep-2012 Robert Greenwalt <rgreenwalt@google.com> Use updatable file for premium-sms filter

The data is really to big for a gservices-driven secure setting.

Change-Id: Ie3d4a1a0aeb69b9ef8fad360fa7ec32e927644e8
bc4ba82335c091cebaaee8b20987a61fb54c1727 28-Sep-2012 Amith Yamasani <yamasani@google.com> Remove user switcher from long-press power menu

Bug: 7252218

Also lock the screen before doing the user switch. This prevents the
janky behavior of showing the target user's homescreen after the switch
and then the lock screen. This is also a privacy issue.

Change-Id: I9f8db047335d06fc93505d7b5cca71e27ca3ac39
a174a776321e1620258b78424dfe38b382327679 28-Sep-2012 John Spurlock <jspurlock@google.com> Merge "Close the notification shade when starting dream." into jb-mr1-dev
0dc2b81ce1400ae23faa5cc386caeef235856307 28-Sep-2012 Daniel Sandler <dsandler@android.com> Merge "Cleanup internal status bar APIs." into jb-mr1-dev
aed4b6f812674bc60a04470013ca449e5c114fa5 28-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Inconsistent events on transition from gesture detection to touch exploration.

1. The problem is that we have a gesture detection timeout after which we transition
to touch exploration state. This handles the case where the user is using too high
velocity while trying to touch explore. The delayed command that transitions from
gesture detection state to touch exploration state was not firing an event for the
end of gesture detection and begin of touch exploration before doing its main work
to transition to touch exploring state.


Change-Id: I5c4855231aa3826dadbee324e74a3c9e52c96cd9
1f22b6a25d7df6c5488d9bd01793e7a20d921349 28-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Accessibility services that do not accept events are mismanaged.

1. If an accessibility service does not specify that it handles any
event types it was never added to the list of services while
the system is bound to it. Since the service is not in the list
with enabled services we never unbind it, hence it consumes
resources without doing nothing. This is also semantically
incorrect because a sevice may not want to receive events while
handling only gestures.


Change-Id: Id478a4704cdeeb1729330f6ae4b8ff9e06320952
591a9e8d6ef2cab3ab3a701bd6279b6c12e6e4c6 28-Sep-2012 John Spurlock <jspurlock@google.com> Close the notification shade when starting dream.

Change-Id: I17d2b75bc502ff8fb739a6cbb4d0219681fa4e8a
13701b50f533775fd7a547fd0e479c1ec9035ce8 28-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "Bundle correlated switch changes atomically." into jb-mr1-dev
3cd961292e877cc5fac146290421e9e67aa553a2 28-Sep-2012 Satoshi Kataoka <satok@google.com> Merge "Fix ime swtich issue" into jb-mr1-dev
d08a9238db0de62c956788ceebb227d099ad88c2 28-Sep-2012 Satoshi Kataoka <satok@google.com> Fix ime swtich issue

Bug: 7250097
Change-Id: Ibe85aaf7d60e7c3a27363eece528d19a0c8ddca2
448f6e1e1471db2caf218ca8918c2d82306b450a 28-Sep-2012 Hiroshi Lockheimer <hiroshi@google.com> Merge "temporarily disable blacklisting" into jb-mr1-dev
bcc046af4ef171aa3aa3c6b64efb5cafc1e46cd3 28-Sep-2012 Jeff Brown <jeffbrown@google.com> Bundle correlated switch changes atomically.

This is a prerequisite for headset jack detection on Manta.

Bug: 6548391
Change-Id: I549a194344511c0cee578b00f6a9ab5fdbdfb99c
7befb7deb2ac15134b3bb190520cba19165d16dd 28-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Global gesture to toggle Accessibility system-wide.

1. This change adds a global gesture for enabling accessibility.
To enable this gesture the user has to allow it from the
accessibility settings or use the setup wizard to enable
accessibility. When the global gesture is enabled the user
can long press on power to bring the global actions dialog
and then hold with two fingers for a few seconds to enable
accessibility. The appropriate feedback is also provided.

2. The global gesture is writing directly into the settings for
the current user if performed when the keyguard is not on. If
the keygaurd is on and the current user has no accessibility
enabled, the gesture will temporary enable accessibility
for the current user, i.e. no settings are changed, to allow
the blind user to log into his account. As soon as a user
switch happens the new user settings are inherited. If no
user change happens after temporary enabling accessibility
the temporary changes will be undone when the keyguard goes
away and the device will works as expected by the current user.


3. The initialization code for the owner was not executed due
to a redundant check, thus putting the accessibility layer in
an inconsistent state which breaks pretty much everything.


Change-Id: Ie7d7aba80f5867b7f88d5893b848b53fb02a7537
e49611452823d74b0657aed1cee8a4863f95ad8d 28-Sep-2012 Satoshi Kataoka <satok@google.com> Merge "Treat additional inputmethod subtypes per user" into jb-mr1-dev
3dc0b80dc6e6aa156eea4d737cdeaad96aa1125a 28-Sep-2012 Craig Mautner <cmautner@google.com> Merge "Fix layout state issues." into jb-mr1-dev
b319d5de196f7ff8fac39a567a449dd93db832c8 28-Sep-2012 Victoria Lease <violets@google.com> temporarily disable blacklisting

Bug: 7248239
Change-Id: I2ef28fa0d6890a127fc424e58a148fe1fb15b683
812d2ca475e88d4e52870a4eeeb096a411f0f077 28-Sep-2012 Craig Mautner <cmautner@google.com> Fix layout state issues.

- Restore test of hidden to isGoneForLayoutLw(), without that
we return false when setAppVisibility(true) is called which leads
to early layout of windows. Particulary on return from full screen
to non-full we lay out once before recognizing that the status bar
should be back and then again once the status bar appears causing
a jump. Fixes bug 6470541.

- Add a new test for configuration size changes to gone or hidden
windows. This forces a layout call to these windows which informs
them of the new size even though they are not shown until later.
In particular this keeps windows that were in the background
during a rotation from using their old boundaries on return.
Fixes bug 6615859.

- Consolidate WindowState.mConfiguration tests into WindowState.

Change-Id: I7a82ce747a3fcf7d74104dc23f1532efe64bd767
625239a05401bbf18b04d9874cea3f82da7c29a1 27-Sep-2012 Jeff Sharkey <jsharkey@android.com> Migrate more Secure settings to Global.

Migrate networking, storage, battery, DropBox, and PackageManager
related Secure settings to Global table.

Bug: 7232014, 7231331, 7231198
Change-Id: I772c2a9586a2f708c9db95622477f235064b8f4d
3f91e43eb00764cebfdffb42a3ddcb723ae439e0 27-Sep-2012 Christopher Tate <ctate@google.com> Merge "Full (local) restore security changes" into jb-mr1-dev
37d83a3caf138e35fa1a355787d20c351f6b37a6 27-Sep-2012 Ben Gruver <bgruv@google.com> Pass the originating uid to the package verifier

Bug: 6923241
Change-Id: I85a3e0d53b469543cb0551d3a440d2663b5d0697
f6d6fa8cbc0251da1900e858bb0379cda5014b6f 27-Sep-2012 Christopher Tate <ctate@google.com> Full (local) restore security changes

(1) Prevent full restore from creating files/directories that are
accessible by other applications

(2) Don't restore filesets from "system" packages; i.e. any that runs
as a special uid, unless they define their own agent for handling
the restore process.

Bug 7168284

Change-Id: Id6a0cb4c113c2e4a8c4605252cffa41bea22d8a3
580ee8b0c6e1aea1e2e1d60499b603b9168b44f0 27-Sep-2012 Adam Cohen <adamcohen@google.com> Merge "Fixing AppWidgetService / AppWidgetHost to work in system process" into jb-mr1-dev
11cf178100e71d3f9f34ab5865e03a277c5eadaa 27-Sep-2012 Daniel Sandler <dsandler@android.com> Cleanup internal status bar APIs.

IStatusBarService.collapseQuickSettings is gone;
collapseNotifications is now collapsePanels, which does what
collapse() used to do. Similarly,
IStatusBar.animateCollapseQuickSettings is now simply

Bug: 7245229
Change-Id: Id157d2fdf34926d3c85ffa8b81c741a5359aede4
5ade83ba1233b33c5570caac6e081229e32d6cec 26-Sep-2012 Satoshi Kataoka <satok@google.com> Treat additional inputmethod subtypes per user

Bug: 6931482
Change-Id: I4f7c7e69a80534da3a48ac508ff7a9e7511f33ce
2480bc12a525a55ebff453dbf6ca95258b9f23cf 27-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #7232952: Settings crash on tapping on Downloaded apps on a secondary user" into jb-mr1-dev
c7ba771a4584d624e66167d018fed7727a819032 27-Sep-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7232952: Settings crash on tapping on Downloaded apps on a secondary user

Also tweak bind flags for new location services so they
aren't put so aggressively up in the oom adj list.

Change-Id: I9da25a3fea7681013b4d95b7db7e9a808f2d733b
7bb89cf1632da6dc236e6603c4245301500eeb39 27-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge changes I2c09abaa,I9d8406e1 into jb-mr1-dev

* changes:
Cure narcolepsy.
Allow applications to connect to known wifi displays.
f21b94a8774f238daf90105a42bc6c140dd7dae2 27-Sep-2012 Jeff Sharkey <jsharkey@android.com> Merge "Remove unused Secure settings." into jb-mr1-dev
68b7a6d14b68b38324ffd275c7227805c7d99b2d 27-Sep-2012 Jeff Sharkey <jsharkey@android.com> Merge "First step towards cleaning up Global settings." into jb-mr1-dev
f9d40f4236544db87c79d2d5dfce158a411b87d0 27-Sep-2012 Jeff Brown <jeffbrown@google.com> Cure narcolepsy.

Bug: 7204211
Change-Id: I2c09abaad5d321cec6f62f7ca0ce00c3b61ee211
bc335457462a12434a9df6955de1dd693cdccac7 27-Sep-2012 Jeff Brown <jeffbrown@google.com> Allow applications to connect to known wifi displays.

Bug: 7177920
Change-Id: I9d8406e1016988e2cd267dfa52d78a829f1b385e
3ff2d867d46067132890a5a6ad68be8a4314d7f6 26-Sep-2012 Adam Cohen <adamcohen@google.com> Fixing AppWidgetService / AppWidgetHost to work in system process

-> Fixes issue 7208464
-> Fixed issue with partial update as well, should address
issue 7214731

Change-Id: Ib8d9d5bee68b4fa7d6b4fbbc2f6609c287689958
4de9936e85696208dfe91d1c40e3e5226e57634a 27-Sep-2012 Jeff Sharkey <jsharkey@android.com> Remove unused Secure settings.

Carefully leave default values intact in Watchdog for now.

Bug: 7232007, 7232230
Change-Id: Id944181109305aed41e0766fdd39625b43cb1d19
eed8f06f7f5d8f934ea99f16ef987a3ae1bd99b2 27-Sep-2012 Philip Milne <pmilne@google.com> Merge "Fix for bug: #7173350. elapsedRealtimeNano() -> elapsedRealtimeNanos()" into jb-mr1-dev
bdfce2ec05a3e9ca6acd6711de6133e06f2446e6 27-Sep-2012 Jeff Sharkey <jsharkey@android.com> First step towards cleaning up Global settings.

Remove all @Deprecated @hide settings, and clean up any stragglers.

Bug: 7232125
Change-Id: Ibf67093c728d4a28565129b923edb1701d3b2789
62c82e4d92cc0b856059f905d81885f7808a0e7d 26-Sep-2012 Jeff Brown <jeffbrown@google.com> Make DreamManagerService more robust.

Clearly isolated the DreamManagerService and DreamController
responsibilities. DreamManagerService contains just enough logic to
manage the global synchronous behaviors. All of the asynchronous
behaviors are in DreamController.

Added a new PowerManager function called nap() to request the device
to start napping. If it is a good time to nap, then the
PowerManagerService will call startDream() on the DreamManagerService
to start dreaming.

Fixed a possible multi-user issue by explicitly tracking for
which user a dream service is being started and stopping dreams
when the current user changes. The user id is also passed to
bindService() to ensure that the dream has the right environment.

Fix interactions with docks and the UI mode manager. It is
important that we always send the ACTION_DOCK_EVENT broadcast
to the system so that it can configure audio routing and the like.
When docked, the UI mode manager starts a dock app if there is
one, otherwise it starts a dream.

This change resolves issues with dreams started for reasons other
than a user activity timeout.

Bug: 7204211
Change-Id: I3193cc8190982c0836319176fa2e9c4dcad9c01f
cef440f2a2bb8b6e8d082d12a67dc21f2ee65e3c 26-Sep-2012 Jeff Brown <jeffbrown@google.com> Move DreamManagerService to its own package.

Bug: 7204211
Change-Id: Ia6cfe252647161df357a4de149a06fa1e3fd63fa
e521573097390ce5465fc9b88dee2ae62f2317c6 26-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Maybe fix issue #7211766: bindService() to User u0 While u10 is..." into jb-mr1-dev
b12e1354f25f04e9c9a71da76c6fca858b7d39d0 26-Sep-2012 Dianne Hackborn <hackbod@google.com> Maybe fix issue #7211766: bindService() to User u0 While u10 is...

...Forground Sometimes Doesn't Take

The main change here is a one-liner in ActiveServices to check the
uid when deciding whether to remove an item from mPendingServices.
This could cause the problem being seen -- if the same service for
two users is starting at the same time, the second one would blow
away the pending start of the first one. Unfortunately I have had
trouble reproducing the bug, so I don't know if this is actually
fixing it. It's a bug, anyway.

The reason so much has changed here is because I spread around
logging and printing of the user ID associated with operations and
objects to make it easier to debug these kind of multi-user things.

Also includes some tweaks to the oom manager to allow more background
processes (I have seen many times in logs where we thrash through
processes because the LRU list is too short), plus to compensate an
additional time-based metric for when to get rid of background processes,
plus some new logic to try to help things like Chrome keep around
their service processes.

Change-Id: Icda77fb2a1dd349969e3ff2c8fff0f19b40b31d3
1951db86f527ff4e8c2ddf4306779ce956cd372d 26-Sep-2012 Jeff Sharkey <jsharkey@android.com> Merge "Multi-user ringtone playback." into jb-mr1-dev
4118012da9a22694b3353040a485f8cdc27e2f17 26-Sep-2012 Philip Milne <pmilne@google.com> Fix for bug: #7173350. elapsedRealtimeNano() -> elapsedRealtimeNanos()

Change-Id: Ie38952bbaace080e81e41e61350cda172951d548
65c4a2b26cd8776b0927e9b0e07ecf53bd31b627 26-Sep-2012 Jeff Sharkey <jsharkey@android.com> Multi-user ringtone playback.

Change RingtonePlayer to open content:// Uris based on requesting
UserHandle. Grant SystemUI visibility to all emulated storage so
it can play ringtones for apps without READ_EXTERNAL_STORAGE.

Resolve canonical file:// Uris before passing out of source app,
replacing any /emulated_legacy/-style paths with user-specific
variant so they can be opened by SystemUI. Calling for RemoteViews,
Ringtones, and Notifications.

Bug: 7202982
Change-Id: Ibf0eca8df80c1486711144a7b648f464aadfe099
72a374705d32cf715443aa203f75c159e1bc9bd5 26-Sep-2012 Victoria Lease <violets@google.com> Merge "getBestProvider() prefers GPS over NLP" into jb-mr1-dev
4e1ab15b305aac26ad8819fc3b2951e20985944d 13-Sep-2012 Satoshi Kataoka <satok@google.com> Enable multi-user function for IMF

Bug: 6931482

Change-Id: Ib23849d352db33f0747aa9d5a178f00ac726c13b
5e1c74dbbe1ccf93ab13a3cc9e46e98988036762 26-Sep-2012 Matthew Xie <mattx@google.com> Merge "Remove permission check in registerAdapter" into jb-mr1-dev
670ef53353f0fc6f295df2f440bf8a159cc283f4 26-Sep-2012 Matthew Xie <mattx@google.com> Remove permission check in registerAdapter

This matches the JB behavior of getDefaultAdapter public api
bug 6948829

Change-Id: I86135bf45fddbb2d078f855f91a34d6fcce237a2
6e065a729dbf08f99209a7710da80442a394ec0d 26-Sep-2012 Jeff Sharkey <jsharkey@android.com> Merge "Handle multi-user mountObb() requests." into jb-mr1-dev
4fbbda4cecb078bd3867f416b02cc75f5455284f 25-Sep-2012 Jeff Sharkey <jsharkey@android.com> Handle multi-user mountObb() requests.

Since emulated external storage paths differ based on execution
context, carefully fix up paths for various use-cases:

1. When sending paths to DefaultContainerService, always scope
OBB paths as belonging to USER_OWNER.
2. When sending paths to vold, always build emulated storage paths
visible to root.
3. Always use the original untouched path when talking with apps.

Mount OBB containers using shared app GID, so that an app can read
the mount point across users.

Handle legacy paths like "/sdcard" by resolving the canonical path
before sending to MountService. Move tests to servicestests, and
add tests for new path generation logic.

Bug: 7212801
Change-Id: I078c52879cd08d9c8a52cc8c83ac7ced1e8035e7
b32e221699201cb647beae3fe0a1771fd5a41cf4 26-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge changes I332f020f,I632648ac into jb-mr1-dev

* changes:
Update references to migrated global settings.
Handle user switched for settings changes.
0a52088e58a6ddea0966ba9cd2fbc7bd3e23809a 26-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "Fix typo." into jb-mr1-dev
c91fb5875bfd7f91d50d6fe939873872b53c8b2f 26-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Adding a global accessibility action to open quick settings." into jb-mr1-dev
e20a177d3f147f3011647c3bdab401f90b2c5d1d 26-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Adding a global accessibility action to open quick settings.

1. Added APIs for opening the quick settings to the StatusBarManagerService
and the local StatausBarManager. The new APIs are protected by the old
Renamed the expand* and collapse* non-public APIs that are expanding
the notifications to expandNotifications* collapseNotifications* to
better convey what they do given that this change adds
expandQuickSettings* and collapseQuickSettings*.
Added a global action to the accessibility layer to expand the quick
settings which is calling into the new status bar manager APIs.


Change-Id: Ic7b46e1a132f1c0d71355f18e7c5a9a2424171c3
98edc951712823dbf5db2b7e9c203a0e98fc616b 25-Sep-2012 Amith Yamasani <yamasani@google.com> Load resources for the correct user

For apps that are only installed on secondary users, the SystemUI is
unable to see them by default. Added some methods to explicitly pass the
userId of the user the resources are requested for by the StatusBarIcon

Bug: 7214384

Also fix binding to remote views

Bug: 7192802

Change-Id: I5d6c5f624aa37fb231f3467f9764c8d99077a91d
bf6f6f9de72c9fd15e6bda9f228c05a9b37d6324 26-Sep-2012 Jeff Brown <jeffbrown@google.com> Update references to migrated global settings.

Fixed one setting that was migrated but not marked deprecated.

Removed a hidden setting that is no longer used by the new
power manager service.

Bug: 7231172
Change-Id: I332f020f876a18d519a1a20598a172f1c98036f7
d49359631bc2642be73dc162a8a73207df1e0baf 25-Sep-2012 Jeff Brown <jeffbrown@google.com> Handle user switched for settings changes.


Bug: 7127417
Change-Id: I632648ac5b01408512f59424f3bb55162431bea4
28e0b09a3d22de80cca05499e98a23d5dd82fa15 25-Sep-2012 Jeff Brown <jeffbrown@google.com> Fix typo.

Bug: 7183618
Change-Id: I0c761fc7f55b3f182007cb4d50cbfdce309f844a
1c9766e32a630c72db400a769430e60549062577 25-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "The active window for accessibilitiy incorrectly tracked." into jb-mr1-dev
a8afa694d6881266ad762aacdac92b2047f9a86c 25-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Regression in screen introspection APIs due to the multi-user change.

1. The initial user was set to USER_NULL but some clients were registering
before the user change callback happens. Since the initial user is
the owner the current user id defaults to USER_OWNER.

2. The check for global clients and window connections was using the
calling UID but there are processes that run in a per user basis
as system UID (Setting for example). Now the check is stronger
and comparing the caller PID with that of the system process.

3. The code for finding the focused window id was not checking the
global window token list in addition to that of the current user.

4. The code updating the active window id was calling out into the
window manager with a lock held.


Change-Id: I9f4b7ea67eb5598b30ee7d1b68a1d3ce0cf8cfb4
f80a9b2f8a841d32c7398ebbf4cba82b02e9f167 25-Sep-2012 Amith Yamasani <yamasani@google.com> Watch for voice recognition service changes for all users

Monitor package changes and update the default recognizer

Bug: 7216043

Change-Id: I6b358b62401eaf58b38059caa57f72585f332eb5
fe3632bcbea6aabe0e363c00097767465a1d7797 25-Sep-2012 Jean-Baptiste Queru <jbq@google.com> Merge into jb-mr1-dev

Change-Id: Ib0523ded92e2fe4be6a32d092baa55b527229c07
56d8cc103150eecad8911754735abec3a7ce9691 25-Sep-2012 Jean-Baptiste Queru <jbq@google.com> Merge into jb-mr1-dev

Change-Id: I6504b000be7e3b6e770af99c5a922fd1e9ec73de
ecfc9ca5f5233ad2eb6921c05250b8b3ebbc4c58 25-Sep-2012 Jean-Baptiste Queru <jbq@google.com> Merge into jb-mr1-dev

Change-Id: Ia9c5e2295fe61ae0f5275d3ddfd056d9778b66d1
95293865bde95d2a41cb6edb0d113277000ccb29 25-Sep-2012 Amith Yamasani <yamasani@google.com> Fix build

Merge error...

Change-Id: I0e674ee25a080fa6abfaa9da893084d6b4fa69a6
0dfe1cf3cda5accef0a3c361593ccc716e725539 25-Sep-2012 Jean-Baptiste Queru <jbq@google.com> Merge into jb-mr1-dev

Change-Id: Id8bbccaa542bef3351958fb6749370880a1921f3
7951c459aefeb012638477b762e19b792ecbe009 25-Sep-2012 Jean-Baptiste Queru <jbq@google.com> Merge into jb-mr1-dev

Change-Id: Ifc2328e30a52c2baebc1322c9b161104dcf21618
ec1996131d2e17408a22fd55fbc3edba5ea80d02 25-Sep-2012 Jean-Baptiste Queru <jbq@google.com> Merge into jb-mr1-dev

Change-Id: I97ff2551b36a1b590f2d314cabfcf198dd10f404
6fb2514cdf77e2657d7b73b0cd97e060aefc6b53 25-Sep-2012 Jean-Baptiste Queru <jbq@google.com> Merge into jb-mr1-dev

Change-Id: I1baab28b12364213673ed7992207ad198491f286
76c0dd48279531cb31e2a284a270c535664cbf81 25-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> The active window for accessibilitiy incorrectly tracked.

1. The active window for accessibility purposes is the either the
window the user is touching or the window that has input focus. We
were using the touch exploration gesture end event to figure
when the user stops touching the screen so we can set the active
window to the input focused one. However, we do not send such
gesture end if the user does not touch explore. If the user only
taps we do not consider this touch exploring. We now have dedicated
accessibility events for first and last touch and this change uses
them as a guide when to update the active window.


Change-Id: I6262c0c5f408b02dbaa127664e4b426935d7f81f
03e7b8881599da69207a93a2bcbbe5050efb6633 25-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> More than one finger at a time can trigger a system crash.

1. The crash was happening if: two active pointers are performing a drag;
there are some inactive pointers down; the main dragging pointer (we are
merging the dragging pointers into one) goes up; now an inactive pointer
goes up and the explorer tries to inject up for the dragging pointer
which is no longer in the event resulting in a crash. Basically two
problems: inactive pointers were not ignored; 2) having only one
active pointer should not only send the up event but also transition
the explorer in touch exploring state.


Change-Id: I341fc360ebc074fe3919d5ba3b98ee5cb08dd71e
3671410b9e09e1c5ec05dfc58651a8efaa7790dd 25-Sep-2012 Jeff Brown <jeffbrown@google.com> Fix dialogs on secondary displays.

Bug: 7183618
Change-Id: I65b650a0c423f3081c412a7341b7427b6ac85e24
ea7e91514ee1968d15713e82a5cca745e2c46a05 25-Sep-2012 Amith Yamasani <yamasani@google.com> AppInfo from Notifications for secondary users

Required wiring up startActivitiesAsUser()

Bug: 7224950

Also fix a bug in navigateUp in secondary user

Change-Id: I114ae2de0457362d62e899fdb94b12239a3eb778
1925e290e7ac2801311cb4e732d1bc5a5f3e0c44 25-Sep-2012 Victoria Lease <violets@google.com> getBestProvider() prefers GPS over NLP

Preferring the GPS location provider over NLP should produce better
average and worst-case results than NLP, which is very accurate in
certain conditions and completely useless in others.

Bug: 7182301
Change-Id: If7d50f0d3ac663cbfd84b7033adc204c11bcaca4
187f3f94901001792328b40366b434135e3f1dde 25-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Magnified frame not properly computed when keyguard goes away.

1. The keyguard force hides some windows when it is shown and as soon
as the keyguard goes away there windows are made visible. However,
the window transition that the keyguard is moving away is reported
before the force hidden windows are shown which makes the screen
magnifier compute the magnified region with an incomplete list of
windows of interest.


Change-Id: I3abc4d97b7a74de8183ad20477dadf66c82da037
14a9f2b9d23976b7aae5330b56c633a03181c710 24-Sep-2012 Jeff Brown <jeffbrown@google.com> Fix drag and drop surfaces on secondary displays.

Bug: 7183618
Change-Id: I4ef746916aad984640f1eb3b3c71b1e34595aabd
2033763bb18913773eea3ac82bf9dbb053444ac6 24-Sep-2012 Jeff Brown <jeffbrown@google.com> Allow a window on a secondary display to have focus.

If any window on the default display has focus, then it
gets focus as usual. If no window on the default display
has focus, then we consider windows on the secondary display.

In the future we will need more elaborate schemes for
managing focus across multiple displays, but this is enough
for testing purposes now.

Bug: 7183618
Change-Id: I21ddb9904eb9e574e42d28743aeca51f4ffebf64
139748fd724b482e2c012a6ec44d1c5abc0c0e97 24-Sep-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7215984: java.lang.RuntimeException: Unable to create...

...service com.android.systemui.SystemUIService: java.lang.NullPointerException

- Don't acquire the activity manager lock in handleIncomingUser(),
there is really no need to do so.
- Rework the settings provider client side cache code to not hold
locks while calling into the provider.

I also changed the way the settings provider uses system properties
so that there is one property for all users. We can't do one per
user, since the system property name space is limited with a fixed
size. And we don't really need to do that; the worse that happens
by combining all users is that if one running user changes one of its
settings, all other running users will think they need to reload
settings when they go to fetch them next.

Change-Id: I13b90b832310d117eb6d721aacd122cfba7d749a
270a331cae1f8179e15c794cf8a359893d5966a1 24-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "UI test automation service should not be auto reconnected." into jb-mr1-dev
657968a65f29e9319c39b833fefc2ae7472c3e53 22-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> UI test automation service should not be auto reconnected.

1. Since adb is restarted on user switch it makes no sense to
try to reconnect the ui automation service since it will
be killed on a user switch.

Disabling touch exploration on UI automation service
connect since it can explicitly put the device in this
state if needed.


Change-Id: I8cfde74f28f3f03d4ccf24746d43b8178ae2b5ef
bc391d58c8d09bd58b57dda20dd9d2281d90db32 24-Sep-2012 Philip Milne <pmilne@google.com> Merge "Revert "Fix for bug: #7173350. elapsedRealtimeNano() -> elapsedRealtimeNanos()"" into jb-mr1-dev
53fe75677212d0eb45e256a78599d7866256bc6a 24-Sep-2012 Philip Milne <pmilne@google.com> Revert "Fix for bug: #7173350. elapsedRealtimeNano() -> elapsedRealtimeNanos()"

This reverts commit 2f6d8829524dfca3a77e9a57c3b9c3862209877d

Change-Id: Id5af767a09fc319127c4ebef837c5b7a7f75cb01
9b93f4def131845200997c861858f34cc15c8dee 24-Sep-2012 Michael Jurka <mikejurka@google.com> Merge "Fix security check for private allocateAppWidgetId api" into jb-mr1-dev
b00df8e929f9ba865a95a7df3f949e6169332954 24-Sep-2012 Philip Milne <pmilne@google.com> Merge "Fix for bug: #7173350. elapsedRealtimeNano() -> elapsedRealtimeNanos()" into jb-mr1-dev
cd11b223f3d23ca0f92b53808f7e1cce928c2a7b 24-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #7214090: Need to be able to post notifications to all users" into jb-mr1-dev
50cdf7c3069eb2cf82acbad73c322b7a5f3af4b1 24-Sep-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7214090: Need to be able to post notifications to all users

Also fix a bunch of system services that should be doing this. And
while doing that, found I needed to fix PendingIntent to evaluate
USER_CURRENT at the point of sending, not creation.

Note that this may end up with us having some notification shown to
non-primary users that lead to settings UI that should only be for
the primary user (such as the vpn notification). I'm not sure what
to do about this, maybe we need a different UI to come up there or
something, but showing the actual notification for those users at
least seems less broken than not telling them at all.

Change-Id: Iffc51e2d7c847e3d05064d292ab93937646a1ab7
888eb73c6e86a18520cbaa999a18e8b039dbed4f 24-Sep-2012 Amith Yamasani <yamasani@google.com> resolved conflicts for merge of 814f5ac3 to jb-mr1-dev

Change-Id: Ic65395ce932971dc9c37a481aa96da79a45d0f12
8658e1aa1fb0905852c4b0f5ae1d96cd2d56b6cf 24-Sep-2012 Victoria Lease <violets@google.com> Merge "Allow apps to getProviders() without location permissions." into jb-mr1-dev
b079d1f28089ad4de05162b7df0ace90bc40a5f3 24-Sep-2012 Amith Yamasani <yamasani@google.com> am 5e8cbdc0: Merge "Fixing services start order that impacts ICS - JB upgrade"

* commit '5e8cbdc0bd6dfc51e6b54db1d5fd61347336d862':
Fixing services start order that impacts ICS - JB upgrade
49397ac93ce3cf4fc38d00b1099a6cd9075cee8a 24-Sep-2012 Jeff Sharkey <jsharkey@android.com> Merge "Always bind to DefaultContainerService as OWNER." into jb-mr1-dev
916b2b5a932a3be1a1363ac1871e74ad8b314f00 24-Sep-2012 Irfan Sheriff <isheriff@google.com> Merge "Increase WFD connect time out to 60s" into jb-mr1-dev
2c2ca5cb7c083cd53dee00e71af99d1abf931976 24-Sep-2012 Irfan Sheriff <isheriff@google.com> Increase WFD connect time out to 60s

The worst case WPS timeout for GO negotiation is two minutes.
Until, we better handle cancelling/disconnecting and re-syncing the
WFD framework with the wifi direct framework/supplicant, increase
the time out to 60s to help with dogfood

Bug: 7217600
Change-Id: I1ba0d9963b957454e2c6f47bfdf05176dea07be7
752cd922f7091dfd5401faf70dc248934a9dbb6d 24-Sep-2012 Jeff Sharkey <jsharkey@android.com> Always bind to DefaultContainerService as OWNER.

When PackageManagerService deals with external storage, always bind
to DefaultContainerService as USER_OWNER. This avoids binding to a
stopped user, which would fail.

Bug: 7203111
Change-Id: I8e303c7558e8b5cbe4fea0acc9a472b598df0caa
17e3e9e53c5fb9c92c8972a8d92659c6bef85831 24-Sep-2012 Victoria Lease <violets@google.com> Merge "Do not use passive GPS data for COARSE only apps." into jb-mr1-dev
8dbb63419bef8678cf92ebae1d43f549f50987c7 22-Sep-2012 Victoria Lease <violets@google.com> Allow apps to getProviders() without location permissions.

This restores MR0's behavior in this regard - apps calling
LocationManager.getProviders() or LocationManager.getBestProvider()
will no longer receive a SecurityException if they do not have
any location permissions. Instead, as was the behavior in MR0, they
only receive providers that their permissions grant them access to,
including an empty list if they have no permission whatsoever.

Bug: 7207864
Change-Id: I027df425e258d436c4821c34a25bc46a2a292824
5a370882f87321629f98f6149ac946a57e25dfa8 23-Sep-2012 Jeff Sharkey <jsharkey@android.com> Merge "Check READ_EXTERNAL enforcement outside of lock." into jb-mr1-dev
11820f7386ce86fd89e9e6b49d9231dce6e1ed07 23-Sep-2012 Jeff Sharkey <jsharkey@android.com> Merge "Allow acquiring ContentProviders across users." into jb-mr1-dev
b939e35274334d1f5e71a526efe8d235eb6d7387 23-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #7209355, #7214271." into jb-mr1-dev
8da429e80d1778d7bcfbfbd64355c70fb466b3ce 23-Sep-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7209355, #7214271.

Issue #7209355: Intent on the secondary user results in an intent picker
in the Primary user.
Issue #7214271: Crash in system UI

Also fix a bug where I recently broke the removeTask() operation in the
activity manager where it would remove the wrong task.

Change-Id: I448c73a0e83a78d9d8d96b4629658c169888d275
c50f31d213d6764602aed76ed9993d45d33d76d9 23-Sep-2012 Jeff Sharkey <jsharkey@android.com> Check READ_EXTERNAL enforcement outside of lock.

Since SettingsProvider can call back into PMS, query the default
enforcement state before acquiring mPackages lock.

Bug: 7182437
Change-Id: Ie218aedfc7a943e5b221814af3e0356c7199b0e4
6d51571835737c7502a2e111ee9dc2527ebad984 21-Sep-2012 Jeff Sharkey <jsharkey@android.com> Allow acquiring ContentProviders across users.

Otherwise services like SystemUI will always open content://-style
Uris as USER_OWNER. Surfaces through createPackageContextAsUser()
which points all ContentResolver operations towards a given user.

Start using in RemoteViews, so that Notifications correctly resolve
image Uris to the sending user. Also add user support for "content"
shell tool.

Bug: 7202982
Change-Id: I8cb7fb8a812e825bb0b5833799dba87055ff8699
88923c973e3b58593c4d0fb6724addcefc53004f 22-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #7214462: Some recent thumbnails are black." into jb-mr1-dev
6a864959e09ad700cc4815e8d751561ceb7e08e3 22-Sep-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7214462: Some recent thumbnails are black.

Change-Id: I9a2704c95a8701c9fb6755662fb47d4743099bf9
9f12373b57bcd7e7c156306aee50ac4e4fdee58a 22-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Fixing a regression in the UI test automation." into jb-mr1-dev
9371a0a0c0cdf9be0e0a32e4c3037cc2e216cfa0 22-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Fixing a regression in the UI test automation.


Change-Id: I28f01a2bfe44febcb1a519028dab82fb1da9753e
993c3d79a3f70684db5c75fb760bae9b0324f715 22-Sep-2012 Adam Cohen <adamcohen@google.com> Merge "Fixing typos" into jb-mr1-dev
77e95d3d71f10a0d936445e3f3ed90e15c019024 22-Sep-2012 Amith Yamasani <yamasani@google.com> Merge "Show lockscreen widgets for the current user." into jb-mr1-dev
db38d8a4ff28caef8f2565a8ba5dca2a7efe9d83 22-Sep-2012 Adam Cohen <adamcohen@google.com> Fixing typos

Change-Id: I3d470a18bd14a4040dffb0b0d8a11e282546057e
8fd96ec2dc215095d12ef3e9bd7dc50ebc78625e 22-Sep-2012 Amith Yamasani <yamasani@google.com> Show lockscreen widgets for the current user.

Also shows the owner info and next alarm for the current user.
AppWidgetService now assumes that any widgets running in the system process are for the
current user, so that lockscreen shows widgets for the current user

Bug: 7211754
Bug: 7212421

Change-Id: Iaf0edc60e49af0afe42625c0b2dcf100c9ecc178
0a5c5567f2d7e203d95c80a8d3353d0acd98b5f9 22-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Multi-user support for the accessibility layer." into jb-mr1-dev
c9e94ea6451958fce107580b54c183181de6aa22 22-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #7213113: Remove old intent resolver" into jb-mr1-dev
52c62344c585662d6b441a08c2a69a5732255a6f 21-Sep-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7213113: Remove old intent resolver

Also make the query package restart broadcast protected like the
documentation says it should be.

Change-Id: I445166111318a02f2f2b1ab0dff9c641a441c20b
58d37b55bd228032355360ea3303e46a804e0516 18-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Multi-user support for the accessibility layer.

1. This change converts the accessibility manager service to
maintain a state per user. When the user changes the services
for the user that is going away are disconnected, the local
accessibility managers in the processes for this user are
disabled, the state is swapped with the new user's one, and
the new user state is refreshed.

This change updates all calls into the system to use their
user specific versions when applicable. For example, regisetring
content observers, package monitors, calls into other system
services, etc.

There are some components that are shared across users such
as UI created by the system process and the SystemUI package.
Such components are managed as a global state shared across
all users and are updated accordingly on a user switch. Since
the SystemUI is running in a normal app process this change
adds hidden APIs on the local window manager to allow the
SystemUI to notify the accessibility layer that it will run
accross users.

Calls to AccessibiltyManager's isEnabled(), isTouchExplorationEnabled()
and sendAccessibilityEvent return false or a are a nop for a
background user sice he should not send accessibility events,
and should not perform touch exploration.

Update the internal accessibility tests due to changes in the

This change also fixes several issues that were encountered
such as calling out the accessibility manager service with a
lock held.

Removed some incorrect debugging code from the TouchExplorer
that was leading to a system crash.


Change-Id: I2cf32ffdee1d827a8197ae4ce717dc0ff798b259
03bdc8a8f756a951b460b01cbd4d01c2ffd05041 22-Sep-2012 Michael Jurka <mikejurka@google.com> Fix security check for private allocateAppWidgetId api

Bug: 7182054
2f6d8829524dfca3a77e9a57c3b9c3862209877d 21-Sep-2012 Philip Milne <pmilne@google.com> Fix for bug: #7173350. elapsedRealtimeNano() -> elapsedRealtimeNanos()

Change-Id: I71c24ea10093ece07a0780e97bc641ff548c1a44
3ca5971339c7eba61388aa3e26a1b3d02c5ccdf6 22-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "Support HDMI hotplug." into jb-mr1-dev
e87bf030766198bf5e1fe846167dba766e27fb3f 21-Sep-2012 Jeff Brown <jeffbrown@google.com> Support HDMI hotplug.

Bug: 7206678
Change-Id: Ia5212b16658a5f5a2ccf8528eca7bebd45ca857a
1ed9fa10de3e94678ddb2929936caa3ff4164cf8 22-Sep-2012 Jim Miller <jaggies@google.com> Merge "Make DPM API for disabling keyguard widgets more generic" into jb-mr1-dev
09016ab4dd056a16809419d612cb865a14980880 16-Sep-2012 Victoria Lease <violets@google.com> Do not use passive GPS data for COARSE only apps.

FusionEngine now attaches a secondary location that has never seen
GPS data to its result. LocationFudger uses the GPS-less location so
that COARSE apps never see data from the GPS provider.

When the previous location is updated, the previous GPS-less location
is carried over if the location update was GPS-only.

Additionally, apps without FINE permission are not notified when GPS
location changes, and any attempt to use GPS_PROVIDER without FINE
permission is met by a stern SecurityException.

Bug: 7153659
Change-Id: I12f26725782892038ce1133561e1908d91378a4a
4e5753f5f6c5e0c7f53722e2bfa451ac7f0b27db 20-Sep-2012 rich cannings <richc@google.com> Add setting to skip verifying ADB installs

Create a setting "verifier_verify_adb_installs" to allow developers to control
package verification on ADB installs only. If package verification is enabled,
the setting will:

0, Do not perform package verification on apps installed through ADB/ADT/USB
and perform package verification on all other installs.

1, Use package verification on all installs. (Default)

Bug: 7183252
Change-Id: I9d3eb8abb5ba5e93f8634d3135794e92ff6273b6
ac439e57a795d48e287ea51a9bd999244a9b0e65 21-Sep-2012 Craig Mautner <cmautner@google.com> Eliminate potential for NPE in WindowAnimator.

Fixes bug 7209850.

Change-Id: I8c8751ab240ea389a2a779c94c05fe786ca8762a
74defbf202de713aa6ae19fbbf2ea5c318ccd11c 21-Sep-2012 Amith Yamasani <yamasani@google.com> Merge "Query users excluding any being removed" into jb-mr1-dev
920ace0bbc2d4133dbec991d2636c99a57d6245e 21-Sep-2012 Amith Yamasani <yamasani@google.com> Query users excluding any being removed

Keep track of user creation and last logged-in time.
adb shell dumpsys users
User switcher shouldn't show users about to be removed.
No need to check for singleton for activities.

Bug: 7194894
Change-Id: Ic9a59ea5bd544920479e191d1a1e8a77f8b6ddcf
35d323a5206644029eb53ae751268feca430cc46 21-Sep-2012 Brian Muramatsu <btmura@google.com> Use global wifi_sleep_policy constants

Bug 7196148

This will get rid of the wifi_sleep_policy has moved log spamming.

Change-Id: I303c8da80289aba183eb1e51f6a006fc40cd1801
11a6450e543d5c178c60ce2216fad1b29bf15457 21-Sep-2012 Adam Cohen <adamcohen@google.com> Merge "Fixing partiallyUpdateAppWidget to cache the new changes" into jb-mr1-dev
957fadc5001be0f0b4d004dbed8c57b6e1f5b46a 21-Sep-2012 Irfan Sheriff <isheriff@google.com> Merge "Use min group owner intent for concurrency" into jb-mr1-dev
99766cf40ed706aad36032f2107fb0c1e54fc398 21-Sep-2012 Irfan Sheriff <isheriff@google.com> Use min group owner intent for concurrency

Our device only supports STA & GC concurrency

Change-Id: I4f16c959a6f4e7ad5610dcae67be830d741f162c
b4c33679cbdec9e12369fb49469ce33ed83ed25c 21-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "Disentangle input manager service startup." into jb-mr1-dev
ddfaa3f55638db2e3d7c9928b605c2e6b90facae 21-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "Provide a debugging option to force enable wifi display." into jb-mr1-dev
a9d131c30878cacdaeacb4f43a82a7cc5b872453 21-Sep-2012 Jeff Brown <jeffbrown@google.com> Disentangle input manager service startup.

We will be adding additional callbacks for other components.
This change makes it clearer how the input manager is started
and where the callbacks are initialized.

Bug: 6548391
Change-Id: I4b2a61482126a12b7cf11fafe513f846c76c11e5
bbd28a293f84baeafed469c5e223eff82c1117c0 21-Sep-2012 Jeff Brown <jeffbrown@google.com> Provide a debugging option to force enable wifi display.

Bug: 7179627
Change-Id: I84c7605a1cee5ed723341eebdcec4a824e7e4d38
fbe44b7d5e2d9d06a238a54f8ed460fb8bc49585 20-Sep-2012 Adam Cohen <adamcohen@google.com> Fixing partiallyUpdateAppWidget to cache the new changes

-> This is a good change to the widget framework that I've wanted to
make for a while, but issue 7174198 triggered the immediate need.

Change-Id: I3f267e0e67f2d9f28920bb53973af365a3c9e0ba
6de76d21ff60818f8b296fc8f645897203f475da 20-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Implement multi-user PackageMonitor." into jb-mr1-dev
c72fc674a33b8d17585764d09d3bb6c77d7d947e 20-Sep-2012 Dianne Hackborn <hackbod@google.com> Implement multi-user PackageMonitor.

New APIs let you indicate what user(s) to monitor, and tell you
what user is changing when receiving a callback.

Fix package manager to only deliver package brpadcasts to the
running users. (This isn't really a change in behavior, since
the activity manager would not deliver to stopped users anyway).
Make sure all broadcasts that package monitor receives also include
user information for it to use.

Update wallpaper service to (hopefully) now Really Correctly
monitor package changes per user.

Change-Id: Idd952dd274abcaeab452277d9160d1ae62919aa0
314488b791d36756504ee593f818f04b4cd24893 20-Sep-2012 Irfan Sheriff <isheriff@google.com> Merge "Captive check for both mobile and wifi" into jb-mr1-dev
ca2cb1841099c7206af93149d0326308e0d3f81a 20-Sep-2012 Wink Saville <wink@google.com> Merge "Suppress location information for non-active users." into jb-mr1-dev
9538bdd3c77968c7673719c580ae653ede4654d6 20-Sep-2012 Irfan Sheriff <isheriff@google.com> Captive check for both mobile and wifi

Bug: 7113195
Bug: 7102238
Bug: 7087564

Change-Id: Iac08db9de3935338ad498aa3983d2ca82057dda1
f6e24d62b6fa863700e5f72d461846f2aa506109 20-Sep-2012 Geremy Condra <gcondra@google.com> Merge "Remove pointless exception supression." into jb-mr1-dev
4dd3c3797060b35c8e6ebbbdd164c17c6db7b5ec 20-Sep-2012 Geremy Condra <gcondra@google.com> Merge "Remove logging for old version mismatches." into jb-mr1-dev
a12a7b3d3d8fc8678411295df4d001447b33a994 20-Sep-2012 Wink Saville <wink@google.com> Suppress location information for non-active users.

Specifically, don't allow call backs for LISTEN_CELL_LOCATION and

Bug: 7087342
Change-Id: Ida7f60b5bde3f28264dcb454b38fcfb1f1616d11
e0de5bfff2e74ee566ac2d053052de09aa25e54b 20-Sep-2012 John Spurlock <jspurlock@google.com> Merge "Fire "dreaming started" and "dreaming stopped" broadcasts." into jb-mr1-dev
350bb15ac74e0abb68ce0e2b2b972dc3cef46aff 20-Sep-2012 Geremy Condra <gcondra@google.com> Remove pointless exception supression.

Bug: 7198235
Change-Id: I3371403a79fd3e01d46678d58129d36eb921d10a
48b9b0d068844af9eb37c215484831c4d6b831b0 20-Sep-2012 Jim Miller <jaggies@google.com> Make DPM API for disabling keyguard widgets more generic

This change renames the widget-specific API to be more generic
to allow further disabling of keyguard-specific customizations
in the future. Currently only allows disabling widgets and the
secure camera but can now easily be extended to disable other
features we add.

Fixes bug: 7021368

Change-Id: I3934cc2e7c64e0c6d511efb86980fc38a849708d
c2b9ea624148df80945afad4198fe686a0ab8dca 20-Sep-2012 Jeff Brown <jeffbrown@google.com> Make wifi display state changes more robust.

Bug: 7178216
Change-Id: Icceaeb61730b0b4916cdda44459f4c69553e303c
89d5546d7fd3a3bb19820c42e8b4527013dd6545 19-Sep-2012 Jeff Brown <jeffbrown@google.com> Add support for remembering Wifi display devices.

Add a setting to globally disable Wifi display.

Fixed a bug where the wifi display broadcast receiver
was running on the wrong thread.

Removed the wifi-display QuickSettings dialog, all functionality
has been moved to Settings.

Bug: 7178216
Bug: 7192799
Change-Id: I9796baac8245d664cf28fa147b9ed978d81d8ab9
0967a9edfc29fe601c9242648b93448d710b7a97 20-Sep-2012 Geremy Condra <gcondra@google.com> Remove logging for old version mismatches.

Since this has no security consequence and triggered by a variety
of totally innocuous things it seems like log noise and so should
be removed.

Bug: 7198235
Change-Id: I80ed5acb378a4c42d5d223b633309bf9526dbf3d
daa57e8d1866fe4579c280c41604f3660db7cd01 19-Sep-2012 Jeff Sharkey <jsharkey@android.com> Migrate network stats from removed users.

When a user is removed, migrate all network stats belonging to that
user into special UID_REMOVED bucket. Also removes those stats from
kernel to avoid double-counting if another user is created.

Bug: 7194784
Change-Id: I03f1d660fe3754566326b7749cae8068fc224ea9
f4f6b4c8b0fcf77d46567f13b409255948fe107b 25-Aug-2012 John Spurlock <jspurlock@google.com> Fire "dreaming started" and "dreaming stopped" broadcasts.

Dream manager now fires broadcast intents when entering + exiting
dreamland (except when testing).

Power manager can now listen for dreams ending, using polling only
as a backstop.

- Bullet-proof dream-manager/dream against known failure modes
- Add new read/write dream permissions
- Refactor dream-manager to delegate work + state management into
a new DreamController class, via a handler

Change-Id: I986bb7812209d8c95ae1d660a5eee5998a7b08b1
6704a48bd06f01d2933f83e9b5eda4ed9846bab7 19-Sep-2012 Craig Mautner <cmautner@google.com> Merge "Fixes to Starting window and Wallpaper windows." into jb-mr1-dev
52716deb4008da1d566dfd711edc0a9c6de5f79f 19-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix deadlock in LockPatternUtils by using local id." into jb-mr1-dev
f1b674197577e815040cd75ef86d611965d603ad 19-Sep-2012 Craig Mautner <cmautner@google.com> Fix deadlock in LockPatternUtils by using local id.

Activity manager now updates window manager's current user id
directly and immediately rather than waiting for a broadcast
update. Window manager passes this through policy to the
KeyguardViewMediator and into LockPatternUtils. LockPatternUtils
no longer goes to Activity to get the current user id if it finds
that its local id is non-default.

Fixes bug 7193726.

Change-Id: Id5613e7a9fe9e5b49e83c26b74504f587c3998c2
09ad0832e0c28fa43a2e2bf53bef87df39bd4416 19-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Switch to showing top-most thumbnail of recent apps." into jb-mr1-dev
15491c6a728131e322c45bc440500a8a78e4a410 19-Sep-2012 Dianne Hackborn <hackbod@google.com> Switch to showing top-most thumbnail of recent apps.

The way it should have been, and with the new recents enter animation
the way it must be.

Added a new method to retrieve this thumbnail, since it would be less
efficient to use the existing API (which always returns the "base"
thumbnail). Probably at some point that existing API should be tweaked
to always return the top thumbnail instead, but that is for a later time.

Also removed code that would clear the thumbnail associated with an
activity when it is resumed. I don't think there should ever be a
reason to clear a thumbnail -- it's much better to have *something*
for the task, even if it is a little out of date.

Change-Id: I83e6ca6403eb2df5e4de3009dfe8c210e8cf8d5b
a490bddc8bf0812973dee34ead5c04c87e7ecb15 19-Sep-2012 Jeff Sharkey <jsharkey@android.com> Merge changes I4513afbd,I20e2194c into jb-mr1-dev

* changes:
Make getMediaStorageDirectory() user-aware.
Lockdown should only augment connected networks.
8863cca57d8c901a2da0edc422b653ae68849313 19-Sep-2012 Craig Mautner <cmautner@google.com> Fixes to Starting window and Wallpaper windows.

- Checking for found wallpaper to match either mWallpaperTarget
or mLowerWallpaperTarget keeps from swapping the layers while
transitioning between two wallpaper activities.

- Fade out RecentsActivity while bringing up selected activity. This
keeps the RecentsActivity from showing through a launching wallpaper

- When moving a starting window from one activity to another clear
the startingDisplayed flag in the old activity.

- When moving a starting window from one activity to another assign
the new activity's mAppAnimator to the starting window's mWinAnimator.

- Only treat a wallpaper transition as entering if the mWallpaperTarget
is visible and not being hidden. Keeps from assigning the wrong
animation when activities are launched back to back and the
mWallpaperTarget is still animating away.

Fixes bug 7148089.

Change-Id: Idd405b1ba113f3345ca2116d141b474abe5bd4c0
4adb9d34162b109db3c67e352ad50c76dc7f2d45 19-Sep-2012 Amith Yamasani <yamasani@google.com> Merge "DevicePolicyManager per user" into jb-mr1-dev
1e5aeecb64827d2b71f429d73a05c25ffe4a5be8 19-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Don't allow more than 3 actively running users at a time." into jb-mr1-dev
bb1aeff3202a51b1db020be272178f50a2f2502d 19-Sep-2012 Dianne Hackborn <hackbod@google.com> Don't allow more than 3 actively running users at a time.

Change-Id: Ic047c62b518a0faaa7b507343909330044ec290b
0b81be6f79ec3d1b9441c21a3cefc629be1450c8 19-Sep-2012 Jeff Sharkey <jsharkey@android.com> Lockdown should only augment connected networks.

Bug: 7148397
Change-Id: I20e2194c874544b272b9ec8b63391d91b0a22f49
6281d7cf32bdc624a9d70b2b4f5abce342558c27 18-Sep-2012 Jeff Sharkey <jsharkey@android.com> Merge "Multi-user MTP." into jb-mr1-dev
599dd7ce9adf8ca067cefb0b191a5ac20ec35a79 15-Sep-2012 Amith Yamasani <yamasani@google.com> DevicePolicyManager per user

Bug: 7136483

Store device policy information for each user and apply them when user switches.

Global proxy can only be controlled by owner.
Camera restriction applies to all users, if any one has an admin that disables it.
Storage encryption can only be controlled by owner, although other users can query the state.
Wipe data will only remove the user if non-zero, wipe the device, if zero.

Change-Id: I359be46c1bc3828fd13d4be3228f11495081c8f2
f35df5b509469fc7e71cdd70f4caec670bc5156f 18-Sep-2012 Felipe Ramos <felipe.wolff@gmail.com> Fixing services start order that impacts ICS - JB upgrade

JB has introduced LockSettingsService. When the phone is
upgrading from ICS, that used another way to store lock
settings, the LockSettingsService needs to import these
settings to store in its database. This happens when the
systemReady() method of this class is called by SystemServer.

The problem resides in the fact that the
DevicePolicyManagerService actually needs to access the
LockSettingsService during its systemReady() initialization,
causing invalid values to be read by it which propagates and
ends up causing a invalid return in the method

If user had a Google corporate account that enforces password
related policies through Google Apps Device Policy (GADP) app
in ICS, when he upgrades to JB, the GADP will throw a
notification saying that the password doesn't meet the required
policies and needs to be changed, incorrectly, since it wasn't
touched during upgrade.

This fix initializes the LockSettingsService before the
DevicePolicyManagerService, which is the correct way since
the latter uses the first in its initialization. This prevents
this issue to happen, and probably future issues, depending
on the way that LockSettingsService evolves.

Change-Id: I3d4334a8b728f0ad9ae744cece430d15af25a0b7
ab3d0fd684eabecd6b290ef3cb9799739db04ca3 18-Sep-2012 Andy Stadler <stadler@google.com> Merge "Move files to make eclipse-java happy" into jb-mr1-dev
d44daaba447e42c0b75d4cf5d33cf0b6ea3076b5 18-Sep-2012 Andy Stadler <stadler@google.com> Move files to make eclipse-java happy

No changes to text at all, just moving the java files to match their
declared packages.

There was no original bug# but this cleans up the code submitted in
the original Change-Id: I42307f58074157b33b6e01216aab10022340d449

Change-Id: I233fa7f21167a42565aadb7ad109600b1a1a5721
27bd34d9d9fe99f11b80aa0bbdb402fb47ef4158 16-Sep-2012 Jeff Sharkey <jsharkey@android.com> Multi-user MTP.

The current MTP kernel driver at /dev/mtp_usb is exclusive, meaning
only one process can have it open. In addition, each MTP session
with a desktop requires unique object IDs, which doesn't hold true
across users on the device.

To solve these two issues, when switching users we cycle the USB host
stack to disconnect both local and remote MTP connections, giving the
new user's media process a chance to claim /dev/mtp_usb, and causing
the desktop to initiate a new MTP session.

This change also allows BroadcastReceivers to registerReceiver()
allow retrieval of a current sticky broadcast. Adds a system property
to override maximum users. Removes MOUNTED broadcasts for secondary
users. Allows INTERACT_ACROSS_USERS to getCurrentUser().

Bug: 6925114
Change-Id: I02b4a1b535af95fb2142655887b6d15a8068d18a
24ed2769130a8f9df44e7fc22be52b6282e724c3 18-Sep-2012 Irfan Sheriff <isheriff@google.com> Merge "WFD fixes" into jb-mr1-dev
e0c28d5f1358fc2d4c464f910bd04fed4b283fef 18-Sep-2012 Irfan Sheriff <isheriff@google.com> WFD fixes

- Specificy max GO intent for WFD
- Increase GO idle time out to 20s and use it for GO and client
- Fix connection broadcast

Change-Id: Ia0e28bc9eb3e23d2830a6c814c5a537ca0bcd5db
f7a6dfcafc1eaa8014b4fa796e4b31208f72fd36 18-Sep-2012 Amith Yamasani <yamasani@google.com> Merge "Pass Bitmap instead of ParcelFileDescriptor in UserManager" into jb-mr1-dev
e928d7d95dbb64627e6ff3a0572190c555b59d96 18-Sep-2012 Amith Yamasani <yamasani@google.com> Pass Bitmap instead of ParcelFileDescriptor in UserManager

Add a USER_INFO_CHANGED intent for lockscreen and quicksettings to use
to monitor changes to the user name or icon.

Bug: 7164040
Change-Id: Id6fb8b6d38ce04ccd02bbadcf0c10699783d6c03
049dd8e6a3815519062902cc6b6f91940c54d5ea 18-Sep-2012 Dave Burke <daveburke@google.com> Merge "Revert "Specify max go intent for wifi display"" into jb-mr1-dev
ee261a5a6cd7da6d95d5c96981e0dfc068f48a05 18-Sep-2012 Dave Burke <daveburke@google.com> Revert "Specify max go intent for wifi display"

This reverts commit 7ab7260697de617aced0b0ba594304a42e5395bd

Change-Id: I5b322f41729695465b164e1dfe6d4b1902cd8117
c535d2f30efff83b93094bbc642d59d8225dcc18 18-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix dumb bug merging receivers for multiple users." into jb-mr1-dev
6cbd33fc25fa48dcb673edc150d2315bec4ade3a 18-Sep-2012 Dianne Hackborn <hackbod@google.com> Fix dumb bug merging receivers for multiple users.

Also clean up some debug output.

Change-Id: Ib19e47682e9ddfc6a234bd61d054275a362d28cc
c33f94e2a50c9b03cb771237e8672743da8b1314 18-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix API review bugs." into jb-mr1-dev
218e2f199b9ba568a815d64269ea0784e2d32935 18-Sep-2012 Irfan Sheriff <isheriff@google.com> Merge "Specify max go intent for wifi display" into jb-mr1-dev
7ab7260697de617aced0b0ba594304a42e5395bd 18-Sep-2012 Irfan Sheriff <isheriff@google.com> Specify max go intent for wifi display

For p2p and sta single channel concurrency, we need the device
to be a GO

Change-Id: I8c3f180b8fc450238e24dace478f03cdf4e370a7
8832c18d8b63367929c2d394c9c508f56003d400 18-Sep-2012 Dianne Hackborn <hackbod@google.com> Fix API review bugs.

7173152 API REVIEW: android.content.pm.PackageUserState
7172969 API REVIEW: android.app.PendingIntent
7172730 API REVIEW: android.content.Context
7172726 API REVIEW: android.manifest.permission

Change-Id: Iad470256d3b5ca5596487f6a699ec1871457c3b5
4246f695f44386ce74d94f5be73cde409dc2dd12 18-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Try again to fix issue #6912004:tap on gmail notification sends me to home screen" into jb-mr1-dev
c31f5a7efe97952ba25b35e0eb9e6e59dc0d0e8e 18-Sep-2012 Geremy Condra <gcondra@google.com> Merge "Add error information to event logs." into jb-mr1-dev
beb9d53971af42db178dfdf6bbcd28d3f823c5f8 17-Sep-2012 Geremy Condra <gcondra@google.com> Add error information to event logs.

Change-Id: Ie4bbb888f4fac4db42a60b9fdd6818af24b834bd
ad9b32115bf8c84a93ab30e6f30f8c46e86d7244 18-Sep-2012 Dianne Hackborn <hackbod@google.com> Try again to fix issue #6912004:tap on gmail notification sends me to home screen

Add a new call to the activity manager to tell it when the activity
is resumed, so it can mark its state as dirty then instead of when
it first tries to create it.

Also tweak things to update the LRU list for the upcoming activity
at the point we start pausing the current activity, to avoid an
inefficiency where we may decide to kill the process of the upcoming
activity if it is at the end of the LRU list.

Change-Id: Ia6dc8c34dc6d4b085a1efbe3a5d5f47721d55078
4215017c12a4d522e20a6164ff33e8ca7da3a3bd 18-Sep-2012 Kenny Root <kroot@google.com> Merge "Use shared app gid for dalvik cache" into jb-mr1-dev
1d31d5ba129007fc13bd0ed49a3e3cd60e748e7c 17-Sep-2012 Amith Yamasani <yamasani@google.com> Merge "Start userId from 10, reserving 1-9 for special use in the future." into jb-mr1-dev
07a0ede729f9b2f472b659b67b4cbc3602aa289a 17-Sep-2012 Amith Yamasani <yamasani@google.com> Start userId from 10, reserving 1-9 for special use in the future.

Change-Id: I3d0c1717d8b3add75ba43ed98e53ba02e6682c34
6a9b2cb7feb96fe17878089cf48e0e27e3ff531d 17-Sep-2012 Kenny Root <kroot@google.com> Use shared app gid for dalvik cache

For forward-locked apps, we need to be able to read the optimized dex
file from a common place. Make it owned by the shared app GID as well.

Bug: 7178231
Change-Id: Ib36d79e8df69d58e8e1e0f167659df995dc84b84
e2fb51900cb6df51b2dffc80c35ecbbaf47d3f4b 17-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "Swap remote submix initialization order." into jb-mr1-dev
e645324e6bb42075b2e3b37d776e180a51091f96 17-Sep-2012 Amith Yamasani <yamasani@google.com> Merge "Add UserManager.getUserIcon()" into jb-mr1-dev
3b49f07a452e0a77c1d22db2065255689a461d31 17-Sep-2012 Amith Yamasani <yamasani@google.com> Add UserManager.getUserIcon()

So that we don't abuse the setUserIcon() for reading. So the new method won't try
to create the file, only return it if it exists.

Change-Id: I7a81d3f1b29d14d37e71f531744ce39f21d827ac
c9bd4ca005768cb30aaaa44c1171e113c13cd107 17-Sep-2012 Jeff Brown <jeffbrown@google.com> Swap remote submix initialization order.

Need to turn the submix on before connecting and off
after disconnecting.

Change-Id: I53389c3b61e6d663855accd0461eed42a67d9d2b
178af5948d71c841278081c712506f7a7fca34b9 17-Sep-2012 Craig Mautner <cmautner@google.com> Add debug to help with b/7135184.

Change-Id: I0d3b60b3e123d35bd557d47e3344ebea1964380b


89c82814dbdfd807b1611a8379be0421cd2f512d 17-Sep-2012 Irfan Sheriff <isheriff@google.com> Merge "Add restoreCallingIdentity under finally" into jb-mr1-dev
443e474881e2b8d2fce0d23c54f8930742d8cdee 17-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #7175553: GRANT_URI_PERMISSION doesn't apper to work on secondary user" into jb-mr1-dev
3d33a633916be943eb294d3309701994095d80f2 17-Sep-2012 Irfan Sheriff <isheriff@google.com> Add restoreCallingIdentity under finally

Change-Id: I068b1a2fc93300aa9bd17da6933bc8c5f0a6b5e4
db831da426602f36e4ccf2eae64e999fcc52736a 17-Sep-2012 Irfan Sheriff <isheriff@google.com> Fix permission accessing getCurrentUser

Bug: 7174737
Change-Id: I0a6a9a46f4115743d16ada401cd67e3cf30fb380
11f0cb7d072cfd8c50d8111ebea1e78eb3c3d816 17-Sep-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7175553: GRANT_URI_PERMISSION doesn't apper to work on secondary user

Change-Id: I0ab372978f8599d0fe8d5da8aeb73965ab85797f
97e7c59c5f669f4af8a77aee4646933108dfff48 17-Sep-2012 rich cannings <richc@google.com> Merge "Enable package verification" into jb-mr1-dev
86e85efe9b10abb2dd60df7ab81db6fc71fdda34 17-Sep-2012 Iliyan Malchev <malchev@google.com> Merge "Set backlight brightness in correct order." into jb-mr1-dev
36c67c236ed188a034fdf13977fbc8d4fe0023e2 17-Sep-2012 rich cannings <richc@google.com> Enable package verification

Turn on package verification, if a verifier exists. Play app is a verifier.

Bug: 7064853
Change-Id: Id7d478a216d10b0a612678d6a9b0ee7f2037204a
735f740fe81b7172d0b208d584eecf632533ec4a 16-Sep-2012 Jeff Brown <jeffbrown@google.com> Set backlight brightness in correct order.

Disable backlight before turning off the screen.
Enable backlight after turning on the screen.

Bug: 7016215
Change-Id: Idb763f85f7a40e852483c57e0a0d1b27eb943f08
3849490c6314d5887f534cc5dea0fc56499465aa 17-Sep-2012 Irfan Sheriff <isheriff@google.com> Merge "Return empty scan results for background user" into jb-mr1-dev
330b1875747561e1f4dfdc062bf15d3c345806ed 16-Sep-2012 Irfan Sheriff <isheriff@google.com> Return empty scan results for background user

Bug: 7087342
Change-Id: I62493e5004111311b7ac9b7610c85e6784e2c7e4
a91f9e2959ee905f97977a88fe45bde6ffb874b0 15-Sep-2012 Craig Mautner <cmautner@google.com> Make more items per-Display.

Moving DimSurfaces, DimBackgrounds and Rotation surfaces into
per-display class.

Fixes bug 7167028.

Change-Id: I7408b3a27b5a7a8d0d59e9d6109c002fc627e536
d65afc65ea5b2bf83889dd88a9c94f895da8aece 16-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "More multi-user stuff." into jb-mr1-dev
398bad04a0ced9dacda185db8af7526002631f62 16-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix debug log." into jb-mr1-dev
5dc5a00e7ebadc085ded7e29feacd17e53698486 16-Sep-2012 Dianne Hackborn <hackbod@google.com> More multi-user stuff.

- New public APIs to find out when a user goes to the foreground,
background, and is first initializing.
- New activity manager callback to be involved in the user switch
process, allowing other services to let it know when it is safe
to stop freezing the screen.
- Wallpaper service now implements this to handle its user switch,
telling the activity manager when it is done. (Currently this is
only handling the old wallpaper going away, we need a little more
work to correctly wait for the new wallpaper to get added.)
- Lock screen now implements the callback to do its user switch. It
also now locks itself when this happens, instead of relying on
some other entity making sure it is locked.
- Pre-boot broadcasts now go to all users.
- WallpaperManager now has an API to find out if a named wallpaper is
in use by any users.

Change-Id: I27877aef1d82126c0a1428c3d1861619ee5f8653
d0c6ccbafdebc73d03cf3cd47f02f9f6c78a69ff 15-Sep-2012 Jeff Sharkey <jsharkey@android.com> Move NetworkPolicy from apps to UID.

For multi-user devices, switch to storing policy per-user instead of
per-app. Also watch for user added/removed broadcasts to clean up
policies and apply global restrictions.

Bug: 7121279
Change-Id: Ia7326bd0ebe0586fa4ec6d3a62f6313dc8814007
2892dfbeafec5315d05fb6ceabeaee73b88f5ff0 15-Sep-2012 Christopher Tate <ctate@google.com> Merge "Fix default population of wifi settings" into jb-mr1-dev
6f5a9a96523ecf97a9828a410dd1226df47ec4e6 15-Sep-2012 Christopher Tate <ctate@google.com> Fix default population of wifi settings

Various wifi settings that are explicitly defaulted did not get their
default code properly converted to refer to the correct settings
database table.

A collection of moved-to-Global settings that had not yet been
marked @deprecated in the Secure.* namespace are now so marked.

Also updated the namespace used to refer to wifi settings from the
Wifi Service. These changes are cosmetic, but they do eliminate a
number of runtime log messages.

Bug 7153671

Change-Id: I9e5b6464d025cfb480ef97373996e38e82f90593
0b62fa234d2e3580b1f04cb9c4a6a308be99a5ae 15-Sep-2012 rich cannings <richc@google.com> Merge "Send more information to verifiers" into jb-mr1-dev
8b681cb8813454aac8a626bf3d7adaa8beca4d75 15-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Some formatting missed in the previous patch

Change-Id: I299090ca67b1d90cf75a46dc85b13970d32511e5
3efa8babf581b107f63e29dedb56166e5db1bfdb 15-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Adding accessibility events for touch and gesture detection states." into jb-mr1-dev
77276b60851a158ad3e142cb3b091d57ae5ceffb 14-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Adding accessibility events for touch and gesture detection states.

1. Currently the system fires accessibility events to announce the
start and end of a touch exploration gesture. However, such a
gesture starts after we have decided that the user is not
performing a gesture which is achieved by measuring speed of
movement during a threshold distance. This allows an accessibility
service to provide some feedback to the user so he knows that
he is touch exploring.

This change adds event types for the first and last touches
of the user. Note that the first touch does not conincide with
the start of a touch exploration gesture since we need a time
or distance to pass before we know whether the user explores
or gestures. However, it is very useful for an accessibility
service to know when the user starts to interact with the
touch screen so it can turn the speech off, to name one
compelling use case.

This change also provides event types for the start and end
of gesture detection. If the user has moved over the threshold
with a speed greater than X, then the system detects gestures.
It is useful for an accessibility service to know the begin
and end of gesture detection so it can provide given feedback
type for such a gesture, say it may produce haptic feedback
or sound that differs for the one for touch exploration.

The main benefit of announcing these new events is that an
accessibility service can provide feedback for each touch
state allowing the user to always know what he is doing.


Change-Id: I26270d774cc059cb921d6a4254bc0aab0530c1dd
13d428e8306d1bb1a3017045bc5d2f76edec32df 13-Sep-2012 rich cannings <richc@google.com> Send more information to verifiers

Send package name, version code and the uid of the application requesting the
install to package verifiers.

Bug: 7164155
Change-Id: I2464dc5d4551f60b4f38f7982495a8920c83e1cd
51fbaff11c195d3004f872d19f98a20fa6c44456 14-Sep-2012 Ben Gruver <bgruv@google.com> Merge "DEFAULT_VERIFY_ENABLE turns verification off" into jb-mr1-dev
04a34b375513eaeec67f54bb203ef6b763328751 14-Sep-2012 Jeff Sharkey <jsharkey@android.com> Merge "Actually move to Global settings." into jb-mr1-dev
e6e6197d7c2eb5c29224bcddb0131a302267f6de 14-Sep-2012 Jeff Sharkey <jsharkey@android.com> Actually move to Global settings.

Also add better ConnectivityService logging.

Bug: 7157464
Change-Id: Ia235a7e62ed809240913c4782920c1410c7d597d
ce18d1c871f7101af58391918b7f249438c4c307 14-Sep-2012 Christopher Tate <ctate@google.com> Merge "Get correct user's package info during clip processing" into jb-mr1-dev
ad9833a77ff4deb5352c67800c2ee62ed6e51356 14-Sep-2012 Christopher Tate <ctate@google.com> Get correct user's package info during clip processing

Also clear the binder identity correctly for purposes of doing
that query.

Bug 7162477

Change-Id: Ie9e43a2d8fc964d1be649887905244dcceaa3c80
e4bf0eae061c821eaaec988097a8d31332d21646 14-Sep-2012 rich cannings <richc@google.com> DEFAULT_VERIFY_ENABLE turns verification off

When DEFAULT_VERIFY_ENABLE == false, package verification must be completely

Bug: 7132197
Change-Id: Icc0dbb4a3f4f5f00ddadecda6cc42976618c4332
a043c2c0534afe418fc39bdb43bfaab394ba821a 14-Sep-2012 Jeff Sharkey <jsharkey@android.com> Merge "Move to Global.NETSTATS and Global.NTP constants." into jb-mr1-dev
023c05a341b87d0899c89bf355b6ae27d138bb03 14-Sep-2012 Jeff Sharkey <jsharkey@android.com> Move to Global.NETSTATS and Global.NTP constants.

Bug: 7157464
Change-Id: Ief10fd37940f62420f5684940994c9f93802e0be
f229e4d3eb8f910c181f96416c6798f6f305a395 13-Sep-2012 Jim Miller <jaggies@google.com> Add support for settings for lock widgets

Change-Id: Iade094c6f32a7653bdbbd4921d345d68f2443ff4
ad92ce85175a45e5d059f129d2e0627cae60aa82 14-Sep-2012 Michael Jurka <mikejurka@google.com> Merge "Fix bug with getting widget categories" into jb-mr1-dev
ca5e341574774379f157a4ea579a1732bd4cf7fb 14-Sep-2012 Michael Jurka <mikejurka@google.com> Fix bug with getting widget categories

Change-Id: I3b0f410707d37436732c45b572c2f588427a784f
5b329e8501486037dd30a5068d96131185893db6 14-Sep-2012 Dianne Hackborn <hackbod@google.com> Fix debug log.

Change-Id: If65abf43ee7a455b12d49b5800657dbf4489e5b9
0b2fa8ca2238de575fc5cf32f28a92a7d422faef 14-Sep-2012 Kenny Root <kroot@google.com> Don't prematurely delete temporary files

When verification and encryption is used, the temporary file was deleted

Also, on next boot-up, scan the directory we use for temporary files to
clean them up if the user rebooted in the middle of installation.

Bug: 7132197
Change-Id: Ic9e8aab9a664ca00d9ac16f72e53fc43d78d21bc
44015010acefa952b66e8405849314363a52242d 14-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "Eat copy pasta." into jb-mr1-dev
5380a064c335216e767be1497f3326ec56399a6d 14-Sep-2012 Jeff Brown <jeffbrown@google.com> Eat copy pasta.

Change-Id: I74cbad279c15f1999cc68d732fc04d6c448b5c39
3a1136eeeb6c2b30b0528e30c41ce36bda35c531 14-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "We don't need black frames for forced display size." into jb-mr1-dev
4796dfd92cd8abc102be2b65b9991ae264eaf672 14-Sep-2012 Craig Mautner <cmautner@google.com> Merge "Improve debug output." into jb-mr1-dev
dc5a6384e7a82ac732c483e32b7acce6dfa443a8 14-Sep-2012 Craig Mautner <cmautner@google.com> Improve debug output.

Change-Id: I94f46e1e373dc9e67bfbc1d1847399c119ec2fcb
76a3cb9773d01079de447c16741f628d19108087 14-Sep-2012 Jeff Brown <jeffbrown@google.com> We don't need black frames for forced display size.

Now that surface flinger lets us set a display projection,
the window manager no longer needs to place a black frame
around the content when simulating a different display size.

Bug: 7139798
Change-Id: I6014390f47444633d434ccf918cee5ff7b502869
cdfc56a3872f6bae7c43aedd5c718c5fa3fbdf9d 14-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "Add preliminary API for reporting display capabilities." into jb-mr1-dev
1f1f5970f9b256c89e94ac6876f8d8204e4b2fb9 14-Sep-2012 Victoria Lease <violets@google.com> Merge "Require ACCESS_FINE_LOCATION for Geofence use." into jb-mr1-dev
45a0b90a7ed7ebd8219a7a6d7b9e64c55183523a 14-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "Enable remote submix for wifi display." into jb-mr1-dev
24271a8c4c55a60047fd3d35c8a7af98b0f4e666 13-Sep-2012 Kenny Root <kroot@google.com> Merge "Use shared app gid for forward-locked processes" into jb-mr1-dev
4fab68b5324e1f9b6765cdc33e66d1f074623dc2 13-Sep-2012 Victoria Lease <violets@google.com> Require ACCESS_FINE_LOCATION for Geofence use.

Bug: 7153226
Change-Id: I49236379e739fcda66bbc9a31cfdca9a87122aec
c5df37c285221d0fb113f55b9e78b35632241d3f 13-Sep-2012 Jeff Brown <jeffbrown@google.com> Add preliminary API for reporting display capabilities.

Change-Id: Ie18dce5b5d130f9a7cdfca08cddbf9b099312277
f60921d921947d7d40285f471a09b0478044c29c 13-Sep-2012 Geremy Condra <gcondra@google.com> Merge changes I69689a73,Iaaef6d41,I7e3cb47a,I42307f58 into jb-mr1-dev

* changes:
DO NOT MERGE Push event logging down into libcore.EventLogger
DO NOT MERGE Added event logging for config installation failures.
DO NOT MERGE Create intermediate directories when installing config data.
DO NOT MERGE Add components for the Android Config Updater to system server.
aefd73d2b9f17a06f05346f302db1e393a7ece19 13-Sep-2012 Kenny Root <kroot@google.com> Merge "Try to avoid possible NPE" into jb-mr1-dev
0f001d3ee0a4db694029b1956fa5b901dcdde781 13-Sep-2012 Kenny Root <kroot@google.com> Try to avoid possible NPE

For some reason .getParent() appears to be returning null for a data
directory. We don't need to use the parent; we can just use the path.

Bug: 7151733
Change-Id: I5e17cc14fe53669882329d67d8a7b4ec35b81104
1803e5e5c7bd867462c74c57c19b43422146d8f9 13-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Enforcing BIND_ACCESSIBILITY_SERVICE for connecting to an accessibility service." into jb-mr1-dev
19f4a29fa44008703738fd5217366365f14f2649 13-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Enforcing BIND_ACCESSIBILITY_SERVICE for connecting to an accessibility service.

1. This change enforces an accessibility service to require the system


Change-Id: If5e16bb4fa97891be0ccbb35e343773712e33b98
e2052a33f6db8db80714748e34a756320093e996 13-Sep-2012 Victoria Lease <violets@google.com> Merge "Secure setting for LocationFudger's accuracy" into jb-mr1-dev
5efc533be6ac43df56a05c84972affbd07a913a7 13-Sep-2012 Amith Yamasani <yamasani@google.com> Merge "Fix service binding for singleUser services" into jb-mr1-dev
4076bc504614ab192186ab58bc346012c53a8330 13-Sep-2012 Amith Yamasani <yamasani@google.com> Fix service binding for singleUser services

Bug: 7137147

No need to try to retrieve the service again as user 0.

Change-Id: I910aca3fae91dc709ef2265ed0fce09f46f5b769
7c65e39964a1aa8fffbd940c5ee9e77691aa9656 12-Sep-2012 Geremy Condra <gcondra@google.com> DO NOT MERGE Added event logging for config installation failures.

This just logs the directory the data is being written to, which
will tell us whether we've pushed a bad update and are about to
start wedging devices.

Change-Id: Iaaef6d41b2ab18bcce295c583ee13f49e337ed65
755b87742319a9ff689df08cea0137732a8f0b2d 11-Sep-2012 Geremy Condra <gcondra@google.com> DO NOT MERGE Create intermediate directories when installing config data.

This prevents an issue where a user factory data resets and
hoses the default directory layout- it will now be recreated
on first update.

Change-Id: I7e3cb47a0fa3aa941a74d46fba7e15865484b66d
b631084613e12e1c6a0ae2ad9446e1284b650ccb 24-Aug-2012 Geremy Condra <gcondra@google.com> DO NOT MERGE Add components for the Android Config Updater to system server.

This adds the necessary bits to verify and install configuration
updates using system server. It also includes the cert pinning
updater as the first user.

Change-Id: I42307f58074157b33b6e01216aab10022340d449
fd218245d236545f02d5111d8742e241ea1ffb6a 13-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "Wait for installd to finish starting before booting." into jb-mr1-dev
df9ec6171f6b7f3075d7f8174e9ae6ecf080c917 12-Sep-2012 Victoria Lease <violets@google.com> Secure setting for LocationFudger's accuracy

This replaces the ACCURACY_METERS constant and all derived values with
a secure setting. This value defaults to 2km and has a hardcoded floor
of 500m.

Bug: 6982024
Change-Id: Ibf97ab57145abf28c4a9747444f40250adddf23c
f69c812f49cb2dea296cd319984e58af026f4c3a 13-Sep-2012 Jeff Brown <jeffbrown@google.com> Wait for installd to finish starting before booting.

Fixes a race condition where the system server might
try to access /data/user/0 before it was created. In so
doing, the system server could end up creating a directory
in that location with the wrong permissions and everything
would promptly crash.

Bug: 7151686
Change-Id: I349c12fd2b9685d2e7f6305e74f6bf7d5816b752
4be297545362e547c2168c5d031be9b335101957 13-Sep-2012 Craig Mautner <cmautner@google.com> Merge "Rename variables and methods for clarity." into jb-mr1-dev
5c0e78c445ed4b12fec295f1c7f0799d1e79bf72 13-Sep-2012 Craig Mautner <cmautner@google.com> Rename variables and methods for clarity.

Change-Id: I2a1b2f2d5605123e55f264d45b1e7292852f2a7f
faecd09cb72a78b6ea2dc1d1e16a8e99ab414b6f 13-Sep-2012 Craig Mautner <cmautner@google.com> Merge "Only consider hiddenRequested when deciding layout" into jb-mr1-dev
c516a5c58ff505d7c53d79a174aa118f65cac366 13-Sep-2012 Craig Mautner <cmautner@google.com> Only consider hiddenRequested when deciding layout

This change removes the test for hidden when deciding whether to
do a layout. So layout begins as soon as hiddenRequested occurs.
Since hidden is cleared when animations starts considering hidden
in the layout decision will delay layout until it is too late.

In particular we were not executing a relayout on return to an
activity even though the screen had been rotated while away.

Fixes bug 6615859.

Change-Id: I5fb0b4bf2c253b910a7a192da04419236d8f09d9
88469e56c8294a928e65398352e8444d66bdb75a 13-Sep-2012 Jeff Brown <jeffbrown@google.com> Enable remote submix for wifi display.

Change-Id: Ib6cad4ecfed91abf835555a1089a206ee9b0763c
4a86019aeeed8420c809b94ac07edeff86972108 12-Sep-2012 rich cannings <richc@google.com> Temporarily turn off package verification

Bug: 7152858
Change-Id: Ic3b1900e486224dafcf3cce5db13e5f795650b51
8b29d63d0857337057db707549ef1faed39792fd 12-Sep-2012 Jeff Sharkey <jsharkey@android.com> Merge "Include user identifier in external storage paths." into jb-mr1-dev
b049e212ab7fe8967893c202efcb30fecfdb82fb 08-Sep-2012 Jeff Sharkey <jsharkey@android.com> Include user identifier in external storage paths.

When building external storage paths, always include user in path
to enable cross-user paths and aid debugging.

Each Zygote process continues to only have access to the appropriate
user-specific emulated storage through bind mounts. A second set of
mounts continue supporting legacy /sdcard-style paths. For example,
a process running as owner has these mount points:


Since Environment is created before Zygote forks, we need to update
its internal paths after each process launches.

Bug: 7131382
Change-Id: I6f8c6971f2a8edfb415c14cb4ed05ff97e587a21
c7b6ec7a7c8ee33278baddb0889d67042f38daef 12-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "Improve reporting of wifi connection state." into jb-mr1-dev
5e900e3a17a87e91a0d190bc1c96efc440eb026a 12-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Adding a scaling threshold in ScreenMagnifier" into jb-mr1-dev
3e1476a697ad94e638867361a6caba0ede77cb33 12-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Adding a scaling threshold in ScreenMagnifier

Change-Id: I1fdd7c93de571a61d88d7386c5c2a423a6b83fb9
b1ee58860280e2dfad63170495393a914ab34804 12-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Refactoring the scale and pan detection in the ScreenMagnifier." into jb-mr1-dev
d420e3ac94afea65173fd0ae43e13dfa6948bff9 12-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Refactoring the scale and pan detection in the ScreenMagnifier.

Change-Id: I8560f53f88ef0c9244e2b48d40119574cacb544f
f8f0eddd07d22ab815d97dd32ae6ed52dc31a80c 12-Sep-2012 Jeff Brown <jeffbrown@google.com> Improve reporting of wifi connection state.

We should only report that the wifi display is connected
after the RTSP connection has been fully established.

Change-Id: Ifc6bc5d5cebd42d551026885b31cbc74b7ece2b1
0bb4d078afeadf4996240d0ac41514c28e5f795a 12-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Screen magnifier should handle window rebuilds correctly." into jb-mr1-dev
9b4125e435b6bc8f8bd2f6e569d9b0b296ab16ef 12-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Screen magnifier should handle window rebuilds correctly.

1. The way for computing the magnified region was simplistic and
incorrect. It was ignoring window layering resulting in broken
behavior. For example, if the IME is up, then the everything else
is magnifed and the IME not. Now the keyguard appears and covers
the IME but the magnified region does not expand while it would
since the keyguard completely covers the not magnified IME window.


Change-Id: I21414635aefab700ce75d40f3e913c1472cba202
e091f22e226f7177e45e23850670c1ad9b63fd75 12-Sep-2012 Kenny Root <kroot@google.com> Use shared app gid for forward-locked processes

Use a shared app gid for each app across different users which allows
forward-locked applications to share the same APK file.

Change-Id: Ifecf51ee7865547117746f83e9733083d3dd5111
9ba2a188919e6e5bf8c042b26527fc090de677ef 11-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge changes I4ad08873,If0562677,I5fe6ba32 into jb-mr1-dev

* changes:
Don't auto-discover peers until scan requested.
Use wfdInfo to filter available sinks.
Allow adb shell am display-size to use bigger sizes.
aec914b1301b9608053b77318c8ea86fa162f14d 11-Sep-2012 Adam Cohen <adamcohen@google.com> Merge "Adding notion of keyguard widgets" into jb-mr1-dev
59c53c6224e2f84d31a56854ebe90d22055100d2 11-Sep-2012 Jeff Brown <jeffbrown@google.com> Don't auto-discover peers until scan requested.

Change-Id: I4ad08873567a5ac86e9bd46abd2375b183e2e95b
0f68d166e6ca45fe27410ea520967275e0733757 11-Sep-2012 Jeff Brown <jeffbrown@google.com> Use wfdInfo to filter available sinks.

Change-Id: If056267738f70835af645a8c6e7a91c0c5407816
a36180925bdbde9308f9ae6d27dd5fbadb2fa511 11-Sep-2012 Kenny Root <kroot@google.com> Merge "Remove "unlinklib" command from installd" into jb-mr1-dev
faea76ff8bc9a350765873af81334afe4d14afbd 11-Sep-2012 Amith Yamasani <yamasani@google.com> Enforce a user limit

By default only 1 user is allowed. Some devices permit more than 1.
Set the real user limit in a device overlay for config.xml

Change-Id: I2e0bffa13393b954fcd20e55b92f20de980c58c0
9bbd70a96397bd5f1445ad6c21977fccfb350dfa 10-Sep-2012 Kenny Root <kroot@google.com> Remove "unlinklib" command from installd

unlinklib is no longer necessary since libraries are now either stored
in an ASEC container or in /data/app-lib

Replace lib directory with a symlink to the /data/app-lib directory even
if it's a dangling link. That way developers don't name something "lib"
in their directory which gets blown away during an update.

Change-Id: I142cf13dba9c13aafbaf0ff8d5e9872cbf1cc910
0aa2d42e87e4a1ed5b83f356690e465d6a3587cc 08-Sep-2012 Adam Cohen <adamcohen@google.com> Adding notion of keyguard widgets

-> Persisting certain appwidget options
-> Adding ability to specify appwidget options on bind
so as to avoid AppWidgetProvider update call with no

Change-Id: I5631039f19f1822b8e123b559b6353c880c0192e
9d9ece3c1e16001b63244459cdf4b428f4272d2e 11-Sep-2012 Dianne Hackborn <hackbod@google.com> Animations for user switching.

The window manager now has a facility to provide a full-screen
animation, which the activity manager uses every time a user
switch happens.

The current animation is just a simple dumb slide until we get
a design from UX.

Also some cleanup: moved the portrait task animations to the
default config so we always have an animation for them, and finally
got the java symbol stuff out of public.xml.

Change-Id: I726f77422b2ef5f2d98f961f8da003e045f0ebe8
ce3ef0abaa17b12dc0626b06421d58bf06974ae2 11-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Screen magnification should disengage on screen off." into jb-mr1-dev
36e614c110dad174dea6017eb701f55339aee200 11-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Screen magnification should disengage on screen off.

1. When the screen goes off the user will be in a completely
different context upon turning the screen on. Therefore,
if magnification auto update is enabled magnification
will be disengaged on screen off.


Change-Id: I790cfa5b3cf31d34e95fc9548e6246a84096c37b
43aa15912891930833edfc101615a9c881de54a1 11-Sep-2012 Jeff Brown <jeffbrown@google.com> Allow adb shell am display-size to use bigger sizes.

We now support scaling the logical display to fit the
physical display, whatever size it is. So we can allow
adb shell am display-size to use more or less arbitrary sizes
although we do enforce an upper and lower bound to
protect the user.

Change-Id: I5fe6ba32ad1f9e4fbcd6915f7d36850b987bbcc0
3c396fccd52f9d06b453b655c20c2266dd984d19 11-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Reducing the click delay while screen magnification is enabled." into jb-mr1-dev
86fe9e14f1a816df32b08e0eb677989cc7444948 11-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Reducing the click delay while screen magnification is enabled.

1. If screen magnification is enabled the user has to triple tap
and lift or triple tap and hold to engage magnification. Hence,
we delay the touch events until we are sure that it is no longer
possible for the user to perform a multi-tap to engage
magnification. While such a delay is unavoidable it feels a
bit longer than it should be. This change reduces the delay
between taps to be considered a multi-tap, essentially making
the click delay shorter.


Change-Id: I2100945171fff99600766193f0effdaef1f1db8f
4e2eb6581f8ee91166cbfd80b531f628dedab89a 11-Sep-2012 Christopher Tate <ctate@google.com> Merge "Update airplane-mode manipulation for the new Settings namespace" into jb-mr1-dev
53d13ecd9a5e4de183e463faba832863f6b95103 11-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "Fix adb am display-size." into jb-mr1-dev
3c5dab46a73a178dd8e12ee269aae1ac9dfa64de 11-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "Make input system aware of multiple displays." into jb-mr1-dev
2e7d0cb592381e2efd9b86d5ee38d8ec657b6a1a 11-Sep-2012 Kenny Root <kroot@google.com> Merge "Move native libraries to /data/app-lib" into jb-mr1-dev
c09cdce1b05075da808ae080b9905a14a3e1e627 11-Sep-2012 Christopher Tate <ctate@google.com> Update airplane-mode manipulation for the new Settings namespace

Quick Settings and global actions (aka longpress-Power) toggles are
included in this CL. The Settings app manipulations are updated in
a different CL because that's a different git package.

Bug 7132230

Change-Id: I50838f5e8d7b25a750d2bcae90bf384b09816dbb
662538957f12a7b7c534382a6a4f306d5777375b 11-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Scaling in viewport moving state locks into a magnified state.

1. If the user changes the magnification level while moving the
viewport the magnification is locked. The gesture handle has
to put device back into a viewport moving state if this was
the last state.


Change-Id: I24992b973bb15624580114353b004efdb35c2faa
e35c54eb14baee2401efd525b5594f0211971d12 11-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Allow simultaneous scale and pan in magnified state." into jb-mr1-dev
e215f26f74744535bcc0209f2a0a0e4a9f36fd82 11-Sep-2012 Jeff Brown <jeffbrown@google.com> Fix adb am display-size.

There were several problems resulting from the use of
mDefaultDisplay before displayReady() was called.
As it happens, we don't need mDefaultDisplay becase we
can get the information from the default display content.

Also modified the Configuration calculations to never
choose a SQUARE orientation. The constant is deprecated
and documented as no longer used, so we should make that
be the case.

Change-Id: I326ed7100030a81e24411e898e5243f28895ea22
6d04712d15e4fe9b44b0d9accf073f5a7f1d334a 11-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Allow simultaneous scale and pan in magnified state.

1. Before in magnified state the user was able to only scale or
pan. Based on user input this change allows performing pan
or scale or both. If the user scales more than a threshold
we are performing a scale and independently of that if the
use pans more than a threshold we are performing a pan.


Change-Id: Ic1511500ba3369091dcfd070669d3e4f0286fbe5
83d616a9c7b9505153d258511eb5c16b552e268d 10-Sep-2012 Jeff Brown <jeffbrown@google.com> Make input system aware of multiple displays.

The input system needs to know about the window that has
focus, even if it is on a secondary display. So now we
send it the list of all windows and indicate which display
they are on. We filter the list of windows as necessary
when delivering touch events.

To keep things simple, monitor input channels and input
filters are not supported except on the main display.
We also do not pass the display id to applications; it is
only used inside the input system for now.

Properly scale touch coordinates based on the viewport.
This will be needed to ensure that touch works on external
display as well as when the internal display is being used
to simulate a different resolution.

Change-Id: I1815579a52fcc852c519b5391fc7ab8767c2dc59
4573e29faf40983f9d1df99bb0f506d77a868e05 11-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Flesh out multi-user in am commands." into jb-mr1-dev
1676c856d61b97c871dc2be0cb1f1fb1e12e24e9 10-Sep-2012 Dianne Hackborn <hackbod@google.com> Flesh out multi-user in am commands.

Now we default to the current user instead of user 0 for most commands
(except where we can do the command for all users).

Many more commands take a user argument: force-stop, kill, profile,

Improved help text.

Change-Id: I719a13b4d31b668f57ca21e51d7043ac3e0d4e1b
ddbe50df2ca70700a46e5849347989b520d1113e 06-Sep-2012 Kenny Root <kroot@google.com> Move native libraries to /data/app-lib

Instead of unpacking libraries into /data/data/<appname>/lib, unpack
them into /data/app-lib so that multi-user applications can use the same

Change-Id: I636dafb5a9eea8cf5a41f1360698e7695455f385
dcc036c54457943afeadf40922a9dacfe29f30e1 10-Sep-2012 Andreas Huber <andih@google.com> Merge "Fix port logic in WifiDisplayController." into jb-mr1-dev
5e0cc0d7ab29e5fbd11316cd3147ef96d65f8de7 10-Sep-2012 Andreas Huber <andih@google.com> Fix port logic in WifiDisplayController.

It's not the port advertised in the sink's wfd IE, it's the one our
source broadcasts in its wfd IE. In addition some dongles ignore the
broadcast port and have to be special cased.

Change-Id: Id5d279652e336391ba34dfc30bba700043d49b1d
7e8f6c4cef8d65c5b470fc8700214e28d8cd4d43 10-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Improve scaling vs pan in screen magnifier." into jb-mr1-dev
0c381504a8fce293b3b9ef8ad0333849c43eb6a4 10-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Improve scaling vs pan in screen magnifier.

1. Due to frequent changes of the behavior of ScaleGestureDetector
this patch rolls in a gesture detector used for changing the
screen magnification level. It has an improved algorithm which
uses the diameter of min circle around the points as the span, the
center of this circle as the focal point, and the average slop
of the lines from each pointer to the center to determine the
angle of the diameter used when computing the span x and y.

Change-Id: I5cee8dba84032a0702016b8f9632f78139024bbe
3c1a20118739fd6765e128c5d9c39c01d22a89e7 10-Sep-2012 Amith Yamasani <yamasani@google.com> Merge "Fix DevicePolicyManager crash when settings password quality (and possibly others)." into jb-mr1-dev
b7a685978f3ea8a1514166c6986c1f1bacedab4a 10-Sep-2012 Amith Yamasani <yamasani@google.com> Fix DevicePolicyManager crash when settings password quality (and possibly others).

Bug: 7130570

Clear the calling identity before broadcasting to all users.

Change-Id: Ibe84af1ee00aecfe4b2d5bb7731a952f617b4885
01a7c79dda60c572af0db5820a66680d0faf95cf 10-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Various fixes." into jb-mr1-dev
2d1b37819112274f538d1886c379ff337eb0d9ed 10-Sep-2012 Dianne Hackborn <hackbod@google.com> Various fixes.

Bug #7132226: Can't start instrumentation due to ActivityManagerService crash
Bug #6912004: tap on gmail notification sends me to home screen

Change-Id: I824128b01f368de95dee288f8e49039b84479a7e
69d6b534335afc883077927b9abb0f94568d298d 10-Sep-2012 Kenny Root <kroot@google.com> Merge "Update PackageSetting flags when updating" into jb-mr1-dev
5455f6826f832ed0f07d28a772f4489d7223acb3 09-Sep-2012 Kenny Root <kroot@google.com> Update PackageSetting flags when updating

Commit 5e03e2ca7d25b899b129baad2dd5eca6bf99d88a moved from
PacakgeParser.Package to PackageSetting which revealed that we weren't
updating the pkgFlags when replacing an existing application.

Add flags to PackageSetting so that deletion of the package later succeeds.

Change-Id: I2e0d4e07da31f48b68601f3f3240966b6e17dbdf
fdb5bd261d7836b5f7e9c20d75709ca978d6eb18 09-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "Disable wifi display API when the adapter is not registered." into jb-mr1-dev
21c7153d30071dcbeb92daa1fd48ed181e42aef3 09-Sep-2012 Jeff Brown <jeffbrown@google.com> Disable wifi display API when the adapter is not registered.

Bug: 7132341
Change-Id: I46d859082077afd2c8adc829ad285977dff80d07
0c191624fba8484e811027a9db40a62a960ab7dc 09-Sep-2012 Kenny Root <kroot@google.com> Remove "protect" command from installd

No one uses the "protect" command anymore, so remove it from installd.

Change-Id: Ia990bae6f95cd6e317496f5dd173ec15164d7164
add52a975aa78d9e24d3e63a8168c00a9bfb80ec 09-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Viewport should zoom out when screen magnification is disabled.

1. If screen magnification is disabled when the screen is in a
magnified state we have to zoom out since otherwise the user
is stuck in a magnified state without ability to pan/zoom/
toggle magnification which renders the device useless.


Change-Id: I8f3339f31310448ec8742f3101c1fdc61a6a5f83
5b1720e11d3d5a23c4b0406e1c51e8cd8275f25f 09-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Viewport should zoom out when screen magnification is disabled." into jb-mr1-dev
6d0df874ce235872bd5fdd4d3bce0905869a099d 09-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Viewport should zoom out when screen magnification is disabled.

1. If screen magnification is disabled when the screen is in a
magnified state we have to zoom out since otherwise the user
is stuck in a magnified state without ability to pan/zoom/
toggle magnification which renders the device useless.


Change-Id: Ia620954fbd594e7cd470e43b89d9ed04c0397c3c
20ec8ac58665e6e2991988c134ba3b8590911648 09-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "Improve Wifi display discovery API." into jb-mr1-dev
180bbc71810496e280e9993177bfeddb3ad1f558 09-Sep-2012 Jeff Brown <jeffbrown@google.com> Improve Wifi display discovery API.

Change-Id: I4d46503e5413f52da16f79bbc9c631cc5ae9c178
8f008e737a84be289d07cc603f98da1bbbfcf837 09-Sep-2012 Amith Yamasani <yamasani@google.com> Merge "More multi-user methods in PM" into jb-mr1-dev
151ec4c9f8ca34625733730a4551a23eb97cda23 08-Sep-2012 Amith Yamasani <yamasani@google.com> More multi-user methods in PM

pm can list installed packages by user now.

Bug: 6926465

Change-Id: I822311bfd6e7e2d6fb315fc484739fbf953c9bb6
8e810132315ba6ce2e1f3dca5e91fd34e42a44d8 09-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "Make display manager tell input system about viewports." into jb-mr1-dev
d728bf514f257670fcb9aa22c6eaf97626072c93 09-Sep-2012 Jeff Brown <jeffbrown@google.com> Make display manager tell input system about viewports.

The window manager is no longer responsible for telling the
input system about the display viewport.

Change-Id: I932882bae55decef55f25093bb2a7ebac1620bb1
1edf63ef4c7484355a6d9371bea912d6518a7d1e 09-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "Enable auto-brightness adjustment feature with system prop." into jb-mr1-dev
631938f26dbc89e7e9530bb85d9f37706dba59f3 09-Sep-2012 Jeff Brown <jeffbrown@google.com> Enable auto-brightness adjustment feature with system prop.

This feature is experimental and disabled by default.

Change-Id: I183534370da7613557e4d1535f556873f8a763df
b0d10aa9831fb74a28db63cac9d111559bed62ab 08-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "Add new wifi display discovery API." into jb-mr1-dev
0597100f9127ddc0b638eb044872f138f4d3e4a8 08-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "Retry wifi display connections." into jb-mr1-dev
e08ae388d63c4db8f9d9a7ecd634f9a51f6e91b9 08-Sep-2012 Jeff Brown <jeffbrown@google.com> Add new wifi display discovery API.

The API is quite simple. There are a few extra functions
on DisplayManager to scan, connect and disconnect from
wifi displays and get status, and a single protected
broadcast sent when the status changes.

Change-Id: Ic91dbab5ee818e790b27fa32e1a1e93788793be0
4ea283a05f3724285ed3057ff1de1a344ab3e15a 08-Sep-2012 Christopher Tate <ctate@google.com> Merge "Sanity-check existence of restore agent" into jb-mr1-dev
5d75052b2da7ed7c153faea69a28f13a4000788f 08-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Add Binder.getCallingUserHandle()." into jb-mr1-dev
74ee8652e02fc94901177214fc9370659732c921 08-Sep-2012 Dianne Hackborn <hackbod@google.com> Add Binder.getCallingUserHandle().

Change-Id: I2a7eedfdc7baeeb4c2cd2ca0153aa95e0cf0bf45
e7287a0791b7398a540c18894972908683456283 08-Sep-2012 Christopher Tate <ctate@google.com> Sanity-check existence of restore agent

When a restore dataset includes data for an app that used to have
a backup agent, but does not in the currently-installed version, we
were merrily trying to bring up the agent for restore anyway, and
crashing. Now we don't do that; we check whether there's actually
going to be an agent to handle the data before doing any of the
heavy work.

Bug 7130695

Change-Id: I0a38c2a8bb51d4a140a72d22896fa58d98ebaa02
824b959dfc830f3d0aa12afc5fb429980e35f3fd 08-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Explicitly specify current user everywhere home is started." into jb-mr1-dev
0cfebf28b15e85a42981a8f9e6a09556bef36ea3 08-Sep-2012 Jeff Brown <jeffbrown@google.com> Retry wifi display connections.

Change-Id: I48c62c7e272c2696022ddeea1c3107d24a9431b8
4d0b56255489efc3b35b9f0187f56536f07d5d66 08-Sep-2012 Jeff Brown <jeffbrown@google.com> Disable hardcoded wifi display adapter.

Change-Id: Id0f7d59b6eafa8794ff7616cf54a0b94ba78c763
d888399ad4a4ec0a08e97518bf22d726a8bd4eaa 08-Sep-2012 Dianne Hackborn <hackbod@google.com> Explicitly specify current user everywhere home is started.

Change-Id: I58d86136de7f9cef1eaf72793d0e200b852d7355
0458a69d4d08a517780c2279ae1dc98ccb3fb916 08-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Fixing off by one error in the ScreenMagnifier." into jb-mr1-dev
2cee686498c6141f5a68532ecb79f598e043ec7e 08-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Fixing off by one error in the ScreenMagnifier.

Change-Id: Ia0ccfb6b354b7a18633e7cf26647c6436ebf5c08
72018294cc4e3cc5feb7affdec4bf4bb2368ac41 08-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "Make mirroring automatic based on Windows on display." into jb-mr1-dev
7017e48380ab0c1be033594bb2a9331898ad5be8 08-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "Add support for Wifi display." into jb-mr1-dev
cd620591b764cd999f18878985444fba01d5b710 08-Sep-2012 Nick Kralevich <nnk@google.com> Merge "installd: fix forward locking symlink" into jb-mr1-dev
1275abd013eee87b3fec5b704a799440cb1c71fe 08-Sep-2012 rich cannings <richc@google.com> Merge "Move verification settings to Settings.Global" into jb-mr1-dev
cd42ce5d61d7854d1add5d4d308d1f3342baeea6 08-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix crash when setting wallpaper from non-primary user." into jb-mr1-dev
11941fd651be468c8ab6c90256616418ecf3a6a8 08-Sep-2012 Dianne Hackborn <hackbod@google.com> Fix crash when setting wallpaper from non-primary user.

When accessing a content provider, there is a check for whether
the provider can run in the caller's process; if so, even if the
provider is currently published, we return to the caller that it
can run locally.

This check was broken -- it had an old condition that allowed
content providers owned by the system UID to run in any other UID's
process. This is wrong, since by definition the other
UIDs would not be able to access the data under the original UID.

We ran into this because the activity picker is part of the
android platform manifest, so runs as the system process. However
it needs to run as the user who invoked it, so when coming from the
non-primary user we spin up a "system" process running as a uid of
that user. Now when that process tries to access the settings
provider, the broken check would think that a new instance of the
settings provider should be created in the caller's process.

Change-Id: I7bf495ed8370cb271bdaec073d5b7dda9e38c546
7de350a91301985b7f2d9f28edde5aade8495d9b 08-Sep-2012 Nick Kralevich <nnk@google.com> installd: fix forward locking symlink

installd was not creating a compatibility symlink when
installing a forward locked application. Fix.

Bug: 7121527
Change-Id: Ied507ab2b759d8658af563e6ac8f0dbb0d286cce
df4a94e21c78b25d7e35590408efda87ab41b633 08-Sep-2012 Craig Mautner <cmautner@google.com> Merge "Fix incorrect indexing calculation." into jb-mr1-dev
efb735dbafd131cd1e8f4af40274c16443e39078 08-Sep-2012 Craig Mautner <cmautner@google.com> Fix incorrect indexing calculation.

Fixes bug 7129583.

Change-Id: Ia395a7acded05686668d5b3cee09d49025a9f339
4d8fc793f044cf2c857ac72ebe51641b8e6c413d 07-Sep-2012 rich cannings <richc@google.com> Move verification settings to Settings.Global

Settings.Global.PACKAGE_VERIFIER_DEFAULT_RESPONSE, respectively.

Bug: 7082362
Change-Id: I21fde031a330563891c0129132f3d6369ac5e7a5
5fc626639aa7ff2aed224b58891149e19fb24b57 08-Sep-2012 Amith Yamasani <yamasani@google.com> Merge "Resolve the correct home intent for secondary users" into jb-mr1-dev
259d5e56a82d721ccb7e7f514c80de69acae309e 01-Sep-2012 Amith Yamasani <yamasani@google.com> Resolve the correct home intent for secondary users

Fix some searches through the Activity stack.

This allows SetupWizard to be launched for the second user.

Change-Id: Icd306319f511c902557bd9985d80dda228e32d96
62df6eb5081fbb66d9245626e8c91497431040e4 08-Sep-2012 Christopher Tate <ctate@google.com> Refer to STAY_ON_WHILE_PLUGGED_IN via the Global namespace

It moved from System to Global, so writes are not automatically redirected
to the new namespace (else apps would start crashing).

Bug 7126575

Change-Id: Ief31fcb5a6107a098da04d30d146e16921dee776
722285e199a9fc74b9b3343b7505c00666848c88 07-Sep-2012 Craig Mautner <cmautner@google.com> Make mirroring automatic based on Windows on display.

Tell the display manager whenever a given logical display
contains interesting windows. If so, then the display
manager arranges to show that content on a physical display,
otherwise it ignores the logical display and makes its
associated primary physical display mirror the default

Assign DisplayContents when Displays are added, remove them when
Displays are removed, and update the DisplayInfo when Displays

Change-Id: I36e08ec538055acabe1e24cdd12c40de4e47a158
c0be8c85b09002359adb1fb20f2bf08e6983d146 07-Sep-2012 Christopher Tate <ctate@google.com> Merge "Refer to STAY_ON_WHILE_PLUGGED_IN in the global namespace" into jb-mr1-dev
ad7353204152389e88b331991274bad04469ae58 07-Sep-2012 Christopher Tate <ctate@google.com> Refer to STAY_ON_WHILE_PLUGGED_IN in the global namespace

This is the one relevant setting that moved from System to Global,
a move that we do not automatically redirect on writes.

Change-Id: I7b26d0c364695c4a10a7cd477db3dfcfe89d7ef5
5e03e2ca7d25b899b129baad2dd5eca6bf99d88a 06-Sep-2012 Dianne Hackborn <hackbod@google.com> More multi-user stuff:

- New (hidden) isUserRunning() API.
- Maintain LRU list of visited users.
- New FLAG_IS_DATA_ONLY for ApplicationInfo.
- Clean up pending intent records when force-stopping a user (or package).
(Also fixes bug #6880627: PendingIntent.getService() returns stale
intent of force stopped app)
- Fix force-stopping when installing an app to do the force-stop across
all users for that app.
- When selecting which processes to kill during a force stop, do this
based on the actual packages loaded in the process, not just process
name matching.
- You can now use --user option in am when starting activities, services,
and instrumentation.
- The am --user option accepts "current" and "all" as arguments.
- The pm uninstall command now uninstalls for all users, so it matches
the semantics of the install command.
- PhoneWindowManager now explicitly says to start home in the current
- Activity manager call to retrieve the MIME type from a content provider
now takes a user argument, so it will direct this to the proper user.
- The package manager uninstall paths are now implemented around
PackageSetting, not PackageParser.Package. This allows them to work
even if the application's apk has been removed (in which case it only
exists as a PackageSetting, not the PackageParser.Package parsed from
the apk).

Change-Id: I3522f6fcf32603090bd6e01cc90ce70b6c5aae40
cbad976b2a36a0895ca94510d5208a86f66cf596 05-Sep-2012 Jeff Brown <jeffbrown@google.com> Add support for Wifi display.

Change-Id: I99693786cf9d07d07d3400046c55eb4933730b80
240a90d2789f8813bef11b499a026b8afe43bbd8 07-Sep-2012 Matthew Xie <mattx@google.com> Merge "Fault tolerance in Bluedroid" into jb-mr1-dev
1223e5a3115e825567972da26e38c0016bdfa268 29-Aug-2012 Syed Ibrahim M <syedibra@broadcom.com> Fault tolerance in Bluedroid

When bluetooth process gets crashed/killed/stopped by Android
system, BluetoothManagerService will re-start AdapterService
to recover from the crash appropriately.

Change-Id: Iacb1a06a8245089517bbbd57de1378ca8ce4b41e
9545dc020ea11649d70dcbe911a8e82a3254a4ea 07-Sep-2012 Jeff Sharkey <jsharkey@android.com> Include primary flag in StorageVolume.

Bug: 7003520
Change-Id: Iaae2ae22253820c954c51e0199c31087bc825f3f
6da5827193408ec6d2a77b64448b2f1c40b9a482 07-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Screen magnification - feature - framework." into jb-mr1-dev
1cf70bbf96930662cab0e699d70b62865766ff52 06-Aug-2012 Svetoslav Ganov <svetoslavganov@google.com> Screen magnification - feature - framework.

This change is the initial check in of the screen magnification
feature. This feature enables magnification of the screen via
global gestures (assuming it has been enabled from settings)
to allow a low vision user to efficiently use an Android device.

Interaction model:

1. Triple tap toggles permanent screen magnification which is magnifying
the area around the location of the triple tap. One can think of the
location of the triple tap as the center of the magnified viewport.
For example, a triple tap when not magnified would magnify the screen
and leave it in a magnified state. A triple tapping when magnified would
clear magnification and leave the screen in a not magnified state.

2. Triple tap and hold would magnify the screen if not magnified and enable
viewport dragging mode until the finger goes up. One can think of this
mode as a way to move the magnified viewport since the area around the
moving finger will be magnified to fit the screen. For example, if the
screen was not magnified and the user triple taps and holds the screen
would magnify and the viewport will follow the user's finger. When the
finger goes up the screen will clear zoom out. If the same user interaction
is performed when the screen is magnified, the viewport movement will
be the same but when the finger goes up the screen will stay magnified.
In other words, the initial magnified state is sticky.

3. Pinching with any number of additional fingers when viewport dragging
is enabled, i.e. the user triple tapped and holds, would adjust the
magnification scale which will become the current default magnification
scale. The next time the user magnifies the same magnification scale
would be used.

4. When in a permanent magnified state the user can use two or more fingers
to pan the viewport. Note that in this mode the content is panned as
opposed to the viewport dragging mode in which the viewport is moved.

5. When in a permanent magnified state the user can use three or more
fingers to change the magnification scale which will become the current
default magnification scale. The next time the user magnifies the same
magnification scale would be used.

6. The magnification scale will be persisted in settings and in the cloud.

Note: Since two fingers are used to pan the content in a permanently magnified
state no other two finger gestures in touch exploration or applications
will work unless the uses zooms out to normal state where all gestures
works as expected. This is an intentional tradeoff to allow efficient
panning since in a permanently magnified state this would be the dominant
action to be performed.


1. The window manager exposes APIs for setting accessibility transformation
which is a scale and offsets for X and Y axis. The window manager queries
the window policy for which windows will not be magnified. For example,
the IME windows and the navigation bar are not magnified including windows
that are attached to them.

2. The accessibility features such a screen magnification and touch
exploration are now impemented as a sequence of transformations on the
event stream. The accessibility manager service may request each
of these features or both. The behavior of the features is not changed
based on the fact that another one is enabled.

3. The screen magnifier keeps a viewport of the content that is magnified
which is surrounded by a glow in a magnified state. Interactions outside
of the viewport are delegated directly to the application without
interpretation. For example, a triple tap on the letter 'a' of the IME
would type three letters instead of toggling magnified state. The viewport
is updated on screen rotation and on window transitions. For example,
when the IME pops up the viewport shrinks.

4. The glow around the viewport is implemented as a special type of window
that does not take input focus, cannot be touched, is laid out in the
screen coordiates with width and height matching these of the screen.
When the magnified region changes the root view of the window draws the
hightlight but the size of the window does not change - unless a rotation
happens. All changes in the viewport size or showing or hiding it are

5. The viewport is encapsulated in a class that knows how to show,
hide, and resize the viewport - potentially animating that.
This class uses the new animation framework for animations.

6. The magnification is handled by a magnification controller that
keeps track of the current trnasformation to be applied to the screen
content and the desired such. If these two are not the same it is
responsibility of the magnification controller to reconcile them by
potentially animating the transition from one to the other.

7. A dipslay content observer wathces for winodw transitions, screen
rotations, and when a rectange on the screen has been reqeusted. This
class is responsible for handling interesting state changes such
as changing the viewport bounds on IME pop up or screen rotation,
panning the content to make a requested rectangle visible on the
screen, etc.

8. To implement viewport updates the window manger was updated with APIs
to watch for window transitions and when a rectangle has been requested
on the screen. These APIs are protected by a signature level permission.
Also a parcelable and poolable window info class has been added with
APIs for getting the window info given the window token. This enables
getting some useful information about a window. There APIs are also
signature protected.


Change-Id: Iec93da8bf6376beebbd4f5167ab7723dc7d9bd00
2b0442f33029c6b6cf1247a1633a97f5908d6cab 07-Sep-2012 Jeff Sharkey <jsharkey@android.com> Merge "Event logging for lockdown VPN state changes." into jb-mr1-dev
91c6a64a04c2d8b27b886d96a56800ae24efb7a9 07-Sep-2012 Jeff Sharkey <jsharkey@android.com> Event logging for lockdown VPN state changes.

Bug: 7079350
Change-Id: I3670efe7f09c0fca55552b6a04a2be159b9beb3c
fa8d83d90444354e8eca6ca0e080bc917e5a1f32 07-Sep-2012 Jeff Sharkey <jsharkey@android.com> Merge "Restrict lockdown and firewall to AID_SYSTEM." into jb-mr1-dev
f56e2435b64f9638e029777fa9492d42f157033e 07-Sep-2012 Jeff Sharkey <jsharkey@android.com> Restrict lockdown and firewall to AID_SYSTEM.

Bug: 7076289
Change-Id: Iafa3054335e8b1c3c8c3b8db2a4191d4ed4c8c41
9e130e70eff57d15c0888f51c4f1a7cc4cd62573 07-Sep-2012 Craig Mautner <cmautner@google.com> Merge "Limit certain actions to default Display." into jb-mr1-dev
69b0818179201fadc9d2a384d692d8ae4aecd85c 05-Sep-2012 Craig Mautner <cmautner@google.com> Limit certain actions to default Display.

Stop messing up PhoneWindowManager state when passing in windows
from non-default Display.

Change-Id: I472f7a13c5e2241fbf1f79ae1c8045fd92af016c
fd5494b8ef91e8a909622c3bf45dac7537254b41 05-Sep-2012 Daniel Sandler <dsandler@android.com> Merge changes I4ef284da,Ie8cc69bd into jb-mr1-dev

* changes:
Make the SystemUI stop the screen saver when a full-screen notification is posted.
Do not play sounds or vibes for background users' notifications.
ec098efcb11c4f4a12e7d3e44995536ef1eb7c1b 05-Sep-2012 Jean-Baptiste Queru <jbq@google.com> am 342c6bc8: am 54099555: am 380a8e3d: Merge "Am: Clean mLaunchingProviders of all providers started by the client"

* commit '342c6bc8e5edb5a0cfa2ad65162d559b7f2ad993':
Am: Clean mLaunchingProviders of all providers started by the client
540995555505486074e9652a9c682bdf6e3056c5 05-Sep-2012 Jean-Baptiste Queru <jbq@google.com> am 380a8e3d: Merge "Am: Clean mLaunchingProviders of all providers started by the client"

* commit '380a8e3d126374b0205e8452bf2b4b70779e2606':
Am: Clean mLaunchingProviders of all providers started by the client
380a8e3d126374b0205e8452bf2b4b70779e2606 05-Sep-2012 Jean-Baptiste Queru <jbq@google.com> Merge "Am: Clean mLaunchingProviders of all providers started by the client"
0b5a4a15132a9367b6bbff62781e9ad3441b6c1d 05-Sep-2012 Jean-Baptiste Queru <jbq@google.com> am 11626a91: am 9eb3bd88: am 42a58ecd: Merge "Revert "Watchdog: Improvement of debuggability""

* commit '11626a91b6e695e7a8fa9e9a9f1a37df11cfb4e2':
Revert "Watchdog: Improvement of debuggability"
9eb3bd88f14c386c89dd2576c3ca798f2493b0fd 05-Sep-2012 Jean-Baptiste Queru <jbq@google.com> am 42a58ecd: Merge "Revert "Watchdog: Improvement of debuggability""

* commit '42a58ecd27783d347242206bcffd4052cf1d5164':
Revert "Watchdog: Improvement of debuggability"
c9ce0abe29baecc540c48f4913255a71586bcfd3 04-Sep-2012 Daniel Sandler <dsandler@android.com> Make the SystemUI stop the screen saver when a full-screen notification is posted.

This keeps all the fullScreenIntent logic (including
multiuser implications) in one place.

Change-Id: I4ef284daf90464f105780ade1d971e9e081fbbb5
24518e466ab36ce7c6d2ffd733ac4d57f255766e 04-Sep-2012 Daniel Sandler <dsandler@android.com> Do not play sounds or vibes for background users' notifications.

USER_ALL notifications will still play/vibe for any user.

Change-Id: Ie8cc69bd1541193ed9c4207ef38a8d4898af0a9d
580e9f72e09efc4645aa98753ad8e9806d428950 05-Sep-2012 Brian Muramatsu <btmura@google.com> Merge "Make battery shutdown temperature configurable" into jb-mr1-dev
f87633f38c399edf5b2c358992ecbbbbbad5a648 05-Sep-2012 Mathias Agopian <mathias@google.com> Merge "update to new SurfaceComposerClient API" into jb-mr1-dev
0d727c714b75b9d9c927eca83aacba8938b08537 05-Sep-2012 Satoshi Kataoka <satok@google.com> Merge "Add subtypeId for keeping enabled "InputMethodSubtype"s even if subtype parameters are changed" into jb-mr1-dev
63f1c43fbef157397869475ef30d23e631b88bbe 05-Sep-2012 Mathias Agopian <mathias@google.com> update to new SurfaceComposerClient API

Change-Id: I8f2c96df56fe3a851b8ec03bb8734db0b6bea3d5
bac6c12974c278a8045ed8deefb08d0348aa8496 05-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix another issue #7097984 java.lang.SecurityException: Permission Denial:" into jb-mr1-dev
fd8bf5c790749b0382c9d70424cac2367d6276e3 05-Sep-2012 Dianne Hackborn <hackbod@google.com> Fix another issue #7097984 java.lang.SecurityException: Permission Denial:

broadcast asks to run as user -1 but is calling from user 0; this requires

Dupped bug of a different problem.

Change-Id: I15f4ab08b81f5f5746ba1cd183dee4f0b1281df5
bb95cb9f997afc34d54f3d5bcb247c44f368b62b 29-Aug-2012 Brian Muramatsu <btmura@google.com> Fix GPS settings change listener in LocManager

Bug 7051185

- Register a ContentObserver to track settings changes rather than
opening up a Cursor with a ContentQueryMap.

- Move updateProvidersLocked into init to assure that the
ContentObserver does not miss any changes.

- Move blacklist and fudger creation before loadProvidersLocked to
improve code readability.

Change-Id: I4d3e19fa33401c384bc2b00658d4336ea119e0e5
7950d081ac945d97427264f2a0531607097c2c71 05-Sep-2012 Craig Mautner <cmautner@google.com> Merge "Make mLayoutNeeded per-Display." into jb-mr1-dev
19d59bc5ad877e9b1544ab13a08282b7b384fefb 04-Sep-2012 Craig Mautner <cmautner@google.com> Make mLayoutNeeded per-Display.

Switch from a global mLayoutNeeded to one for each Display so that
we don't run layout on Displays that haven't changed.

Change-Id: Ib65c5c667933cceacc46b94f4e6e6bd613d5cb35
175ae55c0d62b6adbc9b3cc215ad2e65a8b40cc3 05-Sep-2012 Jim Miller <jaggies@google.com> Merge "Update DevicePolicyManager with ability to disable keyguard widgets" into jb-mr1-dev
690420831c9b60f7fb2f1100aeef67ad79bfd3bb 05-Sep-2012 rich cannings <richc@google.com> Merge "Enable package verification" into jb-mr1-dev
035ce2ca92742894f7f906c93d7d217c647aa19a 05-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Add support for "-rtl" in resources" into jb-mr1-dev
f3c74f34999337b8eb77e1a5ed0287561b512c21 01-Sep-2012 Brian Muramatsu <btmura@google.com> Make battery shutdown temperature configurable

Bug 7079455

Change-Id: I448f21231bf0548ef975f99482576acb24a1a70e
b8ec470617590fa2025db869e8e80dcce8eaec23 01-Sep-2012 Jim Miller <jaggies@google.com> Update DevicePolicyManager with ability to disable keyguard widgets

Change-Id: I5876e9e180b2a995aaa355fbbb2b67cebb86104d
68ed7e448d36c2f82062add8a95dfdf995873557 04-Sep-2012 rich cannings <richc@google.com> Enable package verification

Turn on package verification, if a verifier exists. Play app is now a verifier.

Bug: 7064853
Change-Id: I11f6b108c507ea6236038b1415eb9064ca4c3c6d
784827b27cf4cd82bf074b571e63cb5e660c54af 04-Sep-2012 Jean-Baptiste Queru <jbq@google.com> Revert "Watchdog: Improvement of debuggability"

This reverts commit 9211b13c3268035b0da0c51ed2d6d5a578d45ff3.
d2a8df9541c198d555ef6a50347acb9160509863 04-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #7097984 java.lang.SecurityException: Permission Denial:" into jb-mr1-dev
34a75df63533914bbca95a82d2c89ca374b2645d 04-Sep-2012 Craig Mautner <cmautner@google.com> Merge "Remove single pass actions from display loop." into jb-mr1-dev
ed48f9f8b253b3140607cb97d623093b3a90e897 04-Sep-2012 Craig Mautner <cmautner@google.com> Merge "Change layout inner loop order for multi display." into jb-mr1-dev
b8839dd35723235469a4e805682378c84f50a4fb 04-Sep-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7097984 java.lang.SecurityException: Permission Denial:

broadcast asks to run as user -1 but is calling from user 0; this requires

Also improve part of issue #7087789: Local denial of service via
low-permissioned apps

No longer allow closeSystemDialogs() from background processes.

Change-Id: I752d5a1d51be0b69fde6999d6659835e5bde3efe
7d69e8bd2168a81a5cb68da99d025c6f290bf166 04-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Add registering for explicit users." into jb-mr1-dev
20e809870d8ac1e5b848f2daf51b2272ef89bdfc 01-Sep-2012 Dianne Hackborn <hackbod@google.com> Add registering for explicit users.

New API to register as an explicit user, which allows you to
also select ALL to see broadcasts for all users.

New BroadcastReceiver API to find out which user the broadcast
was sent to.

Use this in app widget service to handle per-user package broadcasts
and boot completed broadcasts correctly.

Change-Id: Ibbe28993bd4aa93900c79e412026c27863019eb8
ea3a09a5b9c8ae56b0c4975c7a7039a05d4c0b3c 04-Sep-2012 Craig Mautner <cmautner@google.com> Remove single pass actions from display loop.

The WindowAnimator loop over each Display contained actions that
only needed to be done one time but were instead done once per loop.

Change-Id: Ia916b08cdb7670686e6295dbcef6a5ff27474099
76a7165719dc3ccce902953f6244e2c2668aa753 04-Sep-2012 Craig Mautner <cmautner@google.com> Change layout inner loop order for multi display.

The inner loop that ran over each display had a few problems:
- The Surface transaction was starting and stopping between each
- The layout change bits were being applied globally so all
displays were layed out when only individual displays needed to be.
- Wallpaper and input actions were being applied each time through
the display loop rather than once only for the default display.

Change-Id: I924252bab28c426222a4bb73693accc4b21cecbe
e62e6d8731ab1e02c1632ebc011792d07b902af8 02-Jul-2012 Satoshi Kataoka <satok@google.com> Add subtypeId for keeping enabled "InputMethodSubtype"s even if subtype parameters are changed

Bug: 6752230
Change-Id: I3a2d512e395fe8645edf6ab82108948b927c629a
4ee364982e783b4a2eac6e05f81d167c6121e110 04-Sep-2012 Vairavan Srinivasan <vairav@codeaurora.org> Am: Clean mLaunchingProviders of all providers started by the client

Launching providers is removed from mLaunchingProviders when the client
process dies and works as long as the client process had requested just
one provider and not otherwise. Fix is to make sure mLaunchingProviders
is updated to remove all providers launched by the client process.

Change-Id: Ib4b8b44b6a102762a6558f65fb2e6dbf11d725ea
e94831e5ed4aa3b1ebc5444cc1b16cdab8cb92f8 02-Sep-2012 Craig Mautner <cmautner@google.com> Merge "Minor refactors." into jb-mr1-dev
398341927f3dca68d71024483aa276d10af4c080 02-Sep-2012 Craig Mautner <cmautner@google.com> Minor refactors.

- Refactor DragState to take Display instead of DisplayContent.
- Rename xxxAnimationLw methods in WindowManagerPolicy to xxxPostLayout
to reflect animation refactoring.

Change-Id: I502f2aa45a699ad395a249a12abf9843294623f0
2701f325a6d4acd920637d2ff6fd6972a9cf836b 01-Sep-2012 Dianne Hackborn <hackbod@google.com> Merge "Remove Binder.getOrigCallingUid()." into jb-mr1-dev
430e5b23cf702d57aa662972c43d546806147d76 01-Sep-2012 Amith Yamasani <yamasani@google.com> Merge "Centralize the creation of the user system directory" into jb-mr1-dev
f83ec838915c13158ddfda0cf4da5865b260b9c6 01-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "More improvements to the display manager." into jb-mr1-dev
4ed8fe75e1dde1a2b9576f3862aecc5a572c56b5 31-Aug-2012 Jeff Brown <jeffbrown@google.com> More improvements to the display manager.

Added more complete support for logical displays with
support for mirroring, rotation and scaling.

Improved the overlay display adapter's touch interactions.

A big change here is that the display manager no longer relies
on a single-threaded model to maintain its synchronization
invariants. Unfortunately we had to change this so as to play
nice with the fact that the window manager wants to own
the surface flinger transaction around display and surface
manipulations. As a result, the display manager has to be able
to update displays from the context of any thread.

It would be nice to make this process more cooperative.
There are already several components competing to perform
surface flinger transactions including the window manager,
display manager, electron beam, overlay display window,
and mouse pointer. They are not manipulating the same surfaces
but they can collide with one another when they make global
changes to the displays.

Change-Id: I04f448594241f2004f6f3d1a81ccd12c566bf296
61f57379ca2c5b6290c8da7548fa17128f7ab24f 31-Aug-2012 Amith Yamasani <yamasani@google.com> Centralize the creation of the user system directory

Environment.getUserSystemDirectory(int userId)

Use it all relevant places that was hardcoding it.
Also, wipe out the user's system directory when user is removed, otherwise old state
might be transferred to a new user.

Change-Id: I788ce9c4cf9624229e65efa7047bc0c019ccef0a
4120375d46091df8527bb701882e056fbb0e6b06 31-Aug-2012 Dianne Hackborn <hackbod@google.com> Remove Binder.getOrigCallingUid().

Replaced all remaining places that used it with explicit user

While doing this, I ran into stuff that was creating PendingIntent
objects (that now need to specify the explicit user they are for),
which are also posting notifications... but have no way to specify
the user for the notification.

So the notification manager in the system process now also gets a
formal concept of a user associated with the notification, which
is passed in to all the necessary aidl calls. I also removed the
old deprecated aidl interface for posting/cancelling notifications,
since we now always need a user supplied.

There is more work that needs to be done here, though. For example
I think we need to be able to specify USER_ALL for a notification that
should be shown to all users (such as low storage or low battery).
Along with that, the PendingIntent creation needs to be tweaked to
be able to handle USER_CURRENT by evaluating the user at the point the
pending intent is sent.

That's for another change, however.

Change-Id: I468e14dce8def0e13e0870571e7c31ed32b6310c
897798225d9c48bd3424757059318ed1eb3207de 31-Aug-2012 Christopher Tate <ctate@google.com> Don't set the time zone under the caller's identity

...otherwise you crash trying to send a broadcast to all users.

Change-Id: If627eeb3eadb1052242c986fe24482d87c8fc093
00453e7a0182b50cf01e65c97650b526284fe084 31-Aug-2012 Jeff Brown <jeffbrown@google.com> Merge "Tweak overlay display adapter scaling." into jb-mr1-dev
a2875f481bc40fb5c7e5ae2d475dfb6d557294c0 31-Aug-2012 rich cannings <richc@google.com> Merge "Notify verifiers that verification is complete" into jb-mr1-dev
f203aeef993b0f4ce65c9630d06bbd50a504e89f 30-Aug-2012 Amith Yamasani <yamasani@google.com> Enforce permissions for calls with specified userId

Fix a couple of places where incorrect userIds were being passed in.

Change-Id: I398c676e0488ff7e584be96e96c8b32652134238
b2dd4e87ae8ac6a0402b7a0ed37201f27bcb1b9c 31-Aug-2012 Dianne Hackborn <hackbod@android.com> am 1a907db0: am 862c3835: am 4b60a8d1: Merge "Added check of ActivityInfo launch mode when starting activity."

* commit '1a907db07ea105ea65e146713f436ed072d7084b':
Added check of ActivityInfo launch mode when starting activity.
d1b5cfc94ae940f42be352e7ed98c21c973471b2 29-Aug-2012 rich cannings <richc@google.com> Notify verifiers that verification is complete

Send the Intent.ACTION_PACKAGE_VERIFIED to all verifiers when
verification is complete (either one verifier verified the package or a
timeout occurred). Details of what occurred is in a new extra,

Bug: 7048930
Change-Id: I4f9855a29b0eb6d77f469891402c69e2e8922945
862c383530d64e6c493fb519f567dd5778d9d48c 31-Aug-2012 Dianne Hackborn <hackbod@android.com> am 4b60a8d1: Merge "Added check of ActivityInfo launch mode when starting activity."

* commit '4b60a8d1b8b5f8fd04df5749ce225ed57e0a1a44':
Added check of ActivityInfo launch mode when starting activity.
4b60a8d1b8b5f8fd04df5749ce225ed57e0a1a44 31-Aug-2012 Dianne Hackborn <hackbod@android.com> Merge "Added check of ActivityInfo launch mode when starting activity."
73365695e4d169126c6932df8e8e932aefe6aaca 30-Aug-2012 Dianne Hackborn <hackbod@google.com> Merge "Improve multi-user broadcasts." into jb-mr1-dev
5ac72a29593ab9a20337a2225df52bdf4754be02 30-Aug-2012 Dianne Hackborn <hackbod@google.com> Improve multi-user broadcasts.

You can now use ALL and CURRENT when sending broadcasts, to specify
where the broadcast goes.

Sticky broadcasts are now correctly separated per user, and registered
receivers are filtered based on the requested target user.

New Context APIs for more kinds of sending broadcasts as users.

Updating a bunch of system code that sends broadcasts to explicitly
specify which user the broadcast goes to.

Made a single version of the code for interpreting the requested
target user ID that all entries to activity manager (start activity,
send broadcast, start service) use.

Change-Id: Ie29f02dd5242ef8c8fa56c54593a315cd2574e1c
4698e36db68273b556867522b1aaffabb8099518 30-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am 6ab3ea5f: am 147ef944: am 60d1e1a0: Merge "Watchdog: Improvement of debuggability"

* commit '6ab3ea5f48abfd777d5bd18d92acc3bc766f78ce':
Watchdog: Improvement of debuggability
147ef9448540adaa4312e3cbc01adfc3c7902f50 30-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am 60d1e1a0: Merge "Watchdog: Improvement of debuggability"

* commit '60d1e1a09e4603e24652e930597ab204855eaa77':
Watchdog: Improvement of debuggability
e217ee4d7a8223289a1af7363627c69956c46d41 29-Aug-2012 Jeff Sharkey <jsharkey@android.com> Access to all users' external storage.

System services holding this permission have external storage bound
one level higher, giving them access to all users' files.

Bug: 7003520
Change-Id: Ib2bcb8455740c713ebd01f71c9a2b89b4e642832
9211b13c3268035b0da0c51ed2d6d5a578d45ff3 28-Aug-2012 rikard dahlman <rikard.dahlman@sonymobile.com> Watchdog: Improvement of debuggability

If the watchdog detects a problem the system server process
is killed, that is followed by a crash. Because the crash is
done after the system server process is killed, the crash
don't contain info about the system server.
This improvement will make sure that the system is crashed
before the system server process is killed.
Behavior is only changed for eng and userdebug builds.

Change-Id: I9f1c8fd8b03d0114032ed44fb582705ad0b49733
428f53937efdc362b60d01592bd01c568691f70e 30-Aug-2012 Jeff Sharkey <jsharkey@android.com> Merge "Locking when clearing VPN source rules." into jb-mr1-dev
580dd31a68c65b4af68147d52d57f60e0bd52dbe 30-Aug-2012 Jeff Sharkey <jsharkey@android.com> Locking when clearing VPN source rules.

Otherwise lockdown VPN reset is racy and can bring down system_server.

Change-Id: Ib8eecde1d0857a1669c3ca5506a46198c71b1b51
a99e4caa94ed3261d11c650e778c7c9b26b3e590 30-Aug-2012 Jeff Sharkey <jsharkey@android.com> Merge "Bind to screenshot service for current user." into jb-mr1-dev
694121c4004e80deec71736481cfb03bd50e38f5 30-Aug-2012 Amith Yamasani <yamasani@google.com> Merge "Fix an NPE in PackageManager when getting the AppInfo for an app" into jb-mr1-dev
317046a08784f0df75165ac1eaaf3d237704618e 30-Aug-2012 Amith Yamasani <yamasani@google.com> Fix an NPE in PackageManager when getting the AppInfo for an app

Bug: 7072043
Change-Id: I37378b13820152434e7b3249e13c27001fe4ae5a
d0dd63dcaed8f63009c03907f38269feb798f305 30-Aug-2012 Jeff Brown <jeffbrown@google.com> Tweak overlay display adapter scaling.

Change-Id: I330fc019c5b3f4e03369e6f1c1a839a33f6ce0e3
12631ec35eafc466e0deef315daa5fdfb5066372 30-Aug-2012 Dianne Hackborn <hackbod@google.com> Merge "Start implementing concept of "running" users." into jb-mr1-dev
ffc45b7d5708e706aeb19454c5172136761d214b 30-Aug-2012 Benoit Goby <benoit@android.com> Merge "UsbDebuggingManager: Fix restart when toggling USB debugging" into jb-mr1-dev
a28c18fc618e4bf58da6417166b1ee249dc16ea9 30-Aug-2012 Irfan Sheriff <isheriff@google.com> Merge "Fix DHCP handling at disconnect/reconnect" into jb-mr1-dev
d5ea3b464795d4e6adbdd174d1bd2f78b628e280 30-Aug-2012 Jeff Brown <jeffbrown@google.com> Merge "Add initial multi-display support." into jb-mr1-dev
509bf2d2cf60201149b4e7711bbcdede8b744791 30-Aug-2012 Benoit Goby <benoit@android.com> UsbDebuggingManager: Fix restart when toggling USB debugging

Change-Id: Iaaec9162b03c4ea77735d096eec670392c61308a
6bfc88876ab575913299b477528225a4d7bf8232 30-Aug-2012 Irfan Sheriff <isheriff@google.com> Fix DHCP handling at disconnect/reconnect

Wifi can have a quick disconnection followed by a reconnection. We used to
create a new DHCP state machine thread for every new connection and
never really waited until it quit after disconnect. This may have lead to
situations where repeated disconnect/reconnects resulted in multiple dhcp
start calls.

We now keep the statemachine after a disconnect and only shut it at supplicant

Bug: 6417686
Change-Id: Icf66efdc654be886e3eb46c81f09f8cce536f2f6
bd6e1500aedc5461e832f69e76341bff0e55fa2b 28-Aug-2012 Jeff Brown <jeffbrown@google.com> Add initial multi-display support.

Split the DisplayManager into two parts. One part is bound
to a Context and takes care of Display compatibility and
caching Display objects on behalf of the Context. The other
part is global and takes care of communicating with the
DisplayManagerService, handling callbacks, and caching
DisplayInfo objects on behalf of the process.

Implemented support for enumerating Displays and getting
callbacks when displays are added, removed or changed.

Elaborated the roles of DisplayManagerService, DisplayAdapter,
and DisplayDevice. We now support having multiple display
adapters registered, each of which can register multiple display
devices and configure them dynamically.

Added an OverlayDisplayAdapter which is used to simulate
secondary displays by means of overlay windows. Different
configurations of overlays can be selected using a new
setting in the Developer Settings panel. The overlays can
be repositioned and resized by the user for convenience.

At the moment, all displays are mirrors of display 0 and
no display transformations are applied. This will be improved
in future patches.

Refactored the way that the window manager creates its threads.
The OverlayDisplayAdapter needs to be able to use hardware
acceleration so it must share the same UI thread as the Keyguard
and window manager policy. We now handle this explicitly as
part of starting up the system server. This puts us in a
better position to consider how we might want to share (or not
share) Loopers among components.

Overlay displays are disabled when in safe mode or in only-core
mode to reduce the number of dependencies started in these modes.

Change-Id: Ic2a661d5448dde01b095ab150697cb6791d69bb5
37ce5c5d5e8216f02230aeb89b147c0395e18329 29-Aug-2012 Benoit Goby <benoit@android.com> UsbDebuggingManager: add missing break in switch

Bug: 7079044
Change-Id: Icf4090e79af47db7d068981537c97f2028d8e405
4e2820c22b3f8b330f8c6d04562037c77845716d 29-Aug-2012 Amith Yamasani <yamasani@google.com> Fix adding live wallpaper in a second user

When the second user downloads a new wallpaper service, Wallpaper
service needs to query the correct user's package state to figure
out if it is available and bind to it.

Change-Id: Ifb95db1c859887f996f5b2e821b4b46510ee7016
c479b55abe059776392af54685b77a825871781e 29-Aug-2012 Craig Mautner <cmautner@google.com> Merge "Check proximity detector before powering off." into jb-mr1-dev
4ccbdd17704e8837f8a8fcc152e8de499b504ff6 29-Aug-2012 Craig Mautner <cmautner@google.com> Check proximity detector before powering off.

Do not automatically power off if the proximity detector wakelock is

Fixes bug 7047455.

Change-Id: I44e30bf388292e5c476dfb5d0de9226d21853e4d
c3815a5679c21a6b09c2deaa6baedd124f9e717a 29-Aug-2012 Amith Yamasani <yamasani@google.com> Merge "Fix PendingIntent caching for multiuser" into jb-mr1-dev
35744c19f6b4e2fc8bbd6fe2c82cea7a76818dfd 29-Aug-2012 Jeff Sharkey <jsharkey@android.com> Bind to screenshot service for current user.

Let apps bindService() across user boundaries if they hold the

Bug: 7012034
Change-Id: I2047d8318e1de47bfae7470d1dbc6fe5cfe44fdc
80a4af2bbc6af42ae605e454bf89558e564f5244 28-Aug-2012 Dianne Hackborn <hackbod@google.com> Start implementing concept of "running" users.

The activity manager now keeps track of which users are running.

Initially, only user 0 is running.

When you switch to another user, that user is started so it is
running. It is only at this point that BOOT_COMPLETED is sent
for that user and it is allowed to execute anything.

You can stop any user except user 0, which brings it back to the
same state as when you first boot the device. This is also used
to be able to more cleaning delete a user, by first stopping it
before removing its data.

There is a new broadcast ACTION_USER_STOPPED sent when a user is
stopped; system services need to handle this like they currently
handle ACTION_PACKAGE_RESTARTED when individual packages are

Change-Id: I89adbd7cbaf4a0bb72ea201385f93477f40a4119
def8b0f011b5b2b02235063d5021ddfd58aa0baf 29-Aug-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix infinite loop when uninstalling apps." into jb-mr1-dev
377de7b13e6706911cca1d6826b2e4665edd60d4 29-Aug-2012 Dianne Hackborn <hackbod@google.com> Fix infinite loop when uninstalling apps.

Change-Id: Ibdf7fa832529a358d1115fc300651101c5185484
2deaa3698d33d428b527329537440ab65ae8dced 29-Aug-2012 rich cannings <richc@google.com> Merge "Add permission checks for Verification API calls" into jb-mr1-dev
4ea60693236d73fa2d9b5bf25deeb6d9b602ed30 28-Aug-2012 Amith Yamasani <yamasani@google.com> Fix PendingIntent caching for multiuser

Store the userId in the PendingIntentRecord.Key, so that it doesn't match
an identical pending intent from another user.

Change-Id: Icfc39e0f717c902dc3a60bdf5283a3402bbd2eaa
7e67151b912622f8a279ab1523a9bcf26ebaff3d 27-Aug-2012 rich cannings <richc@google.com> Add permission checks for Verification API calls

Ensure that only applications with
android.Manifest.permission.PACKAGE_VERIFICATION_AGENT can call application
verification APIs, like PackageManager.verifyPendingInstall and

Bug: 7049083
Change-Id: I5fc28b37e864d67cd319a1ed9d03a90dd15ad052
da6da0907b28d4704aabbdb1bbeb4300954670d1 16-Aug-2012 Irfan Sheriff <isheriff@google.com> Captive portal handling

We now notify the user of a captive portal before switching to the network as default.
This allows background applications to continue to work until the user confirms he
wants to sign in to the captive portal.

Also, moved out captive portal handling out of wifi as a seperate component.

Change-Id: I7c7507481967e33a1afad0b4961688bd192f0d31
10a0df8459d22b29fb9163071e8cbc2bb7194393 28-Aug-2012 Amith Yamasani <yamasani@google.com> Merge "Relax permission requirement for sending broadcasts to other users" into jb-mr1-dev
8bf06edac2088ad100e67dcb00a46d3f0f95c126 28-Aug-2012 Amith Yamasani <yamasani@google.com> Relax permission requirement for sending broadcasts to other users

Also handle USER_CURRENT for broadcasts

Change-Id: I2df5616ac22b7c670a7d007b8d505d4d4d99a24e
dc7d8008eceb08850142fcd77a97404b4fbe688d 28-Aug-2012 Jeff Brown <jeffbrown@google.com> Merge "Add plumbing for new surface flinger display API." into jb-mr1-dev
0e17e5bc43373ff9dd8d567f876a26f990ed638e 28-Aug-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix installing applications from non-primary users." into jb-mr1-dev
786b44046a79d6c4c9cd07f5989d491c7196ad80 28-Aug-2012 Dianne Hackborn <hackbod@google.com> Fix installing applications from non-primary users.

We also now send the correct broadcasts to each user.

You no longer need to be running the shell as root
to be able to create/remove users.

Also added some more man page material to the pm command, and
got rid of a bunch of showUsage() calls that now make error
messages completely buried because of how large the usage info
has become.

And the package manager now shows the user each historical broadcast
was sent to.

Change-Id: Iab42498e1352a0c023069139c80fc04d2d69ab4b
a97ec810e0dd5fe493c1ac08545dcb7a9f93b723 27-Aug-2012 Brian Muramatsu <btmura@google.com> Merge "Remove unused IntentFilter in LocationManager" into jb-mr1-dev
64a55af0ac700baecb0877235eb42caac59a3560 26-Aug-2012 Jeff Brown <jeffbrown@google.com> Add plumbing for new surface flinger display API.

Cleaned up the implementation of Surface and SurfaceSession
to use more consistent naming and structure.

Added JNI for all of the new surface flinger display API calls.

Enforced the requirement that all Surfaces created by
the window manager be named.

Updated the display manager service to use the new methods.

Change-Id: I2a658f1bfd0437e1c6f9d22df8d4ffcce7284ca2
116ee10b95ffff658618be42544ce80971ce28e8 27-Aug-2012 Jeff Sharkey <jsharkey@android.com> Merge "Always-on VPN." into jb-mr1-dev
69ddab4575ff684c533c995e07ca15fe18543fc0 25-Aug-2012 Jeff Sharkey <jsharkey@android.com> Always-on VPN.

Adds support for always-on VPN profiles, also called "lockdown." When
enabled, LockdownVpnTracker manages the netd firewall to prevent
unencrypted traffic from leaving the device. It creates narrow rules
to only allow traffic to the selected VPN server. When an egress
network becomes available, LockdownVpnTracker will try bringing up
the VPN connection, and will reconnect if disconnected.

ConnectivityService augments any NetworkInfo based on the lockdown
VPN status to help apps wait until the VPN is connected.

This feature requires that VPN profiles use an IP address for both
VPN server and DNS. It also blocks non-default APN access when
enabled. Waits for USER_PRESENT after boot to check KeyStore status.

Bug: 5756357
Change-Id: If615f206b1634000d78a8350a17e88bfcac8e0d0
be7ddb9f293076e0c14dc72ea498aced8742b5a9 27-Aug-2012 Andy Stadler <stadler@google.com> Merge "Fix package verifier lookup" into jb-mr1-dev
a84a4af9b11946fe16689cd42741a92ca285ffe9 27-Aug-2012 Amith Yamasani <yamasani@google.com> Merge "Fix adb install" into jb-mr1-dev
2b9146523347d4458d17d99824afdac29e312176 27-Aug-2012 Amith Yamasani <yamasani@google.com> Fix adb install

Was not properly handling creating DefContainerService when the installation was
for USER_ALL. Not a problem for Market installs.

Bug: 7061571
Change-Id: I4528b4c56e38effa137da56460e78c55b242ba45
63dc027be28762232335797a30449995c555ae10 27-Aug-2012 Irfan Sheriff <isheriff@google.com> Merge "Fix permission issue on channel" into jb-mr1-dev
3486b9696d81da8873ef595daa35b2d39fc83146 27-Aug-2012 Craig Mautner <cmautner@google.com> Fix drag bug.

Previous assumption -- that the drag window was defined at time of
DragState construction -- was false. The window, and hence the
Display, is not known until performDrag. This change delays assigning
DragState.mDisplayContent until the window/Display is known.

Fixes bug 7028203.

Change-Id: I5799005652c484ff0c45ab340ce3b9e4b784883e
af18865486df1e23e2951983fb0d1d4bf17f4f32 27-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am ba37d595: am e70a32af: am eb00f951: Merge "VibratorService: Fix to ensure actual delay in a vibrate pattern"

* commit 'ba37d595f70d348987a9e60c56c071fdd319260f':
VibratorService: Fix to ensure actual delay in a vibrate pattern
ba37d595f70d348987a9e60c56c071fdd319260f 27-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am e70a32af: am eb00f951: Merge "VibratorService: Fix to ensure actual delay in a vibrate pattern"

* commit 'e70a32afc5b27ddc9681efd867780a0c4c77edd3':
VibratorService: Fix to ensure actual delay in a vibrate pattern
eb00f951439cd724863d267e8e8d77414383d93f 27-Aug-2012 Jean-Baptiste Queru <jbq@google.com> Merge "VibratorService: Fix to ensure actual delay in a vibrate pattern"
d59db50ab0c3c7a232b2a564e763ca46c6f6ebfa 25-Aug-2012 Jeff Brown <jeffbrown@google.com> Merge "Initialize screen state earlier in the boot process." into jb-mr1-dev
04a286b95528e1fe7c0a18e8780a64bfadbd1eba 25-Aug-2012 Jeff Brown <jeffbrown@google.com> Merge "Fix GpsLocationProvider wake lock book keeping." into jb-mr1-dev
f85ddd6571c9084b76d874f79245d087b152cb67 25-Aug-2012 Jeff Brown <jeffbrown@google.com> Merge "Make it easier to create asynchronous Handlers." into jb-mr1-dev
f75724b3d36d84c881d4052cfd4be766d454c98f 25-Aug-2012 Jeff Brown <jeffbrown@google.com> Initialize screen state earlier in the boot process.

The system depends on receiving reliable vsync signals from
surface flinger during the boot process. If it doesn't get them
because the screen is off then a hang may occur.

This isn't a problem when surface flinger manages the screen
blanking itself but it is a problem for devices that still
rely on early-suspend. When early-suspend is involved, the
screen may be off without surface flinger knowing. This is a
problem because surface flinger will only synthesize fake
vsyncs when it knows the screen is off, otherwise relying
on the hardware to generate vsync signals itself. Unfortunately,
the hardware won't generate vsync signals if the screen was
turned off by early-suspend, so we have a problem.

Bug: 6975688
Change-Id: Iaf4527f716bf4ea72cc3e6fdaf060855697b02f2
028872fe07f9b3468aa1506c658d6aae25f53015 25-Aug-2012 Jeff Brown <jeffbrown@google.com> Fix GpsLocationProvider wake lock book keeping.

The GpsLocationProvider typically acquires a wake lock
before sending a message to its handler then releases it
after the message has been handled.

There were two cases where messages might be removed from
the handler, resulting in the wake lock being released.

There were also two cases where background tasks were being
started while not holding a wake lock for the duration.

Fixed these issues and marked the GpsLocationProvider handler
as asynchronous too so that it doesn't accidentally get
blocked by traversals if it happens to share a thread with some UI.

Bug: 7057752
Change-Id: I8e12fc91ae943e84db068c08ec809879537503c6
a2910d0abbbe18ba1710dfd4a31af45769632255 25-Aug-2012 Jeff Brown <jeffbrown@google.com> Make it easier to create asynchronous Handlers.

There are potentially very many Handlers owned by services
that should not be blocked by barriers introduced by UI traversals
occurring on the same thread (if that ever happens).
Add some convenience constructors to make it easy to switch
these Handlers over to being async.

Bug: 7057752
Change-Id: I64d9bffe81e7c52ada4cfad4e89d4340153f4688
080ca09c7f4c0033d0efece23687b71f7f8febc9 25-Aug-2012 Amith Yamasani <yamasani@google.com> Merge "Bind to the correct default container service when installing/moving/measuring pkgs" into jb-mr1-dev
6ec101288b93d7548ed9ac9169356e7939783813 23-Aug-2012 Amith Yamasani <yamasani@google.com> Bind to the correct default container service when installing/moving/measuring pkgs

Change-Id: I0acfe955b5d57b4985d1922fe3dd841a81c824ed
ba94170a7a4f78d68fe228e9ee35ed82c4de09c8 25-Aug-2012 Dianne Hackborn <hackbod@google.com> Merge "Some clean up of app install and user management." into jb-mr1-dev
4428e17c5e05c0dad76da8f1c28ccba62a66cd91 25-Aug-2012 Dianne Hackborn <hackbod@google.com> Some clean up of app install and user management.

UserManagerService is now closely tied to PackageManagerService,
sharing the same locks. There is no longer direct access of
Installer by UserManagerService, instead the package manager is
back to solely owning it.

Creating a new user now correctly only installs system apps for
that user.

Fixed some misc bugs, where we were getting nulls when
querying content providers and instrumentation in uninstalled
users, incorrect locking, etc.

Change-Id: Ife69b6e373d0cf7c5cfc03fc588e36b43ad5d8b0
250ce285318f9f7d714805e4f859a395ac9615f6 25-Aug-2012 Andy Stadler <stadler@google.com> Fix package verifier lookup

queryIntentReceivers() needs the resolvedType string to be non-null
in order to find the receiver.

Change-Id: If473d7e08e79940c3e495bc7a9d136e4130599a1
595dda6d47a4eeeffc32abbfbc55edfba588d846 24-Aug-2012 Brian Muramatsu <btmura@google.com> Remove unused IntentFilter in LocationManager

This intent filter isn't used anymore, since GpsLocationProvider handles
the CONNECTIVITY_ACTION broadcasts now..

Change-Id: I593a9916aa6f8086b4d684cc3e25286c1cb137cc
0b23b5f6039b3771708c8bc38b342be5f7fb2ee8 24-Aug-2012 Brian Muramatsu <btmura@google.com> Merge "Fix GPS provider thread blocked by NTP and XTRA" into jb-mr1-dev
40e1bafc37e2a83453535132c62aeb7ef706de25 10-Jan-2012 Kevin Tang <zhikait@codeaurora.org> Fix GPS provider thread blocked by NTP and XTRA

Currently, the NTP and XTRA downloads block on the GPS provider thread.
This could potentially block the next tasks for over a minute of time.
If the upcoming task happens to be AGPS, AGPS will time out.

Placed the NTP and XTRA downloads in separate threads.

Bug: 6980618

Change-Id: I57a6aaf5348212bc1246813f6d941da7d5b19136
7767eac3232ba2fb9828766813cdb481d6a97584 24-Aug-2012 Dianne Hackborn <hackbod@google.com> Keep track of whether an app is installed for each user.

This add a new per-user state for an app, indicating whether
it is installed for that user.

All system apps are always installed for all users (we still
use disable to "uninstall" them).

Now when you call into the package manager to install an app,
it will only install the app for that user unless you supply
a flag saying to install for all users. Only being installed
for the user is just the normal install state, but all other
users have marked in their state for that app that it is not

When you call the package manager APIs for information about
apps, uninstalled apps are treated as really being not visible
(somewhat more-so than disabled apps), unless you use the

If another user calls to install an app that is already installed,
just not for them, then the normal install process takes place
but in addition that user's installed state is toggled on.

The package manager will not send PACKAGE_ADDED, PACKAGE_REMOVED,
PACKAGE_REPLACED etc broadcasts to users who don't have a package
installed or not being involved in a change in the install state.
There are a few things that are not quite right with this -- for
example if you go through a full install (with a new apk) of an
app for one user who doesn't have it already installed, you will
still get the PACKAGED_REPLACED messages even though this is
technically the first install for your user. I'm not sure how
much of an issue this is.

When you call the existing API to uninstall an app, this toggles
the installed state of the app for that user to be off. Only if
that is the last user user that has the app uinstalled will it
actually be removed from the device. Again there is a new flag
you can pass in to force the app to be uninstalled for all users.

Also fixed issues with cleaning external storage of apps, which
was not dealing with multiple users. We now keep track of cleaning
each user for each package.

Change-Id: I00e66452b149defc08c5e0183fa673f532465ed5
1552586283f329253edc4786a6cf40c5bb69ea36 24-Aug-2012 Jeff Sharkey <jsharkey@android.com> Merge "Clean up firewall interface method names." into jb-mr1-dev
2c0929850ae495d54efb91a68e4bbd29a2e0ec95 24-Aug-2012 Jeff Sharkey <jsharkey@android.com> Clean up firewall interface method names.

Change-Id: I653f0a01af7c90fc96b201abb31ea8354b036e74
34f863125865664af058ab4dff44ebec570e2234 24-Aug-2012 Jeff Sharkey <jsharkey@android.com> Merge "Migrate legacy VPN arguments to system_server." into jb-mr1-dev
82f8521d386f3109147c477d04e5e90e5c715fa0 24-Aug-2012 Jeff Sharkey <jsharkey@android.com> Migrate legacy VPN arguments to system_server.

Generate the racoon and mtpd daemon arguments in system_server,
instead of accepting them from Settings.

Bug: 5756357
Change-Id: I42c1a644f6add477fe4222342640d7db15982cb8
96702ad6d736fd2b145968843d5d83615b104a16 24-Aug-2012 Jeff Sharkey <jsharkey@android.com> Merge "Framework interface for netd firewall." into jb-mr1-dev
c268f0b19efd0b6c6c89c21be0893787f3cc9cf7 24-Aug-2012 Jeff Sharkey <jsharkey@android.com> Framework interface for netd firewall.

Bug: 5756357
Change-Id: If8b9f738fcea2cf16bd01682220718b57346c7cc
35bbe27d58ccf01ffd170b0f617a568bc843a49e 24-Aug-2012 Irfan Sheriff <isheriff@google.com> Fix permission issue on channel

Change-Id: I57f5d128dc2e2aa3bff93e82456f73cb96851f82
fc6baa834913ec04ed14979341b994f790a53256 24-Aug-2012 Craig Mautner <cmautner@google.com> Merge "Fix unprotected variable access by serializing." into jb-mr1-dev
d5fc86f0677575333556fe579838353fae10ce52 24-Aug-2012 Jeff Sharkey <jsharkey@android.com> Merge "Begin moving VPN to NetworkStateTracker pattern." into jb-mr1-dev
899223b97c9b0ae56a8211a46600914c0ecfd854 05-Aug-2012 Jeff Sharkey <jsharkey@android.com> Begin moving VPN to NetworkStateTracker pattern.

Created base tracker that handles common bookkeeping, and move VPN
to become a tracker. VPN status is now reflected in NetworkInfo, and
is mapped to LegacyVpnInfo.

Legacy VPN now "babysits" any init services it starts, watching for
when they stop unexpectedly.

Bug: 5756357
Change-Id: Iba7ec79da69469f6bd9a970cc39cf6b885b4c9c4
7646c773fab6a12b0727c5e25b8d17d6c5263f8e 24-Aug-2012 rich cannings <richc@google.com> Merge "Allow verifiers to extend timeout" into jb-mr1-dev
d9ef3e5495db1c46bcfcc1a2d4386af8db6deb0c 22-Aug-2012 rich cannings <richc@google.com> Allow verifiers to extend timeout

Create a new verifier API to extend the timeout for a giving package,
including the resulting action (allow or deny) upon the timeout occuring.

Bug: 6901038
Change-Id: I351f7944327f863aff1d7dd1227be74652fa1511
5f7979993979466c79ab4f38d83c6f2aca361662 16-Jun-2012 Fabrice Di Meglio <fdimeglio@google.com> Add support for "-rtl" in resources

- fix bug #7035019 Need to have "-rtl" support for Resource

Change-Id: Ic82145c2ac672729d8a6c695a5f343276a1a0a2c
5642a48fbba84cc0b646aea1b9f407f046b70be9 23-Aug-2012 Craig Mautner <cmautner@google.com> Fix unprotected variable access by serializing.

The variables mKeyguardDisabled and mAllowDisableKeyguard were
being modified unprotected by mKeyguardTokenWatcher. Fix is to
serialize accesses to these variables by only referencing them
from the same Handler that mKeyguardTokenWatcher uses. Eliminates
synchronization blocks and mKeyguardDisabled variable.

Fixes bug 7045624.

Change-Id: I6355aa393507408296316bee61e178dc81e2a172
10fb224623eae3a99a4fc68424eb876eb20c3f90 23-Aug-2012 John Spurlock <jspurlock@google.com> Disable screensavers if below first battery warning level.

Don't activate on sleep if below the threshold, and quit any currently
running dream when the threshold is reached.

Change-Id: I961b350d24ee6f95e502228aaa57312b0ffbadc1
21b53df7c3fc7501c9c9e238eb820a6dcf992650 23-Aug-2012 John Spurlock <jspurlock@google.com> Merge "Add framework support for multiple dreams." into jb-mr1-dev
6715d1effaa70abf261112d2771d4d555cc109c2 23-Aug-2012 Craig Mautner <cmautner@google.com> Merge "Clean up displayId and layerStack usage." into jb-mr1-dev
b47bbc3d80badb94229bc4ce7a2d5006faa9ef15 23-Aug-2012 Craig Mautner <cmautner@google.com> Clean up displayId and layerStack usage.

Make better use of Display object by saving it in DisplayContent.
Only use layerStack when referring to Surfaces. Get displayId from
default Display or default DisplayContent. Remove warnings.

Fixes bug 7038151.

Change-Id: Ie493f0f5e755dc9b91ee969ff561c2a098283ead
2c1dfa29b40a988e3ea8f6922768465743aafddc 23-Aug-2012 Amith Yamasani <yamasani@google.com> Merge "Fix deadlock in removing a user" into jb-mr1-dev
3451dc90648b8bd176030425ce91c019460ba88c 23-Aug-2012 Jeff Sharkey <jsharkey@android.com> Merge "Iteration on multi-user external storage." into jb-mr1-dev
0cd867c83e726c88355375af4d14ee83f3339bbe 23-Aug-2012 Amith Yamasani <yamasani@google.com> Fix deadlock in removing a user

Cleanup PackageManager settings after the package directories are removed.

Change-Id: I264bc95ea21da653a234d7c81df5b25d4de7aa9e
b9b56954ec5a242f7c4945942539106539f98ffb 22-Aug-2012 Craig Mautner <cmautner@google.com> Merge "Eliminate special battery calls by WindowManager" into jb-mr1-dev
2bca868361b41ff6a8228824cbecadc4c5deb44e 22-Aug-2012 Jeff Sharkey <jsharkey@android.com> Iteration on multi-user external storage.

Remove single-user bind mounts, since they need to remain as raw
mounts to correctly propagate when remounted. This means we're back
to using sdcard_r GID to enforce READ_EXTERNAL_STORAGE.

Bug: 6925012
Change-Id: I41b5d7ddc985a5df2e288632a0a80d4724089e00
1a868b7981ca5f52e893fdf9f8f538c9d5ce241d 22-Aug-2012 John Spurlock <jspurlock@google.com> Add framework support for multiple dreams.

Change-Id: I4fba6b8e39dc07af4490c621ac3bc7b3867371b2
6cf3b925ca2640c5c5e7e91ffd91749c0b5b2560 22-Aug-2012 Jeff Brown <jeffbrown@google.com> Merge "Fix auto-brightness adjustment sentinel value." into jb-mr1-dev
5d03a5368119d59e9f58b9121bc4f16391140c73 22-Aug-2012 Jeff Brown <jeffbrown@google.com> Fix auto-brightness adjustment sentinel value.

Change-Id: I1b0da4566eb350333d3c3b09a96266627260baa3
6da92032da255920d2e584f6ba2f8f9336ec9310 22-Aug-2012 Jeff Brown <jeffbrown@google.com> Merge "Fix NPE." into jb-mr1-dev
b5b710a4851db6c7e247429b0551a523c4d33da6 22-Aug-2012 Jeff Brown <jeffbrown@google.com> Fix NPE.

Bug: 7034583
Change-Id: Ie6b436492d12b0dd6bbe1c25d9b7ac35b74095d3
259328c04ce16c554b48a14f68d8af94dc54d7ec 22-Aug-2012 Craig Mautner <cmautner@google.com> Eliminate special battery calls by WindowManager

Previous to this change the WindowManager was notifying the
BatteryDtatsService about windows that keep the screen on. WM used a
custom WakeLock tag to indicate to PowerManagerService that it had
already notified the BatteryStatsService.

This change eliminates WindowManager notifying the BatteryStatsService
and lets PowerManagerService do the job.

Fixes bug 7030326.

Change-Id: I666dc6ef8f094b8d3d109fea6876be058e057b4f
98dddda7912428241ed61c053c7300d4a6702fa7 22-Aug-2012 Amith Yamasani <yamasani@google.com> Merge "Remove permission requirement for some UserManager calls" into jb-mr1-dev
1952637425eece18aa1ce3d80d4b49086ef3bcf7 22-Aug-2012 Amith Yamasani <yamasani@google.com> Remove permission requirement for some UserManager calls

Update javadocs to be explicit about permissions.
Minor fixes in UserManagerService

Change-Id: I0d355e0a60e5dbdb49ed06091111d480ff249f3d
2bd65b61ba6e98496dc574251e06709546d24500 22-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am 29c6f24b: am 6ffe2594: Merge "restorecon /data/anr directory."

* commit '29c6f24b254b4ea1a7d8448980e736355e4badf6':
restorecon /data/anr directory.
29c6f24b254b4ea1a7d8448980e736355e4badf6 22-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am 6ffe2594: Merge "restorecon /data/anr directory."

* commit '6ffe2594674f250c16c5e3055aa69680efaa6f69':
restorecon /data/anr directory.
6ffe2594674f250c16c5e3055aa69680efaa6f69 22-Aug-2012 Jean-Baptiste Queru <jbq@google.com> Merge "restorecon /data/anr directory."
00a8f4ff627584f4d9a8ae0cd83f87786005e16d 22-Aug-2012 Jeff Brown <jeffbrown@google.com> Make the electron beam animation shorter.

Now using about the same duration as it used to have when
it was implemented in Surface Flinger.

Change-Id: I09b28222379f4b6583f1f7b34188cc36c50509e9
aa202a6dc33d331cbd9e34a1bb5f74db6284dda6 22-Aug-2012 Jeff Brown <jeffbrown@google.com> Add a mechanism to adjust auto-brightness at night.

Uses the twilight service to determine the hours of
sunrise and sunset. Shortly after sunset or before sunrise
gradually start to apply a gamma correction factor to the
auto-brightness calculations to make the screen a little
dimmer at night.

The effect is relatively small and is mostly noticeable
in dark rooms. This is just a first pass at the algorithm,
we can tweak the adjustment later to ensure that it has even less
impact in moderate or bright environments.

Change-Id: Idf89022a5d0bb52975e04779352d53fa63371178
2416e09649eb6ab767eba458796e126196c77a34 22-Aug-2012 Jeff Brown <jeffbrown@google.com> Extract the twilight detection into its own service.

Moving the detection out of UiModeManagerService will
make it easy for other services to register for the

Fixed a bugs related to updating twilight state
when the time is updated.

We're using the same algorithm as before for passively
tracking the location. Ideally we should update it
to use the new location manager features for low-power
location requests.

Change-Id: I520c53b9946ab6f8d994587d357fd6542c300c07
ae25108a7b7181bedac11d6b31ff0a64ece729aa 22-Aug-2012 Jeff Brown <jeffbrown@google.com> Merge "Add support for auto-brightness adjust, but leave it disabled." into jb-mr1-dev
330560f53bccd06be805fee1b7988162119d1295 22-Aug-2012 Jeff Brown <jeffbrown@google.com> Add support for auto-brightness adjust, but leave it disabled.

Auto-brightness adjustment applies a gamma correction factor
between 1/3 and 3 depending on the setting. This feature
is disabled for now.

Change-Id: I2b300b5c455da545bea56b2bae5bc7903e30f30e
43c7aae4d0cf9e2d3527b093022ae1fa70d3920f 22-Aug-2012 Brian Muramatsu <btmura@google.com> Merge "Listen for CONNECTIVITY_ACTION in GPS Provider" into jb-mr1-dev
b94b41f516e69e137553157064f9619e1a2188e3 22-Aug-2012 Brian Muramatsu <btmura@google.com> Listen for CONNECTIVITY_ACTION in GPS Provider

Bug: 7020678

The broadcast receiver in GpsLocationProvider now listens for
CONNECTIVITY_ACTION changes. Set the intent filter so that
it catches those actions and updates the network state.

Change-Id: I7efd393dfe2aa8b172dd6701d42ff9ed687648a2
4a81ef8fd3207b06a65709338470d1e6ebed8620 22-Aug-2012 Nick Pelly <npelly@google.com> Merge "Fix some location issues exposed by CTS." into jb-mr1-dev
1332b53522e281012fefb34bfbcc68a03028f516 22-Aug-2012 Nick Pelly <npelly@google.com> Fix some location issues exposed by CTS.

Change-Id: I5859ee2c9db5745b0a3bc8abfa8f08728fb25059
7e877fa00c6b093a0fe734e5d3bf23b5b2d6411e 22-Aug-2012 Craig Mautner <cmautner@google.com> Merge "Fix to allow SYSTEM_UID to display windows." into jb-mr1-dev
a2d7b1117abc23a3ff0ccda15a2f9138aaa7f4fc 22-Aug-2012 Craig Mautner <cmautner@google.com> Fix to allow SYSTEM_UID to display windows.

Was not previously checking to make sure that the appId was not
SYSTEM_UID (1000). This caused certain system windows to fail to

Change-Id: I939dc2f8a256acb84b7c413c7e00003a89aff6d4
de1d96c736730c2a99a225311b9211a34042f9d4 21-Aug-2012 Craig Mautner <cmautner@google.com> Merge "Hide non user app windows from other users." into jb-mr1-dev
23e282554ee0ddff80fd5bd2f47d5fb37b3b02c5 21-Aug-2012 Amith Yamasani <yamasani@google.com> Merge "Multiprocess activity should be allowed to run on current user" into jb-mr1-dev
d4ec5ae504b11aab18fc0e60e7fc142f85aee5c1 21-Aug-2012 Dianne Hackborn <hackbod@google.com> Merge "Improve multi-user app management." into jb-mr1-dev
0c3804950236fe170ebf6cc7a5f1e3e305b8f315 21-Aug-2012 Dianne Hackborn <hackbod@google.com> Improve multi-user app management.

Introduce API to get per-user storage information, keep track
of services associated with users, and various small cleanup.

Change-Id: I5d4e784e7ff3cccfed627d66a090d2f464202634
a10d1aa6c790810990a09f5dfa616075fe198eed 21-Aug-2012 Amith Yamasani <yamasani@google.com> Multiprocess activity should be allowed to run on current user

Multiprocess flag should override singleton checks.

This allows ChooserActivity to run in the process/user that launched it.
Wallpaper chooser from Launcher now works for secondary users.

Change-Id: I17a99278ed2a6d2491c3016a549134a85bc2af00
8eaba6002615f2f89979a50e848c34503fd1e105 21-Aug-2012 Jeff Brown <jeffbrown@google.com> Merge "Disable electron beam on animation." into jb-mr1-dev
256237c99f1d7fc32e025861c3ae7bc855db3c5a 21-Aug-2012 Jeff Brown <jeffbrown@google.com> Merge "Plumb the switch code into Dalvik." into jb-mr1-dev
892f371c6b8c33268dceaeb89ac09c73ad72ad79 21-Aug-2012 Jeff Brown <jeffbrown@google.com> Merge "Encapsulate locks in UEventObservers." into jb-mr1-dev
5356c7dc72e80bbadd0ffbc69cfe3ea333280785 21-Aug-2012 Jeff Brown <jeffbrown@google.com> Disable electron beam on animation.

We want the screen to come back on as soon as possible.

Change-Id: Ifdaa2e88d19590c3da53be985dd886633e5cac59
5338428ddbe662283bf88171c7ca361d51d78da8 21-Aug-2012 Jeff Brown <jeffbrown@google.com> Plumb the switch code into Dalvik.

Bug: 6548391
Change-Id: If0e918669ba27ca0e6561930d4abc427c34de42d
008b1762a8d5c908281a832ff90817ade6c7f9f6 21-Aug-2012 Jeff Brown <jeffbrown@google.com> Encapsulate locks in UEventObservers.

Synchronized methods make me cry so fixing this first before
I introduce any new functionality that could result in a deadlock.

Bug: 6548391
Change-Id: I9c006dc491ce205bfd86acf828dcebda2a63b2ca
4b72463d7cb807912ca359f3b5a160f59d985c1d 21-Aug-2012 Jeff Brown <jeffbrown@google.com> Merge "Add factory test feature to shut off on long press power." into jb-mr1-dev
a5d5d608ccd885d8328879dde782a8cc93b7cf4f 21-Aug-2012 Brian Muramatsu <btmura@google.com> Merge "add wireless charger support" into jb-mr1-dev
9dc52bc44c94854fcd3384a045b4b862e30e25de 06-Aug-2012 Craig Mautner <cmautner@google.com> Hide non user app windows from other users.

When transitioning between old user and new user application windows
from the old user may not be shown because only one user's windows
can be shown at a time.

Change-Id: I4e17b36c9100c9457cc6eb3cb3b77f3a94fa2b41
ca7a9ef0e52216e88d302feacf8edb766d813f5f 21-Aug-2012 Jeff Brown <jeffbrown@google.com> Merge "Adjust auto-brightness time constants." into jb-mr1-dev
3fee5c6bd8e13f8ef7e1ba1df3a8bf56ebb36221 20-Aug-2012 Jeff Brown <jeffbrown@google.com> Merge "Fix some proximity sensor bugs." into jb-mr1-dev
9a538ee7bde42ad36f43edc48594282d98e191a4 20-Aug-2012 Jeff Brown <jeffbrown@google.com> Add factory test feature to shut off on long press power.

Bug: 6847329
Change-Id: I2f4f975c3af2d13ccc06812a5a42e79032700862
7b7feee80331deed883602d5861074ca66293e9c 20-Aug-2012 Benoit Goby <benoit@android.com> Merge "Add UsbDebuggingManager and UsbDebuggingActivity" into jb-mr1-dev
a811e0848dc28f73e31a3f84d8ceca3b1f504b52 20-Aug-2012 rich cannings <richc@google.com> Merge "Pass URLs to package verifiers" into jb-mr1-dev
5f47ba4db739d0db6feb8ce899764dbf87855901 20-Aug-2012 Jeff Brown <jeffbrown@google.com> Adjust auto-brightness time constants.

Specifically, dim a little more slowly.

Change-Id: I10d66a83ddc3a63f8c93d740a0cb116e6c974d10
4e68bd420b6cfdbeadb5e69aa6448665b2da762b 26-Apr-2012 Benoit Goby <benoit@android.com> Add UsbDebuggingManager and UsbDebuggingActivity

The UsbDebuggingManager listens to adbd requests and displays a dialog
when the public key authentification fails, for the user to confirm if it
wants to allow USB debugging from the attached host. If the user chooses
to always allow USB debugging, the UsbDebuggingManager writes the public
key to adbd's config file so that the public key authenfication succeeds
next time.

Change-Id: I115c828331d8e326c380844ee33915d5dff22260
6307a150d374cec7b20f80a68800bbf69f495839 20-Aug-2012 Jeff Brown <jeffbrown@google.com> Fix some proximity sensor bugs.

Forgot to clear waiting for proximity negative flag.
Waiting for proximity negative also shouldn't turn the screen off
if it is currently on.

Change-Id: I9885b2f54b185beb961acda44176bc5f11a9f58b
706e8ba26bf0de19ad5f736516dae40c4c88c2d7 20-Aug-2012 rich cannings <richc@google.com> Pass URLs to package verifiers

This change passes the originating URL and accompanied referrer to
package verifiers, when available.

Bug: 6544677
Change-Id: I9ebc71bc13f549bd88267e444816151a99bda000
d14e17627266ff8cf804d1f8241a0a4bde7a0ab4 20-Aug-2012 Robert Greenwalt <rgreenwalt@google.com> Update TCP buffer size when switching network type

Import of non-merging change 41612 from AOSP

When PDP connects in GSM network, the TCP buffer window size is
set to max 8760. If the phone swicthes to UMTS, the TCP buffer
size is not updated to UMTS, i.e. GPRS buffer size is still
used with limited data transfer spead as a result.
This fix makes sure the TCP buffer size is updated when
switching network type.

Change-Id: Ic44a557677ffe629e83ce1f522a9f058bee6e7b2
2d78fa2d2558dc8c6d6400232c742da7936c6204 20-Aug-2012 Amith Yamasani <yamasani@google.com> am ff7735b0: am a3db5297: Merge "ProviderMap: remove hashmap when entire user specific entries are removed"

* commit 'ff7735b0ee8c3347d0f3cb1866e454be0e9534e2':
ProviderMap: remove hashmap when entire user specific entries are removed
ff7735b0ee8c3347d0f3cb1866e454be0e9534e2 20-Aug-2012 Amith Yamasani <yamasani@google.com> am a3db5297: Merge "ProviderMap: remove hashmap when entire user specific entries are removed"

* commit 'a3db5297cda370ce41db99b6839cd9528c31ef7c':
ProviderMap: remove hashmap when entire user specific entries are removed
ec42c3c35fd4c16e1823cfd0e5b589ed2d205aa7 20-Aug-2012 Craig Mautner <cmautner@google.com> Merge "Ensure that mAllAppWinAnimators is not null." into jb-mr1-dev
bea12bdc2e6d2b1158c1faa58a8197d5e971a817 20-Aug-2012 Craig Mautner <cmautner@google.com> Ensure that mAllAppWinAnimators is not null.

The method showAllWindowsLocked can be called from the layout
side of the WindowManagerService. Previously the AppWindowAnimator
member mAllAppWinAnimators was created on the animation side. If
showAllWindowsLocked was called before the first animation of the
activity an NPE would occur. This fix creates mAllAppWinAnimators
when the AppWindowAnimator is created and also updates it with
current values before calling showAllWindowsLocked.

Fixes bug 6917136.

Change-Id: If3ace22022b65c6888bbb9d0575efe9a45d86475
a3db5297cda370ce41db99b6839cd9528c31ef7c 20-Aug-2012 Amith Yamasani <yamasani@google.com> Merge "ProviderMap: remove hashmap when entire user specific entries are removed"
37a37f445cbcd64376af153dd79ea2a123d9405d 15-Aug-2012 Brian Muramatsu <btmura@google.com> add wireless charger support

bug: 6879638

- add new enum value BATTERY_PLUGGED_WIRELESS
- check for sys online file with contents "Wireless"

Change-Id: I22dc3c40f50573c98643e7b5cbcb237d0216530d
ec7ed14c183a2ab958817694bad53bdc8b05e49e 25-Jul-2012 rpcraig <rpcraig@tycho.ncsc.mil> restorecon /data/anr directory.

Restore the security contexts of anr directory
when initially created.

Change-Id: Ia731414ccbcdc7369d24be6db0003c53abcf6ef4
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
bf5740e75efd87ae0213486e78e029403804c6f0 20-Aug-2012 Jeff Brown <jeffbrown@google.com> Improve display manager debugging.

Change-Id: Iae794fe99a7cf9809f64eafb216091126a2f7e39
98365d7663cbd82979a5700faf0050220b01084d 20-Aug-2012 Jeff Brown <jeffbrown@google.com> Refactor for multi-display support.

Split WindowManagerImpl into two parts, the WindowManager
interface implementation remains where it is but the global
communications with the window manager are now handled by
the WindowManagerGlobal class. This change greatly simplifies
the challenge of having separate WindowManager instances
for each Context.

Removed WindowManagerImpl.getDefault(). This represents the
bulk of this change. Most of the usages of this method were
either to perform global functions (now handled by WindowManagerGlobal)
or to obtain the default display (now handled by DisplayManager).

Explicitly associate each new window with a display and make
the Display object available to the View hierarchy.

Add stubs for some new display manager API features.

Start to split apart the concepts of display id and layer stack.
since they operate at different layers of abstraction.
While it's true that each logical display uniquely corresponds to a
surface flinger layer stack, it is not necessarily the case that
they must use the same ids. Added Display.getLayerStack()
and started using it in places where it was relatively easy to do.

Change-Id: I29ed909114dec86807c4d3a5059c3fa0358bea61
848c2dc93b6795e171f3dd6f64ea0be65e2762ca 20-Aug-2012 Jeff Brown <jeffbrown@google.com> Stub out display manager service implementation.

Reverting to the previous stub as the display adapter registration
and the logical to physical mapping is not at all what we are going
to need moving forward.

Fixed up the service initialization order so that the display manager
service has a context from the start.

Change-Id: I717f2f1099c7a77180ef207c371ec8329258850a
e4c56d9367ae89c705b92e44f327bd1d0132129c 31-Mar-2011 Vairavan Srinivasan <vairav@codeaurora.org> VibratorService: Fix to ensure actual delay in a vibrate pattern

delay might timeout early as value of duration isn't updated
correctly in the loop, should the wait be interrupted, to reflect
the elapsed time. Fix is to update duration in the loop.

Change-Id: I525b0e97799b288f46ae3a056cff7dcc69701bb0
ce777171fce4911f383e838d9019d84520426456 19-Aug-2012 Amith Yamasani <yamasani@google.com> Fixed static wallpaper for multi-user

Earlier assumption that systemui was running in the system process
does not hold true, so running static wallpaper in its own user

Bug: 7008230
Change-Id: I32a128e6bbd8efa7006286330e970bafcf37f05a
fc6e0ca07e599de5229582efe29c4f78eabaa3b8 18-Aug-2012 Amith Yamasani <yamasani@google.com> Fix build part 2

Change-Id: I3b4ed430f214468a22d3b3aaf3605e570cfd0ed1
7fdaa3976d6082bd7e96329240bda478c08b751e 18-Aug-2012 Amith Yamasani <yamasani@google.com> Merge "Save preferred activity info with user id." into jb-mr1-dev
029675e5ad8737a8a097c17d216afb3f11f0b12c 18-Aug-2012 Amith Yamasani <yamasani@google.com> Merge "Fix launching activity from a pending intent" into jb-mr1-dev
2b7a0d00426218523629e4e8dd2e9197d445c09b 18-Aug-2012 Nick Pelly <npelly@google.com> Fix addGeofence() and addProximityAlert().

Need to clear the callers identity before calling into geofence manager
because it in turn calls fused location API's.

Change-Id: I7993b0b8b2a947ff93c37a7c9d29ca0e7c95f9a8
4035f5a7c191a68bc9a5912ce44c43c82e9e5dbf 17-Aug-2012 Nick Pelly <npelly@google.com> Port location blacklist code to MR1.

I had to re-do this change for MR1 because LocationManagerService changed
so much. Here is the original change description:

Add package-name-prefix blacklist for location updates.

The Settings.Secure value locationPackagePrefixBlacklist and
locationPackagePrefixWhitelist contains comma seperated package-name

Location & geo-fence updates are silently dropped if the receiving
package name has a prefix on the blacklist. Status updates are
not affected. All other API's work as before.

A content observer is used so run-time updates to the blacklist
apply immediately. There is both a blacklist and a whitelist.
The blacklist applies first, and then exemptions are allowed
from the whitelist. In other words, if your package name prefix
matches both the black AND white list, then it is allowed.

Bug: 6986553
Change-Id: I1e151e08bd7143e47db005bc3fe9795076398df7
7300dbeba06a85948d63e480da36258d78840b30 17-Aug-2012 Amith Yamasani <yamasani@google.com> Fix launching activity from a pending intent

The creator of the pending intent is the user on which the activity
should be launched.

Change-Id: I733326ed8a5784985ac93a84ce91de4dda17c730
81c304b99d920e8d66ac16332489d78ff7162e12 17-Aug-2012 Amith Yamasani <yamasani@google.com> Merge "Send USER_SWITCHED with the correct permission" into jb-mr1-dev
1ab36c1d83969bab7ef782af11fa1673993b76fa 17-Aug-2012 Amith Yamasani <yamasani@google.com> Send USER_SWITCHED with the correct permission

Forgot to change this from MANAGE_ACCOUNTS to MANAGE_USERS.

Change-Id: Ib07d2ac84c19cef278a0e564676b6200e0f97dd1
a3f133afe885f9e005dfc0584cb7b3b90f75f665 10-Aug-2012 Amith Yamasani <yamasani@google.com> Save preferred activity info with user id.

So each user can have their own set of intent resolution preferences.

ResolverActivity now launches the activity on the correct user, and
persists the preference for the correct user.

Bug: 6961905
Change-Id: I6d3a8a9af89bc649277d4fc8d0f367ee123f8392
c48ee60426a741d0a8e7df7df8af2a9ac24cee85 17-Aug-2012 Robert Greenwalt <rgreenwalt@google.com> am 6626398a: Merge "Fix for updating TCP buffer size when switching network type"

* commit '6626398a72ae592e3a9184c9b0868df0fc1f1724':
Fix for updating TCP buffer size when switching network type
d2ae85d41ec1651dd1bf4c33fe31833ba5c5cff5 17-Aug-2012 Michael Jurka <mikejurka@google.com> Merge "Adding a thumbnail scale down animation" into jb-mr1-dev
6626398a72ae592e3a9184c9b0868df0fc1f1724 17-Aug-2012 Robert Greenwalt <rgreenwalt@google.com> Merge "Fix for updating TCP buffer size when switching network type"
aeca6898041437a7e2ba68c1421b9be90669154d 17-Aug-2012 Nick Pelly <npelly@google.com> Merge "Fix regression from location changes: GPS battery tracking." into jb-mr1-dev
f2033e473aea4bfd0152feee51129fc4748e6f79 17-Aug-2012 Nick Pelly <npelly@google.com> Fix regression from location changes: GPS battery tracking.

The client UID list wasn't being saved, so we never removed
client UID's. As a result apps get blamed for GPS even when
they are no longer using it.

Bug: 7007314
Change-Id: Idff3b7c8c0ee87b99c9bdd7bd20d8391d0b1ac0f
79af1dd54c16cde063152922b42c96d72ae9eca8 17-Aug-2012 Dianne Hackborn <hackbod@google.com> Switch public APIs to use new UserHandle class for identifying users.

Gets rid of "yet another integer" confusion.

Change-Id: Id07ea7307aea7c62f0087c6663a1f1c08e2e5dee
2a00329c6d55c6cd9166e01963d7410e95d80d21 15-Aug-2012 Amith Yamasani <yamasani@google.com> UserHandle to UserSerialNo mapping

Use AtomicFile for usermanager files.

Added a MANAGE_USERS permission that apps (signature permission) can use
to create/query/modify/remove users.

Change-Id: I5cf232232d0539e7508df8ec9b216e29c2351cd9
1968256926a13e8d809256f652073b0532199fd1 17-Aug-2012 Magnus Strandberg <magnus.strandberg@sonymobile.com> Fix for updating TCP buffer size when switching network type

When PDP connects in GSM network, the TCP buffer window size is
set to max 8760. If the phone swicthes to UMTS, the TCP buffer
size is not updated to UMTS, i.e. GPRS buffer size is still
used with limited data transfer spead as a result.
This fix makes sure the TCP buffer size is updated when
switching network type.

Change-Id: Iaa527c84f56cae108f4c7276bbed10552faaff6c
1f3f128ad1744dfbe4108857f322a805b1dc5eb7 17-Aug-2012 Nick Pelly <npelly@google.com> Merge "Add javadoc for new location API's." into jb-mr1-dev
4e31c4fffbc42b4c2b5dca6431cfeef9e078f5b4 14-Aug-2012 Nick Pelly <npelly@google.com> Add javadoc for new location API's.

Change-Id: If15024ee88421c07ba3a174747774fc451fd002e
9a994b5350731b8169a9b25463f57266ee2988fb 17-Aug-2012 Kenny Root <kroot@google.com> am 050c87f8: am a950daf5: Merge changes Ieb566a2a,I953057cd

* commit '050c87f87e2a48c7bc90f5b15fb6e4e37e667286':
Use Libcore's stat instead of FileUtils#getFileStatus
Use Libcore.os.stat instead of FileUtils
050c87f87e2a48c7bc90f5b15fb6e4e37e667286 17-Aug-2012 Kenny Root <kroot@google.com> am a950daf5: Merge changes Ieb566a2a,I953057cd

* commit 'a950daf5c14a0009c2c62e9c3e0e8d51eb0cf7d9':
Use Libcore's stat instead of FileUtils#getFileStatus
Use Libcore.os.stat instead of FileUtils
13c589b66c47aa4d988eecce9a12c39d580939c9 17-Aug-2012 Jeff Brown <jeffbrown@google.com> Animate brightness with electron beam.

Also added an internal flag to control whether the electron beam
on animation is used. It's on for now but we might want to
turn if off if we can't get the HAL to provide the
necessary screen on synchronization on all devices.

Change-Id: Iaa3cfa0fd61de10174e68351e4db890eff2d2918
520ee7bcadafdc5768fa8fc8890199ebe29886da 17-Aug-2012 Kenny Root <kroot@android.com> am a2e8365c: am 9b0da58e: Merge "Introduce a restorecon JNI binding."

* commit 'a2e8365cc883de0d3e56e9f4af350ecfe1b8fc4c':
Introduce a restorecon JNI binding.
a2e8365cc883de0d3e56e9f4af350ecfe1b8fc4c 17-Aug-2012 Kenny Root <kroot@android.com> am 9b0da58e: Merge "Introduce a restorecon JNI binding."

* commit '9b0da58e3a30b760de37138cdd51d20f269c383e':
Introduce a restorecon JNI binding.
786cbcacd2efbd94476eb05a4d5b77211f20d434 16-Aug-2012 Kenny Root <kroot@google.com> Use Libcore.os.stat instead of FileUtils

PackageManagerService just needed to know the owner for this file, so
just use stat instead so we can remove the old JNI code.

This is the last user of FileUtils#getPermissions so just remove the
FileUtils method as well.

Change-Id: I953057cd6b9de4410f33b6f22e4bddff02fe2988
60020e2fa3dd31280ccec91029113f88ee5338c8 17-Aug-2012 Nick Pelly <npelly@google.com> Merge "Improve coarse locations." into jb-mr1-dev
74fa7eabda3d0c1a85e0b568e3fc4230ed4fe7a4 14-Aug-2012 Nick Pelly <npelly@google.com> Improve coarse locations.

Fix a couple of bugs, and modify the behavior of the random offset.

The random offset now slowly changes over time, to mitigate against
applications averaging out the offset over time while at a
grid boundary.

Change-Id: Iecffff29145b8c2b30d1eca1662cf9d3e8cff756
9b0da58e3a30b760de37138cdd51d20f269c383e 16-Aug-2012 Kenny Root <kroot@android.com> Merge "Introduce a restorecon JNI binding."
c584b65b2093396c9a0c9303dab6ff6cb81ac315 16-Aug-2012 Jeff Sharkey <jsharkey@android.com> Merge "Multi-user external storage support." into jb-mr1-dev
ee98610f1af9c12fcb89522cf1795470bec60938 16-Aug-2012 Iliyan Malchev <malchev@google.com> Merge "Set the brightness to zero on screen-off" into jb-mr1-dev
122415f5c813408fe2c7b81e33144f2beff9c3d5 16-Aug-2012 Iliyan Malchev <malchev@google.com> Set the brightness to zero on screen-off

Fixes b/6996990

Ideally, the HWC HAL should turn off the backlight when the display is turned
off. This patch enforces this at the PowerManager, which can guard against
errant HWC implementations.

Change-Id: Ibb826a02871c983f8a68034d010e68abe9c5c1d5
Signed-off-by: Iliyan Malchev <malchev@google.com>
f02b60aa4f367516f40cf3d60fffae0c6fe3e1b8 16-Aug-2012 Dianne Hackborn <hackbod@google.com> Rename UserId to UserHandle.

This is the start of turning this into a formal public API.

Change-Id: I5786d2c320f1de41a06ed5d0f65adb68967287a0
7c964e78993ab1bc93c079e4f75b22ce1ebdec98 16-Aug-2012 Jeff Brown <jeffbrown@google.com> Merge changes I39804ee6,I6a5a7ea2 into jb-mr1-dev

* changes:
Use spline interpolation for auto-brightness.
Add FloatMath.hypot.
e663975055eb1dc0a0da5efffc3c92312b15498e 16-Aug-2012 Jeff Brown <jeffbrown@google.com> Merge "Improve auto-brightness debounce." into jb-mr1-dev
1a30b55036c2279d72ba69cb1107ec5f6f40d5e9 16-Aug-2012 Jeff Brown <jeffbrown@google.com> Use spline interpolation for auto-brightness.

Strictly speaking, this is a change in behavior for all products.
Instead of using discrete zones, they will all now use spline
interpolation. We could make this behavior configurable
but there seems to be little point to it. The range of brightness
values used will be more or less the same as before, it's just
that what used to be the brightness value for all levels within
a particular zone now becomes the brightness value for the
highest level in that zone and lower values are used for lower
levels within the zone.

Change-Id: I39804ee630ba55f018e1e53c0576b28e7bd27931
832cb229cd748505c90f74ae8154fc3557d61a73 13-Apr-2012 Michael Jurka <mikejurka@google.com> Adding a thumbnail scale down animation

Recents animation will temporarily look a bit
wrong, but a subsequent change will fix this.
8809004bc5125d48a1bbfc292509514374cc4fce 16-Aug-2012 Vairavan Srinivasan <vairav@codeaurora.org> ProviderMap: remove hashmap when entire user specific entries are removed

User specific entries in mProvidersByNamePerUser and mProvidersByClassPerUser
isn't cleared when entire user specific providers are removed. Fix is to remove
the user specific hashmap in such cases.

Change-Id: I6edf211ced873e59f3b89ffceb9eceec13ea8f3f
06565b64de1953fc9534f789b2e8b8fd70758979 16-Aug-2012 Jeff Brown <jeffbrown@google.com> Improve auto-brightness debounce.

Change-Id: I045e2a14cb31ff987a22872733c442fc92ebadbf
5b1ada2562c17921adf6a62ea62bcb445160983c 15-Aug-2012 Jeff Sharkey <jsharkey@android.com> Multi-user external storage support.

Emulated external storage always has multi-user support using paths
like "/data/media/<user_id>". Creates and destroys these paths along
with user data. Uses new ensure_dir() to create directories while
always ensuring permissions.

Add external storage mount mode to zygote, supporting both single-
and multi-user devices. For example, devices with physical SD cards
are treated as single-user. Begin migrating to mount mode instead
of relying on sdcard_r GID to enforce READ_EXTERNAL_STORAGE.

Bug: 6925012
Change-Id: I9b872ded992cd078e2c013567d59f9f0032ec02b
a1a1a1d6caddc25c4e249e5b5030d6a3ed861dd9 16-Aug-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #6955586: No navigation bar in landscape on tablets" into jb-mr1-dev
5a052a4d19556700a21286029f37e1cc37f217b1 16-Aug-2012 Dianne Hackborn <hackbod@google.com> Fix issue #6955586: No navigation bar in landscape on tablets

The window manager was telling the activity manager to evaluate
the new configuration when first initializing the display, before
actually setting mDisplay, so it failed creating that first config.

Change-Id: I6e94fcf55b0587ccf15a5fd7ecbe2c9a0c201b96
f6307820c88e694e102824225b9d8caa6de75a30 14-Aug-2012 Yuhao Zheng <yuhaozheng@google.com> CTS test for WiFi watchdog - framework support.

The new WiFi watchdog requires kernel/driver to export some packet loss
counters. This CTS tests whether those counters are correctly exported.

Change-Id: I41999676f8488e86f35f1f8214ce668f1a2b5638
9630704ed3b265f008a8f64ec60a33cf9dcd3345 28-Jul-2012 Jeff Brown <jeffbrown@google.com> Power manager rewrite.

The major goal of this rewrite is to make it easier to implement
power management policies correctly. According, the new
implementation primarily uses state-based rather than event-based
triggers for applying changes to the current power state.

For example, when an application requests that the proximity
sensor be used to manage the screen state (by way of a wake lock),
the power manager makes note of the fact that the set of
wake locks changed. Then it executes a common update function
that recalculates the entire state, first looking at wake locks,
then considering user activity, and eventually determining whether
the screen should be turned on or off. At this point it may
make a request to a component called the DisplayPowerController
to asynchronously update the display's powe state. Likewise,
DisplayPowerController makes note of the updated power request
and schedules its own update function to figure out what needs
to be changed.

The big benefit of this approach is that it's easy to mutate
multiple properties of the power state simultaneously then
apply their joint effects together all at once. Transitions
between states are detected and resolved by the update in
a consistent manner.

The new power manager service has is implemented as a set of
loosely coupled components. For the most part, information
only flows one way through these components (by issuing a
request to that component) although some components support
sending a message back to indicate when the work has been
completed. For example, the DisplayPowerController posts
a callback runnable asynchronously to tell the PowerManagerService
when the display is ready. An important feature of this
approach is that each component neatly encapsulates its
state and maintains its own invariants. Moreover, we do
not need to worry about deadlocks or awkward mutual exclusion
semantics because most of the requests are asynchronous.

The benefits of this design are especially apparent in
the implementation of the screen on / off and brightness
control animations which are able to take advantage of
framework features like properties, ObjectAnimator
and Choreographer.

The screen on / off animation is now the responsibility
of the power manager (instead of surface flinger). This change
makes it much easier to ensure that the animation is properly
coordinated with other power state changes and eliminates
the cause of race conditions in the older implementation.

The because of the userActivity() function has been changed
so that it never wakes the device from sleep. This change
removes ambiguity around forcing or disabling user activity
for various purposes. To wake the device, use wakeUp().
To put it to sleep, use goToSleep(). Simple.

The power manager service interface and API has been significantly
simplified and consolidated. Also fixed some inconsistencies
related to how the minimum and maximum screen brightness setting
was presented in brightness control widgets and enforced behind
the scenes.

At present the following features are implemented:

- Wake locks.
- User activity.
- Wake up / go to sleep.
- Power state broadcasts.
- Battery stats and event log notifications.
- Dreams.
- Proximity screen off.
- Animated screen on / off transitions.
- Auto-dimming.
- Auto-brightness control for the screen backlight with
different timeouts for ramping up versus ramping down.
- Auto-on when plugged or unplugged.
- Stay on when plugged.
- Device administration maximum user activity timeout.
- Application controlled brightness via window manager.

The following features are not yet implemented:

- Reduced user activity timeout for the key guard.
- Reduced user activity timeout for the phone application.
- Coordinating screen on barriers with the window manager.
- Preventing auto-rotation during power state changes.
- Auto-brightness adjustment setting (feature was disabled
in previous version of the power manager service pending
an improved UI design so leaving it out for now).
- Interpolated brightness control (a proposed new scheme
for more compactly specifying auto-brightness levels
in config.xml).
- Button / keyboard backlight control.
- Change window manager to associated WorkSource with
KEEP_SCREEN_ON_FLAG wake lock instead of talking
directly to the battery stats service.
- Optionally support animating screen brightness when
turning on/off instead of playing electron beam animation

Change-Id: I1d7a52e98f0449f76d70bf421f6a7f245957d1d7
ff7e6ef4f18ff94a9836492ff3ccd1ba7f6804f3 15-Aug-2012 Jeff Brown <jeffbrown@google.com> Apply ValueAnimator scale factor immediately in WM.

Normally the ValueAnimator scale factor is applied the first
time a ViewRootImpl window session is created but that may
be too late for animators created by system services that
start early in the boot process. So set the scale factor
immediately whenever the setting changes.

Also make ValueAnimator.getDurationScale() accessible (but @hide)
for custom animators that want to apply the same scale to
their animations.

Change-Id: I0f5a750ab5b014f63848445435d8dca86f2a7ada
f363dfd26c304bca33f12065a9ed3de291193962 16-Feb-2012 Johan Viktorsson <johan.viktorsson@sonymobile.com> Added check of ActivityInfo launch mode when starting activity.

When starting a singleTop activity from a singleInstance activity,
the onNewIntent() callback was not called when expected. The
reason for this was that only the launchMode specified on the
intent was checked and not the launchMode specified in the manifest.

Fixes issue 17137.

Change-Id: I1a9bc1007d6f5145bf93a6161534732bf5214b7a
58de1427c313e0debf2a929931e8c4065d4d46c5 14-Aug-2012 Matthew Xie <mattx@google.com> Merge "Implement enableNoAutoconnect()" into jb-mr1-dev
fffa86ba834d37684238c83c0dd081133324984d 09-Aug-2012 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Implement enableNoAutoconnect()

Adding enableNoAutoconnect() API support in Bluetooth service
to let BT enable in quiet mode

Change-Id: I546f3ceb298082a9c9a698f406379470e3cc0d4f
510cff946874b8408664c86f9935d6a38f770e82 14-Aug-2012 Mike Lockwood <lockwood@google.com> am f02354e2: am 9064a483: Merge "Added missing USB_DEVICE_ATTACHED broadcast to running Activity"

* commit 'f02354e208ec7b7e0dee68e12c0b5cde86a0f20a':
Added missing USB_DEVICE_ATTACHED broadcast to running Activity
f02354e208ec7b7e0dee68e12c0b5cde86a0f20a 14-Aug-2012 Mike Lockwood <lockwood@google.com> am 9064a483: Merge "Added missing USB_DEVICE_ATTACHED broadcast to running Activity"

* commit '9064a48365c131ef5f64b26ab33dd40a7d1246a7':
Added missing USB_DEVICE_ATTACHED broadcast to running Activity
9064a48365c131ef5f64b26ab33dd40a7d1246a7 14-Aug-2012 Mike Lockwood <lockwood@google.com> Merge "Added missing USB_DEVICE_ATTACHED broadcast to running Activity"
bf7d222011bcb417a2d6ab0f086b25e1608445cb 14-Aug-2012 Christopher Tate <ctate@google.com> Merge "Don't back up / restore non-primary users' data" into jb-mr1-dev
aac71ff465399251fa8e830407f2917b986988d9 14-Aug-2012 Christopher Tate <ctate@google.com> Don't back up / restore non-primary users' data

For now only the device owner "user" gets cloud backups. Also, only the
device owner account has access to local backup/restore.

Bug 6956438

Change-Id: I87d7ba5969e606c23f4214469f9bf2fd47a6c61b
1866f68dfe35da46995e5f2321f33e8fee44bcf8 14-Aug-2012 Dianne Hackborn <hackbod@google.com> Merge "Modify how the background process LRU list is handled." into jb-mr1-dev
f88dd0b32ea2042eb2011170be465259a21d2563 09-Aug-2012 Dianne Hackborn <hackbod@google.com> Small service cleanup.

Get rid of duplication between find/retrieve service funcs; when
a service in a persistent process crashes, restart it immediately
since the persistent process is going to be immediately restarted
anyway; when a new process is attaching, immediately restart any
services associated with it that are waiting to restart, since
it is weird to not let them run if the process comes back for some
other reason.

Change-Id: Id087fe04ebf2b6a4bd00732796c8326364765ea7
ee7621c0f5de6eca2cfb9fb2b6117fb61e13cc41 14-Aug-2012 Dianne Hackborn <hackbod@google.com> Modify how the background process LRU list is handled.

A long time ago, we had a concept of an "empty" process -- this was
a process that didn't have any interesting components in it, which
would be placed below everything else in the LRU list.

Empty processes didn't work out well, because you could get into
bad situations where you have filled your LRU list with things that
have hidden activities, pushing empty processes to the bottom and
being immediately killed as soon as they go into the list. So this
was removed.

This change brings the concept back, but in a slightly different
form, to address a more specific problem: for people who are switching
between N different applications, we would like to try to keep those
activities available in RAM in a consistent manner. Currently the
previous activities would be killed often quickly and suprisingly,
even on devices with lots of RAM. This is for two reasons:

(1) As you sit in one application, other things going on in the
background will go to the top of the LRU list, pushing down the
previous apps you have visited, even though you aren't aware at all
of these other things executing.
(2) There is a hard limit on the number of background processes
(currently 16) after which they are killed regardless of the amount
of available RAM. This is desireable because if there is lots of
RAM we can end up with tons and tons of processes sitting around,
not really serving any purpose, but using up resources.

To improve the situation, we have again a concept of "empty" processes
but now it means one with no activities. Processes that aren't empty
but in the background list are called hidden. We maintain these as
two parallel lists, each getting half of the process limit: so with
a 16 process limit, you can have at most 8 empty and 8 hidden processes.

This allows us to consistently keep up to 8 recent applications around
for fast app switching; we will also keep around 8 other processes to
make it more efficient for background work to execute again if it needs

Change-Id: Iee06e45efc20787da6a1e50020e5421c28204bd7
7be1a3d67c32d73b20e30e85084f07c609617762 13-Aug-2012 John Spurlock <jspurlock@google.com> Stop screensaver on incoming phone call.

Use notification manager as an indicator of when to stop the screensaver
due to immediately-needed user interaction.

Any notification with a fullScreenIntent will now exit the screensaver.

Bug: 6976796
Change-Id: Id91cd4c32f3fad018b56f4dfe24b37110bab32d8
38cc2a5a3ad076fbbb0824a91f49730a4297549b 13-Aug-2012 Kenny Root <kroot@google.com> am 3221bf27: am 438a0efc: Do not eject internal ASECs when storage unmounted

* commit '3221bf27ff6b8eebf360ed2496ad5c56b95fd689':
Do not eject internal ASECs when storage unmounted
3221bf27ff6b8eebf360ed2496ad5c56b95fd689 13-Aug-2012 Kenny Root <kroot@google.com> am 438a0efc: Do not eject internal ASECs when storage unmounted

* commit '438a0efcfbee5dc953e8e5bbdf4cb3dbe94b3f80':
Do not eject internal ASECs when storage unmounted
438a0efcfbee5dc953e8e5bbdf4cb3dbe94b3f80 09-Aug-2012 Kenny Root <kroot@google.com> Do not eject internal ASECs when storage unmounted

If the incoming request is to notify of storage unmounted, don't mess
with apps that are in internal ASECs.

Bug: 6948035
Change-Id: I63ffb895c4d994ee03a5a9bd6bb23f69c88e2a87
258848d2ae04f447ff1c18023fa76b139fcc0862 11-Aug-2012 Amith Yamasani <yamasani@google.com> User Manager service to manage users and query user details

Moved a bunch of methods from PackageManager to UserManager.

Fix launching of activities from recents to correct user.

Guest creation APIs

Change-Id: I0733405e6eb2829675665e225c759d6baa2b708f
75f0fac91bd7fa67fa76cfdd4e163b9f35be0432 11-Aug-2012 Nick Pelly <npelly@google.com> Merge "Fix a couple of bugs from the location overhaul." into jb-mr1-dev
08ca1046fe4f1890f91241f8d082a024ef6cfd93 11-Aug-2012 Nick Pelly <npelly@google.com> Fix a couple of bugs from the location overhaul.

Marshall LocationRequest array correctly.

Observe reportLocation from FusionEngine.

Actually deliver the setRequest message to fusion engine.

Change-Id: Iff64596fdd42f9fb06e563591dda9fbe0241533a
77b257967de44e031c313858a45fccdd6e89732f 11-Aug-2012 Ashish Sharma <ashishsharma@google.com> Merge "Setup idletimer for network interface." into jb-mr1-dev
0412423f06ec633203b96f68b51f0720c33a2473 29-Jun-2012 Haoyu Bai <bhy@google.com> Setup idletimer for network interface.

Cherry-picked from commit f71ca8a5728e425de61ba794c9653dd0b04f16e3 in
master. DO NOT MERGE

Change-Id: I6101c7ae041b4cc1237ce7a9983753dbdfa301d3
6fa9ad4afcd762aea519ff61811386c23d18ddb2 16-Jul-2012 Nick Pelly <npelly@google.com> Location overhaul, major commit.

Themes: Fused Location, Geofencing, LocationRequest.

API changes
o Fused location is always returned when asking for location by Criteria.
o Fused location is never returned as a LocationProvider object, nor returned
as a provider String. This wouldn't make sense because the current API
design assumes that LocationProvider's have fixed properties (accuracy, power
o The fused location engine will tune itself based on the criteria passed
by applications.
o Deprecate LocationProvider. Apps should use fused location (via Criteria
class), instead of enumerating through LocationProvider objects. It is
also over-engineered: designed for a world with a plethora of location
providers that never materialized.
o The Criteria class is also over-engineered, with many methods that aren't
currently used, but for now we won't deprecate them since they may have
value in the future. It is now used to tune the fused location engine.
o Deprecate getBestProvider() and getProvider().
o Add getLastKnownLocation(Criteria), so we can return last known
fused locations.
o Apps with only ACCESS_COARSE_LOCATION _can_ now use the GPS, but the location
they receive will be fudged to a 1km radius. They can also use NETWORK
and fused locatoins, which are fudged in the same way if necessary.
o Totally deprecate Criteria, in favor of LocationRequest.
Criteria was designed to map QOS to a location provider. What we
really need is to map QOS to _locations_.
The death knell was the conflicting ACCURACY_ constants on
Criteria, with values 1, 2, 3, 1, 2. Yes not a typo.
o Totally deprecate LocationProvider.
o Deprecate test/mock provider support. They require a named provider,
which is a concept we are moving away from. We do not yet have a
replacement, but I think its ok to deprecate since you also
need to have 'allow mock locations' checked in developer settings.
They will continue to work.
o Deprecate event codes associated with provider status. The fused
provider is _always_ available.
o Introduce Geofence data object to provide an easier path fowards
for polygons etc.

Implementation changes
o Fused implementation: incoming (GPS and NLP) location fixes are given
a weight, that exponentially decays with respect to age and accuracy.
The half-life of age is ~60 seconds, and the half-life of accuracy is
~20 meters. The fixes are weighted and combined to output a fused
o Move Fused Location impl into
o Refactor Fused Location behind the IProvider AIDL interface. This allow us
to distribute newer versions of Fused Location in a new APK, at run-time.
o Introduce ServiceWatcher.java, to refactor code used for run-time upgrades of
Fused Location, and the NLP.
o Fused Location is by default run in the system server (but can be moved to
any process or pacakge, even at run-time).
o Plumb the Criteria requirements through to the Fused Location provider via
ILocation.sendExtraCommand(). I re-used this interface to avoid modifying the
ILocation interface, which would have broken run-time upgradability of the
o Switch the geofence manager to using fused location.
o Clean up 'adb shell dumpsys location' output.
o Introduce config_locationProviderPackageNames and
config_overlay_locationProviderPackageNames to configure the default
and overlay package names for Geocoder, NLP and FLP.
o Lots of misc cleanup.
o Improve location fudging. Apply random vector then quantize.
o Hide internal POJO's from clients of com.android.location.provider.jar
(NLP and FLP). Introduce wrappers ProviderRequestUnbundled and
o Introduce ProviderProperties to collapse all the provider accuracy/
bearing/altitude/power plumbing (that is deprecated anyway).
o DELETE lots of code: DummyLocationProvider,
o Rename the (internal) LocationProvider to LocationProviderBase.
o Plumb pid, uid and packageName throughout
LocationManagerService#Receiver to support future features.

TODO: The FLP and Geofencer have a lot of room to be more intelligent
TODO: Documentation
TODO: test test test

Change-Id: Iacefd2f176ed40ce1e23b090a164792aa8819c55
14262d79c42072b01d8beccc3a0d688938da4214 10-Aug-2012 Brian Muramatsu <btmura@google.com> Merge "Control GPS logging with property" into jb-mr1-dev
1715cb36d9231f08f244ec6c0a373f1a46d66cc7 09-Aug-2012 Brian Muramatsu <btmura@google.com> Control GPS logging with property

This allows users of the PDK to debug GPS issues.

Change-Id: I4aff12e124f4264abd1a0be012df4c431044189c
c5bfe1962626ec73ce8dac67ab26bad96637e2f1 10-Aug-2012 John Spurlock <jspurlock@google.com> Merge "Fix screen timeout determination for starting dream." into jb-mr1-dev
b9ba2b6768063b4a4135143bc5b6219fb9b3b22f 09-Aug-2012 John Spurlock <jspurlock@google.com> Fix screen timeout determination for starting dream.

It turns out OFF_BECAUSE_OF_TIMEOUT is not the best indicator
of actual screen timeout.

For example, it is the reason passed down when acquiring a wake lock.
This was causing us to launch Dreams in the wrong situations, and
deadlocking on calls to WindowManager.

This fix simply adds an additional check ensuring the intention is to
turn the screen off.

Change-Id: If8adff446b5b1fcb19424b45878b75bfd0552b90
2c02933b13b426637808d3d4fd57aea1ff11011a 09-Aug-2012 Amith Yamasani <yamasani@google.com> Merge "Send BOOT_COMPLETED to all users." into jb-mr1-dev
015b9f45d4cfa1e9764d7fbd6142ee612b2ea628 09-Aug-2012 Daniel Sandler <dsandler@android.com> Fix the dock-insertion Dream entry codepath.

Bug: 6956040
Change-Id: I663e13f8a28db13b94d0f5aa4dbcf0cd64ef22fe
4860cfc68464ebdcc391324518772c79f047597f 09-Aug-2012 Amith Yamasani <yamasani@google.com> Send BOOT_COMPLETED to all users.

At least until we have a concept of logged-in users.

Change-Id: I65e3bed2aeef9692dbc64169cf02a7451cfed1cd
8264408f5995534f8e3147b001664ea0df52aaa5 03-Aug-2012 Amith Yamasani <yamasani@google.com> Start the correct settings from the status bar.

Added a new method to Context: startActivityAsUser() requiring the

Show the correct Recents list, based on current user.
Added a getRecentTasksForUser() in ActivityManager. Hidden and requires

Change-Id: If5b56465efdd3ead36601a3b51ed4af157bbf35c
fb11ffa2a04f0a6b1291cd7ffc68032fcc322312 09-Aug-2012 Jeff Sharkey <jsharkey@android.com> Merge "Isolate NetworkStateTracker creation, test." into jb-mr1-dev
fb878b66b9456f8fee2bcb1076263852d207949d 27-Jul-2012 Jeff Sharkey <jsharkey@android.com> Isolate NetworkStateTracker creation, test.

Change ConnectivityService to use a factory when creating
NetworkStateTrackers, which gives us a good place to inject mocks
for testing. Add initial tests to verify that network routes are
added and removed as networks changed.

Change-Id: I11cbc61a84c2ed4afa2670036295b1494eab26e1
82f479d0647855148af84fe2ba5484cb188c92cc 09-Aug-2012 Jeff Sharkey <jsharkey@android.com> Merge "Cleaner controls between Vpn and init services." into jb-mr1-dev
a56d9cecee8a34e0554770ac6253dd3a76b9199c 08-Aug-2012 Rich Cannings <richc@google.com> Merge "Revert "Pass URLs to package verifiers"" into jb-mr1-dev
5017f2328407447002ab2d0cae1fe8ef87c50501 28-Jul-2012 Jason Simmons <jsimmons@google.com> Call systemReady on the lock settings before doing so on the window manager

At systemReady time, the window manager needs to obtain values from the lock
settings service (e.g. whether the lock screen is disabled). During the
initial boot of a wiped device, the window manager was getting the wrong
values because LockSettingsService.systemReady/migrateOldData had not yet been

Change-Id: I60825d0e4fad53a5b4349dabf9e5e299b863d0d0

(cherry pick of 2458abaf6676d5015af733c1010ecd67a085e9e2 from jb-aah-dev)
e1d7c711df3e3a2d2f195457882aa4ddb5626167 08-Aug-2012 Rich Cannings <richc@google.com> Revert "Pass URLs to package verifiers"

This reverts commit 24713907fe4632d263aea82f7a35c8fb08918a09

Change-Id: Ie04ba73475b813635c4a74915c45e83250801b6b
537915828b45693e846a126292e026c5b4f05152 08-Aug-2012 Dianne Hackborn <hackbod@google.com> Merge "More mult-user API work." into jb-mr1-dev
786546eaccfc7a284b90b077f505cf42206c6f5f 08-Aug-2012 John Spurlock <jspurlock@google.com> Check the ACTIVATE_ON_DOCK setting in DockObserver.

Otherwise docking the device will always launch a Dream.

Change-Id: I2e74ca62f80d7e386d11c00920a75a5a6e78926c
7d19e0242faac8017033dabb872cdf1542fa184c 08-Aug-2012 Dianne Hackborn <hackbod@google.com> More mult-user API work.

- You can now use android:singleUser with receivers and providers.
- New API to send ordered broadcasts as a user.
- New Process.myUserHandle() API.

For now I am trying out "user handle" as the name for the numbers
representing users.

Change-Id: I754c713ab172494bb4251bc7a37a17324a2e235e
85b1041f891b4bbfe81e4f6423397fca50c14e5b 07-Aug-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Window position not reported if the window is not moved." into jb-mr1-dev
758143ecfedbe08cc6c4fed0ad8ad7a854194ca4 07-Aug-2012 Svetoslav Ganov <svetoslavganov@google.com> Window position not reported if the window is not moved.

1.If a window is shown but never moved the window window
is never notified for its current location. Therefore,
accessibility nodes do not contain correct bounds in
screen coordinates.


Change-Id: I7df18b095d33ecafffced75aba9e4f4693b0c393
3c91724e7a8850df41a00fe4829a4d69d6ba9094 07-Aug-2012 Dianne Hackborn <hackbod@google.com> Merge "Refactor Service code out of main ActivityManagerService class." into jb-mr1-dev
599db5c85faa5733af538a712b870e1f507cd380 04-Aug-2012 Dianne Hackborn <hackbod@google.com> Refactor Service code out of main ActivityManagerService class.

Change-Id: I83ade73b48e8fda1ad413634c1eb0dba2a545ca7
088f29f55eebc6862a4cb5dddeaefacf24f74d95 05-Aug-2012 Jeff Sharkey <jsharkey@android.com> Cleaner controls between Vpn and init services.

Change-Id: I35edf054f4a1190f7fb7b4c48ee832e899c9528b
4e4306ab14f1f2125035ed43fbb021db8bc99c3f 06-Aug-2012 Jeff Sharkey <jsharkey@android.com> Merge "Include network type that caused broadcast." into jb-mr1-dev
75fbb4bdfde9188081f000506845d852f31362f0 06-Aug-2012 Jeff Sharkey <jsharkey@android.com> Include network type that caused broadcast.

Network type can be obtained through EXTRA_NETWORK_INFO, but offer
it as first-class extra since the returned NetworkInfo is deprecated.

Bug: 6936247
Change-Id: Ief59577afd2bd930f0f4c5650b413feef86bfbc3
bec1d13da2ef3c8c2c4cc4f740474d095068bd8b 05-Aug-2012 Jeff Sharkey <jsharkey@android.com> Merge "Make generic BaseNetworkObserver." into jb-mr1-dev
9c5c65959790bdceda384f87cf457bc7f9c2d433 05-Aug-2012 Jeff Sharkey <jsharkey@android.com> Merge "Make LocalSocket Closeable." into jb-mr1-dev
216c181e76ee11a47a0b2a180f9af96740ab38ad 05-Aug-2012 Jeff Sharkey <jsharkey@android.com> Make generic BaseNetworkObserver.

This makes it easier to add new INetworkManagementEventObserver events
in future.

Change-Id: I432263d745558de4b878f313c1951230ed9db2b1
065b299df4159602327977dd007cb2cd6b64ab20 05-Aug-2012 Jeff Sharkey <jsharkey@android.com> Make LocalSocket Closeable.

Enables usage of IoUtils.closeQuietly().

Change-Id: I91126297c1f235ae9da09f82d8f4f22db46558eb
2e5746a7a807c6d9d61af48978695214ef9d6717 04-Aug-2012 Dianne Hackborn <hackbod@google.com> Merge "We can now (kind-of) change screen density on the fly." into jb-mr1-dev
dde331cebd87982faded6818ad5f9927ff994c96 03-Aug-2012 Dianne Hackborn <hackbod@google.com> We can now (kind-of) change screen density on the fly.

Preloaded drawables now have a density associated with them, so we
can load the correct drawable if we are using a different density.

Window manager now formally keeps track of the density for each
screen, allowing it to be overridden like you can already do with
size, and relies on this density to drive itself internally and
the configurations it reports.

There are a new set of Bitmap constructors where you provide a
DisplayMetrics so they can be constructed with the correct density.
(This will be for when you can have different windows in the same
app running at different densities.)

ActivityThread now watches for density changes, and pushes them
to the DENSITY_DEVICE and Bitmap global density values for that

A new am command allows you to change the density.
0b24b1d37a955a0674a31d4da9ee1d0357a1d7f8 03-Aug-2012 Jeff Sharkey <jsharkey@android.com> Merge "Pass changed NetworkInfo to LocationProvider." into jb-mr1-dev
821bd8081a3a02de946af7a5c2ab52cdc3e48c4e 03-Aug-2012 Jeff Sharkey <jsharkey@android.com> Pass changed NetworkInfo to LocationProvider.

LocationProviders often rely on non-default networks, so pass the
network that actually changed, instead of the default.

Bug: 6929692
Change-Id: I31d9eec792e07259282aa1bb57ec66c01962df64
3185b376b0b9b8c393fb8300b18df441a3481ad0 03-Aug-2012 John Spurlock <jspurlock@google.com> Merge "Re-enable dreams: frameworks/base" into jb-mr1-dev
7de53949bc89e1e79ed63d730beaa49f838038b6 03-Aug-2012 Craig Mautner <cmautner@google.com> Merge "Add features to DisplayManager." into jb-mr1-dev
bc632a28e4fba4a659baf39b9fd3d06d10cfda97 31-Jul-2012 John Spurlock <jspurlock@google.com> Re-enable dreams: frameworks/base

Enable feature in config. Expose Dream in public api for unbundled apps.
Unhide package. Add isDreaming() method to service.

Re-arrange the Dream api a bit. (use onStart as hook for subclasses).
Coordinate properly with power manager.

Replace old dock mode (don't fire old intent).

Change-Id: I1318d20cc1613e5d862f2913f2fcdc9719302cf7
Bug: 6921930
329465c6b2407ee086a171cac1a3581f83dbb048 03-Aug-2012 Dianne Hackborn <hackbod@google.com> Merge "Add APIs for interacting across users." into jb-mr1-dev
b4163a6e12ee7100c758c6d3d062ade1f2843fce 03-Aug-2012 Dianne Hackborn <hackbod@google.com> Add APIs for interacting across users.

- Expose the existing Context.sendBroadcast() as
- Add new android:singleUser attribute for services.
- Add new INTERACT_ACROSS_USERS_FULL permission for full
system-level access to cross-user interface (allows
sendBroadcastAsUser() to send to any receiver).
- Add new INTERACT_ACROSS_USERS_FULL permission for
more restricted cross-user interaction: this is required
for android:singleUser, and allows you to use
sendBroadcastAsUser() but only to send to your own

Change-Id: I0de88f6718e9505f4de72e3f45d29c0f503b76e9
f95f3ebf12bf9ee23b8ed4e940ab007cbc22f3f3 02-Aug-2012 Jeff Brown <jeffbrown@google.com> Merge "Allow access to display manager service from isolated processes." into jb-mr1-dev
e7c1d88fba71122038d516d3b758d68f9f92fa64 02-Aug-2012 Jeff Brown <jeffbrown@google.com> Allow access to display manager service from isolated processes.

Bug: 6921302
Change-Id: I9eed4a24992538e18ad0540b96a8cea2c8a9ef76
9de4936c99b979f6010440b043edc6d6142d1980 02-Aug-2012 Craig Mautner <cmautner@google.com> Add features to DisplayManager.

Added Surface.setDisplayId().
Added callbacks to DisplayManagerService.

Change-Id: Idd3f85f8ca1f1208962f1196efd6a3ab51c8c259
2a642a450a07dfdb94d897ef06d2348855dcc431 02-Aug-2012 Craig Mautner <cmautner@google.com> Merge "Refactor DisplayManagerService to be functional." into jb-mr1-dev
24713907fe4632d263aea82f7a35c8fb08918a09 26-Jul-2012 rich cannings <richc@google.com> Pass URLs to package verifiers

This change passes the originating URL and accompanied referrer to
package verifiers, when available.

Bug: 6544677
Change-Id: If9ff6663ad7f3426b7aea2aceb1413b689788138
4f67ba6ba4e861b287a3ff0323c107aa77f66264 02-Aug-2012 Craig Mautner <cmautner@google.com> Refactor DisplayManagerService to be functional.

Change-Id: Ieac1eca172be5dc5db45302d3afa26188acd4d6d
437a0fbd57662e1d9d260da6f62ff83da2769a7e 02-Aug-2012 Craig Mautner <cmautner@google.com> Merge "Introduce multiple displays with DisplayContent." into jb-mr1-dev
59c009776dae5ccbdfb93d7151ff2065ca049dc3 30-Jul-2012 Craig Mautner <cmautner@google.com> Introduce multiple displays with DisplayContent.

Fix a couple of bugs that turned up.
Remove touch/focus from display. Add iterators for access.
Respond to comments. Remove TODOs, and some deviceId parameters.

Change-Id: Idcdb4f1979aa7b14634d450fd0333d6eff26994d
908aecc3a63c5520d5b11da14a9383f885b7d126 01-Aug-2012 Dianne Hackborn <hackbod@google.com> Start moving away from DisplayMetrics.DENSITY_DEVICE.

This puts in most of the infrastructure needed to allow us to
switch between different densities at run time. The main remaining
uses of the global are to initialize the Bitmap object (not sure
what to do about that since it doesn't have anything passed in
the constructor to get this information from), and being able to
load drawables if we need a different density than what was preloaded
by zygote.

Change-Id: Ifdbfd6b7a5c59e6aa22e63b95b78d96af3d96848
3805e8ca0a5ba05afd8e04e19e440bbbe3469b81 01-Aug-2012 Dianne Hackborn <hackbod@google.com> Merge "Optimize memory use of IntentResolver." into jb-mr1-dev
40e5df95ff9468cec0624ca7fb14e51c13e4b047 01-Aug-2012 Dianne Hackborn <hackbod@google.com> Merge "Make AtomicFile a public API. It's about time!" into jb-mr1-dev
39606a007a5b1309dd000234f2b8cf156c49fd0f 01-Aug-2012 Dianne Hackborn <hackbod@google.com> Make AtomicFile a public API. It's about time!

Change-Id: Ib34e294747405b7ab709cb0bbb2d9a0cc80ce86a
24d19fb6ab94cc5fd23f1c9a1d7916948a7fd571 01-Aug-2012 Jeff Sharkey <jsharkey@android.com> Revert "API to adjust network stats."
16ef57791766b92b8e34de4f752db2f522f34c82 31-Jul-2012 Jeff Sharkey <jsharkey@android.com> Merge "API to adjust network stats. DO NOT MERGE." into jb-mr1-dev
e7ed1ce4c84fe92caafc97b1f9044c6647aa3f7f 28-Jul-2012 Jeff Sharkey <jsharkey@android.com> API to adjust network stats. DO NOT MERGE.

Enables system apps to correctly account network usage performed on
behalf of another application.

Bug: 6695246
Change-Id: I39e243afd57936b6b30157a6ca511a17b6c55c39
e23ae144cc1b6487a7c0e7a33d3016431c81850c 31-Jul-2012 Kenny Root <kroot@google.com> am fa74f7e0: am bba948dc: Merge "Delay AccountManagerService initialization" into jb-dev

* commit 'fa74f7e04fcad1258a1b85515547dba0466086d8':
Delay AccountManagerService initialization
fa74f7e04fcad1258a1b85515547dba0466086d8 31-Jul-2012 Kenny Root <kroot@google.com> am bba948dc: Merge "Delay AccountManagerService initialization" into jb-dev

* commit 'bba948dc9e95baab9e6fb728927aada4a00d93de':
Delay AccountManagerService initialization
bba948dc9e95baab9e6fb728927aada4a00d93de 31-Jul-2012 Kenny Root <kroot@google.com> Merge "Delay AccountManagerService initialization" into jb-dev
5dcbe638ee063201fb476ef475d2beb347f02097 31-Jul-2012 Nick Pelly <npelly@google.com> am 1af5ac1b: Merge "DO NOT MERGE. Add package-name-prefix blacklist for location updates." into jb-dev

* commit '1af5ac1b6801c4da2ef689449fd1fd2eba1ff48e':
DO NOT MERGE. Add package-name-prefix blacklist for location updates.
9ec6cdde9f8f22356dcc9f811d99ebf813194721 31-May-2012 Dianne Hackborn <hackbod@google.com> Optimize memory use of IntentResolver.

Use raw arrays instead of ArrayList for data structures.

Temporarily includes a copy of the old intent resolver for
validating the new implementation.

Change-Id: I988925669b6686ac73b779be6cd6fe3a9fd86660
26ff6626fc4ee0ae46f01ad309b366921da589fe 30-Jul-2012 Kenny Root <kroot@google.com> Delay AccountManagerService initialization

Since applications can have Account providers, they need to be delayed
until after PackageManagerService says everything is mounted.
Otherwise the accounts associated with that provider will be removed
immediately when startup happens.

Bug: 6820670
Change-Id: Iba81765260421649f706624d0605a40ebc1347b1
48c5eb018b1731bd47caccd43cda2cd36ebc271f 30-Jul-2012 Nick Pelly <npelly@google.com> DO NOT MERGE. Add package-name-prefix blacklist for location updates.

The Settings.Secure value locationPackagePrefixBlacklist and
locationPackagePrefixWhitelist contains comma seperated package-name

Location & geo-fence updates are silently dropped if the receiving
package name has a prefix on the blacklist. Status updates are
not affected. All other API's work as before.

A content observer is used so run-time updates to the blacklist
apply immediately. There is both a blacklist and a whitelist.
The blacklist applies first, and then exemptions are allowed
from the whitelist. In other words, if your package name prefix
matches both the black AND white list, then it is allowed.

Change-Id: I4ea2ad56fa6bd75d32151bc250ac25c26a5777c4
fa14d824d235c33b137a429c3eb6818f273407ab 28-Jul-2012 Jeff Brown <jeffbrown@google.com> Merge "Move and rename user activity event type constants." into jb-mr1-dev
b696de5c10ebcc7bf42d8487fc0e56e0e937754d 28-Jul-2012 Jeff Brown <jeffbrown@google.com> Move and rename user activity event type constants.

Change-Id: Ie565808796773b6896e71ddfac6aaaf8031de846
ab88f9864e67aca97df8dcca8e99c17854a54510 28-Jul-2012 Jeff Sharkey <jsharkey@android.com> Merge "Split NST handler events away from CS internals." into jb-mr1-dev
6881a10557acf3b0270de54799d6f19437acf584 27-Jul-2012 Craig Mautner <cmautner@google.com> Small step towards supporting multiple displays

Change-Id: I353449c2b464394988c7e0203656b5851a0c9127
4c628eba480d271d5547af5d4fafc01e0e53a5eb 23-Jul-2012 Jeff Sharkey <jsharkey@android.com> Split NST handler events away from CS internals.

Instead of sharing event space, use a different handler backed by
the same looper.

Change-Id: I11f1e4701c341665770ca640f3cba0c295bb7561
10d940d99ff3814cbf4a1b1759a9377b88752f5f 26-Jul-2012 Irfan Sheriff <isheriff@google.com> Fix permission issues for apps

Add a work around and create a bug for proper fix

Bug: 6882233
Change-Id: I342ef7ecade8b9e2c7d16e82ea9031214b1b4462
fa25bf5382467b1018bd9af7f1cb30a23d7d59f7 24-Jul-2012 Jeff Brown <jeffbrown@google.com> Add display manager skeleton.

The purpose of this change is to remove direct reliance on
SurfaceFlinger for describing the size and characteristics of

This patch also starts to make a distinction between logical displays
and physical display devices. Currently, the window manager owns
the concept of a logical display whereas the new display
manager owns the concept of a physical display device.

Change-Id: I7e0761f83f033be6c06fd1041280c21500bcabc0
ffed02b95adc552a402c646260b9f4dbc3fcf553 26-Jul-2012 Jeff Brown <jeffbrown@google.com> Merge "Stop using raw display size except in window manager."
b208a24cf521401912cfce16fce550a995cf1250 25-Jul-2012 Wink Saville <wink@google.com> Revise and update CellInfo API's

Change-Id: I25a46076a244f50edb9da65816b3717e00820b34
a8b9defade5b937d4ad64f9aff4bca792298f43c 23-Jul-2012 Jeff Brown <jeffbrown@google.com> Stop using raw display size except in window manager.

We don't actually need the raw size in these places.
The logical size is good enough.

Starting to move dependencies on surface flinger
and window manager out of the Display class.

Change-Id: I2065bee8e5bf7f42c5a452dd1e8479e40ebb0d37
554cb0c290406f5bba34908489db5382a69d0a9a 05-Jul-2012 rpcraig <rpcraig@tycho.ncsc.mil> Introduce a restorecon JNI binding.

Label the vmdl.*\.tmp files and the final .apk file differently.
Modify the WallpaperManagerService to restorecon the wallpaper file.

Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>

Change-Id: Idfc056e9ec0508d7e11100626a7114f341f1af70
85d28a00043e5985b11f517031d7b2317ac19e10 24-Jul-2012 Fabrice Di Meglio <fdimeglio@google.com> Merge "Replace left/right with start/end for Gravity / LayoutParams / Padding"
2eeeec248a38ff33999c83f4b8d5bab7d50e79d2 18-Jul-2012 Nick Pelly <npelly@google.com> Improve Location object.

Add getElapsedRealtimeNano():

Currently Location just has getTime() and setTime() based on UTC time.
This is entirely unreliable since it is not guaranteed monotonic.
There is a lot of code that compares fix age based on deltas -
and it is all broken in the case of a system clock change. System
clock can change when switching cellular networks (and in some
cases when switching towers).

Document the meaning of getAccuracy():
It is the horizontal, 95% confidence radius.

Make some fields mandatory if they are reported by a LocationProvider:

All Locations returned by a LocationProvider must include at the
minimum a lat, long, timestamps, and accuracy. This is necessary
to perform fused location. There are no public API's for applications
to feed locations into a location provider so this should not cause
any breakage.

If a LocationProvider does not fill in enough fields on a Location
object then it is dropped, and logged.

Bug: 4305998
Change-Id: I7df77125d8a64e174d7bc8c2708661b4f33461ea
aac0d4ed026d1cfbcf3fa81c6e4eb96f4347ca17 20-Jul-2012 Fabrice Di Meglio <fdimeglio@google.com> Replace left/right with start/end for Gravity / LayoutParams / Padding

- see bug #5429822 UI should be mirrored for RTL locales (Arabic, Hebrew, farsi)

Change-Id: Id9af5375fb9b0edeae5232c77e52ecd497bd2e67
db3c8678e5cbdfec011afaf25bde2091152c30ad 20-Jun-2012 Haoyu Bai <bhy@google.com> Network data activity change intent for network interfaces.

The activity notification is received from netd, an intent
DATA_ACTIVITY_CHANGE is then raised for other part of the system to

Change-Id: Idfcc4763c51c5b314c57f546c12557082f06bebf
6b7358d9511df7e519bb417fbed6017c06a33d45 18-Jul-2012 Haoyu Bai <bhy@google.com> Netd event code for interface class acitivity.

Change-Id: I83d5ca9ab854cb30ce6d9c06a977ca295f0cdbfd
33034b13cae1429d526722374bd39be3f9605ae4 10-Jul-2012 Wink Saville <wink@google.com> Create telephony-common and mms-common - DO NOT MERGE

These have been created to reduce the size and complexity
of frameworks/base.

mms-common was created by moving all of

telephony-common was created by moving some of

Change-Id: If6cb3c6ff952767fc10210f923dc0e4b343cd4ad
cdce0b9897183f8aef08fe200feb4027fac56290 13-Jul-2012 Matthew Xie <mattx@google.com> Handle airplane mode messages in BroadcastReceiver, safe locking, etc

Handle airplane mode messages in BroadcastReceiver
Safe-lock the access of mBluetooth as a indication of binding state
break indent

Change-Id: Ib24ba0b1f5102c80e55e44b40a8dbf88bc2fad2e
fe19f1234e460a22e43a53665db1c48613844fa6 13-Jul-2012 Matthew Xie <mattx@google.com> Add TODO comments to remove start/stopReverseTethering

Change start/stopReverseTethering permission from CHANGE_NETWORK_STATE

Change-Id: Iac76d5af6418e6a3e2d2f77bf713466981285e1a
6fde3098074ab2551867d1cd919958383b15725f 12-Jul-2012 Matthew Xie <mattx@google.com> Minor changes. Change some instance variables to be final.

Variable name changes, better code reability.

Change-Id: I9f0e9c8a57d4bacf0723be1f91d621c592860683
a8c6df0d3a6b929cac3e59abde8309e8a45ea78a 11-Jul-2012 Fred <fredc@broadcom.com> Removed startService() call from BluetoothManagerService.

BT enable()/disable() are handled by using the binder interface

Change-Id: I0bb8d4984129706e424320241ca3ea7e12caf0d3


9631314e3d28b6e96ef0b7cc777f1a7747a0ac39 30-Jun-2012 Matthew Xie <mattx@google.com> Fix merge error, put in tmp workaround for input manager.

Fix merge error, missing enableNoAutoConnect api.
Remove bluetoothF from inputManageF.systemReady call as tmp workaround.
Recover shutdownRadios(MAX_RADIO_WAIT_TIME) call in ShutdownThread

Change-Id: Ice2b5c54267755bdbf56c742feabbb8709b92570
bf072a712f584ae1c01022835b0de21c40513d06 10-May-2012 fredc <fredc@broadcom.com> Moved BluetoothAdapter.ACTION_STATE_CHANGED broadcast from AdapterService to BluetoothManagerService

Change-Id: I88e5f3fe050cf11eae9c5cf1b7c393a178b8f9b1
c2f5cc50f70bbb82729659f72e1491de137f7fe2 02-May-2012 zzy <zhenye@broadcom.com> disable the sync addr flag
a732ffd8e07a024fb15832990546d38d1ddf384e 02-May-2012 Andre Eisenbach <andre@broadcom.com> Re-enable Bluetooth after a reboot, even if airplane mode is enabled.

This is to resolve Buganizer issue 6325950 and make the behaviour of
Blueooth and Wifi consistant.

Change-Id: Idd6cfa79136f7847e9e670d6d2aa0bf613b0381f
d6883533e4ac3f73d2fde1db9a1dddf06dac6709 26-Apr-2012 fredc <fredc@broadcom.com> Fixed socket not closing on BT off. Used RemoteCallbackList to monitor binder deaths in BluetoothManagerService.

Change-Id: I524964bd2836d8c5a4bae095b93ac9481337941d
116d1d4696ac8e300c83dd8a95e20e67717ef520 20-Apr-2012 fredc <fredc@broadcom.com> Fixed issue with getting Bluetooth adapter's name and airplane mode

Change-Id: I18b632223574aa41b09ba30de8e35417fad86cbe
649fe497cea2f19e937f84218d1080bdcefe47f2 19-Apr-2012 fredc <fredc@broadcom.com> Fixed BT on/off issues and added airplane mode handling

Change-Id: If39df19b99a3f45ebe82e89205d8bb0ff036e2a2
f24588615efa6c781ad963f1a5bbdf47359e1b53 17-Apr-2012 fredc <fredc@broadcom.com> Fixed issue with Bluetooth not turning on if enabled called twice in a row or disabled called twice in a row

Change-Id: I26cac2fa347934e0740578b811aa5a6767cf4862
0f42037eb7b5118015c2caca635538324ccf0ccf 12-Apr-2012 fredc <fredc@broadcom.com> Non persistent adapter service

Change-Id: Ib13d5c77416e58161df0e04d7a15ec0dddbde8b5






e21a4ac09d2473becaea43a73d19e9e836e7732a 07-Mar-2012 Jaikumar Ganesh <jaikumar@google.com> Add a new version of the disable API.

This allows for the setting to be persisted or not.
Also turn on Bluetooth in System Server if needed.
It won't work currently because the service wouldn't have

Change-Id: I15fa2bff93aa32134c1b565fcbe90ba68614b6a1
3a6794cad739c2b6fcc9b3fc6c4461f88728af8a 17-Jul-2012 Matthew Xie <mattx@google.com> Merge "Changes to Bluetooth Service structure."
a0a69897dfa3f0ede5558326172fb676e5dbe359 17-Jul-2012 Matthew Xie <mattx@google.com> Merge "Remove BT references from System Server."
a8ae2ee371decb9504c8b449de45a253eae7d5c4 17-Jul-2012 Matthew Xie <mattx@google.com> Merge "Dock: Temporary removal of function to get BT address"
c69238ebc8d011ce225c9540bcf4e79bd3fa8eb0 17-Jul-2012 Jeff Brown <jeffbrown@google.com> Merge "Remove dithering support."
3cc321ecf505d87850740ad3c63849e6793a8ef6 17-Jul-2012 Jeff Brown <jeffbrown@google.com> Remove dithering support.

The dithering flag is no longer implemented in Surface Flinger
so this is all dead code.

Change-Id: I74c0e452923207e5b7cfe0eeca9457e5cb990947
f422a5669457c152e36e889c820d64b37e005167 17-Jul-2012 Jeff Brown <jeffbrown@google.com> Merge "Remove freezeDisplay(), which is no-op."
a46cdc04fa2561de158d3e3beb505e4ba200b315 17-Jul-2012 Adam Cohen <adamcohen@google.com> am c80f72f7: Merge "Fixing issue where you couldn\'t set null RemoteViews for a widget" into jb-dev

* commit 'c80f72f75e8d5b5fa85b694b64510fad74ea345d':
Fixing issue where you couldn't set null RemoteViews for a widget
c80f72f75e8d5b5fa85b694b64510fad74ea345d 17-Jul-2012 Adam Cohen <adamcohen@google.com> Merge "Fixing issue where you couldn't set null RemoteViews for a widget" into jb-dev
55e395ab33f24b009d87a4d45a5566394260fff7 16-Jul-2012 Jeff Brown <jeffbrown@google.com> Remove freezeDisplay(), which is no-op.

Change-Id: I981ee49e6e2d41a09feaee4b384392e83f7faf3d
7d4252171c8f58e18359e476c9768fea39778489 16-Jul-2012 Nick Pelly <npelly@google.com> Merge "Improve geofencing: throttle location updates with distance to fence."
e5827466217b0d44795b23b7c2a09bd08ddc1065 16-Jul-2012 Adam Cohen <adamcohen@google.com> Fixing issue where you couldn't set null RemoteViews for a widget

-> As noted here: http://code.google.com/p/android/issues/detail?id=35014

Change-Id: Id5d1c47b6961d4b448453d8b16700801c0137f2b
e0fd693c6098f59004f9e96ad75c058e26c337b0 11-Jul-2012 Nick Pelly <npelly@google.com> Improve geofencing: throttle location updates with distance to fence.

Previously any geofence (proximity alert) would turn the GPS on at full rate.
Now, we modify the GPS interval with the distance to the nearest geofence.
A speed of 100m/s is assumed to calculate the next GPS update.

o Major refactor of geofencing code, to make it easier to continue to improve.
o Discard proximity alerts when an app is removed.
o Misc cleanup of nearby code. There are other upcoming changes
that make this a good time for some house-keeping.

The new geofencing heuristics are much better than before, but still
relatively naive. The next steps could be:
- Improve boundary detection
- Improve update thottling for large geofences
- Consider velocity when throttling

Change-Id: Ie6e23d2cb2b931eba5d2a2fc759543bb96e2f7d0
f08a8b78b61bc7f1a6a71c70da25ec3ef41b8cff 16-Jul-2012 Adam Cohen <adamcohen@google.com> Fixing issue where you couldn't set null RemoteViews for a widget

-> As noted here: http://code.google.com/p/android/issues/detail?id=35014

Change-Id: Id5d1c47b6961d4b448453d8b16700801c0137f2b
c9c9a48e7bafae63cb35a9aa69255e80aba83988 16-Jul-2012 Svetoslav Ganov <svetoslavganov@google.com> Removing a workaround for incorrect window position on window move.

1. The window manager was not notifying a window when the latter
has been moved. This was causing incorrect coordinates of the
nodes reported to accessibility services. To workaround that
we have carried the correct window location when making a
call from the accessibility layer into a window. Now the
window manager notifies the window when it is moved and the
workaround is no longer needed. This change takes it out.

2. The left and right in the attach info were not updated properly
after a report that the window has moved.

3. The accessibility manager service was calling directly methods
on the window manager service without going through the interface
of the latter. This leads to unnecessary coupling and in the
long rung increases system complexity and reduces maintability.


Change-Id: Iacb734b1bf337a47fad02c827ece45bb2f53a79d
1abb1cb3a8fe17f7866150604c2fd73751da787e 26-Jan-2012 Jaikumar Ganesh <jaikumar@google.com> Changes to Bluetooth Service structure.

Changes to make Bluetooth Service part of the system_service.
These changes may be temporary.

Changes to update to the new disable API.

Change-Id: If89dba17e6e6c6daa53c37684221763a2da076e9


34196187365687d3f144a6de5fef811b52545ac0 18-Jan-2012 Jaikumar Ganesh <jaikumar@google.com> Remove BT references from System Server.

Change-Id: Icfdb3e140aa35174a8b70da57472a1bf2bd0143b


9773ebb7783ecd29957b43acbe5b26ba459a7458 18-Jan-2012 Jaikumar Ganesh <jaikumar@google.com> Dock: Temporary removal of function to get BT address

Change-Id: I0d1033654e2708f864649f2b2568be7c9da014ed
99e34591c63ef534ac8042e4978dd54f2e0b65f9 14-Jul-2012 Amith Yamasani <yamasani@google.com> Does not compile!!!

Revert "Removing a workaround for incorrect window position on window move."

This reverts commit 939f2e43a80f9a6df16b7e18eba5cfffdbf032da
939f2e43a80f9a6df16b7e18eba5cfffdbf032da 11-Jul-2012 Svetoslav Ganov <svetoslavganov@google.com> Removing a workaround for incorrect window position on window move.

1. The window manager was not notifying a window when the latter
has been moved. This was causing incorrect coordinates of the
nodes reported to accessibility services. To workaround that
we have carried the correct window location when making a
call from the accessibility layer into a window. Now the
window manager notifies the window when it is moved and the
workaround is no longer needed. This change takes it out.

2. The left and right in the attach info were not updated properly
after a report that the window has moved.

3. The accessibility manager service was calling directly methods
on the window manager service without going through the interface
of the latter. This leads to unnecessary coupling and in the
long rung increases system complexity and reduces maintability.


Change-Id: Ibbf98afd29439783ba331a7a0cdce55d7f138922
052db7c25e859be174ab0976e6a31d0604df85a9 13-Jul-2012 Craig Mautner <cmautner@google.com> Merge "Further isolate layout side from animation side."
322e40315609acd5a608440bc469d873e09559ca 13-Jul-2012 Craig Mautner <cmautner@google.com> Further isolate layout side from animation side.

- Use local AppWindowAnimators in WindowAnimator rather than
using shared WindowManagerService objects.
- Use local WindowStateAnimators in AppWindowAnimator rather
than use AppToken's WindowState objects.
- Remove redundant WindowManagerService parameter passed to
AppWindowAnimator ctor.
- Keep from copying parameters from performLayout if the
parameters haven't changed since the last copy.
- Link WindowStateAnimator to AppWindowAnimator to keep
from going through WindowStateAnimator.mWin,
WindowState.mAppToken and AppWindowToken.mAppAnimator.
- Converted attached WindowState in WindowStateAnimator to
WindowStateAnimator to eliminate multiple conversions.

Change-Id: I5e35af88d8fdc1a7454984eaea91a1bc4f926978
af665efcbccc621fdeb29422bb422f04adad6972 13-Jul-2012 Dianne Hackborn <hackbod@google.com> Merge "Improve cleanup of file caches."
197a0c82a1fbf337ec0a85d36b6b89c3d6e8a0ac 12-Jul-2012 Dianne Hackborn <hackbod@google.com> Improve cleanup of file caches.

This rewrites installd's code for deleting cache files to be better:

- Isn't really stupid about just deleting directories in the order
they are found on the filesytem; now collects all cache files and
sorts them by mod time to determine which to delete.
- Also deletes cache files in /data/media and for all users.

This also tweaks DeviceStorageMonitor to be a little smarter about
deciding when to flush cache files, having upper and lower limits
that it allows memory to get down to and then flash files to reach
the higher free storage limit. This should reduce the amount that
we perform flushing when starting to reach the storage limit.

Finally add a new pm command to force a cache flush.

Change-Id: I02229038e1ad553d1168393e5cb6d5025933271d
f1ca09b9902d007b7ba42f7630f80e18f2ca9006 12-Jul-2012 Svetoslav Ganov <svetoslavganov@google.com> Merge "Gestures don't work when turning on Explore by Touch pragmatically."
a43ef3d1c553007b3fa158fe1d3ec4ddb99a71af 12-Jul-2012 Svetoslav Ganov <svetoslavganov@google.com> Gestures don't work when turning on Explore by Touch pragmatically.

1. There was a misspelled duplicate member in the accessibility service
class which was causing inconsistent behavior because one field was
updated and another checked.

2. When the set of services that can put the device in explore by touch
mode changes we were disconnecting and reconnecting all services
and this is not correct. Now only the state of explore by touch is
updated appropriately.


Change-Id: Ib3c119cef8e71c3458d56e4ce6fbde2c2f750dcd
5362f17ff5e8e06601b172bd86c26027ced9780c 12-Jul-2012 Wink Saville <wink@google.com> Merge commit '1b003ef0' into mit

* commit '1b003ef0':
Create telephony-common and mms-common

Change-Id: Ie8876541dbe7f4c933cf7d69910dd204538bc975
a639b311e93ad14d9ee5c2b2c215ed2d86c32d2a 10-Jul-2012 Wink Saville <wink@google.com> Create telephony-common and mms-common

These have been created to reduce the size and complexity
of frameworks/base.

mms-common was created by moving all of

telephony-common was created by moving some of

Change-Id: If6cb3c6ff952767fc10210f923dc0e4b343cd4ad
64ab8fcd6f2011c0d185f2973b9615f155f6d239 12-Jul-2012 Craig Mautner <cmautner@google.com> am dcddea95: Merge "Handle keyguard visibility states separately. DO NOT MERGE" into jb-dev

* commit 'dcddea95301641e3dc9692ed7d70127085458a24':
Handle keyguard visibility states separately. DO NOT MERGE
f333f5f67a6e2e943123797d8752f946c9a4b399 11-Jul-2012 Craig Mautner <cmautner@google.com> Handle keyguard visibility states separately. DO NOT MERGE

Previous to this change the forceHiding variable was a boolean. This
change recognizes the different configurations of the keyguard by
defining separate states for forceHiding and testing for window
visibility differently in each state.

Fixes bug 6786114.

Change-Id: I3460c45ea6da772a4ff76bb016de7aa4b051a673
fbf885b652272013f44da71e9f77923333bf62eb 10-Jul-2012 Craig Mautner <cmautner@google.com> Merge "Notify client side of window movement."
4bf18a7c97c0f312ccf12bcd952b420af0c95e5f 10-Jul-2012 Craig Mautner <cmautner@google.com> Handle keyguard visibility states separately.

Previous to this change the forceHiding variable was a boolean. This
change recognizes the different configurations of the keyguard by
defining separate states for forceHiding and testing for window
visibility differently in each state.

Fixes bug 6786114.

Change-Id: I078e0df7865ddafe498ee46e02110c3a017386d0
4461f6028df664009c707b3dc1815b789171f4dc 10-Jul-2012 Winson Chung <winsonc@google.com> Merge "Fixing index-out-of-bounds in AppWidgetService. (Bug 6717459)"
918b53bc531f5bd1ea102e8b827d693bd4d0555b 09-Jul-2012 Craig Mautner <cmautner@google.com> Isolate layout and animation wallpaper objects.

Provide separate copies of mWallpaperTarget, mWallpaperTokens, and
mLower/UpperWallpaperTarget in the layout and animation sides of
Window Manager.

Simplify constructors of WindowAnimator and WindowStateAnimator.

Change-Id: I7e35794a432c25c4194c046e9e27150d1c905403
2639da500e3d53ea3a17d888b1c0001d043c6b98 09-Jul-2012 Craig Mautner <cmautner@google.com> Fix hang on rotation.

A recent optimization to only send updates to WindowManagerService
when there is something to report backfired. One bit indicating
change had negative polarity so the update should also have been
sent when this bit was cleared. This change alters the bit to
positive polarity.

Fixes bug 6780496.

Change-Id: I3336812a60534ebffc9e94b2fb1d0df4d6969bca
12670b5fb401733d14684b8d02259462eb640dc7 04-Jul-2012 Craig Mautner <cmautner@google.com> Make setting wallpaper offset immediate.

Wallpaper offset was passing through H Handler before being set.
It isn't part of animation and wasn't going through animation anyways.
This change goes back to original implementation of setting
wallpaper offset directly from call.

Change-Id: Ied88e2dc042af814b5ba91c7efb839bd82682567
a76fdb7713d900763cff090557a10d3942b9b3ca 04-Jul-2012 Craig Mautner <cmautner@google.com> Use new object to sync DimAnimator.

The controls for the DimAnimator were going through the H Handler
to sync with the Animator. We are switching to using the
LayoutToAnimator object for passing data from layout to animator.

Change-Id: Ib6d0afabba781c88bcc1c525e3ae424cf19ac1ad
711f90a7c1e99a435fa8f5335f13772f0b41270b 04-Jul-2012 Craig Mautner <cmautner@google.com> Swap source and destination transfer objects.

It will be better to have the object that moves layout parameters to
animation on the layout side, and the object that moves animation
parameters back to layout on the animation side. That way we can
do partial filling of these objects without calling across. We
may never do partial draining of these objects.

Change-Id: I88826fa97350f96e309beef386885f55a9a73305
078ea0a6444bfb5c7ab1678b1c8898e590828731 25-Jun-2012 Craig Mautner <cmautner@google.com> Step 2 in consolidating wallpaper animation.

Separate updateWindowsAndWallpaperLocked into two methods,
updateWindowsLocked and updateWallpaperLocked. Eliminates mForceHiding.

Change-Id: I3958cfae09283aaa7f1781d1b54ef224d8e80f3f
6fbda63e68513ece4409dac845588711ab25c39d 03-Jul-2012 Craig Mautner <cmautner@google.com> Merge CL 202423/3 App launching has random pauses.

Change-Id: Iba5616182c02e51f4d9063d0a01b30b9f558549a
c751e37c4fea4aecb7cc8859d8ac9a6e2a8ce93f 03-Jul-2012 Craig Mautner <cmautner@google.com> am cc935071: Merge "DO NOT MERGE Set force hiding differently" into jb-dev

* commit 'cc93507124855591be40af55a94deeb33d74e719':
DO NOT MERGE Set force hiding differently
cc93507124855591be40af55a94deeb33d74e719 03-Jul-2012 Craig Mautner <cmautner@google.com> Merge "DO NOT MERGE Set force hiding differently" into jb-dev
7b04c2cc816ab53bd303ca97dcbbb8c116047872 03-Jul-2012 Craig Mautner <cmautner@google.com> am 80059d6c: am 00b9e899: Merge "Clear startingDisplayed flag when removing window." into jb-dev

* commit '80059d6c1b60e9920b7ae133808c989b4d3fa8fe':
Clear startingDisplayed flag when removing window.
80059d6c1b60e9920b7ae133808c989b4d3fa8fe 03-Jul-2012 Craig Mautner <cmautner@google.com> am 00b9e899: Merge "Clear startingDisplayed flag when removing window." into jb-dev

* commit '00b9e899320488ff5623d8c80258ed7dfefc7b53':
Clear startingDisplayed flag when removing window.
38b2478f63004c493d7f7f1ac0bf07f51d6f0757 03-Jul-2012 Craig Mautner <cmautner@google.com> Clear startingDisplayed flag when removing window.

The flag indicating that the Starting window is displayed was not
being cleared when the Starting window was removed. That caused the
goodToGo indication to falsely indicate that all windows were drawn
when in fact the destination activity had not yet been drawn. This
caused the animation to begin when it was still black behind the old

This fixes bug 6764727.

Change-Id: Iacef73b0335b9bde2cdc8d0b072034222cd728e8
503d6a44a8193d8111eba393651dcb522cc1cf87 25-Jun-2012 Craig Mautner <cmautner@google.com> DO NOT MERGE Set force hiding differently

Only force hide windows when the keyguard is animating in.

Fixes bug 6721572.

Change-Id: Iad7b8b811bcf0840726cbf6c6f279dabd08a3aba


095c58b73ac112cc7e00771430765434893d8bc5 29-May-2012 Wink Saville <wink@google.com> Enhance StateMachine Quitting and logging support. DO NOT MERGE

Make StateMachine#quit non-conditional and remove the need to
process the SM_QUIT_CMD it is now private.

Rename halting to onHalting.

Add onQuitting

Change the message specific logging to be more generic and change
the xxxProcessedMessagesYyy methods to xxxLogRecXyy names. Also add
addLogRec(String) and addLogRec(String, State) as the generic logging

bug: 5678189
Change-Id: I22f66d11828bfd70498db625fe1be728b90478b7


5702d4dfb5b81491f873a3617f8d8fc8dc5279e6 30-Jun-2012 Craig Mautner <cmautner@google.com> Notify client side of window movement.

Add a one way method to notify Views that the window has moved
on the screen. Fixes issues arising from the IME popping up and
translating the window that uses it. Accessibility was left unaware
of these movements and was drawing the box around the wrong widgets.
Similarly PopupWindow used getLocationOnScreen to determine how
much screen real estate was above and below the anchor point to
determine where to put an anchored window.

Fixes bug 6623031.

Change-Id: I4731a94d5424c1ec77bf1729fba8fc9ea34cae46
c32e190ea6da8c9acd8dc1a29a6e8794ecf7d857 30-Jun-2012 Dianne Hackborn <hackbod@google.com> resolved conflicts for merge of a9c38461 to master

Change-Id: Ie7044c4f9f15384c3edd328fa8e2932c731d9d5c
a9c3846194b69f1bfa73066be670c9d77f6dd0d7 30-Jun-2012 Dianne Hackborn <hackbod@google.com> am bfb752f8: Merge "Fix issue #6761130: Clearing app data in settings does not clear app\'s USB storage" into jb-dev

* commit 'bfb752f8f0e4d73dc251c19d2ef79649fbbe4fd1':
Fix issue #6761130: Clearing app data in settings does not clear app's USB storage
183ce028f10442dd6ada59de8fa531d690134663 30-Jun-2012 Dianne Hackborn <hackbod@google.com> Fix issue #6761130: Clearing app data in settings does not clear app's USB storage

The package manager calls to clear data / clear cache were not also
having default container service clear the data on external storage. Now
they do.

Change-Id: Ib5e5eb6adf2cac5a4cc094cc1a02ac8cfb6a2edf
30729fb9d7dda76e8c96fcaa6af0d5cb838538a2 29-Jun-2012 Dianne Hackborn <hackbod@google.com> am c7b2778c: am cfb0f409: Merge "Fix issue #6745498: Cannot view consecutive event details from agenda view" into jb-dev

* commit 'c7b2778c2dc7934665c56067b65d83d76fbe31e5':
Fix issue #6745498: Cannot view consecutive event details from agenda view
c7b2778c2dc7934665c56067b65d83d76fbe31e5 29-Jun-2012 Dianne Hackborn <hackbod@google.com> am cfb0f409: Merge "Fix issue #6745498: Cannot view consecutive event details from agenda view" into jb-dev

* commit 'cfb0f40903cf2180ce0947cdd965e2f5b90b48bb':
Fix issue #6745498: Cannot view consecutive event details from agenda view
cfb0f40903cf2180ce0947cdd965e2f5b90b48bb 29-Jun-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #6745498: Cannot view consecutive event details from agenda view" into jb-dev
45a25bcfc9af74bc4275cc710347304e581f3c51 28-Jun-2012 Dianne Hackborn <hackbod@google.com> Fix issue #6745498: Cannot view consecutive event details from agenda view

- There was a long-standing bug when using FLAG_ACTIVITY_REORDER_TO_FRONT
where we could find and use an activity that is currently finishing.
- There was a recently introduced bug where activities being destroyed
would not be removed from the history stack at the time they are done
being destroyed, allowing the above bug to be exposed.
- Removing a task would not kill any processes associated with the app
that had a different name from the app itself.

Change-Id: I4401ab6d348a69e1ac4fb8f719d2c69d5a78e567
2c59c5b6b2ee98322a310fd380eba61be6cb4493 28-Jun-2012 Craig Mautner <cmautner@google.com> am 2dca20e1: am 4fa46485: Merge "Update dumpsys power output." into jb-dev

* commit '2dca20e194778e6ce54709a484442df77f8d11be':
Update dumpsys power output.
2dca20e194778e6ce54709a484442df77f8d11be 28-Jun-2012 Craig Mautner <cmautner@google.com> am 4fa46485: Merge "Update dumpsys power output." into jb-dev

* commit '4fa4648515c3c1f77a31da186a9fe31d6c509412':
Update dumpsys power output.
4fa4648515c3c1f77a31da186a9fe31d6c509412 28-Jun-2012 Craig Mautner <cmautner@google.com> Merge "Update dumpsys power output." into jb-dev
0e5416f661a01221a3b22a3e4764e2505af64488 27-Jun-2012 Dianne Hackborn <hackbod@google.com> Merge "Use two fingers to work some magic..."
672083b88aebc3f6fae978f2dafd15fdf4b9cd54 26-Jun-2012 Craig Mautner <cmautner@google.com> Update dumpsys power output.

A little more detail on the animation state. For aid in debugging

Change-Id: Ibfabf7fc8822ccb74bb83e2fd8e53004691dcd76
5359bc38a2f1a39a059c16cb4e435be0d1100c2f 27-Jun-2012 Dianne Hackborn <hackbod@google.com> am 2e8295ce: am 3bb98aec: Merge "Fix issue #6730064: When turning off Nakasi, it very often..." into jb-dev

* commit '2e8295ce1861d8284f16e0f0f80475db0ec2983f':
Fix issue #6730064: When turning off Nakasi, it very often...
2e8295ce1861d8284f16e0f0f80475db0ec2983f 27-Jun-2012 Dianne Hackborn <hackbod@google.com> am 3bb98aec: Merge "Fix issue #6730064: When turning off Nakasi, it very often..." into jb-dev

* commit '3bb98aec9344af1299b90d1567b4443e4d50cc91':
Fix issue #6730064: When turning off Nakasi, it very often...
3bb98aec9344af1299b90d1567b4443e4d50cc91 27-Jun-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #6730064: When turning off Nakasi, it very often..." into jb-dev
ea401541c51422ba76f8319927cca0f303c57a4e 26-Jun-2012 Dianne Hackborn <hackbod@google.com> Fix issue #6730064: When turning off Nakasi, it very often...

...turns itself immediately back on.

The ON_AFTER_RELEASE flag is documented to not turn the screen on if
it is currently off.

Unfortunately, it didn't seem to actually do this -- it would just
cause a userActivity() call, which turns on the screen if it is
currently off.

Fix this by adding yet another boolean to that function to tell it
to not poke user activity if the screen is off. (Yes the number of
booleans on it is now insane, and should be cleaned up after we
get through JB.)

Bug: 6730064
Change-Id: I850dfbc777c7668d08b7d63f42a293e22b878256
25a525411b0fa6ec386b4fea9d827ff37f8146a0 26-Jun-2012 Kenny Root <kroot@google.com> am 7d33d0c3: am c17f92ce: Merge "Use removePackageLI instead of removing mPackages" into jb-dev

* commit '7d33d0c36c7e8c9de4139af383f7491823055bc7':
Use removePackageLI instead of removing mPackages
7d33d0c36c7e8c9de4139af383f7491823055bc7 26-Jun-2012 Kenny Root <kroot@google.com> am c17f92ce: Merge "Use removePackageLI instead of removing mPackages" into jb-dev

* commit 'c17f92ce047e8d62fac829d1df5dae654f7e4de8':
Use removePackageLI instead of removing mPackages
c17f92ce047e8d62fac829d1df5dae654f7e4de8 26-Jun-2012 Kenny Root <kroot@google.com> Merge "Use removePackageLI instead of removing mPackages" into jb-dev
a4b7f2f75e7803193429ec1179fb5e2eb1c6fbda 21-May-2012 Dianne Hackborn <hackbod@google.com> Use two fingers to work some magic...

Change-Id: Ibcb3dbd3d158c22da8277e544d81fb47eadccd49
6a15634f601617b815935bc7fdbe0c356d020f44 26-Jun-2012 Nick Kralevich <nnk@google.com> am 3346bc69: am ab294eeb: Merge "DevicePolicyManagerService: dump less" into jb-dev

* commit '3346bc69493e75565208f9b485bd6038e6abefe9':
DevicePolicyManagerService: dump less
3346bc69493e75565208f9b485bd6038e6abefe9 26-Jun-2012 Nick Kralevich <nnk@google.com> am ab294eeb: Merge "DevicePolicyManagerService: dump less" into jb-dev

* commit 'ab294eeb20d884855b038600f94a6e17b88b5772':
DevicePolicyManagerService: dump less
ab294eeb20d884855b038600f94a6e17b88b5772 26-Jun-2012 Nick Kralevich <nnk@google.com> Merge "DevicePolicyManagerService: dump less" into jb-dev
dfcd6653c5b142e7e2f4275e35f06eaa1a363e60 26-Jun-2012 Dianne Hackborn <hackbod@google.com> am e53fd84a: am 9e608c12: Merge "Fix issue #6381224: Initial emulator boot fails and shows a blank black screen." into jb-dev

* commit 'e53fd84a28584692d9c99712a3d36100643ba000':
Fix issue #6381224: Initial emulator boot fails and shows a blank black screen.
e6c2d62efb65fa7b4681d29ad0710df56bf9002b 26-Jun-2012 Dianne Hackborn <hackbod@google.com> am 9906e784: am 17990395: Merge "Fix issue #6717667: expanded notification actions don\'t work on the lock screen" into jb-dev

* commit '9906e784faca2cc8388a04fdc544722ea93d51be':
Fix issue #6717667: expanded notification actions don't work on the lock screen
be00b410146b35b50fc213474a8d04d463021554 26-Jun-2012 Nick Kralevich <nnk@google.com> DevicePolicyManagerService: dump less

Reduce the amount of unnecessary information emitted from
the DevicePolicyManagerService.

Bug: 6732364
Change-Id: I639f6beab8471bdbe41ce6cd3a5a378acaf678b2
e53fd84a28584692d9c99712a3d36100643ba000 26-Jun-2012 Dianne Hackborn <hackbod@google.com> am 9e608c12: Merge "Fix issue #6381224: Initial emulator boot fails and shows a blank black screen." into jb-dev

* commit '9e608c12186d308fb1711e8824901fdf931a3a96':
Fix issue #6381224: Initial emulator boot fails and shows a blank black screen.
9906e784faca2cc8388a04fdc544722ea93d51be 26-Jun-2012 Dianne Hackborn <hackbod@google.com> am 17990395: Merge "Fix issue #6717667: expanded notification actions don\'t work on the lock screen" into jb-dev

* commit '17990395bc62f8ce1bae4f1880899f231a8e613b':
Fix issue #6717667: expanded notification actions don't work on the lock screen
b4215267f342759c8bdad02ed124dae4bb6d6833 26-Jun-2012 Dianne Hackborn <hackbod@google.com> am fca66cd8: Merge "DO NOT MERGE Fix issue #6697105: App launching sometimes has random pauses" into jb-dev

* commit 'fca66cd828e214fe7494e46c7daa2879dfc3210d':
DO NOT MERGE Fix issue #6697105: App launching sometimes has random pauses
9e608c12186d308fb1711e8824901fdf931a3a96 26-Jun-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #6381224: Initial emulator boot fails and shows a blank black screen." into jb-dev
17990395bc62f8ce1bae4f1880899f231a8e613b 26-Jun-2012 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #6717667: expanded notification actions don't work on the lock screen" into jb-dev
fca66cd828e214fe7494e46c7daa2879dfc3210d 26-Jun-2012 Dianne Hackborn <hackbod@google.com> Merge "DO NOT MERGE Fix issue #6697105: App launching sometimes has random pauses" into jb-dev
eca64b391408dfdb9ff3ae03fc39cfdb6918f3ad 26-Jun-2012 Kenny Root <kroot@google.com> Use removePackageLI instead of removing mPackages

When adding an system app via OTA, trying to remove it from mPackages
directly doesn't work. The ContentProviders and other things aren't
removed and point to the hidden system app's applicationInfo instead of
the updated app.

Bug: 6685263
Change-Id: I487cf518e0e3c60fae736e9b974617023a7dee8d
ad51a1e9230cdf95082b5e05690f0b72eaed3f35 26-Jun-2012 Jeff Brown <jeffbrown@google.com> am 0086ec0d: am d48cf0c0: Merge "Don\'t wait until boot timeout if there is no wallpaper." into jb-dev

* commit '0086ec0d3009bc8c80e1330cd73ba534aa45f489':
Don't wait until boot timeout if there is no wallpaper.
c585841115a859eadb2f6479cb4d09a1d3ea9cba 26-Jun-2012 Jeff Brown <jeffbrown@google.com> am db65cc52: am a3a59a2f: Merge "Don\'t enable input dispatch until display enabled." into jb-dev

* commit 'db65cc520ebb3f9cfafa4a9d5be9f07621814213':
Don't enable input dispatch until display enabled.
0086ec0d3009bc8c80e1330cd73ba534aa45f489 26-Jun-2012 Jeff Brown <jeffbrown@google.com> am d48cf0c0: Merge "Don\'t wait until boot timeout if there is no wallpaper." into jb-dev

* commit 'd48cf0c0ce5f9458802d2be8671c85fa027a74a0':
Don't wait until boot timeout if there is no wallpaper.
db65cc520ebb3f9cfafa4a9d5be9f07621814213 26-Jun-2012 Jeff Brown <jeffbrown@google.com> am a3a59a2f: Merge "Don\'t enable input dispatch until display enabled." into jb-dev

* commit 'a3a59a2fa7e3b3b044b41d2741118be37c57509a':
Don't enable input dispatch until display enabled.
1927ae8a56a010919a7535231fa0f7db70f7e152 23-Jun-2012 Dianne Hackborn <hackbod@google.com> Fix issue #6717667: expanded notification actions don't work on the lock screen


Instead, and the infrastructure for the status bar to take care
of closing and hiding things itself when you press these buttons,
just like it does for the main Intent of the notification.

Bug: 6717667
Change-Id: I1b22186e0cedc05f46a1a3ec78053a72afaf61b1
42e620caf0407f1b5e02935ac4323742c65459fd 24-Jun-2012 Dianne Hackborn <hackbod@google.com> Fix issue #6381224: Initial emulator boot fails and shows a blank black screen.

Make sure that all cases where we remove an activity from the history
stack, we call resumeTopActivityLocked() to cause the home activity
to be launched if the stack is now empty.

Also fixed a problem where some timeouts would not be removed when destroying
an activity, and a race condition in boot that would cause the
PhoneWindowManager to initially start out with the home key not working.

Bug: 6381224
Change-Id: If046bb01aed624b0d9ee3bbaaba68ed6b98fd1d0
f12100e0255c86d0d05dba2e7ba87a745870423d 25-Jun-2012 Craig Mautner <cmautner@google.com> Eliminate jank by setting force hiding differently

Only force hide windows when the keyguard is animating in.

Fixes bug 6721572.

Change-Id: Iad7b8b811bcf0840726cbf6c6f279dabd08a3aba
a3195057fc5874d158cc8ea053aa75d5e016bdcf 25-Jun-2012 Winson Chung <winsonc@google.com> Fixing index-out-of-bounds in AppWidgetService. (Bug 6717459)

Change-Id: I9d676fbb2110f01eb1d36adc59437a6a5ec97cc2
780c46fc9197f7ecb258e2c229824749f9e93806 24-Jun-2012 Jeff Brown <jeffbrown@google.com> Don't wait until boot timeout if there is no wallpaper.

When launching only core apps, the wallpaper service
is not started. Without this change the WM waits
up to 30 seconds for the wallpaper window to be created even
though it will never happen. This introduces a significant
delay before the boot animation is dismissed so the user can
enter a decryption password.

Bug: 6263070
Change-Id: Ia975127a0bf09cf99818f7cc4fd6c0264b740ec6