diff options
-rw-r--r-- | service/java/com/android/server/wifi/WifiConfigManager.java | 7 | ||||
-rw-r--r-- | service/java/com/android/server/wifi/WifiConfigStore.java | 9 |
2 files changed, 9 insertions, 7 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java index cf9fbcbed..d267fdad1 100644 --- a/service/java/com/android/server/wifi/WifiConfigManager.java +++ b/service/java/com/android/server/wifi/WifiConfigManager.java @@ -2440,7 +2440,6 @@ public class WifiConfigManager { } WifiConfigStoreData storeData; - long readStartTime = mClock.getElapsedSinceBootMillis(); try { storeData = mWifiConfigStore.read(); } catch (IOException e) { @@ -2450,9 +2449,6 @@ public class WifiConfigManager { Log.wtf(TAG, "XML deserialization of store failed. All saved networks are lost!", e); return false; } - long readTime = mClock.getElapsedSinceBootMillis() - readStartTime; - Log.d(TAG, "Reading from store completed in " + readTime + " ms."); - loadInternalData(storeData.getConfigurations(), storeData.getDeletedEphemeralSSIDs()); return true; } @@ -2488,7 +2484,6 @@ public class WifiConfigManager { new WifiConfigStoreData( sharedConfigurations, userConfigurations, mDeletedEphemeralSSIDs); - long writeStartTime = mClock.getElapsedSinceBootMillis(); try { mWifiConfigStore.write(forceWrite, storeData); } catch (IOException e) { @@ -2498,8 +2493,6 @@ public class WifiConfigManager { Log.wtf(TAG, "XML serialization for store failed. Saved networks maybe lost!", e); return false; } - long writeTime = mClock.getElapsedSinceBootMillis() - writeStartTime; - Log.d(TAG, "Writing to store completed in " + writeTime + " ms."); return true; } diff --git a/service/java/com/android/server/wifi/WifiConfigStore.java b/service/java/com/android/server/wifi/WifiConfigStore.java index bdbaea4aa..e75d916aa 100644 --- a/service/java/com/android/server/wifi/WifiConfigStore.java +++ b/service/java/com/android/server/wifi/WifiConfigStore.java @@ -240,8 +240,13 @@ public class WifiConfigStore { */ private void writeBufferedData() throws IOException { stopBufferedWriteAlarm(); + + long writeStartTime = mClock.getElapsedSinceBootMillis(); mSharedStore.writeBufferedRawData(); mUserStore.writeBufferedRawData(); + long writeTime = mClock.getElapsedSinceBootMillis() - writeStartTime; + + Log.d(TAG, "Writing to stores completed in " + writeTime + " ms."); } /** @@ -252,8 +257,12 @@ public class WifiConfigStore { * @return storeData The entire data retrieved across all the config store files. */ public WifiConfigStoreData read() throws XmlPullParserException, IOException { + long readStartTime = mClock.getElapsedSinceBootMillis(); byte[] sharedDataBytes = mSharedStore.readRawData(); byte[] userDataBytes = mUserStore.readRawData(); + long readTime = mClock.getElapsedSinceBootMillis() - readStartTime; + + Log.d(TAG, "Reading from stores completed in " + readTime + " ms."); return WifiConfigStoreData.parseRawData(sharedDataBytes, userDataBytes); } |