2382 Commits

Author SHA1 Message Date
Adam Powell
5cd88cfd23 Fix bug 2757693 - Multi-touch coordinates can jump when a finger goes down.
Change-Id: I26bd54cec739ca8d91d2c2b18b90134f20dbd907
2010-06-09 17:10:04 -07:00
Jim Miller
284b62e1b8 Fix 2737842: Disable KeguardManager API if device policy is enabled
This change adds notification to find out when the device policy
has changed.  When an admin adds or changes a policy, we get notified
and reset the state of keyguard to be enabled.

It also moves disabling keyguard into the TokenWatcher.acquired()
method to avoid disabling keyguard when a policy doesn't permit it.
This avoids reference counting issues in TokenWatcher and hence relieves
the ordering issue.

There is one remaining caveat. An application that uses KeyguardManager
to disable keyguard will need to disable keyguard again after any
policy change.

Tested:

Install and run app that disables keyguard with no admin. Result: keyguard is enabled/disabled as expected.
Enable admin and set quality = "something" after installing & running app. Result: keyguard is enabled.
Change admin password quality to "unspecified" and re-run app (per caveat). Result: keyguard is disabled.
Change admin password quality to "something" again. Result: keyguard is enabled.
Disable admin : Result: keyguard is enabled until app runs again (per caveat).

Added minor cosmetic changes after review.

Change-Id: I302f2b01446bf031f746b0f3e8b5fd7a6cc0e648
2010-06-08 15:47:52 -07:00
Jim Miller
bde25c2077 Merge "Fix 2737842: disable keyguard API when device policy is enabled." into froyo 2010-06-07 19:24:45 -07:00
Jim Miller
d6b5705e18 Fix 2737842: disable keyguard API when device policy is enabled.
This fix disables KeyguardManager's enable/disable API when any
device policy admin requests a policy that enforces a password.

Change-Id: Idb1da16b14ed8963142f7b1f62d2b060d84ffa65
2010-06-07 19:19:29 -07:00
Christopher Tate
ac24d23cd4 Merge "Don't bring up Launcher until after boot complete" into froyo 2010-06-07 18:46:46 -07:00
Christopher Tate
04c0af8f55 Don't bring up Launcher until after boot complete
The preboot upgrade handling was bringing up the acore process with a default
application object, then the normal "start the HOME app" code was bringing up
Launcher2 [hosted in acore] in anticipation of boot completion... but then it
saw that the host process was alive and continued with Launcher2's init.
Launcher2 depends on a custom application object, however, so it crashed
immediately.

This change ensures that the HOME app is not actually initted at that level
until after boot has completed, at which point its proper application class
can be instantiated.

Fixes bug #2732250

Change-Id: I1a15384e2c0d50e14300df0c0db236bd7b1a187c
2010-06-07 18:35:20 -07:00
Dianne Hackborn
d1d9047d5c Merge "Fix issue #2749322: addPackageToPreferred throws SecurityException" into froyo 2010-06-07 17:32:02 -07:00
Dianne Hackborn
8377fc0f36 Fix issue #2749322: addPackageToPreferred throws SecurityException
Change-Id: I96cdc110fd9acca4b6c95d281e819bad1e4557f8
2010-06-07 17:30:57 -07:00
Robert Greenwalt
5a671d03e3 Cut logging, boost efficiency of ThrottleService
Changed the Alarms to be non-waking.

bug:2748959
bug:2747862
Change-Id: I9e4294162a4fc2f90aed36393b858edcf82aa307
2010-06-07 16:43:16 -07:00
Christopher Tate
df2e2eff94 Merge "Watchdog now records kernel stacks when it fires" into froyo 2010-06-04 18:06:07 -07:00
Robert Greenwalt
f9610b3842 Merge "Make the DUN apn data secure." into froyo 2010-06-04 15:55:09 -07:00
Christopher Tate
ecaa7b41ca Watchdog now records kernel stacks when it fires
The kernel threads are appended to the usual /data/anr/traces.txt file
and dropboxed along with the usual Dalvik stack dumps.

