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
This commit is contained in:
@@ -173,5 +173,7 @@ interface IWifiManager
|
||||
byte[] retrieveBackupData();
|
||||
|
||||
void restoreBackupData(in byte[] data);
|
||||
|
||||
void restoreSupplicantBackupData(in byte[] supplicantData, in byte[] ipConfigData);
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user