Merge commit '9171749700853305f3e6abbcdbd9e02f3a71d459'
* commit '9171749700853305f3e6abbcdbd9e02f3a71d459':
Use system properties to track the current transport
Merge commit '72eb0acad5cffc57ce5006f6deab29ee259e461e'
* commit '72eb0acad5cffc57ce5006f6deab29ee259e461e':
Expand support for different screen sizes.
Merge commit '8a27f923eb9dbbe3c2d0184e82d9f1a98f1e4cdc'
* commit '8a27f923eb9dbbe3c2d0184e82d9f1a98f1e4cdc':
Don't crash in various ways when using backup services too early
This change retools the transport selection mechanism a fair bit. Transports
are now specified by name rather than by numeric ID, and the name of the
currently selected transport is stored in a persistent system property under the
name "persist.service.bkup.trans".
The name -> IBackupTransport translation is now handled by maintaining a map
from the names to the live IBackupTransport objects that correspond. The Google
transport service observer now registers and unregisters the transport as the
service goes up and down.
The bmgr command has been expanded to include real transport interrogation and
selection by name, and some documentation has been written for it.
Ordinarily we wipe the data of apps we are restoring. This is problematic for
packages that expect that their data can never be wiped back to nothing,
especially system packages, so we now respect the android:allowClearUserData
manifest attribute.
Applications can now declare that they support small, normal, or
large screens. Resource selection can also be done based on these
sizes. By default, pre-Donut apps are false for small and large,
and Donut or later apps are assumed to support all sizes. In either
case they can use <supports-screens> in their manifest to declare
what they actually support.
BackupManager now no longer tries to use a null service binder if it's used
early during the boot process. ActivityManagerService no longer tries to
dereference null pointers if bind/unbind semantics get out of step due to things
being run too early.
Merge commit '7d562ec393d54dd9ef387c49d1283243bfdbd2b1'
* commit '7d562ec393d54dd9ef387c49d1283243bfdbd2b1':
Add a new IRestoreObserver callback class to the restore process
The observer is told when restore begins how many packages are being restored.
It then gets an onUpdate() call telling it that the Nth package is now
undergoing restore. Ultimately, its restoreFinished() callback is invoked,
passing a simple success/fail error code, to let it know that the restore
operation has concluded.
Merge commit '5cb400bd72726c22f641f334951b35ce2ddcfeef'
* commit '5cb400bd72726c22f641f334951b35ce2ddcfeef':
Keep track of backup state independently for each transport
Backup transports now provide the Backup Manager with a suggested name with
which it can disambiguate any transport-specific bookkeeping that it needs to
maintain. The Manager keeps separate application backup 'state blobs' for each
transport now, preventing things from getting out of step if the device is
switched among multiple transports.
Also, the metadata backup agent is always invoked now on each backup pass. This
is cheap when there is nothing to do, but also strongly ensures that we never
wind up in a situation where a given transport destination has not been given
all of the metadata necessary for the backup set.
Previously only the level was being updated, resulting in out of date values
being left in the cache.
Patch was provided by Motorola.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Merge commit 'f881762f97c74253bbc7f629380bb65739457041'
* commit 'f881762f97c74253bbc7f629380bb65739457041':
Add a method to Process to get uid for a pid.
This CL does the following:
+ adds an AbsoluteFileBackupHelper class for managing backup of files
known by absolute path, not based off of the app's getFilesDir() root
+ bumps up the collection interval from its testing-only default of 1 second
to 3 minutes
+ adds a SystemBackupAgent class to the main system package and names it as
the android:backupAgent for the main OS package. Right now this agent
only backs up & restores the wallpaper file.
+ amend the Wallpaper Service to inform the Backup Manager when the wallpaper
changes.
On the subject of the 3-minute collection interval before the backup actually
occurs: this can be short-circuited from an adb shell. Running the command
'bmgr run' will cause the Backup Manager to kick off any pending backup
operations immediately.
* changes:
* new screen resolution support impl. * use full window for activities, and shift & clip the content * refactored the compatibility code, and introdcued Translator class to handle cooridnate translations. * removed a workaround to handle an activity with configChagne=rotation in old implementation. * I'll fix background issue on rotation in next CL.
Merge commit '67669c9c1753b062fe2a71f89b589d01b32ba0f7'
* commit '67669c9c1753b062fe2a71f89b589d01b32ba0f7':
Modify the IBackupTransport API to support bulk restore operations.
* changes:
Modify the IBackupTransport API to support bulk restore operations. Change the BackupManagerService and LocalTransport to support the new API.
The am command is now the one that takes care of opening the target file,
handling the opened file descriptor to the process that will be profiled.
This allows you to send profile data to anywhere the shell can access, and
avoids any problems coming up from the target process trying to open the
file.
* use full window for activities, and shift & clip the content
* refactored the compatibility code, and introdcued Translator class to handle cooridnate translations.
* removed a workaround to handle an activity with configChagne=rotation in old implementation.
* I'll fix background issue on rotation in next CL.
* removed unnecessary scaling code in SurfaceView, which I forgot to remove when I changed SurfaceView
not to scale the content.
Merge commit '54f156c7c47bd5b5f2c9675f56bddaaa43ad162e'
* commit '54f156c7c47bd5b5f2c9675f56bddaaa43ad162e':
Pass the originating app's versionCode along with a restore set
This change amends the doRestore() / onRestore() interface to backup agents to
provide the integer android:versionCode of the app that stored the backup set.
This should help agents figure out how to handle whatever historical data set
they're handed at restore time.
Merge commit '3a31a93b8a195ae2d0180e6dfbf292da2e581f50'
* commit '3a31a93b8a195ae2d0180e6dfbf292da2e581f50':
Add some global metadata to the restore set
In addition to the signatures of each participating application, we now also
store the versionCode of each backed-up package, plus the OS version running on
the device that contributed the backup set. We also refuse to process a backup
from a later OS revision to an earlier one, or from a later app version to an
earlier.
LocalTransport has been modified as well to be more resilient to changes in the
system's use of metadata pseudopackages.
* changes:
Helper API cleanup. Allows multiple helpers to function, because they'll always go in the same order, and this lets us not have to write headers to keep them paired.
Merge commit '07a5f126df2cf0dbeb7096535ae634ea8eaeb306'
* commit '07a5f126df2cf0dbeb7096535ae634ea8eaeb306':
At boot time, add additional per-device information to the
* changes:
At boot time, add additional per-device information to the kernel randomness pool. This helps increase the quality / uniqueness of the random numbers, and is especially important during the device's first boot, when insufficient randomness is available.