83375 Commits

Author SHA1 Message Date
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
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
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
Jean-Baptiste Queru
c77c6898b3 am 3221b333: am 26ad1e78: am 03d16e12: Merge "Make setCaptureRate locale safe"
* commit '3221b33322b480fe9d4ba9dc0e7cd684ebe8c96a':
  Make setCaptureRate locale safe
2012-08-27 13:10:57 -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
Dianne Hackborn
4763989d95 am 32d1fec5: Merge "Fixes relative time formatting issue for dates in future"
* commit '32d1fec50baaecdea34ae2a47ca808e8e4181ed2':
  Fixes relative time formatting issue for dates in future
2012-08-27 12:31:49 -07:00
Andy Stadler
be7ddb9f29 Merge "Fix package verifier lookup" into jb-mr1-dev 2012-08-27 12:28:05 -07:00
Amith Yamasani
a84a4af9b1 Merge "Fix adb install" into jb-mr1-dev 2012-08-27 12:24:24 -07:00
Amith Yamasani
2b91465233 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
2012-08-27 12:04:40 -07:00
Irfan Sheriff
63dc027be2 Merge "Fix permission issue on channel" into jb-mr1-dev 2012-08-27 11:59:16 -07:00
Jeff Sharkey
62e2709c3f Merge "Ensure /data/media before trying to upgrade." into jb-mr1-dev 2012-08-27 11:42:30 -07:00
Jeff Sharkey
dc9b0128c5 Ensure /data/media before trying to upgrade.
Most devices create the path in their init.rc, but create it just
to be sure.  This fixes emulator boot failure.

Bug: 7058844
Change-Id: Icab3ce11c4304d972d13e1d9a0c269cfe05b9370
2012-08-27 11:41:55 -07:00
Dianne Hackborn
32d1fec50b Merge "Fixes relative time formatting issue for dates in future" 2012-08-27 11:39:10 -07:00
Craig Mautner
9d9ea05cde Merge "Fix drag bug." into jb-mr1-dev 2012-08-27 11:34:50 -07:00
Craig Mautner
3486b9696d 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
2012-08-27 11:31:24 -07:00
Jean-Baptiste Queru
3221b33322 am 26ad1e78: am 03d16e12: Merge "Make setCaptureRate locale safe"
* commit '26ad1e7874f3151ec331e142fdcb8b3a22ddc26a':
  Make setCaptureRate locale safe
2012-08-27 11:29:29 -07:00
Jean-Baptiste Queru
26ad1e7874 am 03d16e12: Merge "Make setCaptureRate locale safe"
* commit '03d16e122aa01f9283836d1e5144428082b4c1cd':
  Make setCaptureRate locale safe
2012-08-27 11:28:00 -07:00
Dianne Hackborn
7e0e19d420 Restore man page entries.
Change-Id: I002808037ec117c039aeb71f425c1f43d4cac6d8
2012-08-27 10:57:30 -07:00
Jean-Baptiste Queru
03d16e122a Merge "Make setCaptureRate locale safe" 2012-08-27 10:22:29 -07:00
James Dong
71d7c3c628 Merge "Added some common error codes in MediaPlayer.java" into jb-mr1-dev 2012-08-27 10:07:14 -07:00
Jean-Baptiste Queru
af18865486 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
2012-08-27 08:16:02 -07:00
Jean-Baptiste Queru
ba37d595f7 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
2012-08-27 08:13:27 -07:00
Jean-Baptiste Queru
e70a32afc5 am eb00f951: Merge "VibratorService: Fix to ensure actual delay in a vibrate pattern"
* commit 'eb00f951439cd724863d267e8e8d77414383d93f':
  VibratorService: Fix to ensure actual delay in a vibrate pattern
2012-08-27 08:11:19 -07:00
John Spurlock
68cff8c117 Merge "Beans in space." into jb-mr1-dev 2012-08-27 08:08:11 -07:00
Jean-Baptiste Queru
eb00f95143 Merge "VibratorService: Fix to ensure actual delay in a vibrate pattern" 2012-08-27 07:55:41 -07:00
Johan Redestig
1c7928e8c6 Make setCaptureRate locale safe
Dont use the default String.format in setCaptureRate as it is both
locale unsafe and less efficient than regular string concatenation
in this case.

Change-Id: I29418ec0352ef8c79967592b6eb8ff66cc9c99f0
2012-08-27 14:24:10 +02: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
Baligh Uddin
4dd2763295 Merge "Import translations. DO NOT MERGE" into jb-mr1-dev 2012-08-26 16:46:23 -07:00
James Dong
2adac496a8 Added some common error codes in MediaPlayer.java
o related-to-bug: 6770717

Change-Id: Iea8ba6943755a9af8df5b6e91284c7c1b32c3c6c
2012-08-26 14:15:57 -07:00
Jeff Brown
d59db50ab0 Merge "Initialize screen state earlier in the boot process." into jb-mr1-dev 2012-08-25 13:46:49 -07:00
Jeff Brown
04a286b955 Merge "Fix GpsLocationProvider wake lock book keeping." into jb-mr1-dev 2012-08-25 13:44:51 -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
f75724b3d3 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
2012-08-25 13:41:35 -07:00
Jeff Brown
028872fe07 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
2012-08-25 13:40:28 -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
f07439fba4 Beans in space.
Quick example dream reusing the JB bean bag view.

Change-Id: Iad3ecedc9ba2c258bd33fcfbba2e3fc48382bdc8
2012-08-25 13:25:37 -04:00
Amith Yamasani
080ca09c7f Merge "Bind to the correct default container service when installing/moving/measuring pkgs" into jb-mr1-dev 2012-08-25 07:25:42 -07:00
Amith Yamasani
6ec101288b Bind to the correct default container service when installing/moving/measuring pkgs
Change-Id: I0acfe955b5d57b4985d1922fe3dd841a81c824ed
2012-08-25 07:17:29 -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