2255 Commits

Author SHA1 Message Date
Dianne Hackborn
686f7911a3 Merge "Fix issue #2561067: Screen Display half faded..." into froyo 2010-03-31 22:49:30 -07:00
Dianne Hackborn
f83c555d8a Fix issue #2561067: Screen Display half faded...
Also a little tweak to the activity manager to behave better when
an application crash, to hopefully mostly avoid situations where
you get into a crash loop.

Change-Id: I627cc1da3a0f16a180957f02bfbe5c81ecd31758
2010-03-31 22:47:10 -07:00
Suchi Amalapurapu
ae18171acd Change certificate policy.
The certificates of the package and its shared user certificates
 are initialized only when installing the package.

When scanning the packages, the certificates are collected from the apk
if the time stamp changes. If not the one's from
PackageSetting(read from packages.xml) are reused.

Removed mergeSignatures and updateSignatures since we don't support
this any more.
Also fix some bugs related to reinstalling failed upgrades.

Some unit tests.

Change-Id: Ibdeff170bd386d723f774136b18e0ad59d9cdabb
2010-03-31 19:58:25 -07:00
Jeff Brown
c738783cc2 Merge "Fix alarms with negative or very large wakup times." into froyo 2010-03-31 15:56:30 -07:00
Jeff Brown
11c5f1a65d Fix alarms with negative or very large wakup times.
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
2010-03-31 15:38:08 -07:00
Dianne Hackborn
e259bc770b Fix issue #2558391: Package manager problem when not replacing existing system partition app
This fixes the package manager to ensure we can't get in this bad state of
an update to a system app being installed as a separate app.

Change-Id: I2a3f601bbc06b74f31ca09192993614bc6885ff7
2010-03-31 11:07:47 -07:00
Eric Olsen
6a362a97f7 Add thermal shutdown. If battery temp >= 68C.
Change-Id: I625fa47939d8ecc532457b5c6e13f91d83bfbcc5
2010-03-31 09:33:47 -07:00
Jeff Brown
0733079111 Show SD unavailable icon for apps on SD when ejected.
This change include a minor refactoring of PackageItemInfo and related
classes to eliminate code duplication and to avoid redundant work
searching for an ApplicationInfo instance we already have.

Bug: b/2537578
Change-Id: Id0794c3f055ea58b943028f7a84abc7dec9d0aac
2010-03-30 22:20:42 -07:00
Irfan Sheriff
59610c041a cherry-pick d4f3958bde05d04f97e0a4054d2a6185989d99f3 into Froyo
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
2010-03-30 13:37:00 -07:00
Dianne Hackborn
d7c096845d Package manager optimizations.
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
2010-03-30 13:34:43 -07:00
Christopher Tate
22375e4a73 Merge "Make RestoreSession.getAvailableRestoreSets() asynchronous" into froyo 2010-03-30 13:09:50 -07:00
Daniel Sandler
a703590945 Remove logspew.
Change-Id: I8b56a9c289dcc87080116e6af27721e24d49c3b0
2010-03-30 15:45:31 -04:00
Christopher Tate
2d449afe3d Make RestoreSession.getAvailableRestoreSets() asynchronous
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
2010-03-30 12:42:35 -07:00
Dianne Hackborn
e252246655 Fix issue #2547337: switching night modes
Dumb.

Change-Id: Iaa72eaac54422f7fd95cf1050f6b7b6da55af0c3
2010-03-29 21:13:31 -07:00
Dianne Hackborn
ad5499dd20 Hopefully get rid of some ANRs.
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
2010-03-29 21:07:23 -07:00
Oscar Montemayor
1f4df90bfa DO NOT MERGE
Removing unused features from source tree.
Please refer to Bug#2502219.

Change-Id: I879c29bfd5ffe933f64bb1082aaae7c956450a5a
2010-03-29 18:12:24 -07:00
Christopher Tate
cc84c69726 API CHANGE: rename BackupHelperAgent => BackupAgentHelper per API Council
Part of bug #2545514

Change-Id: Ic775e3b942c485252149c1b6c15c88517fa4e3e5
2010-03-29 15:48:14 -07:00
Irfan Sheriff
b99fe5e622 cherry-pick 288b4ac94571e6f77036831708e7bb7c31874688 into froyo
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
2010-03-29 12:02:44 -07:00
Jean-Michel Trivi
211957f639 Implement audio focus support in the notification manager.
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
2010-03-29 09:37:02 -07:00
Christopher Tate
9c3cee9824 API CHANGE: Backup/restore API changes requested by the API Council
* @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
2010-03-26 14:26:44 -07:00
Dianne Hackborn
d49258fed4 Fix issue #2544466: Car Home brightness icon comes and goes while phone is in car dock in FRE83
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
2010-03-26 12:52:53 -07:00
Joe Onorato
1aedcce92f Fix StatusBarService deadlock for real this time.
The lock is now only held long enough to swap the queue with a new ArrayList.