Change-Id: I120f1f5ee54c965efe9ac0c7f40fdef56385f1fa
NOTE: this change depends on the kernel publishing /proc/$PID/stack
2010-06-04 14:55:02 -07:00
Jeff Hamilton
4b3309211e Don't crash when low storage is encountered pre-boot completion.
Bug: 2741633
Change-Id: Ic073ead64ff43b2e2c32b439756cd71c2b6550b8
2010-06-04 15:16:06 -05:00
Robert Greenwalt
77b32ddbbe Make the DUN apn data secure.
Rather than come out of the user-modifiable APN DB, the DUN APN data will
come first from a built-in resource and then potentially overriden by a secure
setting (which is gservices upgradable).

Also made the "require-dun" setting secure-setting overridable.
bug:2736390

Change-Id: I1e4644c3839f06c977b83797641f3948785146a2
2010-06-04 11:13:34 -07:00
Christopher Tate
6ee412d51d Also dump system process threads halfway through the watchdog interval
This gives us a snapshot of what the system process was doing after 30 seconds
of apparent inactivity as well as after 1 minute, to help distinguishing actual
deadlocks from too-slow progress, livelock, etc.

Change-Id: I19758861d1b25f298e88788e8f1c7ec7bf828823
2010-05-28 12:23:16 -07:00
Jeff Hamilton
dc46f6f6cc Merge "Don't enforce broadcast timeouts for PRE_BOOT_COMPLETED broadcasts." into froyo 2010-05-27 09:39:19 -07:00
Irfan Sheriff
7baec0fe4e Fix null pointer exception
Bug: 2718857
Change-Id: I4b04284fd5b3a4881297fe15555e9f1ca91d73cb
2010-05-26 17:16:47 -07:00
Irfan Sheriff
9ecca85f06 Merge "Fix escaping of characters" into froyo 2010-05-26 13:02:06 -07:00
Jeff Hamilton
acf8474b68 Don't enforce broadcast timeouts for PRE_BOOT_COMPLETED broadcasts.
They're designed to handle one time upgrade code, which may
take a significant amount of time. Third party code cannot
receive this broadcast so the timing should be able to be
kept under control.

Bug: 2713849
Change-Id: I3733b6530198bebd9b8c2ba6f9f27a7999336b8d
2010-05-26 14:02:56 -05:00
Robert Greenwalt
d1055a250c Make the NTP Cache max-age gservices-settable
Trying to make Throttle polling more energy efficient.

bug:2708119
Change-Id: I2b75639e202dcbcee11047c43407a22de04ce350
2010-05-25 15:54:52 -07:00
Irfan Sheriff
a6e559edb7 Fix escaping of characters
\ and " in SSID and password cause issues
with netd parsing. Fix it.

Bug: 2708960
Change-Id: I278ca21c0bbfd9dc430a2f9ae02828274a0d2376
2010-05-24 14:55:42 -07:00
Suchi Amalapurapu
9a212adcff Fix 2641875
Initialize the cache path only if the container exists.
This did exist before but was somehow removed.
Fix a known test failure as well.

Change-Id: I63219369b0e7abca4919fbde2a04035a0fea9e35
2010-05-18 11:31:50 -07:00
Mike Lockwood
eb9cbb8fdd Resurrect flashlight support in obsolete IHardwareService Binder API.
This is to avoid flashlight apps that had been using reflection to access
this API after this class was removed after eclair.

Change-Id: I26ed929abad93345468eb33d4a15977a31ebea7e
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-05-17 17:47:20 -04:00
Chung-yih Wang
5f1beda18f Merge "Make the SSID field of WifiConfiguration consistent with API description." into froyo 2010-05-14 23:15:04 -07:00
Dianne Hackborn
aa77de1348 Fix issue #2686193: Can't move apps to SD card
Change-Id: Icd84d8080d33fb8ce5103a0e726d50f0ec70092e
2010-05-14 22:33:54 -07:00
Chung-yih Wang
047076d170 Make the SSID field of WifiConfiguration consistent with API description.
Bug id http://b/issue?id=2684571

Change-Id: I809478991ba606252d69ef007339754ab2856416
2010-05-15 11:03:30 +08:00
Suchi Amalapurapu
1ace5bc070 Fix 2672155
Check the code path when enabling disabling packages.

