10833 Commits

Author SHA1 Message Date
Zhihai Xu
251445667c 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 2012-10-10 09:52:33 -07:00
Jeff Brown
f6138f0720 Merge "Don't consider the boot completed until the animation is over." into jb-mr1-dev 2012-10-10 00:35:20 -07:00
Zhihai Xu
40874a096b 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
2012-10-09 19:10:14 -07:00
Jeff Brown
20767b2d1e 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
2012-10-09 19:06:25 -07:00
Dianne Hackborn
c0bd747b06 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
2012-10-09 17:57:14 -07:00
Dianne Hackborn
840590dd64 Merge "Fix issue #7311376: Add API to allow apps to know if they are..." into jb-mr1-dev 2012-10-09 17:46:36 -07:00
Eric Laurent
6f2cdcdbe4 Merge "fix concurrent headset and HDMI connection" into jb-mr1-dev 2012-10-09 17:25:27 -07:00
Craig Mautner
0cd641001a Merge "Remove debugging statements before final ROM." into jb-mr1-dev 2012-10-09 17:18:30 -07:00
Dianne Hackborn
a8a9bd65bf 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
2012-10-09 17:00:31 -07:00
Jeff Brown
f545660dcb Merge "Prevent full wake lock from keeping device awake while dreaming." into jb-mr1-dev 2012-10-09 16:54:12 -07:00
Jeff Brown
637a30fde7 Merge "Fix a segfault when there is no power module." into jb-mr1-dev 2012-10-09 16:51:49 -07:00
Eric Laurent
9e6e8355f8 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
2012-10-09 16:41:32 -07:00
Jeff Brown
10428748f9 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
2012-10-09 15:52:31 -07:00
Kenny Root
a8a6b0848d Merge "Add fused location provider to real provider list" into jb-mr1-dev 2012-10-09 15:21:36 -07:00
Jeff Brown
0a19d001c4 Fix a segfault when there is no power module.
This can happen in the emulator.

Bug: 7315152
Change-Id: I4a3f547127419fcd4dc4fc1c6f7ee869706cf12e
2012-10-09 14:47:05 -07:00
rich cannings
f1b246ddfe Merge "Fix verfication bypassed for adb installs" into jb-mr1-dev 2012-10-09 14:11:21 -07:00
rich cannings
36070b414a 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
2012-10-09 13:34:51 -07:00
Craig Mautner
f1f3b49b94 Remove debugging statements before final ROM.
Change-Id: I18afd1a4c4f8f945308edc9b3af48b8c8adb3b9e
2012-10-09 13:23:08 -07:00
Kenny Root
c3575188c2 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
2012-10-09 12:44:42 -07:00
Victoria Lease
c0c0c0e612 Merge "Multiuser love for LocationManager" into jb-mr1-dev 2012-10-09 12:22:03 -07:00
Satoshi Kataoka
6be35dd636 Merge "Fix an issue on showInputMethodPickerFromClient" into jb-mr1-dev 2012-10-09 00:28:17 -07:00
Satoshi Kataoka
c86884cd83 Fix an issue on showInputMethodPickerFromClient
Bug: 7302748
Change-Id: Iff4345d26b3d6e4bfedf893bbd6a864c771df01d
2012-10-09 15:20:29 +09:00
Jeff Brown
9e316a1a2a 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
2012-10-08 19:23:15 -07:00
Victoria Lease
b711d57ca4 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
2012-10-08 17:19:43 -07:00
Jeff Brown
2aac1a0fe8 Merge "Improve the power off fade animation." into jb-mr1-dev 2012-10-08 17:00:18 -07:00
Jeff Brown
252c206984 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
2012-10-08 16:21:01 -07:00
Victoria Lease
0fb7e32a01 Merge "Last position improvements for GeofenceManager" into jb-mr1-dev 2012-10-08 15:14:49 -07:00
Svetoslav Ganov
55c7029312 Merge "Show the touch explore enable dialog for the current user." into jb-mr1-dev 2012-10-08 15:02:56 -07:00
Dianne Hackborn
4efbab480d Merge "Framework side of issue #7302511: GCM client needs to use new framework API..." into jb-mr1-dev 2012-10-08 15:02:56 -07:00
Dianne Hackborn
36d337adff 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
2012-10-08 14:33:47 -07:00
Svetoslav Ganov
318b00bfee 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.

bug:7304437

Change-Id: I692b5112df16405e6d2e4890aafbfde79981f973
2012-10-08 13:18:12 -07:00
Craig Mautner
847b12295e Merge "Fix problems with IME layers." into jb-mr1-dev 2012-10-08 12:28:23 -07:00
Craig Mautner
e6f7d5054a 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
2012-10-08 10:34:17 -07:00
Amith Yamasani
9c2a38ed10 Merge "Fix resource reading for secondary users" into jb-mr1-dev 2012-10-07 22:53:18 -07:00
Amith Yamasani
64442c1155 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
2012-10-07 15:56:34 -07:00
Dianne Hackborn
b52b6bf138 Merge "Fix issue #7295951: Mako asks which Launcher to use at every re-boot" into jb-mr1-dev 2012-10-07 15:48:39 -07:00
Jeff Brown
8b9cf1c800 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
2012-10-07 14:54:17 -07:00
Dianne Hackborn
6309271f7b 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
2012-10-07 14:45:35 -07:00
Craig Mautner
138f272bfc Merge "Save resized windows even if freezing." into jb-mr1-dev 2012-10-07 11:50:55 -07:00
Craig Mautner
33877e15b8 Merge "Adds showWhenLocked attribute to Activities." into jb-mr1-dev 2012-10-07 11:48:50 -07:00
Jeff Brown
140cdb7a5d Merge "Allow the dim brightness to be brighter than the minimum." into jb-mr1-dev 2012-10-06 22:53:40 -07:00
Craig Mautner
ade0a9a938 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
2012-10-06 13:55:07 -07:00
Craig Mautner
5962b12bed 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
2012-10-06 13:09:58 -07:00
Jeff Brown
b76eebff47 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
2012-10-06 12:37:47 -07:00
Svetoslav Ganov
1ad0fd9c04 Merge "Accessibility active window not updated on time." into jb-mr1-dev 2012-10-06 12:17:56 -07:00
Svetoslav Ganov
f81dc4c08b Merge "Screen magnification cannot be engaged in landscape on a phone." into jb-mr1-dev 2012-10-06 12:11:29 -07:00
Dianne Hackborn
52177738e8 Merge "Fix issue #7296314, issue #7296314." into jb-mr1-dev 2012-10-06 11:08:17 -07:00
Dianne Hackborn
4c1e3183ba 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
together.

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
2012-10-05 20:38:31 -07:00
Jeff Brown
4d12d5be8f Merge "Recover from bad input event timestamps from the kernel." into jb-mr1-dev 2012-10-05 19:44:36 -07:00
Svetoslav Ganov
a7bcb546bc 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.

bug:7293097

Change-Id: Ic5ff91977df8bcf4afd77071685c3eb20555d4f3
2012-10-05 19:39:26 -07:00