summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/PackageManagerService.java
Commit message (Collapse)AuthorAgeFilesLines
* am 9a212adc: Fix 2641875 Initialize the cache path only if the container ↵Suchi Amalapurapu2010-05-181-1/+3
|\ | | | | | | | | | | | | | | | | exists. This did exist before but was somehow removed. Fix a known test failure as well. Merge commit '9a212adcffbc4b32d51f512889b33ba584647aa9' into froyo-plus-aosp * commit '9a212adcffbc4b32d51f512889b33ba584647aa9': Fix 2641875
| * Fix 2641875Suchi Amalapurapu2010-05-181-1/+3
| | | | | | | | | | | | | | | | 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
* | am aa77de13: Fix issue #2686193: Can\'t move apps to SD cardDianne Hackborn2010-05-141-2/+2
|\ \ | |/ | | | | | | | | | | Merge commit 'aa77de1348cbda3d5348b15734ab141cb9c7759c' into froyo-plus-aosp * commit 'aa77de1348cbda3d5348b15734ab141cb9c7759c': Fix issue #2686193: Can't move apps to SD card
| * Fix issue #2686193: Can't move apps to SD cardDianne Hackborn2010-05-141-2/+2
| | | | | | | | Change-Id: Icd84d8080d33fb8ce5103a0e726d50f0ec70092e
* | am c928a11e: Merge "Fix 2672155 Check the code path when enabling disabling ↵Suchi Amalapurapu2010-05-131-3/+6
|\ \ | |/ | | | | | | | | | | | | | | packages." into froyo Merge commit 'c928a11e34678296511d5ea34582292be7368618' into froyo-plus-aosp * commit 'c928a11e34678296511d5ea34582292be7368618': Fix 2672155
| * Fix 2672155Suchi Amalapurapu2010-05-131-3/+6
| | | | | | | | | | | | | | | | Check the code path when enabling disabling packages. Add unit test Change-Id: I0f0f482a3735234eab3f63ba1f6462574b70144e
* | am df7ccbc8: Merge "Fix 2656989. Clean up update to updated system ↵Suchi Amalapurapu2010-05-051-0/+12
|\ \ | |/ | | | | | | | | | | | | | | applications." into froyo Merge commit 'df7ccbc8ff0d93a708a7fa1e57469d3f93ceda5c' into froyo-plus-aosp * commit 'df7ccbc8ff0d93a708a7fa1e57469d3f93ceda5c': Fix 2656989. Clean up update to updated system applications.
| * Fix 2656989. Clean up update to updated system applications.Suchi Amalapurapu2010-05-051-0/+12
| | | | | | | | Change-Id: Ic66b00926c45fac43396f1f8f23d0865ba77faba
* | merge from open-source masterThe Android Open Source Project2010-05-031-1/+1
|\ \ | |/ |/| | | Change-Id: If72ad6758c9e1bf77c38c4afec6b00ec9d5b89e4
| * 'uses-library' was not working for persistent applications.Jey2010-04-291-1/+1
| | | | | | | | | | | | Fix by generating the applicationInfo, when asked for info. Change-Id: I44686d5a306562c6649148dce8f709e682adcdf4
| * cherry pick d60e29009c1049a9776e6630e9489e1ef3f83491android-build SharedAccount2010-02-161-13/+0
| | | | | | | | | | Revert "Add null checks when scanning a package." This reverts commit 9e7ac3ba8405f22c11629091449ff35a06b72055.
* | Fix issue #2641875: Apps on sdcard not accesible after updateDianne Hackborn2010-04-291-2/+1
| | | | | | | | Change-Id: I541aa040939e6a872f0b7e8e82e44f96de49d97a
* | Fix issue #2569139: Sapphire user cannot login to last.fm...Dianne Hackborn2010-04-281-9/+10
| | | | | | | | | | | | | | | | ...after upgrade from Donut to FRF01B For realz this time. Change-Id: I92bd12451b19a6006cf487a9dfa0b7c696a21122
* | Fix typo when parsing external platform version from Settings.Bryan Mawhinney2010-04-231-2/+1
| | | | | | | | | | | | May fix http://b/2569139 Change-Id: I437f614fd25512bd461812feddb091edcd12ccb7
* | Fix PM crash due to bad array bookkeeping logic.Jeff Brown2010-04-201-1/+1
| | | | | | | | | | Bug: 2586093 Change-Id: I320deeef65a434060e608015dc2dd97b8200e025
* | Remove native binaries when an updated system application is upgraded ↵David 'Digit' Turner2010-04-151-14/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Revert "Add ordered broadcast when removing packages."Suchi Amalapurapu2010-04-141-29/+27
| | | | | | | | | | | | | | | | | | | | | | | | Couple of cosmetic fixes as well. This reverts commit 0c1285fa979e8b8c170f31d0ef1b4e5d9ddcf6b1. Conflicts: services/java/com/android/server/PackageManagerService.java Change-Id: Ife0f9f80525f4a41b1f8c12ffc2de62e061e7d5b
* | Dont fall back to installing on sdcard when internal storage is filled upSuchi Amalapurapu2010-04-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | 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
* | Add ordered broadcast when removing packages.Suchi Amalapurapu2010-04-141-28/+31
| | | | | | | | Change-Id: I30a84068fa8f2b15564b0a164d339ac95f40e801
* | Fix issue #593153: Broadcast time out when sending...Dianne Hackborn2010-04-141-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...ordered broadcast for ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE Turns out this was because the broadcast receiver for ContextImpl was not correctly being created, so when it received an ordered broadcast it would not tell the activity manager when it was done. This is now fixed, along with a ton of superficial changes to debug output to help track this down and a little cleanup of dealing with error cases in dispatching broadcasts. Also a fix for a NPE when dumping the broadcast state. Finally, a little fiddling with package manager to get rid of a lot of the noise when removing and re-adding packages on the SD card. Change-Id: I961c14836dc613d3ea8122b6e910ef866e7fcb25
* | Fix crashes related to unmounting when app on sdcard has an active notificationSuchi Amalapurapu2010-04-131-64/+101
| | | | | | | | | | | | | | | | | | | | in status bar. When unmounting sdcard, all the secure containers have to be unmounted first before invoking the MountService call back. We send a broadcast about disabled packages. Force a gc to clean up any stale asset references and then unmount the containers before invoking the MountService call back. Change-Id: I831da1ae54aeec89de3601b94a4a2fae5dc7e495
* | Improve robustness of package manager certificate collection.Jeff Brown2010-04-081-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | The package manager contains an optimization which reuses cached signatures instead of reloading them on startup if the package appears to be unchanged. This commit adds an extra check to ensure that the PackageSettings object actually has valid signatures since it has happened that they have gone missing. Unfortunately it does not address the root cause of the problem but it should alleviate the symptoms after a reboot. Bug: b/2547993 Change-Id: I41900c6a752711eb3a901360e3bb29aec946d0be
* | Fix issue #2541849: System crash when an app with active notifications...Dianne Hackborn2010-04-071-21/+29
| | | | | | | | | | | | | | | | | | | | | | | | ...in status bar is installed on sdcard and device is powered down. Don't do the GC until everyone has had a chance to take care of external storage going away. This is more correct, but doesn't completely fix the problem that appears when shutting down. Change-Id: I24b19337ba6262cfd8d010645dbf67e76ea03058
* | Fix 2579461Suchi Amalapurapu2010-04-071-1/+23
| | | | | | | | | | | | | | | | 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
* | Fix 2578016.Suchi Amalapurapu2010-04-071-73/+92
| | | | | | | | | | | | | | | | Add some checks before moving package. Checkin test code. Regenerate test apks Change-Id: I769ece128fefd3429ce93208a77d887c7759d2e1
* | Fix issue #2569139: Cannot login to last.fm after upgrade from Donut to FRF01BDianne Hackborn2010-04-061-2/+52
| | | | | | | | | | | | | | | | | | | | 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
* | 2568467 System crash when installing corrupt APKDianne Hackborn2010-04-051-0/+3
| | | | | | | | | | | | | | | | 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
* | Handle exceptions when doing dexopt.Suchi Amalapurapu2010-04-011-1/+7
| | | | | | | | Change-Id: Iaeba98ef9fef2f1dbf3dbe2e8e4497dae8d0fe7f
* | Change certificate policy.Suchi Amalapurapu2010-03-311-180/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Fix issue #2558391: Package manager problem when not replacing existing ↵Dianne Hackborn2010-03-311-1/+12
| | | | | | | | | | | | | | | | | | 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
* | Show SD unavailable icon for apps on SD when ejected.Jeff Brown2010-03-301-6/+7
| | | | | | | | | | | | | | | | | | 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
* | Package manager optimizations.Dianne Hackborn2010-03-301-38/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | DO NOT MERGEOscar Montemayor2010-03-291-47/+11
| | | | | | | | | | | | | | Removing unused features from source tree. Please refer to Bug#2502219. Change-Id: I879c29bfd5ffe933f64bb1082aaae7c956450a5a
* | Fix issue #2540920: connectivity issues with tripit/pandoraDianne Hackborn2010-03-241-0/+3
| | | | | | | | | | | | | | | | | | 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
* | Clean up stale containers if needed at install time.Suchi Amalapurapu2010-03-241-2/+13
| | | | | | | | | | | | | | | | | | 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
* | Add new activity manager method to get list of running applications ↵Suchi Amalapurapu2010-03-231-36/+38
| | | | | | | | | | | | | | | | | | | | 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
* | Fix bug where group IDs were not being assigned during boot.Dianne Hackborn2010-03-231-1/+7
| | | | | | | | Change-Id: Ic735e98b106932eef2c2458d73fa016274fd796f
* | Don't delete stale containers on sdcard.Suchi Amalapurapu2010-03-231-3/+2
| | | | | | | | | | | | Comment out flaky test Change-Id: Ic7da6421c1a1980c19f7f1c929976432245479fa
* | Fix restoring of permissions after a reboot.Dianne Hackborn2010-03-221-23/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | It turns out the whole loadedPermissions thing was pointless at this point, and causing the problem: we would write out the granted permissions, then at boot load them into loaded permissions, and never actually put them in granted. Just remove loadedPermissions. The grantedPermissions (that is the permissions the user has approved be granted to the app) are all we care about. Change-Id: I54d9dc418d6277ae0b35b8c1fc4b9c11f34f86f0
* | Add new method call back in MountService.Suchi Amalapurapu2010-03-221-25/+31
| | | | | | | | | | | | | | | | | | | | | | PackageManager invokes this call back when its done handling the media status update. Add new uid check for updateExternalMediaStatus Change killPids method in ActivityManager. Remove mountsd command in Pm.java We cannot arbitrarily enable/disable packages in PackageManager now. Change-Id: I28dcba4afd2b4486f68abdaa1628a31b66544c91
* | Maybe fix issue #2457218: Corrupt batterystats.bin file preventing phone ↵Dianne Hackborn2010-03-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | boot - LIBtt68127 No steps to repro, but makes the code more robust by using the standard JournaledFile class and doing sanity checks on the input it reads. This required moving the JournaledFile class in to the framework (and we really should get rid of either it or AtomicFile, but they have different recovery semantics so that is tough). Also went through and cleaned up the file management in various places. Change-Id: Ieb7268d8435e77dff66b6e67bb63b62e5dea572e
* | Grant permissions to apps on sd when enabling/disabling packages.Suchi Amalapurapu2010-03-191-0/+2
| | | | | | | | Change-Id: I0f011bd4a3348ccd46fd7ae9765edf8933b94142
* | Fix issue #2512507: Shortcuts and Widgets lost on upgrading from Eclair to ↵Dianne Hackborn2010-03-181-24/+11
| | | | | | | | | | | | | | | | | | FRE70D Apps on the system partition are now allowed to change their certs, as long as they are not using a shared user id. Change-Id: I02ff7ac874dc649b7f8cbb705ae8d7ed31e1d125
* | Switch default install location to unspecified.Suchi Amalapurapu2010-03-181-7/+6
| | | | | | | | | | | | | | | | | | | | Add a new install location unspecified for backward compatibility. There is not much difference between policies auto and unspecified. But we dont have to make any code changes in PackageParser based on our preference for install location. Add tests Change-Id: I563238133261d911d08fbc66344687b7dfc870b1
* | Rework permissions to be retained when an app is temporarily uninstalled.Dianne Hackborn2010-03-181-115/+359
| | | | | | | | | | | | | | | | | | | | | | This allows us to keep the assigned permissions when apps are temporarily removed due to the SD card being unmounted, and also if you use the facility to uninstall an app but keep its data. Also fixes issue #2515189: Potential permission spoofing attack in Android (external bug 7166) Change-Id: I2a120ec938552028c989f9e0e890c32773957738
* | Add new install flag to install on internal flash onlySuchi Amalapurapu2010-03-171-8/+18
| | | | | | | | | | | | | | Change default install location policy for new flag. New error code for media unavailable. Change-Id: I5a5d0828b067692b2b94a15a2bcc7534f796c1a2
* | Do storage checks before initiating a move.Suchi Amalapurapu2010-03-161-16/+46
| | | | | | | | | | | | | | | | | | | | | | | | Add new remote method to check for insufficient error conditions. Some fixes in MountService when updating media status on PackageManagerService Fix size calculation condition in installd. Add new error code if media is unavailable. New tests for testing error codes. Some additional debugging statements in MountService. Change-Id: Ibfe90d5ed6c71d57f9c1c67806f38b5ae9ecdfbf
* | Fix NPE when clearing preferred packages.Dianne Hackborn2010-03-111-192/+241
| | | | | | | | | | | | | | | | | | | | | | | | Fixes issue #2507124: cts.PackageManagerRequiringPermissionsTest:testClearPackagePreferredActivities is failing with NPE Also introduce some compatibility code to simple ignore calls to set preferred packages from old applications, and changes some package manager logs to Slog. Change-Id: Id3f98ac8e106da526ba4c12879a9ddaabf28f462
* | Need to keep new package's cert when using original-package.Dianne Hackborn2010-03-111-0/+4
| | | | | | | | | | | | Fixes bug #2504353: Lost all widgets and shortcuts after upgrading form FRE68 to FRE69 Change-Id: I62bab66bbd90bf0956d1716bae1b6073d01e2d8a
* | Applications should -not- be able to set preferred activities.Dianne Hackborn2010-03-101-3/+7
| | | | | | | | | | | | | | | | | | | | | | I can't believe I let this slip through. And in the SDK no less. :( The APIs for setting preferred activities will now throw a security exception when used. This may break some apps, we'll see how it goes. If it is too bad we can just make these log and not throw anything, but I would much prefer they throw an exception. Change-Id: I3aed434750eef8b202aa9d5bd774a0121be521c6