2362 Commits

Author SHA1 Message Date
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
Dianne Hackborn
8633e68ebd Fix issue #2619247: Music sometimes stops playing when navigation talks
When a service transitions from foreground to background, we now push it
to the top of the LRU list.  Also fix the activity manager to take care
of killing processes if we go beyond a reasonable number of background
process to keep around.

Change-Id: Ic9f44c02af7a111ee6f1d06142386b301948bafe
2010-04-22 16:11:18 -07:00
Dianne Hackborn
f09c1a247a Fix issue #2608292: Fails to launch the video camera preview
Need to clear the attached hidden flag on the window, even if it does
not yet have an actual surface.

Change-Id: I0a90f6b03cd8e347a3eae4d6bea3ab93f7128bf4
2010-04-22 15:59:21 -07:00
Robert Greenwalt
fb9896b5cd Add a Throttle check shortly after boot.
Throttle is useless when ntp and imsi are not yet ready.  In the real world
the second check won't happen for 10 minutes letting people do what they want
for 10 minutes each boot.  Trim this down with a quicker first check.

bug:2614247
Change-Id: I84ec33f31e8fed37b3933482fbc187b8e9e94e79
2010-04-22 15:39:38 -07:00
Robert Greenwalt
05fa2144e4 Merge "Trim throttle logs." into froyo 2010-04-22 09:08:25 -07:00
Robert Greenwalt
bf7de39727 Trim throttle logs.
Removing unwanted sntp logging and throttle logging.

bug:2614927
Change-Id: Ic0b1c3502ebbc1f04130d09d715591af6513f439
2010-04-22 09:04:27 -07:00
Christopher Tate
36fa47139d Merge "Fix security hole in Google backup transport registration" into froyo 2010-04-21 18:10:20 -07:00
Christopher Tate
a32504fce8 Fix security hole in Google backup transport registration
Previously, it was conceivable that a 3rd party application on a non-GED
device could publish a service that supported the (hidden) IBackupTransport
interface and spoofed the Google backup transport's package and component
name.  This could allow it to secretly intercept all data moved through the
backup mechanism.

Fix by ensuring that the package in question exists and is part of the
OS itself (FLAG_SYSTEM in its ApplicationInfo description) before binding
to it.

Fixes bug #2457063

Change-Id: I3487572be45c2014fa209beacfe3ac6f8270f872
2010-04-21 18:02:56 -07:00
Jeff Brown
22caecda8a Merge "Fix PM crash due to bad array bookkeeping logic." into froyo 2010-04-20 17:53:00 -07:00
Robert Greenwalt
be34896457 Merge "Move Tethering off the ServerThread." into froyo 2010-04-20 17:37:22 -07:00
Jeff Brown
8c8bb8b3c4 Fix PM crash due to bad array bookkeeping logic.
Bug: 2586093
Change-Id: I320deeef65a434060e608015dc2dd97b8200e025
2010-04-20 17:21:47 -07:00
Robert Greenwalt
7eae25021d Move Tethering off the ServerThread.
An ANR has been reported because somebody else was hogging the Netd
link.  We can't pause the server thread for that, so make a new thread.

bug:2609904
Change-Id: I0430a08621da1cda0a0010ce15826cceee59a529
2010-04-20 15:51:20 -07:00
Daniel Sandler
c96307efd2 Merge "Make the silent/vibrate status icon reflect overall device state. (DO NOT MERGE)" into froyo 2010-04-20 12:57:54 -07:00
Robert Greenwalt
f06f2eb2d6 Merge "Misc fixes for throttling." into froyo 2010-04-19 13:21:01 -07:00
Robert Greenwalt
05d0673bfc Misc fixes for throttling.
Cleanup of duplicate code
Caching Ntp data so we don't hit the network as often
Clearing out of MRU data when we switch to a new sim
Sending notification after we reset byte counts

bug:2605277
bug:2605272
bug:2597530
bug:2576057
Change-Id: I3df526bae6374f6ae56fed67b0defad2b4fabefd
2010-04-19 12:29:29 -07:00
Brad Fitzpatrick
b213d103d3 Reduce lock contention, removing unnecessary synchronization.
The value returned is purely a function of what's passed in, all
following final members.

BUG=2606839

