33993 Commits

Author SHA1 Message Date
Dianne Hackborn
80a4af2bbc 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
restarted.

Change-Id: I89adbd7cbaf4a0bb72ea201385f93477f40a4119
2012-08-28 16:30:55 -07:00
John Reck
2ec1098961 DO NOT MERGE Remove dead code
Cherry pick

Change-Id: I19603a6e234b0b2592ef90fd426b2973cff8e4fd
2012-08-28 16:29:51 -07:00
John Reck
b5b2acec80 Merge "Remove dead code" into jb-mr1-dev 2012-08-28 16:28:15 -07:00
John Reck
25b86b6bf0 Remove dead code
Change-Id: Ice4bf3a94743019a8fc8ab04ee3de19f27a9e2c3
2012-08-28 16:24:28 -07:00
Adam Powell
618cbea4e7 New implementation for ScaleGestureDetector
This solves the problems around active pointer tracking when the
caller may skip events in the MotionEvent stream and replaces the
old implementation with a much simpler algorithm.

Change-Id: I6b15a2e215cab7b9559db800fcc57374702357fc
2012-08-28 16:20:32 -07:00
Baligh Uddin
b210018760 Merge "Import translations. DO NOT MERGE" into jb-mr1-dev 2012-08-28 15:51:02 -07:00
rich cannings
2deaa3698d Merge "Add permission checks for Verification API calls" into jb-mr1-dev 2012-08-28 15:14:26 -07:00
Craig Mautner
b1a1e5ca7d Merge "Use correct WindowManager for Toast." into jb-mr1-dev 2012-08-28 14:43:59 -07:00
Craig Mautner
b6ee2a2429 Use correct WindowManager for Toast.
The WindowManager retrieved from the activity Context with
getSystemService is incorrect for a Toast. Because it contains
a parent window when addView is called its LayoutParams.token
is set to the value of the parent window. Then when an Activity
is dismissed WindowManagerGlobal.closeAll() sees the incorrect
token and incorrectly closes the Toast.

This fix uses the application Context instead of the activity
Context to retrieve a WindowManager with no parent window. This
leaves the token unchanged and keeps from dismissing the toast when
the activity is closed.

Fixes bug 7048792.

Change-Id: I92c3095d8fabd6e9e4206e9bc8e917885ab322a9
2012-08-28 14:28:53 -07:00
rich cannings
7e67151b91 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
PackageManager.extendVerificationTimeout

Bug: 7049083
Change-Id: I5fc28b37e864d67cd319a1ed9d03a90dd15ad052
2012-08-28 14:00:46 -07:00
Jean-Baptiste Queru
8d8646471c am 1112a376: am 416362e6: Merge "Change StringTokenizer to TextUtils.StringSplitter"
* commit '1112a376e81af8ef4c2b661f5bda443596ba37da':
  Change StringTokenizer to TextUtils.StringSplitter
2012-08-28 13:41:15 -07:00
Jean-Baptiste Queru
1112a376e8 am 416362e6: Merge "Change StringTokenizer to TextUtils.StringSplitter"
* commit '416362e6d8c8d0a34e09704138688f75aa810c9b':
  Change StringTokenizer to TextUtils.StringSplitter
2012-08-28 13:19:48 -07:00
Baligh Uddin
3b87a57aca Import translations. DO NOT MERGE
Change-Id: Ia11f923dfd05112764cd795034e5a8b33b2d67fe
Auto-generated-cl: translation import
2012-08-28 13:10:55 -07:00
Jean-Baptiste Queru
416362e6d8 Merge "Change StringTokenizer to TextUtils.StringSplitter" 2012-08-28 12:22:39 -07:00
Jean-Baptiste Queru
a3b63c001c am 337756fa: am 78ad66b4: Merge "[Audio]Press camera button during Http live Audio playing, then return Browser, DUT display abnormal."
* commit '337756fa6587bca84afdfdc964805f962ea534ed':
  [Audio]Press camera button during Http live Audio playing, then return Browser, DUT display abnormal.
