2285 Commits

Author SHA1 Message Date
Suchi Amalapurapu
c2461be627 Merge "Fix 2579461 Move install location values to secure settings. Diable attribute for UI. Set default value to auto. Add command line interface to set install location via pm." into froyo 2010-04-07 21:24:36 -07:00
Suchi Amalapurapu
40e472521a Fix 2579461
Move install location values to secure settings.
Diable attribute for UI. Set default value to auto.
Add command line interface to set install location via pm.

Change-Id: I80e97b3d24845adad7102f40dcbe238f00efa406
2010-04-07 20:43:54 -07:00
Dianne Hackborn
390022b23b Merge "Fix issue #2528537: android.os.DeadObjectException" into froyo 2010-04-07 18:31:06 -07:00
John Wang
815b8e4ac4 Merge "Add emergencyOnly indicator in ServiceState." into froyo 2010-04-07 17:51:41 -07:00
Dianne Hackborn
472ad8716e Fix issue #2528537: android.os.DeadObjectException
Nice.

Change-Id: I6142b12b5770b508ff4a43361da6f5e52bed2de9
2010-04-07 17:31:48 -07:00
John Wang
56c2d2ff27 Add emergencyOnly indicator in ServiceState.
For bug 2536842 to show signal strength in Emergency mode.

The STATE_EMERGENCY_ONLY of ServiceState is not in-use.

So add a hide interface to indicate Emergency mode.

Change-Id: I19398ac5e73a722dcaaf744347f961d1fa7513ac
2010-04-07 16:06:13 -07:00
San Mehat
fd998a0caf Merge "NetworkManagementService: Remove 'maxkbs' parameter from throttle API" into froyo 2010-04-07 15:32:44 -07:00
San Mehat
f0db6e1853 NetworkManagementService: Remove 'maxkbs' parameter from throttle API
Change-Id: I1cfbdac7d06478243931c6acec462da8e257f42f
Signed-off-by: San Mehat <san@google.com>
2010-04-07 15:22:10 -07:00
Suchi Amalapurapu
30f775b12a Fix 2578016.
Add some checks before moving package.
Checkin test code.
Regenerate test apks

Change-Id: I769ece128fefd3429ce93208a77d887c7759d2e1
2010-04-07 11:43:31 -07:00
Dianne Hackborn
48bce4515d Merge "Fix issue #2569139: Cannot login to last.fm after upgrade from Donut to FRF01B" into froyo 2010-04-06 11:18:01 -07:00
Dianne Hackborn
f22221fd19 Fix issue #2569139: Cannot login to last.fm after upgrade from Donut to FRF01B
This is a quick and dirty solution to re-assign permissions after booting
from a platform update.  It is not great, because it means that an app
can have permissions that the user didn't get to see when they originally
installed it.  Unfortunately it's not clear what else to do here, nor is
there time to do anything significant.

Change-Id: I82faba141b5883c87212afa7febecf9860a413e3
2010-04-06 11:17:08 -07:00
Suchi Amalapurapu
fede9aed2b Merge "Forcibly unmount the sdcard after N retries." into froyo 2010-04-06 10:50:56 -07:00
Irfan Sheriff
b2e6c01f44 Disable tethering when airplane mode is enabled
Tethering should be disabled when
airplane mode is enabled. Additionally,
we should restore Wifi (if it was on
before tethering was enabled) when
airplane mode is disabled.

Bug: 2567099
Change-Id: Iba2031f5ecb207954fd155c47134b39ed0167fa0
2010-04-06 10:35:27 -07:00
Suchi Amalapurapu
7af074a612 Forcibly unmount the sdcard after N retries.
Don't rely on the ActivityManager's reported status about killing the
storage user process since the process might have gone away in between.

Change-Id: Ia7fa43eb34553329e7ff611ab6b99375b5ae673a
2010-04-06 10:02:34 -07:00
Dianne Hackborn
6e52b5d768 2568467 System crash when installing corrupt APK
Also fix another crash I just saw in the package manager, when a
permission got left around from a previous install but as no
longer defined.