Bug: 2542233
Change-Id: I8c1c3d4d0b5b53166cc239fc0069d69929b43f91
2010-03-26 12:13:29 -07:00
Dan Egnor
621bc54598 Add "dumpsys diskstats" to get a dump of disk-free values.
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
2010-03-25 17:16:01 -07:00
Joe Onorato
53d7c23443 Merge "Fix 2495749 - System process crash when a notification switches sections." 2010-03-25 16:00:25 -07:00
Joe Onorato
32b51436c6 Fix 2495749 - System process crash when a notification switches sections.
Change-Id: I86ff1b78fc309b758c6457be867509b71042d42e
2010-03-25 15:57:49 -07:00
Robert Greenwalt
b012e15441 Merge "Fix Tethering of multiple downstream ifaces." 2010-03-25 15:50:25 -07:00
Robert Greenwalt
b37f0c6513 Fix Tethering of multiple downstream ifaces.
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
2010-03-25 15:29:57 -07:00
Irfan Sheriff
a3bd409a0a settings variable for wifi saved state
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
2010-03-25 15:10:34 -07:00
Robert Greenwalt
bfb7bfa538 Update Framework to support multiple dhpc ranges
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
2010-03-25 14:46:13 -07:00
Daniel Sandler
c68b5b7e5b Merge "Use a more benign icon for ADB notifications." 2010-03-25 13:26:36 -07:00
Daniel Sandler
39576c8df3 Use a more benign icon for ADB notifications.
Also suppress vibe & noise for ADB notifications.

Bug: 2544480
Bug: 2545486

Change-Id: I955a7271f47601f9b35f0d3fcd48363370ebd252
2010-03-25 16:19:53 -04:00
Dianne Hackborn
529bef6925 Dumb late-night typo.
Change-Id: If5e5d8c3728ffc06d686c793ed94a7e18328e5ab
2010-03-25 11:48:43 -07:00
San Mehat
a507859797 MountService: Switch all Log -> Slog
Change-Id: Id33c76497e9d963f295ef6e99d850223ca59b6cd
Signed-off-by: San Mehat <san@google.com>
2010-03-25 10:03:39 -07:00
Dianne Hackborn
2e13d2331e Merge "Fix issue #2543231: chat invitation dialog does show all the time" 2010-03-25 01:02:32 -07:00
Dianne Hackborn
16064f9f18 Fix issue #2543231: chat invitation dialog does show all the time
We were forgetting to re-assign layers after re-ordering windows
after an app token transaction.

Change-Id: I448c0b9da644e027c3edff3ae8a4afa79da292d1
2010-03-25 01:00:03 -07:00
Amith Yamasani
e861ec11c4 Fix 2242164 Soft keyboard keeps getting enabled even if I disable it
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.
2010-03-24 21:39:27 -07:00
Dan Egnor
12331739e0 Merge "Limit DropBox storage to 1000 files (by default)." 2010-03-24 18:13:41 -07:00
Irfan Sheriff
f91444c5e1 Disallow tethering disable by Wifi
Disallow Tethering being disabled by Wifi
and vice versa. We now need to explicitly
disable tethering to enable Wifi.

Bug: 2539071
Change-Id: Id34a5335e70cb7234367b4709882937a4b8cc526
2010-03-24 18:01:57 -07:00
Irfan Sheriff
3bf504df9f Fix WakeLock issue for driver stop
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
2010-03-24 17:59:42 -07:00
Dan Egnor
3a8b0c18a4 Limit DropBox storage to 1000 files (by default).
Also does trimming asynchronously (not directly in the broadcast receiver).

Bug: 2541253
Change-Id: I7daf8bc618e2dce68a98571f5f7fbce4df1d6a76
2010-03-24 17:48:20 -07:00
Dianne Hackborn
3ac71b605b Merge "Fix issue #2540920: connectivity issues with tripit/pandora" 2010-03-24 13:22:20 -07:00
Dianne Hackborn
610f389040 Merge "Fix issue #2537384: Default keyboard input method switched on Eclaire to FRE77D upgrade" 2010-03-24 13:11:55 -07:00
Dianne Hackborn
83e48f57e9 Fix issue #2537384: Default keyboard input method switched
on Eclaire to FRE77D upgrade

We want to prefer system IMEs when our current IME disappears.

Change-Id: Ief7332bc4f029991cd833ce0968d75bde987b594
2010-03-24 13:03:47 -07:00
Dianne Hackborn
af7cea3a51 Fix issue #2540920: connectivity issues with tripit/pandora
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
2010-03-24 12:59:52 -07:00
Suchi Amalapurapu
c7537ee7b6 Clean up stale containers if needed at install time.
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
2010-03-24 10:32:37 -07:00
Suchi Amalapurapu
f7f5dda5e5 Add new activity manager method to get list of running applications installed on sdcard.
Use new method in UsbStorageActivity.
Fix moving dex files.
moveDex should be suffixed with LI since it uses Installer

Change-Id: Id5ef0254578e84b9aae2c2ac44f722eb5a0fda1c
2010-03-23 16:56:08 -07:00
Dianne Hackborn
9818d7506e Merge "Improve switching to car mode, retain night mode option." 2010-03-23 11:54:09 -07:00
Dianne Hackborn
008f6561f2 Merge "Fix bug where group IDs were not being assigned during boot." 2010-03-23 11:52:14 -07:00
Dianne Hackborn
bbfd58a007 Fix bug where group IDs were not being assigned during boot.
Change-Id: Ic735e98b106932eef2c2458d73fa016274fd796f
2010-03-23 11:51:44 -07:00
San Mehat
a89e372db2 Merge "Asec: Add new 'StorageNotFound' response code handling for container paths" 2010-03-23 11:25:31 -07:00