Add unit test

Change-Id: I0f0f482a3735234eab3f63ba1f6462574b70144e
2010-05-13 15:48:39 -07:00
Dianne Hackborn
6f86c0e64b Fix issue #2676378: Activity Manager Crash on FRF40
D'oh!

Change-Id: If1b43ff5f230f9bf0de0887deb1b25dcf6aa6e66
2010-05-11 14:20:52 -07:00
Mike Lockwood
f19a785e15 LocationManagerService: Call updateNetworkState on providers that are disabled.
Fixes a problem with Network Location not working after SetupWizard until the
network state changes.

Change-Id: Ief81b76beb5cc90b2ca7d8aa2d4c99221898f01d
BUG: 2671347

Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-05-11 15:35:09 -04:00
Jean-Michel Trivi
392a2bbb52 Fix bug 2670395 and 2599698
When the user selects a "Silent" notification sound, the Uri encoded
    path is an empty string. Setting this Uri as the data source of the
    MediaPlayer used to play notifications caused the completion listener
    to not be called, which with the AudioFocus logic causes the Music
    app to pause and never resume. The NotificationPlayer modifications
    cause the MediaPlayer for the notification to only request audio
    focus when the data source is not empty.
    The audio focus code in AudioService is defensively synchronized
    against a unique lock, and the exception observed in bug 2670395
    is explicitely caught in case another edge case wasn't caught by
    this fix.
    The AudioFocus handling in AudioManager is modified so only the
    requestAudioFocus and abandonAudioFocus methods are meant to be
    used, as registerAudioFocusListener and unregisterAudioFocusListener
    provided no additional functionality over the request/abandon
    methods. abandonAudioFocus() also removes the listener from the
    map in AudioManager since after abandonning focus, the listener
    would no longer be called.

Change-Id: I3b553ee8a8163c25e01117d7e5479dd5fdfa7c6b
2010-05-11 09:20:49 -07:00
Dianne Hackborn
6d00151c51 Merge "Hopefully fix issue #2662536: Why is launcher being killed?" into froyo 2010-05-10 17:27:14 -07:00
Dianne Hackborn
906497c574 Hopefully fix issue #2662536: Why is launcher being killed?
It looks like there was a subtle bug where Process.setOomAdj() could
return false just because the given process doesn't exist, even though
it is documented to only return false if OOM killing is not supported
at all.  This would cause the activity manager to fall into its code
path of trying to clean up processes itself, which it does a much
poorer problem at.  I am thinking we may be seeing this problem more
now that the activity manager is killing background processes itself
when there are too many of them.

In addition, this change cleans up and reduces some of the logging
around killing processes.

Finally, try to improve process LRU management a bit by taking
into account process dependencies.  Any dependent processes are
pulled up in the LRU list with the processes that is actually
moving.  Also, we bring a process up if someone accesses its content
provider.

Change-Id: I34ea161f839679345578ffe681e8d9c5d26ab948
2010-05-10 17:19:58 -07:00
Robert Greenwalt
fee4683f47 Fix ThrottleService wifi interaction
When we switch to another network (or even just lose mobile data) the mobile
interface is either brought down or destroyed altogether.  That means any
throttling rules we've told the kernel about get lost.

This change notices when our interface comes up and reinstates throttling
if needed.

bug:2660287
Change-Id: I4c6ebf78acc59ed66b95984a1e8b7c2ffbc22dcb
2010-05-06 16:45:43 -07:00
Suchi Amalapurapu
c1d07d9beb Fix 2656989. Clean up update to updated system applications.
Change-Id: Ic66b00926c45fac43396f1f8f23d0865ba77faba
2010-05-05 14:06:17 -07:00
Dianne Hackborn
4416c3d6e4 Fix issue #2643754: Launcher is caching widget layouts for too long
With the .apk file names now changing during an update, we need
to make sure to flush all caches related to a package when the
package is removed.  Otherwise we can continue to use the old
package, since its old file may still exist if we try to load it
too soon.

