10571 Commits

Author SHA1 Message Date
Svetoslav Ganov
a8afa694d6 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.

bug:7224670

Change-Id: I9f4b7ea67eb5598b30ee7d1b68a1d3ce0cf8cfb4
2012-09-25 13:59:37 -07:00
Amith Yamasani
f80a9b2f8a Watch for voice recognition service changes for all users
Monitor package changes and update the default recognizer

Bug: 7216043

Change-Id: I6b358b62401eaf58b38059caa57f72585f332eb5
2012-09-25 10:31:47 -07:00
Jean-Baptiste Queru
fe3632bcbe Merge into jb-mr1-dev
Change-Id: Ib0523ded92e2fe4be6a32d092baa55b527229c07
2012-09-25 09:42:01 -07:00
Jean-Baptiste Queru
56d8cc1031 Merge into jb-mr1-dev
Change-Id: I6504b000be7e3b6e770af99c5a922fd1e9ec73de
2012-09-25 09:41:25 -07:00
Jean-Baptiste Queru
ecfc9ca5f5 Merge into jb-mr1-dev
Change-Id: Ia9c5e2295fe61ae0f5275d3ddfd056d9778b66d1
2012-09-25 09:40:41 -07:00
Amith Yamasani
95293865bd Fix build
Merge error...

Change-Id: I0e674ee25a080fa6abfaa9da893084d6b4fa69a6
2012-09-25 09:39:36 -07:00
Jean-Baptiste Queru
0dfe1cf3cd Merge into jb-mr1-dev
Change-Id: Id8bbccaa542bef3351958fb6749370880a1921f3
2012-09-25 09:37:51 -07:00
Jean-Baptiste Queru
7951c459ae Merge into jb-mr1-dev
Change-Id: Ifc2328e30a52c2baebc1322c9b161104dcf21618
2012-09-25 09:36:32 -07:00
Jean-Baptiste Queru
ec1996131d Merge into jb-mr1-dev
Change-Id: I97ff2551b36a1b590f2d314cabfcf198dd10f404
2012-09-25 09:35:19 -07:00
Jean-Baptiste Queru
6fb2514cdf Merge into jb-mr1-dev
Change-Id: I1baab28b12364213673ed7992207ad198491f286
2012-09-25 09:25:15 -07:00
Svetoslav Ganov
03e7b88815 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.

bug:6874128

Change-Id: I341fc360ebc074fe3919d5ba3b98ee5cb08dd71e
2012-09-24 18:43:30 -07:00
Jeff Brown
3671410b9e Fix dialogs on secondary displays.
Bug: 7183618
Change-Id: I65b650a0c423f3081c412a7341b7427b6ac85e24
2012-09-24 17:36:06 -07:00
Amith Yamasani
ea7e91514e AppInfo from Notifications for secondary users
Required wiring up startActivitiesAsUser()

Bug: 7224950

Also fix a bug in navigateUp in secondary user

Change-Id: I114ae2de0457362d62e899fdb94b12239a3eb778
2012-09-24 17:19:03 -07:00
Svetoslav Ganov
187f3f9490 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.

bug:7215285

Change-Id: I3abc4d97b7a74de8183ad20477dadf66c82da037
2012-09-24 16:34:26 -07:00
Jeff Brown
14a9f2b9d2 Fix drag and drop surfaces on secondary displays.
Bug: 7183618
Change-Id: I4ef746916aad984640f1eb3b3c71b1e34595aabd
2012-09-24 14:37:31 -07:00
Jeff Brown
2033763bb1 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
2012-09-24 14:37:30 -07:00
Dianne Hackborn
139748fd72 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
2012-09-24 14:15:14 -07:00
Svetoslav Ganov
270a331cae Merge "UI test automation service should not be auto reconnected." into jb-mr1-dev 2012-09-24 13:58:22 -07:00
Svetoslav Ganov
657968a65f 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.

bug:6967373

Change-Id: I8cfde74f28f3f03d4ccf24746d43b8178ae2b5ef
2012-09-24 13:50:44 -07:00
Philip Milne
bc391d58c8 Merge "Revert "Fix for bug: #7173350. elapsedRealtimeNano() -> elapsedRealtimeNanos()"" into jb-mr1-dev 2012-09-24 11:41:53 -07:00
Philip Milne
53fe756772 Revert "Fix for bug: #7173350. elapsedRealtimeNano() -> elapsedRealtimeNanos()"
This reverts commit 2f6d8829524dfca3a77e9a57c3b9c3862209877d

