| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Not sure if this wording is perfectly appropriate, so comments welcome.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before, PackageParser threw NPE when reading <path-permission>
android:writePermission set.
Fixes http://b/issue?id=2430967
Change-Id: I4c69f0210ab362a649ff239c5f9e927d93c2f241
|
|/
|
|
| |
Change-Id: I070558c0adca43c8650ac740d3cda4334d0f4a50
|
|
|
|
|
|
| |
Add checks for fwdlocked and updated system apps
add more tests
remove duplicate adds
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Javadoc fixes for new method in PackageManager class.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This class implements heuristics to determine best app install location, without looking at the package flags (pre-parsing stage).
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Allow ApplicationInfo to track multiple files it wants to use as
resources by adding a string array to its public definition.
Change-Id: Ieffc4b1755270520b59c4e5a3c084e86aef02346
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| |
| | |
Change-Id: Ia4362cd48ac0689b91003943a4cd9660da72ff90
|
| |
| |
| |
| |
| | |
Several files were moved to android-common. Update all the references
to import those files from the new location.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Merge commit 'b43b35a034ad667ba749270537155e7534906153'
* commit 'b43b35a034ad667ba749270537155e7534906153':
Add Annotation for optional features.
|
| |/
| |
| |
| |
| |
| |
| | |
This is used by the SDK to display available features in the
editors.
Change-Id: I10073d503d1b3dcb92a5dc526cd054285b85fa3a
|
|\ \
| |/
| |
| |
| |
| |
| | |
Merge commit 'e2585127974ce972a013407e2af95d8776a99a8e'
* commit 'e2585127974ce972a013407e2af95d8776a99a8e':
Fix issue #2296457: PackageManager.addPackageToPreferred needs to a no-op
|
| |
| |
| |
| | |
Change-Id: I0d8f75938226e1bb49cf7b1154445631b0bb0bc9
|
|\ \
| |/
| |
| |
| |
| |
| | |
Merge commit '5417933a456f23a0ca30bb73632feee5dd5f8e46'
* commit '5417933a456f23a0ca30bb73632feee5dd5f8e46':
Fix issue #2286419: maxSdkVersion causes existing apps to disappear.
|
| |
| |
| |
| | |
Change-Id: Ie552036f4ea673e0ce9981ff1cbd1fbe08678510
|
|\ \
| |/
| |
| |
| |
| |
| | |
Merge commit '7937464319133d478d5e8b386e9d08668eddd8a9'
* commit '7937464319133d478d5e8b386e9d08668eddd8a9':
More on issue #2271640: Fix wallpaper etc docs
|
| |
| |
| |
| |
| |
| | |
Publish the features developers may be interested in.
Change-Id: I7d40ad9a9f4b9770e2f8dd1b0a729b0d322c062e
|
|\ \
| |/
| |
| |
| |
| |
| | |
Merge commit '8c3fc0801bb32a99dd5ab97c93bb615999b2c977'
* commit '8c3fc0801bb32a99dd5ab97c93bb615999b2c977':
Debugging for issue #2250075: Desk dock clock app sometimes doesn't
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/
| |
| |
| |
| |
| | |
Merge commit '7efa671569955aead877d10e7d6b1fa3129184a4'
* commit '7efa671569955aead877d10e7d6b1fa3129184a4':
Make the RegisteredSErvices Cache not allow the registered service for a
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Remove api to set these values.
Remove an unused method in AppSecurityPermissions
|
|
|
|
|
|
| |
Dr.No from mcleron.
Change-Id: Iaca2268684f83fe8757e64db0b0e047a19755311
|
|
|
|
| |
Change-Id: I16b1c566f91167aac9615ac59dd297a154c828ea
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I1624a42803f1c4b02736f558a8eeeeba2890667e
|
|
|
|
|
|
| |
Also extend the feature APIs a bit.
Change-Id: I99e932d7f4e61edb0e20f75c55e9831e4b59a14d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
| |
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
|