When the wakeup time is negative, the kernel /dev/alarm driver
never triggers the alarm. This can cause alarms to back up in the
priority queue since an alarm at the head with a negative wakup time
will never be triggered. Now we use 0 as the wakup time which causes
an immediate triggering.
When the wakeup time is very large, it is possible for a numeric
overflow to occur when converting the timestamp from milliseconds
since epoch to nanoseconds. This has been fixed by avoiding the
intermediate conversion in the JNI call so that overflow cannot
occur.
Bug: b/2558820
Change-Id: I4f5b4646a04090cc749a9fc5d3982a68402954ef
Setting the allowed channel count in the
driver can take a long time to potentially
cause ANR in the phone process. Make the call
asynchronous
Bug: 2555117
Change-Id: Ie3c2e6f90aa0ec8ee4b85c989ccae1ca0f2b94f9
Addresses:
Issue #2550648: PackageManagerService setComponentEnabledSetting unconditionally
writes Settings xml
Issue #2549084: Make PackageManager.addPermission have async version
Also make the writing of settings when changing the preferred activities to use
the same async mechanism, and fiddle with thread priorities in the background
thread to go up to foreground priority when holding the lock to write settings
and a few other places. (At some point we should really clean this up to never
acquire the main lock while in the background.)
Change-Id: Ib2b7632543f6fb3f92a225518579f3b2d15e1413
This transaction can involve the transport having to query a remote backend
over the wire, so it can take a Long Time(tm). Make it main-thread-safe by
making it asynchronous, with the results passed as a callback to the invoker's
RestoreObserver. We also make the IRestoreObserver callback interface
properly oneway.
Bug #2550665
Bug #2549422
Change-Id: If18a233a0a3d54c7b55101715c9e6195b762c5a0
Don't hold the activity manager lock the entire time we are processing an ANR,
which often causes us to cause a second ANR as someone else calls into the
activity manager and gets blocked.
Change-Id: Ife4db82b12d6f4378ac2705bd6f60beb1244a1e6
Killing the WifiWatchdogService thread from
WifiService can cause messages to be handled on
a dead thread. Quit the thread on the broadcast
instead.
A couple of more fixes:
- Do an asynchronous bring up of Wifi. This will
allow WifiWatchdogServiceThread to be immediately
brought up, instead of relying on an update.
- There is no need to listen on supplicant connection
in wifiwatchdog anymore. We kill the thread when
supplicant connection is no more.
Bug: 2546756
Change-Id: I15a188e031bc79856c55aabdd271287b0df0377d
This change introduces the NotificationPlayer class which was
created from the code of android.media.AsyncPlayer. The only modification
was to modify the construction of the MediaPlayer so it properly issues
onCompletion notifications (which are used to abandon audio focus).
Unless the sound to be played is looped, the notification is transient
and other apps may duck (uses AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK in
audio focus request).
Change-Id: I69cbb71d0892447b934351384e4e24a2e239295b
* @hide the android.app.backup.RestoreSession class and functionality
* Provide a public method on android.app.backup.BackupManager that apps
can use to request a restore pass of their last-known-good dataset.
The new method is called requestRestore().
* Provide the name of the package being restored, not just its ordinal,
in the RestoreObserver's onUpdate() callback.
Part of bug #2545514
Change-Id: I9689bf8d6e2b808b4ee412424a36a835be0a5ca8
There was a really dumb bug that was causing us to not always apply
the new configuration. As a result of fixing this, there were new
glithes in the transition between car and regular mode, so further
work here to fix that. And since I was actually working during the
night and seeing night mode, I noticed how obnoxiously bright the
status bar is compared to the car home at night, so it now nicely
dims itself when we switch to the night config. Oh and in doing
that I also found and fixed a bug in dispatching config changes to
a window (where they wouldn't get dispatched if the window didn't
resize).
FINALLY... tweak the wallpaper enter/exit animations a bit to
make them a little smoother.
Change-Id: I4e062093cbcfbc919307799a794846db2920216f
Also includes a trivial test of I/O latency. (Mostly useful to be invoked
from checkin to poll disk-free and latency issues. Also moderately useful
to see in a bugreport.)
Also make "dumpsys netstat" a non-no-op, in case we want this data.
Change-Id: Ia93550a23ca6b35586c5d9217890ee0a5801aae1
We weren't notifying the second tethered iface of it's upstream iface name so its traffic
was not getting routed correctly.
We also weren't clearing out our connected iface name when we untethered, so the route rules
weren't getting flushed when the last tether came down.
Change-Id: I34e5d672ea882c89c8f582d69d6dc421cb52d4b4
We add a variable for saving wifi state
to restore after tethering.
Bring up wifi on boot up if the state indicates so.
Bug: 2537983
Change-Id: I9c6548b93df6fcbc0cec1e6b857f7224dc6d1b2c
Previously we only supported a single range - this was inadequate for
multiple interfaces. Adding a second range so we can support
both usb and wifi tethering.
Also moving out of the zero-conf range as our dhcp client won't
accept ip addrs in that range (no nexus to nexus wifi action).
bug: 2537963
bug: 2533491
bug: 2538303
Change-Id: I600b421343c28c2f9839ed2076122ae3d0ff5d3d
On keyboardful devices, it is possible to disable the system soft input
method. Something changed in eclair that caused the ime to be re-enabled
on every package manager update (packages added/deleted).
Now keep track of disabled system imes in the settings db and search
in that list before enabling a system IME on package changes.
Every time the user goes to settings to enable/disable imes, the list
is re-created.
Any new system IMEs that may be added via an OTA will get enabled if
they have a different package name.
Disallow Tethering being disabled by Wifi
and vice versa. We now need to explicitly
disable tethering to enable Wifi.
Bug: 2539071
Change-Id: Id34a5335e70cb7234367b4709882937a4b8cc526
Due to message removal, wakelock could be held forever.
Do a timer only based wakelock release until we do this
more cleanly in ConnectivityService for later release.
Also, add an optimization to prevent use of wakelocks when driver is
already stopped.
Bug: 2529883
Change-Id: Ia1c2ddd44213ef3aa609855613bf155945bef8e4
Need to be sure to compute gids when SD card is mounted, since we
need the package info for that. Note that this is not re-granting
permissions (and in the future we could optimize this to just pass
through the mounted apps).
Change-Id: I51e1c23d17a6429642132902ef75c65a307fc33a
This is needed when restoring applications installed on sdcard
via Market after a data wipe. The stale containers need to be cleaned up before
reinstalling again.
Add a test case for installing when a stale container exists.
Change-Id: I20c30b3003e85fb31531dd3cf9cb59962fe8fe5f
Use new method in UsbStorageActivity.
Fix moving dex files.
moveDex should be suffixed with LI since it uses Installer
Change-Id: Id5ef0254578e84b9aae2c2ac44f722eb5a0fda1c
Also fixes how the quality vs. mode is handled to be more consistent, which also
required introducing a new "alphabetic" quality since it is possible for the user
to enter such a password.
The current password quality and length is stored in the DPM, since at boot it
couldn't figure this out from the stored password.
Change-Id: I519d9b76dd0b4431bcf42920c34dda38c9f1136e
Fiddle with how we go into car mode to try to ensure we get a clean
transition. Also have the system take care of remembering the night
mode setting so it will stay at what you want.
Change-Id: Icb94fdd961c7a192f7707ec71544485a1ea12455