OSDN Git Service

Make BackupManager encryption aware.
authorJeff Sharkey <jsharkey@android.com>
Wed, 17 Feb 2016 22:29:38 +0000 (15:29 -0700)
committerJeff Sharkey <jsharkey@android.com>
Thu, 18 Feb 2016 17:54:11 +0000 (10:54 -0700)
commit2c1ba9a961d4f96c26df260ee437655ad9e7c03e
tree9e31be1e3cb94b1bd2a9cdf96f12e42e92dcfc09
parent18026642213698fc095a9510c2431862d3a7f310
Make BackupManager encryption aware.

Backup requires both CE and DE storage to be available, so delay
spinning up the backup system until the user is unlocked, since
that's when CE storage becomes available.  Note that devices without
FBE immediately transition USER_SYSTEM into the unlocked state,
since their CE is always available.

Offer to backup and restore files under both CE and DE.  Since DE
is effectively the same as CE, most logic is simply duplicated for
now, but it could be simplified in the future.  Since system apps
can force their default storage location to DE, we always build
explicit CE and DE paths.

Add getDataDir() to give clean access to the top-level private data
directory, but disclaim that apps shouldn't create files there.

Bug: 26279618
Change-Id: Ic34a4b330223725db93b1d0f5c9dffc88002c61f
12 files changed:
api/current.txt
api/system-current.txt
api/test-current.txt
core/java/android/app/ContextImpl.java
core/java/android/app/backup/BackupAgent.java
core/java/android/app/backup/FullBackup.java
core/java/android/content/Context.java
core/java/android/content/ContextWrapper.java
core/tests/coretests/src/android/app/backup/FullBackupTest.java
services/backup/java/com/android/server/backup/BackupManagerService.java
test-runner/src/android/test/mock/MockContext.java
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java