Change-Id: I506fb9b1f3be965576c2b3317a30ff1f990ccda3
2010-04-19 11:58:52 -07:00
Brad Fitzpatrick
afbf9f8d6d Merge "Ease contention on the mProcessStatsThread mutex in updateCpuStats." into froyo 2010-04-19 11:50:53 -07:00
Daniel Sandler
c210b65cd2 Make the silent/vibrate status icon reflect overall device state. (DO NOT MERGE)
Previously, this status icon reflected just the incoming
call behavior:
 - gone for audible (with or without vibrate),
 - wiggling phone for vibrate,
 - silent (speaker + X) for no audible ring or vibrate.

Now that silent mode has changed (see VIBRATE_IN_SILENT),
you can easily get into a state where this icon is
confusing by setting the incoming call ringer to *never*
vibrate but setting the overall device silent state to allow
vibration (VIBRATE_IN_SILENT=true).  In this case, rocking
the volume all the way down would show a wiggling phone
(because the device is in vibrate-only mode) but the status
bar would show speaker+X (because the incoming call would
neither ring nor vibrate).

Now these two icons are consistent. This means, however,
that if this special condition is set by the user (device
vibrates in silent mode, but incoming calls should never
vibrate) and the device is in silent mode, the status bar
will show a wiggling phone even though incoming calls will
not vibrate the device. This puts the ringer on a more even
footing with other apps on the device, which may elect not
to vibrate even if VIBRATE_IN_SILENT=true overall.

Bug: 2598014
Change-Id: Ib942f68738d77ab0d9b9da4fac718ae5957c133c
2010-04-19 14:36:57 -04:00
Brad Fitzpatrick
01fad4a526 Ease contention on the mProcessStatsThread mutex in updateCpuStats.
BUG=2606839

Change-Id: I444af0bb4a7b0be7ebf9ee5887805f2f09a426d0
2010-04-19 10:47:40 -07:00
Jean-Michel Trivi
04152f98ff Merge "Fix bug 2599698 Music paused by itself The NotificationPlayer sets an OnCompletionListener on the MediaPlayer it's using to play the notification. NotificationPlayer relies on the completion event to abandon audio focus. The player was started before the listener was set. The theory about the bug is that the player finished playing before the listener was called. Therefore the audio focus was never abandonned, and the music didn't resume." into froyo 2010-04-19 09:41:19 -07:00
Mike Lockwood
3110bf6df1 Merge "Fix inconsistency in how we handle light sensor when battery is low." into froyo 2010-04-19 08:18:58 -07:00
Robert Greenwalt
7171ea8179 Make ThrottleService more tamper resistant.
Use elapsed time not wall time for alarms so users can't play with the
system time to get around things.

Also using NTP servers to pull in an authoritative time - if we the build
is configured with an NTP server we will not advance to the next cycle
without it, but we also will not trottle - rather not throttle users
on an error.

Note that the poll alarm is just relative to the last poll time and real
time doesn't matter.

Defining the time-fetching API's as returning time in the system wallclock
range (correcting if we are using NTP time internally).

bug:2597530
Change-Id: I1c0ac0923314c2f8a04edd0b36c4845352eae99a
2010-04-18 10:21:20 -07:00
Mike Lockwood
48358bd5c1 Fix inconsistency in how we handle light sensor when battery is low.
In lightSensorChangedLocked we ignore the light sensor if the battery is low.
But in applyButtonState() and applyKeyboardState() we were still using the previous
mLightSensorScreenBrightness value, which resulted in a race condition that could
leave the button lights on after the screen turns off.
Now we ignore the light sensor value and button brightness override if the battery
is low so the low battery behavior is consistent.

Change-Id: I4943f8904299883211a95596ee207df69d1eaea2
BUG: 2570962

Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-04-17 22:29:20 -04:00
Irfan Sheriff
cf28236b37 Dont check on interface value on API
The interface check in API could be used
in future.

Bug: 2576057
Change-Id: Icfb78a88be44d1e6a8350c4b65efe70970e658d8
2010-04-16 16:53:20 -07:00
Jean-Michel Trivi
a99f5f43cd Fix bug 2599698 Music paused by itself
The NotificationPlayer sets an OnCompletionListener on the
MediaPlayer it's using to play the notification.
NotificationPlayer relies on the completion event to abandon
audio focus.
 The player was started before the listener was set. The theory
about the bug is that the player finished playing before the listener
was called. Therefore the audio focus was never abandonned, and
the music didn't resume.