2012-08-28 11:13:38 -07:00
Jean-Baptiste Queru
337756fa65 am 78ad66b4: Merge "[Audio]Press camera button during Http live Audio playing, then return Browser, DUT display abnormal."
* commit '78ad66b43cf5b649869de18ee9c246c95b135c10':
  [Audio]Press camera button during Http live Audio playing, then return Browser, DUT display abnormal.
2012-08-28 11:08:22 -07:00
Jean-Baptiste Queru
78ad66b43c Merge "[Audio]Press camera button during Http live Audio playing, then return Browser, DUT display abnormal." 2012-08-28 10:43:10 -07:00
Przemyslaw Szczepaniak
70574efd8f Fix threading issue in BlockingAudioTrack.
This fixes the issue where one thread calls .stop() on
mAudioTrack that was released (or being released) by other thread.

Bug: 7029291
Change-Id: Ia6db803e8ee40379b63327acf578466127cfabcb
2012-08-28 02:19:20 -07:00
Irfan Sheriff
c5fd6e59db Fix build
Change-Id: Id17b70154b3f8a101457b20fb37db0a16159dff9
2012-08-28 02:02:21 -07:00
Irfan Sheriff
da6da0907b 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
2012-08-27 22:27:06 -07:00
Jeff Brown
5c807b4e84 Merge "Fix improper use of CloseGuard." into jb-mr1-dev 2012-08-27 17:21:12 -07:00
Jeff Brown
dc7d8008ec Merge "Add plumbing for new surface flinger display API." into jb-mr1-dev 2012-08-27 17:16:53 -07:00
Jeff Brown
ac66d4a8d6 Merge "Use new surface flinger API." into jb-mr1-dev 2012-08-27 17:15:25 -07:00
John Reck
f920271828 Merge "Protect against focus changes after .destroy()" into jb-mr1-dev 2012-08-27 16:54:18 -07:00
John Reck
1612fab07b Protect against focus changes after .destroy()
Bug: 7026042

Change-Id: I656b612a4b5304225863d3100a98bf2b97d9890d
2012-08-27 16:44:39 -07:00
alanv
b72fe7a263 Don't overwrite accessibility delegates in AbsListView items.
Bug: 6856579
Change-Id: I2963edcefdc0dd5e1413b57858e6f319904a269d
2012-08-27 16:44:25 -07:00
Baligh Uddin
81efbb30f0 Merge "Import translations. DO NOT MERGE" into jb-mr1-dev 2012-08-27 16:17:57 -07:00
alanv
c98b34608b Reload page when A11y is on and the JavaScript state changes.
Bug: 6910403
Change-Id: I85af7d2019a02c1a6cc17b0c4930276b7fb69e33
2012-08-27 15:21:09 -07:00
Jeff Brown
3e7e7f025e Fix improper use of CloseGuard.
Change-Id: I37131a86e27a4be55956384a3566de9dcfd90fe5
2012-08-27 14:34:55 -07:00
Jeff Brown
64a55af0ac 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
2012-08-27 14:34:54 -07:00
Jeff Brown
0b722fe9ce Use new surface flinger API.
Change-Id: Ic888577408a59a36481a48010e19c5e77c24e211
2012-08-27 14:34:53 -07:00
Adam Powell
ac137b3211 Merge "Add setOnDismissListener to AlertDialog.Builder" into jb-mr1-dev 2012-08-27 14:04:29 -07:00
Jeff Sharkey
116ee10b95 Merge "Always-on VPN." into jb-mr1-dev 2012-08-27 13:57:58 -07:00
Adam Powell
7f02dc5c9c Add setOnDismissListener to AlertDialog.Builder
Add documentation to setOnCancelListener to clarify that the cancel
event plus the events for the various choice buttons are not the
exhaustive set of ways the dialog can be dismissed, and that a dismiss
listener should be used if the app needs to cover all cases of
dismissal.

