selectBackupTransportAsync should report failure when backup is not available
Merged-in: I393308857ea6082dca167e3e417b946615a83c20
Fix: 37304539
Test: runtest -x frameworks/base/services/tests/servicestests/src/com/android/server/backup/TrampolineTest.java
Test: setup device owner, then set up profile.
Ensure tapping Settings->Google->Work->Security -> Verify app
is working
Change-Id: I88c3e3163605d62123c88377ae0843084e354212
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user