diff options
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiConfigManager.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java index aea7c6ade..e79047cf3 100644 --- a/service/java/com/android/server/wifi/WifiConfigManager.java +++ b/service/java/com/android/server/wifi/WifiConfigManager.java @@ -2603,6 +2603,14 @@ public class WifiConfigManager { } return true; } + // If the user unlock comes in before we load from store, which means the user store have + // not been setup yet for the current user. Setup the user store before the read so that + // configurations for the current user will also being loaded. + if (mDeferredUserUnlockRead) { + Log.i(TAG, "Handling user unlock before loading from store."); + mWifiConfigStore.setUserStore(WifiConfigStore.createUserFile(mCurrentUserId)); + mDeferredUserUnlockRead = false; + } try { mWifiConfigStore.read(); } catch (IOException e) { @@ -2615,13 +2623,6 @@ public class WifiConfigManager { loadInternalData(mNetworkListStoreData.getSharedConfigurations(), mNetworkListStoreData.getUserConfigurations(), mDeletedEphemeralSsidsStoreData.getSsidList()); - // If the user unlock comes in before we load from store, we defer the handling until - // the load from store is triggered. - if (mDeferredUserUnlockRead) { - Log.i(TAG, "Handling user unlock after loading from store."); - handleUserUnlockOrSwitch(mCurrentUserId); - mDeferredUserUnlockRead = false; - } return true; } |