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.
* changes:
Fix issue with shared user permissions. just look in the requested permissions of packages within shared user setting rather than the granted permissions
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.
We now record the version number of the app (drawn from its manifest versionCode
attribute) along with its signatures. At restore time, we compare the version
associated with the restore set with the version present on the device. If the
restore set is from a newer version of the app than is present on device, we do
not perform the restore operation.
Also fix the pending-backup iteration in 'dumpsys backup'.
Adds support for system properties:
ro.error.receiver.system.apps - default error report receiver for system apps
ro.error.receiver.default - fallback error report receiver
Merge commit 'fd5f087536dcb04ac9c46f2b19f87a37455390b0'
* commit 'fd5f087536dcb04ac9c46f2b19f87a37455390b0':
Make signature checks on restore work with unsigned apps
On restore now, the backup manager gets the signature blocks corresponding to
the restore set from the transport. It then validates those signatures against
the on-device app signatures, and refuses to restore data to an app whose
on-device sig block does not match the backup image's.
Also actually implement 'bmgr transport N' so that we can select the local
transport easily during runtime.
- Fix a bug where targetSdkVersion could not be set if minSdkVersion. Stupid, stupid.
Also make sure to fail if minSdkVersion is for a code name. Really stupid.
- Change the API for resize compatibility mode to be a bit in the flags field, instead
of a separate boolean.
- Implement delayed dexopting, to avoid the looong full dexopt during boot. This is
only enabled for "eng" builds. When in this mode, the activity manager will make
sure that a dexopt has been done before loading an .apk into a process, and will
try to avoid displaying ANRs if they are due to the dexopt causing some operation
to take longer than it normally would (though I make no guarantees about this
totally working).
- Add API to Context to get the ApplicationInfo for its package, for easy access to
things like targetSdkVersion.