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

Commit 91824ff0 authored by Chandan Nath's avatar Chandan Nath
Browse files

[Backup cleanup] remove unused (and no-op) method setBackupProvisioned

Bug: 120120742

Test: 1) atest RunBackupFrameworksServicesRoboTests
2) atest $(find \
frameworks/base/services/tests/servicestests/src/com/android/server/backup \
-name '*Test.java')
3) atest CtsBackupTestCases
4) atest CtsBackupHostTestCases
5) atest GtsBackupTestCases
6) atest GtsBackupHostTestCases

Change-Id: I7b712f346f851ca4f2b6b7d62a0a8fdcc7c77a56
parent a0bf4d7a
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -179,13 +179,6 @@ interface IBackupManager {
     */
    void setAutoRestore(boolean doAutoRestore);

    /**
     * Indicate that any necessary one-time provisioning has occurred.
     *
     * <p>Callers must hold the android.permission.BACKUP permission to use this method.
     */
    void setBackupProvisioned(boolean isProvisioned);

    /**
     * Report whether the backup mechanism is currently enabled.
     *
+0 −7
Original line number Diff line number Diff line
@@ -385,13 +385,6 @@ public class Trampoline extends IBackupManager.Stub {
        setAutoRestoreForUser(binderGetCallingUserId(), doAutoRestore);
    }

    @Override
    public void setBackupProvisioned(boolean isProvisioned) throws RemoteException {
        /*
         * This is now a no-op; provisioning is simply the device's own setup state.
         */
    }

    @Override
    public boolean isBackupEnabledForUser(@UserIdInt int userId) throws RemoteException {
        BackupManagerService svc = mService;
+0 −13
Original line number Diff line number Diff line
@@ -509,19 +509,6 @@ public class TrampolineTest {
        verify(mBackupManagerServiceMock).setAutoRestore(mUserId, true);
    }

    @Test
    public void setBackupProvisioned_calledBeforeInitialize_ignored() throws RemoteException {
        mTrampoline.setBackupProvisioned(true);
        verifyNoMoreInteractions(mBackupManagerServiceMock);
    }

    @Test
    public void setBackupProvisioned_forwarded() throws RemoteException {
        mTrampoline.initializeService();
        mTrampoline.setBackupProvisioned(true);
        verifyNoMoreInteractions(mBackupManagerServiceMock);
    }

    @Test
    public void isBackupEnabled_calledBeforeInitialize_ignored() throws RemoteException {
        assertFalse(mTrampoline.isBackupEnabled());