Change-Id: I9e9d6f90f6f9ccaeb2c697474ab353e2d78f37b9
2012-08-27 13:53:29 -07:00
Baligh Uddin
cbe5266a27 Import translations. DO NOT MERGE
Change-Id: I07901e5eab6cc8aa560d713bf84efb1774456e48
Auto-generated-cl: translation import
2012-08-27 13:23:32 -07:00
Dianne Hackborn
e45ca31a61 am aae49432: am 4763989d: am 32d1fec5: Merge "Fixes relative time formatting issue for dates in future"
* commit 'aae4943297a08a659add964a3fef96bdfa0b2c14':
  Fixes relative time formatting issue for dates in future
2012-08-27 13:10:58 -07:00
Jeff Sharkey
69ddab4575 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
2012-08-27 12:35:05 -07:00
Dianne Hackborn
aae4943297 am 4763989d: am 32d1fec5: Merge "Fixes relative time formatting issue for dates in future"
* commit '4763989d95342c25e9b857dc9ee21eb5ebac31d6':
  Fixes relative time formatting issue for dates in future
2012-08-27 12:33:57 -07:00
Steve Pomeroy
ca3363775e Fixes relative time formatting issue for dates in future
All variations of getRelativeTimeSpanString() now properly handle dates
that are in the future. Prior, the version used by
getRelativeDateTimeString() would occasionally show the time instead of
a date when the future date was the same weekday as the current weekday.
This resulted in the time output being duplicated, eg.: "11:23, 11:23"

Change-Id: If20972a6942cce792fa233437f94dedfb71379f3
Signed-off-by: Steve Pomeroy <steve@staticfree.info>
2012-08-27 02:20:13 -04:00
Baligh Uddin
aea57c8b48 Merge "Import translations. DO NOT MERGE" into jb-mr1-dev 2012-08-26 16:55:22 -07:00
Jeff Brown
f85ddd6571 Merge "Make it easier to create asynchronous Handlers." into jb-mr1-dev 2012-08-25 13:43:48 -07:00
Jeff Brown
a2910d0abb 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
2012-08-25 13:40:26 -07:00
John Spurlock
3782aabe4e Merge "DreamManagerService: Handle missing db value" into jb-mr1-dev 2012-08-25 07:06:08 -07:00
John Spurlock
4fde81f7e7 DreamManagerService: Handle missing db value
Should not happen (except for early dogfooders with a specific build),
but handle gracefully as we do elsewhere in dream manager.

To test:
  adb shell sqlite3 \
  /data/data/com.android.providers.settings/databases/settings.db \
  "delete from secure where name = 'screensaver_components'"

Pre-fix workaround:
  adb shell sqlite3 \
  /data/data/com.android.providers.settings/databases/settings.db \
  "insert into secure(name, value) values ('screensaver_components', \
  'com.google.android.deskclock/com.android.deskclock.Screensaver')"

Change-Id: I2cf39608c8dd5011f6a00deece95eb6554da5173
2012-08-25 09:51:40 -04:00
Dianne Hackborn
ba94170a7a Merge "Some clean up of app install and user management." into jb-mr1-dev 2012-08-24 18:03:56 -07:00
Adam Powell
f3db71791b Merge "Show content description popups when long-pressing action bar tabs" into jb-mr1-dev 2012-08-24 18:01:14 -07:00
Adam Powell
c7752a312a Show content description popups when long-pressing action bar tabs
If an action bar tab shows as an icon only and has a content
description, show a long-press popup with the content description.

Bug 6009390

Change-Id: I7f2f68eeef03ede99ff2113e21e1dc14a4295827
2012-08-24 18:00:40 -07:00
Dianne Hackborn
4428e17c5e 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
2012-08-24 18:00:37 -07:00
Raph Levien
236d0520a6 Merge "Fix bug 7054190 line breaks at inappropriate places" into jb-mr1-dev 2012-08-24 16:19:19 -07:00
Fabrice Di Meglio
de91aa4bec Merge "Fix again bug #6887370 ListPreference shows misaligned radio drawables (in CheckedTextView?)" into jb-mr1-dev 2012-08-24 16:11:19 -07:00