Methods Summary |
---|
public void | acknowledgeFullBackupOrRestore(int token, boolean allow, java.lang.String curPassword, java.lang.String encryptionPassword, android.app.backup.IFullBackupRestoreObserver observer)
BackupManagerService svc = mService;
if (svc != null) {
svc.acknowledgeFullBackupOrRestore(token, allow,
curPassword, encryptionPassword, observer);
}
|
public void | agentConnected(java.lang.String packageName, android.os.IBinder agent)
BackupManagerService svc = mService;
if (svc != null) {
svc.agentConnected(packageName, agent);
}
|
public void | agentDisconnected(java.lang.String packageName)
BackupManagerService svc = mService;
if (svc != null) {
svc.agentDisconnected(packageName);
}
|
public void | backupNow()
BackupManagerService svc = mService;
if (svc != null) {
svc.backupNow();
}
|
boolean | beginFullBackup(FullBackupJob scheduledJob)
BackupManagerService svc = mService;
return (svc != null) ? svc.beginFullBackup(scheduledJob) : false;
|
public android.app.backup.IRestoreSession | beginRestoreSession(java.lang.String packageName, java.lang.String transportID)
BackupManagerService svc = mService;
return (svc != null) ? svc.beginRestoreSession(packageName, transportID) : null;
|
public void | clearBackupData(java.lang.String transportName, java.lang.String packageName)
BackupManagerService svc = mService;
if (svc != null) {
svc.clearBackupData(transportName, packageName);
}
|
public void | dataChanged(java.lang.String packageName)
BackupManagerService svc = mService;
if (svc != null) {
svc.dataChanged(packageName);
}
|
public void | dump(java.io.FileDescriptor fd, java.io.PrintWriter pw, java.lang.String[] args)
BackupManagerService svc = mService;
if (svc != null) {
svc.dump(fd, pw, args);
} else {
pw.println("Inactive");
}
|
void | endFullBackup()
BackupManagerService svc = mService;
if (svc != null) {
svc.endFullBackup();
}
|
public void | fullBackup(android.os.ParcelFileDescriptor fd, boolean includeApks, boolean includeObbs, boolean includeShared, boolean doWidgets, boolean allApps, boolean allIncludesSystem, boolean doCompress, java.lang.String[] packageNames)
BackupManagerService svc = mService;
if (svc != null) {
svc.fullBackup(fd, includeApks, includeObbs, includeShared, doWidgets,
allApps, allIncludesSystem, doCompress, packageNames);
}
|
public void | fullRestore(android.os.ParcelFileDescriptor fd)
BackupManagerService svc = mService;
if (svc != null) {
svc.fullRestore(fd);
}
|
public void | fullTransportBackup(java.lang.String[] packageNames)
BackupManagerService svc = mService;
if (svc != null) {
svc.fullTransportBackup(packageNames);
}
|
public android.content.Intent | getConfigurationIntent(java.lang.String transport)
BackupManagerService svc = mService;
return (svc != null) ? svc.getConfigurationIntent(transport) : null;
|
public java.lang.String | getCurrentTransport()
BackupManagerService svc = mService;
return (svc != null) ? svc.getCurrentTransport() : null;
|
public android.content.Intent | getDataManagementIntent(java.lang.String transport)
BackupManagerService svc = mService;
return (svc != null) ? svc.getDataManagementIntent(transport) : null;
|
public java.lang.String | getDataManagementLabel(java.lang.String transport)
BackupManagerService svc = mService;
return (svc != null) ? svc.getDataManagementLabel(transport) : null;
|
public java.lang.String | getDestinationString(java.lang.String transport)
BackupManagerService svc = mService;
return (svc != null) ? svc.getDestinationString(transport) : null;
|
public boolean | hasBackupPassword()
BackupManagerService svc = mService;
return (svc != null) ? svc.hasBackupPassword() : false;
|
public void | initialize(int whichUser)
// Note that only the owner user is currently involved in backup/restore
if (whichUser == UserHandle.USER_OWNER) {
// Does this product support backup/restore at all?
if (mGlobalDisable) {
Slog.i(TAG, "Backup/restore not supported");
return;
}
synchronized (this) {
if (!mSuppressFile.exists()) {
mService = new BackupManagerService(mContext, this);
} else {
Slog.i(TAG, "Backup inactive in user " + whichUser);
}
}
}
|
public boolean | isBackupEnabled()
BackupManagerService svc = mService;
return (svc != null) ? svc.isBackupEnabled() : false;
|
public boolean | isBackupServiceActive(int userHandle)Querying activity state of backup service. Calling this method before initialize yields
undefined result.
if (userHandle == UserHandle.USER_OWNER) {
synchronized (this) {
return mService != null;
}
}
return false;
|
public java.lang.String[] | listAllTransports()
BackupManagerService svc = mService;
return (svc != null) ? svc.listAllTransports() : null;
|
public void | opComplete(int token)
BackupManagerService svc = mService;
if (svc != null) {
svc.opComplete(token);
}
|
public void | restoreAtInstall(java.lang.String packageName, int token)
BackupManagerService svc = mService;
if (svc != null) {
svc.restoreAtInstall(packageName, token);
}
|
public java.lang.String | selectBackupTransport(java.lang.String transport)
BackupManagerService svc = mService;
return (svc != null) ? svc.selectBackupTransport(transport) : null;
|
public void | setAutoRestore(boolean doAutoRestore)
BackupManagerService svc = mService;
if (svc != null) {
svc.setAutoRestore(doAutoRestore);
}
|
public void | setBackupEnabled(boolean isEnabled)
BackupManagerService svc = mService;
if (svc != null) {
svc.setBackupEnabled(isEnabled);
}
|
public boolean | setBackupPassword(java.lang.String currentPw, java.lang.String newPw)
BackupManagerService svc = mService;
return (svc != null) ? svc.setBackupPassword(currentPw, newPw) : false;
|
public void | setBackupProvisioned(boolean isProvisioned)
BackupManagerService svc = mService;
if (svc != null) {
svc.setBackupProvisioned(isProvisioned);
}
|
public void | setBackupServiceActive(int userHandle, boolean makeActive)
// Only the DPM should be changing the active state of backup
final int caller = Binder.getCallingUid();
if (caller != Process.SYSTEM_UID
&& caller != Process.ROOT_UID) {
throw new SecurityException("No permission to configure backup activity");
}
if (mGlobalDisable) {
Slog.i(TAG, "Backup/restore not supported");
return;
}
if (userHandle == UserHandle.USER_OWNER) {
synchronized (this) {
if (makeActive != isBackupServiceActive(userHandle)) {
Slog.i(TAG, "Making backup "
+ (makeActive ? "" : "in") + "active in user " + userHandle);
if (makeActive) {
mService = new BackupManagerService(mContext, this);
mSuppressFile.delete();
} else {
mService = null;
try {
mSuppressFile.createNewFile();
} catch (IOException e) {
Slog.e(TAG, "Unable to persist backup service inactivity");
}
}
}
}
}
|