Change-Id: Ic3baf359ea24de0d832a655dc47e745b25bc3dec
2010-04-16 16:40:47 -07:00
Robert Greenwalt
e80c6f49d5 Merge "Add multi-sim support to ThrottleService." into froyo 2010-04-15 17:37:55 -07:00
Robert Greenwalt
e6e9882341 Add multi-sim support to ThrottleService.
Uses the last used data until the SIM is available (if ever).  Supports data from
several SIMs for all the world travelers out there.

bug: 2576057
Change-Id: I70e34a51f1c2ccda41a480652b0233b68ff3f538
2010-04-15 17:23:59 -07:00
David 'Digit' Turner
4f99e3c284 Remove native binaries when an updated system application is upgraded through OTA.
The point of this patch is to deal with the following case:

- A system application exists in the system partition. As such its
  native code lies under /system/lib

- An upgrade for it is installed through Market and overrides the
  version on the system partition. This places its native libraries
  under /data/data/<pkgname>/lib/

- Finally, the system is upgraded through an OTA, with an even more
  recent of the system application. We thus must remove the Market
  package as well as the native libraries that are in <dataDir>/lib
  since the new versions in /system/lib will be more recent.

The patch itself removes the files in <dataDir>/lib when such a
situation is detected. Note that this directory is created by the
PackageManager service and owned by the 'system' userID. The application
cannot create files there so simply erasing the content of the directory
is enough (and avoids reparsing the market package file to list
the installed binaries).

The patch also fixes a different issue which can be reproduced with:

- have system app installed on /system partition
- install an update (e.g. adb install -r Term.apk)
- uninstall the update (e.g. adb uninstall com.android.term)

the logcat shows that the PackageManager will unpack the native libraries
from the original /system/app/Term.apk into <dataDir>/lib, while they
already are in /system/lib. The patch fixes that too.

Change-Id: I5dfe27b91b6b31972e9cd4c196d15c3692732127
2010-04-15 10:35:25 -07:00
Mike Lockwood
93597ed183 Merge "Fix wakelock leak in PowerManagerService.sendNotificationLocked()" into froyo 2010-04-15 05:45:21 -07:00
Robert Greenwalt
8090edae9e Merge "Sholes mobile iface comes/goes - handle the reset" into froyo 2010-04-14 20:23:45 -07:00
Suchi Amalapurapu
deb69370ef Revert "Add ordered broadcast when removing packages."
Couple of cosmetic fixes as well.

This reverts commit 0c1285fa979e8b8c170f31d0ef1b4e5d9ddcf6b1.

Conflicts:

	services/java/com/android/server/PackageManagerService.java

Change-Id: Ife0f9f80525f4a41b1f8c12ffc2de62e061e7d5b
2010-04-14 19:58:22 -07:00
Dianne Hackborn
b0ef144286 Merge "Fix issue #258640: Automatic propagation of FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET" into froyo 2010-04-14 19:02:00 -07:00
Suchi Amalapurapu
315a5fb91d Dont fall back to installing on sdcard when internal storage is filled up
when the install location is set to internal only. Similary if install
location is set to external only(via adb), dont fall back to installing on
internal storage if sdcard is filled up.
If nothing is specified ie install location is set to let system decide,
we just check on internal storage.
Fix tests

Change-Id: I7400ccc131782d9c45284bd9ebd0dee43a3b412b
2010-04-14 18:24:06 -07:00
Dianne Hackborn
b67fa45c26 Fix issue #258640: Automatic propagation of FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET
Make sure, if an activity is started with clear task when reset, if that
activity is finished in the middle of a stack that the behavior is retained
by propagating it to the next activity.

Change-Id: Ie31b8f968558b0e64e0ef7efa55950a722c6afa5
2010-04-14 18:01:43 -07:00
Robert Greenwalt
8c7e609b53 Sholes mobile iface comes/goes - handle the reset
The byte counter for the iface goes to zero when it comes back.  Catch that and
do the complex math to correct.

Also add a log entry telling us our desired throttle index.

Lastly, reset the sec/msec part of our reset time so that one calc will == another and not
be off by little bits.

bug:25494925
Change-Id: I99525b72a76316a8e601ceb457ca202fae040bae
2010-04-14 17:31:20 -07:00
Suchi Amalapurapu
0c1285fa97 Add ordered broadcast when removing packages.
Change-Id: I30a84068fa8f2b15564b0a164d339ac95f40e801
2010-04-14 17:13:50 -07:00