Change-Id: I33b87420f0c59e24b8b77fab8b0316461d99e048
2010-04-05 18:37:57 -07:00
Doug Zongker
944ff0b788 remove OTA packages from the old (pre-froyo) updater
The old updater ran in the system process, so only that UID can delete
its downloads.  Do this on startup in case we've just upgraded from
something before froyo and need to clean up those packages.

b/2571619 - eclair -> froyo update package not deleted

Change-Id: I0a5e7834c3ecd2cc2f6fd73052b3a38e1294b5d5
2010-04-05 15:10:31 -07:00
San Mehat
73a8f26aef Merge "NetworkManagementService: Combine setInterfaceRx/Tx throttle and add max speed" into froyo 2010-04-05 10:35:56 -07:00
Christopher Tate
5923c97183 Fix 'dumpsys backup'
"for (Type foo : mSetOfType)" doesn't work when mSetOfType is null.

Change-Id: Iac667c7309f99b12d3147830e166b542b29cba5f
2010-04-04 17:45:35 -07:00
Christopher Tate
1484b6d6b7 Merge "Fix "incall in landscape sometimes" bug #2523942" into froyo 2010-04-02 19:14:58 -07:00
Christopher Tate
b696aee7b3 Fix "incall in landscape sometimes" bug #2523942
The problem turns out to have been a deep weirdness in the way that keyguard
and incall interact.  Incall gets relaunched when the keyboard is opened/closed,
which transiently exposes keyguard with its nosensor orientation demands, and
that plus the long keyguard-hide animation was leaving incall in a bad state
from which the window manager didn't try to recover.

We now disregard animating-towards-hidden windows [i.e. keyguard] when running
through the app tokens to determine what orientation should be, and do not do
configuration calculations at all while the display is frozen.  There can still
be a transient state in which incall is drawn in landscape, but things proceed
from there to relaunch it back into the proper portrait orientation, and it
ends up in the right state in the end.

Change-Id: I0d74ee19064b6d7f65600976f1b5b16b7ec36f31
2010-04-02 19:13:51 -07:00
Irfan Sheriff
9c50996b17 Merge "Dont start wifi if in airplane mode" into froyo 2010-04-02 12:47:45 -07:00
Suchi Amalapurapu
a77acab9c6 Merge "Handle exceptions when doing dexopt." into froyo 2010-04-02 12:46:38 -07:00
Irfan Sheriff
60e3ba071d Dont start wifi if in airplane mode
Now that wifi start is asynchronous
at the time of bring up, make sure
Wifi is not started if in airplane
mode.

Bug: 2567652
Change-Id: I947b7c8480029973bcbf028f6143aabbc88c9793
2010-04-02 12:43:04 -07:00
San Mehat
be23fba286 NetworkManagementService: Combine setInterfaceRx/Tx throttle and add max speed
Change-Id: I1d6816c9754801504a988802118a2167e0eb8690
Signed-off-by: San Mehat <san@google.com>
2010-04-02 11:50:27 -07:00
Daniel Sandler
25642f0b16 Merge "Make desk mode work again." into froyo 2010-04-02 10:54:57 -07:00
Daniel Sandler
8daf2a4799 Make desk mode work again.
Bug: 2564612
Change-Id: I858a86d14a6840f5f587343a64c5d0c4bc5d5263
2010-04-02 10:15:09 -04:00
Suchi Amalapurapu
73dafa1f66 Handle exceptions when doing dexopt.
Change-Id: Iaeba98ef9fef2f1dbf3dbe2e8e4497dae8d0fe7f
2010-04-01 21:02:21 -07:00
San Mehat
91cac64cd0 NetworkManagementService: Add interface counters & throttle API
Change-Id: I4976549cdbb027ba7859335e69bf866e738961c9
Signed-off-by: San Mehat <san@google.com>
2010-04-01 08:34:20 -07:00
Dianne Hackborn
513ae3610e Merge "Fix issue #2560791: Expose API to go in to car mode." into froyo 2010-03-31 23:03:26 -07:00
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
Dianne Hackborn
9c9c532d36 Fix issue #2560791: Expose API to go in to car mode.
Also fix bug where night mode was being used in desk dock.

Change-Id: I56c1cf3d6fe800a4f986d40cc4cb2e70b76ac261
2010-03-31 16:25:53 -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