diff options
author | Roshan Pius <rpius@google.com> | 2016-11-11 04:38:11 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-11-11 04:38:11 +0000 |
commit | f72715cc4f998aefba0f1002cbb223fac9ed164a (patch) | |
tree | 6707cc9c470b1d426e4a79bfd3da3125142c291c /service | |
parent | 19dc032ab0cfe0eba8cec9fe9ed5f530905eb206 (diff) | |
parent | b88000ed5302860e71e32646695daf661f56d927 (diff) |
WifiConfigStore: Move log for store read/write times
am: b88000ed53
Change-Id: I32f507e46a9460d7728a573cdd94235117660688
Diffstat (limited to 'service')
-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); } |