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

Commit 568204e3 authored by Roshan Pius's avatar Roshan Pius Committed by Android (Google) Code Review
Browse files

Merge "WifiManager: Add new API's for backup/restore"

parents 3e2280ed 7bc0adbc
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -169,5 +169,9 @@ interface IWifiManager
    void factoryReset();

    Network getCurrentNetwork();

    byte[] retrieveBackupData();

    void restoreBackupData(in byte[] data);
}
+24 −0
Original line number Diff line number Diff line
@@ -2737,4 +2737,28 @@ public class WifiManager {
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * Retrieve the data to be backed to save the current state.
     * @hide
     */
    public byte[] retrieveBackupData() {
        try {
            return mService.retrieveBackupData();
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * Restore state from the backed up data.
     * @hide
     */
    public void restoreBackupData(byte[] data) {
        try {
            mService.restoreBackupData(data);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }
}