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
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
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
Was not properly handling creating DefContainerService when the installation was
for USER_ALL. Not a problem for Market installs.
Bug: 7061571
Change-Id: I4528b4c56e38effa137da56460e78c55b242ba45
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
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
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
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>
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
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
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
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
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
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