Change-Id: I15f08dffca3feac999dbca4f24bef12a30ca0a66
2010-05-04 17:22:49 -07:00
Dianne Hackborn
c956f37567 Fix issue #2641875: Apps on sdcard not accesible after update
Change-Id: I541aa040939e6a872f0b7e8e82e44f96de49d97a
2010-04-29 11:56:40 -07:00
Amith Yamasani
6e4895b63a Merge "Make timezone changes apply to status bar time in 24hr mode. Bug: 2632681" into froyo 2010-04-28 15:18:15 -07:00
Amith Yamasani
c4938fd619 Make timezone changes apply to status bar time in 24hr mode. Bug: 2632681
The SimpleDateFormat was being cached and new timezone not being applied. Make sure
to apply the new timezone to the format object as soon as it changes.

Change-Id: I72abfef2e14cf5db5a6e8cb71b053380b695495c
2010-04-28 13:20:43 -07:00
Dianne Hackborn
92cfa105f9 Fix issue #2569139: Sapphire user cannot login to last.fm...
...after upgrade from Donut to FRF01B

For realz this time.

Change-Id: I92bd12451b19a6006cf487a9dfa0b7c696a21122
2010-04-28 11:00:44 -07:00
Jean-Michel Trivi
cd24dae9ca Merge "Fix bug 2605504 Don't leak a metric ton of NotificationPlayer threads The Looper on the thread created in order to be notified of the playback completion of notification sounds, was never stopped, causing the threads to stay around in wait state. The fix consists in quitting the Looper used for the previous sound when a new sound is started." into froyo 2010-04-26 18:02:35 -07:00
Jean-Michel Trivi
6cf3d09636 Fix bug 2605504 Don't leak a metric ton of NotificationPlayer threads
The Looper on the thread created in order to be notified of the
playback completion of notification sounds, was never stopped, causing
the threads to stay around in wait state.
The fix consists in quitting the Looper used for the previous sound
when a new sound is started.

Change-Id: Ia4b3d16b5447ffafacc093db3a7fe05574089935
2010-04-26 17:21:40 -07:00
Robert Greenwalt
27fba6797b Fix Throttle reset.
The start and end times were precisely the same so, a ">" check needed to be ">=".
Also removed useless code and removed the potential problem where continuous gradual
advancement of your start and end times would prevent resets.

bug:2629717
Change-Id: Ieced1965a5611a9b555e92bcf924ec350f2a80db
2010-04-26 12:29:14 -07:00
Robert Greenwalt
19681af44b Merge "Handle throttling being disabled via policy change" into froyo 2010-04-26 11:13:11 -07:00
Robert Greenwalt
cce83379ef Handle throttling being disabled via policy change
bug:2622543
Change-Id: Ic0c169094cdb4f80af9cfcbed116f59fda46a421
2010-04-23 17:35:29 -07:00
Bryan Mawhinney
2131a3caa8 Fix typo when parsing external platform version from Settings.
May fix http://b/2569139

Change-Id: I437f614fd25512bd461812feddb091edcd12ccb7
2010-04-23 22:42:17 +01:00
Dianne Hackborn
2adec762fb Merge "Fix issue #2621809: Kill! Kill! Kill!" into froyo 2010-04-23 14:23:39 -07:00
Dianne Hackborn
149427cd90 Fix issue #2621809: Kill! Kill! Kill!
Stop! Stop! Stop!  Spamming the log.

Change-Id: I13f432b49d8c85165873566d58e2fb2714b1263e
2010-04-23 14:20:03 -07:00
Robert Greenwalt
5bf16d6e8c Respond to changes in throttle policy.
We were updating limits and such before, but we were not applying them
to the current situation if we were already throttled.  Now it can result in
us throttling or changing our throttle rate or unthrottling or even making
the ui come or go (disabling/enable throttling)

bug:2622543
bug:2619879
Change-Id: I64a62634d54f4768ab8625f8d72f9f66a239cb19
2010-04-23 13:15:44 -07:00
Robert Greenwalt
251ccef044 Merge "Add a Throttle check shortly after boot." into froyo 2010-04-23 10:17:14 -07:00
Dianne Hackborn
90c6aec10f Merge "Fix issue #2619247: Music sometimes stops playing when navigation talks" into froyo 2010-04-22 16:23:44 -07:00