summaryrefslogtreecommitdiffstats
path: root/core/java/android/content/pm
Commit message (Collapse)AuthorAgeFilesLines
* Add 'restoreAnyVersion' attr for apps that want to restore "future" dataChristopher Tate2010-02-242-2/+20
| | | | | | | | | | | | | | | | | | | | | | | If a backup-participating app sets android:restoreAnyVersion="true" in its manifest <application> tag, then its agent will be invoked for restore even if the available dataset was created by a later version of the app than is currently installed on the device. This will not typically be a problem for third party applications, since for them the installation and initial data restore are tightly coupled, but it can cause serious problems for applications which are both preinstalled on the system partition and overridden by later updates. The primary difficulty that this new attribute addresses is this: 1. User buys a Nexus One, Market self-updates, and the user installs some apps. At this point the backup data on the server may indicate that the version of Market which originated its bookkeeping is newer than the stock N1 Market app. 2. User loses their phone, and buys a replacement N1. At setup time, Market has not yet had a chance to self-update, so when the restore comes in, it's tagged as being from "the future" and so the restore is refused. No apps get reinstalled. Bug: 2442127 Change-Id: I076a9553dc613e5c3189350e778315718ed1ed2b
* Some framework fixes for apps on sdSuchi Amalapurapu2010-02-241-1/+1
| | | | | | | | | | | | change hard coded path in installd fix tests Work around for renaming containers. Do forced unmount when destroying containers. Force a gc in default container service to release handle to parsed package and thus avoid getting killed by vold Some cosmetic changes to PackageManager api. Unit tests for renaming container for MountService Remove internal size limit on app to be installed.
* Automatically restore app data at install timeChristopher Tate2010-02-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an application being installed defines a backupAgent in its manifest, we now automatically perform a restore of the latest-known-good data for that app. This is defined as "data backed up by this app from this handset, if available; otherwise data for this app as it existed when the device was initially provisioned." If neither option exists for the app, no restore action is taken. The CL involves major changes in the Backup and Package Managers... * The Package Manager's act of installing an application has now been split into two separate phases, with a data-restore phase optionally occurring between these two PM actions. First, the details of the install are performed as usual. Instead of immediately notifying install observers and issuing the install-related broadcasts, the in-process install state is snapshotted and the backup manager notified that a restore operation should be attempted. It does this by calling a new API on IBackupManager, passing a token by which it identifies its in-progress install state. The backup manager then downloads [if possible] the data for the newly-installed application and invokes the app's backupAgent to do the restore. After this step, regardless of failure, it then calls back into the Package Manager to indicate that the restore phase has been completed, supplying the token that was passed in the original notification from the Package Manager. The Package Manager then runs the final post-install actions: notifying install observers and sending out all the appropriate broadcasts. It's only at this point that the app becomes visible to the Launcher and the rest of the OS. ... and a few other bits and pieces... * The ApplicationInfo.backupAgentName field has been exposed to the SDK. This can be reverted if there's a reason to do so, but it wasn't clear that this info needs to be hidden from 3rd party apps. * Debug logging of restore set IDs and operation timeout tokens [used during any asynchronous Backup Manager operation] are now consistently in hex for readability. * We now properly reset our binder identity before calling into the transport during restore-set operations. This fixes a permissions failure when a single-app restore was attempted. * The 'BackupTest' test app is no longer lumped onto the system partition by default. Change-Id: If3addefb846791f327e2a221de97c8d5d20ee7b3
* Move package from internal to external and vice versa.Suchi Amalapurapu2010-02-193-0/+112
|
* Elaborate a little on the documentation for PackageManager's resolveActivity.Mike LeBeau2010-02-181-1/+3
| | | | Not sure if this wording is perfectly appropriate, so comments welcome.
* Include install location preference when installing packages.Suchi Amalapurapu2010-02-121-25/+9
| | | | | | | | | | | | | | | | | | | | | Changes include Add new remote call in default container service to determine install location. Rename INSTALL_ON_SDCARD Remove recommentAppInstall method Add some additional flags used in remote stubs. Move check for protected apps prior to copy. Unit tests DefaultContainerService first parses the file uri(if content uri is specified it returns a default install internal only value) and returns a recommended location. Based on which the temporary id is determined either a file name or a container id and the file is copied there. This is then later renamed during install. Todo's light weight parsing of package when determining location since we just need the install location attribute only when finding out recomended location. This will also enable to move the check for updated system apps(cannot be on sdcard) prior to copying.
* Add APIs for mapping between new and current package names.Dianne Hackborn2010-02-112-0/+20
| | | | | | This will allow Market and others to find out what the "real" name of a package is, when it is currently running under the old name of a previously installed version.
* Introduce special UI modes for night and car usage.Tobias Haamel2010-02-111-0/+7
| | | | | | | | | | | | | | | | | | The device mode is now called ui mode. Furthermore is the order of precedence for the resources now in such a way that the ui mode needs to be specified after the orientation and before the density. The ui mode can be set, like it is done for the locale, as follows: IActivityManager am = ActivityManagerNative.getDefault(); Configuration config = am.getConfiguration(); config.uiMode = Configuration.UI_MODE_TYPE_CAR | Configuration.UI_MODE_NIGHT_ANY; am.updateConfiguration(config); To allow users to disable the car mode and set the night mode the IUiModeManager interface is used. The automatic night mode switching will be added in a separate change.
* New implementation of <original-package> tag.Dianne Hackborn2010-02-111-23/+104
| | | | | | | | | | | | | We now have the new package retain the name of the old package. This makes sure that all existing references to it (shortcuts, widgets, etc) will still work. This does mean that your package can run under either the old or new name, depending on whether the user got it with an update. Buyer beware! I have tried testing all of the paths of updating, installing another update in /data, uninstalling the update, updating system with an even newer update, etc. I think they all work. No promises though.
* Support per-application switch to execute the VM in safe mode.Ben Cheng2010-02-102-8/+22
| | | | | | | | | | | The new attribute can be set by adding android:safeMode="true" in AndroidManifest.xml with the SDK. Tested with pairing locally compiled SDK with Eclipse and verified that the JIT (the only component currently included in the safe mode) is indeed disabled with the new attribute. Bug: 2267583
* Add new manifest option for install locationSuchi Amalapurapu2010-02-103-4/+41
| | | | | | | | | | | | Change recommendAppInstallLocation api add code to parse new attribute. Define flags in PackageInfo Add new settings attributes for enabling setting and value for install location Some tests The policy for install location: if explicitly set in manifest as internal only we try to install the app only on internal storage. if set to preferExternal, we try to install it on sdcard if possible. If not we fall back to internal. If the user enables setting SET_INSTALL_LOCATION(which will always be set to false in final release builds) and sets a prefered location, we try to honour it.
* New external storage APIs.Dianne Hackborn2010-02-092-0/+8
| | | | | | | | | | | This implements the spec for external storage organization, and properly reflects how the media scanner organizes the files it finds. Also includes package manager support for removing app private files from external storage when the application is uninstalled. For the new APIs and paths, the main place to look is Environment and Context.
* Merge "Fix NPE in PackageParser"Bjorn Bringert2010-02-091-1/+1
|\
| * Fix NPE in PackageParserBjorn Bringert2010-02-091-1/+1
| | | | | | | | | | | | | | | | | | Before, PackageParser threw NPE when reading <path-permission> android:writePermission set. Fixes http://b/issue?id=2430967 Change-Id: I4c69f0210ab362a649ff239c5f9e927d93c2f241
* | Hide resourceDirs from public APIKenny Root2010-02-091-0/+2
|/ | | | Change-Id: I070558c0adca43c8650ac740d3cda4334d0f4a50
* Rename media resource broadcastsSuchi Amalapurapu2010-02-082-2/+11
| | | | | | Add checks for fwdlocked and updated system apps add more tests remove duplicate adds
* Implement system data migration support.Dianne Hackborn2010-02-031-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds three new features: - <original-package android:name="com.foo" /> manifest tag. This allows an .apk to specify another package it originally came from, propagating all state and data from the old to new package. - <adopt-permissions android:name="com.foo" /> manifest tag. In some more complicated cases, a new .apk may be a combination of multiple older .apks that each declared their own permissions. This allows you to propagate the permissions from these other .apks into the new one. - A new system/etc/updatecmds directory. You can place files here which describe data files to move from one package to another. (See below for details.) Also in this change: we now clean up the data directories of .apks that disappear from the system image, and some improvements to logging and reporting error messages. A typical file in the updatecmds directory looks like this: ------- com.google.android.gsf:com.google.android.providers.talk databases/talk.db com.google.android.gsf:com.google.android.googleapps databases/gls.db ------- This says that for com.google.android.sfs, there are two packages to move files from: From com.google.android.providers.talk, the file databases/talk.db. From com.google.android.googleapps, the file databases/gls.db As part of moving the file, its owner will be changed from the old package to whoever is the owner of the new package's data directory. If those two files had existed, after booting you would now have the files: /data/data/com.google.android.gsf/databases/talk.db /data/data/com.google.android.gsf/databases/gls.db Note that all three of these facilities assume that the older .apk is completely removed from the newer system. The WILL NOT work correctly if the older .apk still remains.
* Apps on sdcard: Add new broadcastsSuchi Amalapurapu2010-02-021-0/+5
| | | | | | | | | | | | | Add new broadcasts ACTION_MEDIA_RESOURCES_AVAILABLE and ACTION_MEDIA_RESOURCES_UNAVAILABLE that get broadcast by PackageManagerService when sdcard gets mounted/unmounted by MountService so that packages on sdcard get recognized by various system services as being installed/available or removed/unavailable by the system. The broadcasts are sent before the actual package cleanup which includes mounting/unmounting the packages and we force a gc right after so that any lingering file references to resources on sdcard get released.
* Apps on SD project.Oscar Montemayor2010-02-011-5/+5
| | | | Javadoc fixes for new method in PackageManager class.
* Apps on SD card project.Oscar Montemayor2010-01-291-77/+17
| | | | | | | Refactored recommendAppInstallLocation(..) method in PackageManager by making it an instance method. Since PackageManager has only abstarct instance methods, moved implementation to ApplicationContext.ApplicationPackageManager class, in line with the rest of the method implementations. Tah way, chage is consistent with best coding practices. Also MockPackageManager received the additional method.
* Apps on SD card project.Oscar Montemayor2010-01-281-0/+85
| | | | This class implements heuristics to determine best app install location, without looking at the package flags (pre-parsing stage).
* More device admin work: description, policy control.Dianne Hackborn2010-01-262-1/+45
| | | | | | | | | | | | There is now a description attribute associated with all components, that can supply user-visible information about what the component does. We use this to show such information about device admins, and wallpapers are also updated to be able to show this in addition to the existing description in their meta-data. This also defines security control for admins, requiring that they declare the policies they will touch, and enforcing that they do so to be able to use various APIs.
* Make PackageManager unpack gdbserver binaries at installation time.David 'Digit' Turner2010-01-251-0/+8
| | | | | | | | | | Native-debuggable packages contain a lib/<abi>/gdbserver executable. This patch ensures that the package manager will copy it to the proper location (/data/data/<appname>/lib) at installation time. Note that such packages are marked with a new ApplicationInfo flag named FLAG_NATIVE_DEBUGGABLE, to be used later by the Activity Manager.
* Add extra resources field for ApplicationInfoKenny Root2010-01-221-2/+14
| | | | | | | Allow ApplicationInfo to track multiple files it wants to use as resources by adding a string array to its public definition. Change-Id: Ieffc4b1755270520b59c4e5a3c084e86aef02346
* Fix build errorSuchi Amalapurapu2010-01-141-3/+1
|
* app install on sdcard. provide skeleton implementationSuchi Amalapurapu2010-01-144-11/+63
| | | | | | | | | | | | | | | | | | | | | | to install an app on sdcard, just resources. Add new install path for /asec in installd. ignore . when checking for apk path since the sdcard packages id'ed by package name. Add new -s option to adb shell pm Refactor fwd locked from scanMode to ApplicationInfo. Add new flag for sd install Add new parse flags for fwd locking and installing on sdcard New mock api's in PackageManagerService to invoke MountService api's. These will be refactored again and so have been wrapped internally. Some error codes in PackageManager Changes in PackageManagerService to use mPath and mScanPath during installation and switch to using PackageParser.Package.applicationInfo attributes for source and public resource directories. Some known issues that will be addressed later using system_uid for now. needs some tinkering with uid and packagesetting creation to use the actual app uid error handling from vold not very robust. ignoring lot of things for now sending a delayed destroy to delete packages. will revisit later revisit temp file creation later. just copy for now
* resolved conflicts for merge of ad2fa35d to masterTom Taylor2009-12-222-2/+2
|\ | | | | | | Change-Id: Ia4362cd48ac0689b91003943a4cd9660da72ff90
| * Update imports to android-commonTom Taylor2009-12-212-2/+2
| | | | | | | | | | Several files were moved to android-common. Update all the references to import those files from the new location.
* | am b43b35a0: am e6547423: Merge change I10073d50 into eclairXavier Ducrohet2009-12-161-0/+12
|\ \ | | | | | | | | | | | | | | | | | | Merge commit 'b43b35a034ad667ba749270537155e7534906153' * commit 'b43b35a034ad667ba749270537155e7534906153': Add Annotation for optional features.
| * | Add Annotation for optional features.Xavier Ducrohet2009-12-141-0/+12
| |/ | | | | | | | | | | | | This is used by the SDK to display available features in the editors. Change-Id: I10073d503d1b3dcb92a5dc526cd054285b85fa3a
* | am e2585127: am 9ed7dc10: am 5886050f: Merge change I0d8f7593 into eclairDianne Hackborn2009-12-021-10/+8
|\ \ | |/ | | | | | | | | | | Merge commit 'e2585127974ce972a013407e2af95d8776a99a8e' * commit 'e2585127974ce972a013407e2af95d8776a99a8e': Fix issue #2296457: PackageManager.addPackageToPreferred needs to a no-op
| * Fix issue #2296457: PackageManager.addPackageToPreferred needs to a no-opDianne Hackborn2009-12-011-10/+8
| | | | | | | | Change-Id: I0d8f75938226e1bb49cf7b1154445631b0bb0bc9
* | am 5417933a: am d1689ea8: am 8e1985d4: Merge change Ie552036f into eclairDianne Hackborn2009-11-251-11/+0
|\ \ | |/ | | | | | | | | | | Merge commit '5417933a456f23a0ca30bb73632feee5dd5f8e46' * commit '5417933a456f23a0ca30bb73632feee5dd5f8e46': Fix issue #2286419: maxSdkVersion causes existing apps to disappear.
| * Fix issue #2286419: maxSdkVersion causes existing apps to disappear.Dianne Hackborn2009-11-251-11/+0
| | | | | | | | Change-Id: Ie552036f4ea673e0ce9981ff1cbd1fbe08678510
* | am 79374643: am b9ab7126: am 524812fb: Merge change I7d40ad9a into eclairDianne Hackborn2009-11-191-0/+62
|\ \ | |/ | | | | | | | | | | Merge commit '7937464319133d478d5e8b386e9d08668eddd8a9' * commit '7937464319133d478d5e8b386e9d08668eddd8a9': More on issue #2271640: Fix wallpaper etc docs
| * More on issue #2271640: Fix wallpaper etc docsDianne Hackborn2009-11-191-0/+62
| | | | | | | | | | | | Publish the features developers may be interested in. Change-Id: I7d40ad9a9f4b9770e2f8dd1b0a729b0d322c062e
* | am 8c3fc080: am 5bb200fd: am 2ade6421: Merge change I775e1ec0 into eclairDianne Hackborn2009-11-113-21/+42
|\ \ | |/ | | | | | | | | | | Merge commit '8c3fc0801bb32a99dd5ab97c93bb615999b2c977' * commit '8c3fc0801bb32a99dd5ab97c93bb615999b2c977': Debugging for issue #2250075: Desk dock clock app sometimes doesn't
| * Debugging for issue #2250075: Desk dock clock app sometimes doesn'tDianne Hackborn2009-11-113-21/+42
| | | | | | | | | | | | | | | | | | | | | | This adds a history of the last 100 broadcasts that is printed in the debug log, to be able to see what recently happened at the time the bug report was taken. Also does some optimization of the printing of the broadcast records to make it feasible to print this number of entries. (We kind-of need to do this because there are some broadcasts like SIG_STR and SYNC_STATE_CHANGED that are being broadcast a LOT.) Change-Id: I775e1ec0f63369c8bca8c83cee27b95ddc5ec450
* | am 7efa6715: am e871be66: Merge change I735f4553 into eclair-mr2Fred Quintana2009-11-113-74/+334
|\ \ | |/ | | | | | | | | | | Merge commit '7efa671569955aead877d10e7d6b1fa3129184a4' * commit '7efa671569955aead877d10e7d6b1fa3129184a4': Make the RegisteredSErvices Cache not allow the registered service for a
| * Make the RegisteredSErvices Cache not allow the registered service for aFred Quintana2009-11-103-74/+334
| | | | | | | | | | | | | | | | | | | | | | | | type to change without first uninstalling the previous service for that type, unless the newly installed service is in the system image. Notify the listener when a service is added or removed. Make the AccountManagerService remove the accounts for an authenticator when the registered authenticator changes from one uid to another. Make the AbstractSyncableContentProvider force a sync when the database is first created.
* | Encrypted File Systems project. Implementation of opt-out flag in ↵Oscar Montemayor2009-11-112-0/+16
|/ | | | | | | | | | | | | | | AndroidManifest XML file. This flag is necessary for applications to specifythat their daa is never to be encrypted when the encrypted file system feature is commplete and enabled. Encrypted File Systems project. Adding android:neverEncrypt flag to AndroidManifest.XML to allow packages to opt-out from EFS features. Encrypted File Systems Project. Fixing white spaces and end-line issues. Encrypted File SYstems Project: opt-out flag. Removed AndroidManifest.xml changes, as will make that change in a separate integration.
* When upgrading packages with shared user ids make sure we are eliminatingSuchi Amalapurapu2009-10-291-14/+12
| | | | | | | the package about to be deleted or upgraded when updating permissions associated with the shared user. Include a simple null check when retrieving the permission. Fix PackageParser to avoid ArrayIndexOutOfBounds exceptions in several places
* Make sdk version and code names static finals in PackageParser.Suchi Amalapurapu2009-10-061-19/+16
| | | | | Remove api to set these values. Remove an unused method in AppSecurityPermissions
* Work on issue #2163789: Way too much loggingDianne Hackborn2009-10-041-6/+9
| | | | | | Dr.No from mcleron. Change-Id: Iaca2268684f83fe8757e64db0b0e047a19755311
* Update from API review.Dianne Hackborn2009-09-301-0/+1
| | | | Change-Id: I16b1c566f91167aac9615ac59dd297a154c828ea
* Fix issue #2154794: Force close when start facebook application.Dianne Hackborn2009-09-301-45/+50
| | | | | | | | | | | | | | I think when we were scanning the updated app in the system image, from an older version on the data partition, we were not setting the existing package to have the system flag, so not auto-granting any new permissions. This also includes some other cleanup in the package manager to remove old files in various places, and tighten up logging. Also similar logging cleanup elsewhere. Change-Id: I6d113c7cf7e736ab9be512d6d7c94c806a24199a
* Fix bug where we would return null with disabled components.Dianne Hackborn2009-09-281-4/+36
| | | | Change-Id: I1624a42803f1c4b02736f558a8eeeeba2890667e
* The touch screen is probably a feature.Dianne Hackborn2009-09-262-1/+11
| | | | | | Also extend the feature APIs a bit. Change-Id: I99e932d7f4e61edb0e20f75c55e9831e4b59a14d
* A variety of work on animations.Dianne Hackborn2009-09-251-1/+1
| | | | | | | | | | | | | | | - The lock screen now fades in and out. - Fixed a bug where we would accidentally freeze the screen when switching to an activity with a different orientation than the current (but the screen itself is in the current orientation). This would mess up the animations on the car dock. - New API to force a particular animation for an activity transition (untested). - New wallpaper animations. - Resources now uses the next API version when in a development build, to help applications being developed against such builds. Change-Id: I2d9998f8400967ff09a04d693dc4ce55f0dbef5b
* Fix issue #2133206: dialogs/menus should auto-dismiss when screen turns offDianne Hackborn2009-09-232-1/+15
| | | | | | | Lot of infrastructure for more things to go away when "clear system dialogs" happens, and now do this when we turn on the lock screen. Change-Id: I567130296fe47ce82df065ed58ef21b37416ceaf