Merge "selectBackupTransportAsync should report failure when backup is not available" into oc-dev

This commit is contained in:
TreeHugger Robot
2017-05-04 08:43:59 +00:00
committed by Android (Google) Code Review

View File

@@ -304,6 +304,14 @@ public class Trampoline extends IBackupManager.Stub {
BackupManagerService svc = mService;
if (svc != null) {
svc.selectBackupTransportAsync(transport, listener);
} else {
if (listener != null) {
try {
listener.onFailure(BackupManager.ERROR_BACKUP_NOT_ALLOWED);
} catch (RemoteException ex) {
// Ignore
}
}
}
}