Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 60ef1ce0 authored by Tony Mak's avatar Tony Mak
Browse files

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
parent 0fe5a2d5
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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
                }
            }
        }
    }