diff options
author | lesl <lesl@google.com> | 2019-12-10 16:14:38 +0800 |
---|---|---|
committer | lesl <lesl@google.com> | 2019-12-10 16:14:38 +0800 |
commit | 62fc4d193484ad2541613ae14ce44cb9f27e0799 (patch) | |
tree | d9d486690e02e1fbbdb8bbb624773d28dbcfe97c /service | |
parent | 47fc6c5f3eb6ba273c3f04890971a63c31324996 (diff) |
wifi: Return SoftApConfiguration for cloud restore.
Restore process might need to notify user because
restored ap configuration requires the band conversion.
Bug: 142752869
Test: atest frameworks/opt/net/wifi/tests/wifitests/
Change-Id: I8141aabbbdbda81c0c59dcd8a1d3b8ee989bd332
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiServiceImpl.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/service/java/com/android/server/wifi/WifiServiceImpl.java b/service/java/com/android/server/wifi/WifiServiceImpl.java index 165df13bc..02ebda50e 100644 --- a/service/java/com/android/server/wifi/WifiServiceImpl.java +++ b/service/java/com/android/server/wifi/WifiServiceImpl.java @@ -3020,7 +3020,7 @@ public class WifiServiceImpl extends BaseWifiService { Log.d(TAG, "Restored backup data"); } - /* + /** * Retrieve the soft ap config data to be backed to save current config data. * * @return Raw byte stream of the data to be backed up. @@ -3041,9 +3041,10 @@ public class WifiServiceImpl extends BaseWifiService { * Restore soft ap config from the backed up data. * * @param data Raw byte stream of the backed up data. + * @return restored SoftApConfiguration or Null if data is invalid. */ @Override - public void restoreSoftApBackupData(byte[] data) { + public SoftApConfiguration restoreSoftApBackupData(byte[] data) { enforceNetworkSettingsPermission(); mLog.info("restoreSoftApBackupData uid=%").c(Binder.getCallingUid()).flush(); SoftApConfiguration softApConfig = @@ -3052,6 +3053,7 @@ public class WifiServiceImpl extends BaseWifiService { mWifiThreadRunner.post(() -> mWifiApConfigStore.setApConfiguration(softApConfig)); Log.d(TAG, "Restored soft ap backup data"); } + return softApConfig; } |