OSDN Git Service

Enable runtime turndown of backup/restore services
authorChristopher Tate <ctate@google.com>
Thu, 30 Oct 2014 20:44:27 +0000 (13:44 -0700)
committerChristopher Tate <ctate@android.com>
Fri, 7 Nov 2014 18:40:47 +0000 (18:40 +0000)
commitbbe23b31dcd0eec8af5b5198970de7ff2a9ef79a
treee0f6458989ba16677e19f930fcfd128af6d11d3f
parent4b19b7aaff1d1ff972ebe68101c2107454bbe5de
Enable runtime turndown of backup/restore services

The heavy implementation of the backup manager service is now sitting
behind a lightweight trampoline that actually provides the binder
call interface.  The indirection allows us now to tear down the
implementation on the fly without breaking callers who have cached
binder references to the backup services: these callers will simply
see their future invocations failing benignly.

In addition there is now an API for suitably privileged callers such
as device policy management to effect this turndown.

Finally, there is now a static system property, "ro.backup.disable",
that a product can use to outright remove backup/restore operation
from the system's operation.  The public APIs will continue to be
safely usable on such products but no data will be moved to or
from the device.

Bug 17367491

Change-Id: I8108e386ef3b5c967938fae483366d6978fe4e04
core/java/android/app/backup/IBackupManager.aidl
services/backup/java/com/android/server/backup/BackupManagerService.java
services/backup/java/com/android/server/backup/FullBackupJob.java
services/backup/java/com/android/server/backup/Trampoline.java [new file with mode: 0644]