Change-Id: Id5af767a09fc319127c4ebef837c5b7a7f75cb01
2012-09-24 11:38:29 -07:00
Michael Jurka
9b93f4def1 Merge "Fix security check for private allocateAppWidgetId api" into jb-mr1-dev 2012-09-24 11:24:26 -07:00
Philip Milne
b00df8e929 Merge "Fix for bug: #7173350. elapsedRealtimeNano() -> elapsedRealtimeNanos()" into jb-mr1-dev 2012-09-24 11:02:31 -07:00
Dianne Hackborn
cd11b223f3 Merge "Fix issue #7214090: Need to be able to post notifications to all users" into jb-mr1-dev 2012-09-24 10:58:20 -07:00
Dianne Hackborn
50cdf7c306 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
2012-09-24 10:55:46 -07:00
Amith Yamasani
888eb73c6e resolved conflicts for merge of 814f5ac3 to jb-mr1-dev
Change-Id: Ic65395ce932971dc9c37a481aa96da79a45d0f12
2012-09-24 09:26:37 -07:00
Victoria Lease
8658e1aa1f Merge "Allow apps to getProviders() without location permissions." into jb-mr1-dev 2012-09-24 09:02:13 -07:00
Amith Yamasani
b079d1f280 am 5e8cbdc0: Merge "Fixing services start order that impacts ICS - JB upgrade"
* commit '5e8cbdc0bd6dfc51e6b54db1d5fd61347336d862':
  Fixing services start order that impacts ICS - JB upgrade
2012-09-24 08:45:14 -07:00
Jeff Sharkey
49397ac93c Merge "Always bind to DefaultContainerService as OWNER." into jb-mr1-dev 2012-09-23 18:25:47 -07:00
Irfan Sheriff
916b2b5a93 Merge "Increase WFD connect time out to 60s" into jb-mr1-dev 2012-09-23 17:32:07 -07:00
Irfan Sheriff
2c2ca5cb7c 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
2012-09-23 17:30:19 -07:00
Jeff Sharkey
752cd922f7 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
2012-09-23 16:44:34 -07:00
Victoria Lease
17e3e9e53c Merge "Do not use passive GPS data for COARSE only apps." into jb-mr1-dev 2012-09-23 15:06:59 -07:00
Victoria Lease
8dbb63419b 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
2012-09-23 14:09:47 -07:00
Jeff Sharkey
5a370882f8 Merge "Check READ_EXTERNAL enforcement outside of lock." into jb-mr1-dev 2012-09-23 13:23:39 -07:00
Jeff Sharkey
11820f7386 Merge "Allow acquiring ContentProviders across users." into jb-mr1-dev 2012-09-23 13:22:27 -07:00
Dianne Hackborn
b939e35274 Merge "Fix issue #7209355, #7214271." into jb-mr1-dev 2012-09-23 12:58:10 -07:00
Dianne Hackborn
8da429e80d 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
2012-09-23 12:53:34 -07:00
Jeff Sharkey
c50f31d213 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
2012-09-22 17:14:02 -07:00
Jeff Sharkey
6d51571835 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
2012-09-21 19:49:43 -07:00
Dianne Hackborn
88923c973e Merge "Fix issue #7214462: Some recent thumbnails are black." into jb-mr1-dev 2012-09-21 18:47:18 -07:00
Dianne Hackborn
6a864959e0 Fix issue #7214462: Some recent thumbnails are black.
Change-Id: I9a2704c95a8701c9fb6755662fb47d4743099bf9
2012-09-21 18:46:11 -07:00
Svetoslav Ganov
9f12373b57 Merge "Fixing a regression in the UI test automation." into jb-mr1-dev 2012-09-21 18:26:52 -07:00
Svetoslav Ganov
9371a0a0c0 Fixing a regression in the UI test automation.
bug:6967373

Change-Id: I28f01a2bfe44febcb1a519028dab82fb1da9753e
2012-09-21 18:20:42 -07:00
Adam Cohen
993c3d79a3 Merge "Fixing typos" into jb-mr1-dev 2012-09-21 18:19:06 -07:00
Amith Yamasani
77e95d3d71 Merge "Show lockscreen widgets for the current user." into jb-mr1-dev 2012-09-21 18:16:49 -07:00
Adam Cohen
db38d8a4ff Fixing typos
Change-Id: I3d470a18bd14a4040dffb0b0d8a11e282546057e
2012-09-21 18:14:58 -07:00
Amith Yamasani
8fd96ec2dc 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
2012-09-21 18:10:34 -07:00
Svetoslav Ganov
0a5c5567f2 Merge "Multi-user support for the accessibility layer." into jb-mr1-dev 2012-09-21 17:21:45 -07:00
Dianne Hackborn
c9e94ea645 Merge "Fix issue #7213113: Remove old intent resolver" into jb-mr1-dev 2012-09-21 17:05:47 -07:00