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

Commit 08131593 authored by Roshan Pius's avatar Roshan Pius
Browse files

WifiManager: Add new API to restore old backup data

Add a new API to restore the old backups containing the raw data from
wpa_supplicant.conf & ipconfig.txt files.
This helps clean up all the existing wifi configuration parsing
logic from SettingsBackupAgent.

BUG: 29075035
Change-Id: I8c7b93ef7c9e2decc8e4f9e5d7038939cf0ef196
parent 06fe328c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -173,5 +173,7 @@ interface IWifiManager
    byte[] retrieveBackupData();

    void restoreBackupData(in byte[] data);

    void restoreSupplicantBackupData(in byte[] supplicantData, in byte[] ipConfigData);
}
+13 −0
Original line number Diff line number Diff line
@@ -2761,4 +2761,17 @@ public class WifiManager {
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * Restore state from the older version of back up data.
     * The old backup data was essentially a backup of wpa_supplicant.conf & ipconfig.txt file.
     * @hide
     */
    public void restoreSupplicantBackupData(byte[] supplicantData, byte[] ipConfigData) {
        try {
            mService.restoreSupplicantBackupData(supplicantData, ipConfigData);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }
}