diff options
author | Mingguang Xu <mingguangxu@google.com> | 2019-03-27 11:24:39 -0700 |
---|---|---|
committer | Mingguang Xu <mingguangxu@google.com> | 2019-03-27 17:06:55 -0700 |
commit | efe5d28d9030c2c5370e2682ab0db8c0b21f536c (patch) | |
tree | 28aef4117311cdacd83a22d2534f31e7534c7b88 /service | |
parent | 4a1a9a7adea99ef396e58f241e6f630afec5b465 (diff) |
Wifi usability: Add device mobility state into Wifi usability stats
Device mobility state is helpful for predicting Wifi usability in a
future time conditioned on current Wifi status.
Populate the device mobility state and the associated timing information
in WifiMetrics.
Bug: 129409568
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I22139bd2cc753d79623f35dec791c82332261cd9
Signed-off-by: Mingguang Xu <mingguangxu@google.com>
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiMetrics.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiMetrics.java b/service/java/com/android/server/wifi/WifiMetrics.java index ccfdbc029..159a9d1da 100644 --- a/service/java/com/android/server/wifi/WifiMetrics.java +++ b/service/java/com/android/server/wifi/WifiMetrics.java @@ -2768,6 +2768,7 @@ public class WifiMetrics { line.append(",cellular_signal_strength_dbm=" + entry.cellularSignalStrengthDbm); line.append(",cellular_signal_strength_db=" + entry.cellularSignalStrengthDb); line.append(",is_same_registered_cell=" + entry.isSameRegisteredCell); + line.append(",device_mobility_state=" + entry.deviceMobilityState); pw.println(line.toString()); } @@ -4163,6 +4164,7 @@ public class WifiMetrics { wifiUsabilityStatsEntry.rxLinkSpeedMbps = info.getRxLinkSpeedMbps(); wifiUsabilityStatsEntry.isSameBssidAndFreq = isSameBssidAndFreq; wifiUsabilityStatsEntry.seqNumInsideFramework = mSeqNumInsideFramework; + wifiUsabilityStatsEntry.deviceMobilityState = mCurrentDeviceMobilityState; CellularLinkLayerStats cls = mCellularLinkLayerStatsCollector.update(); if (DBG) Log.v(TAG, "Latest Cellular Link Layer Stats: " + cls); @@ -4323,6 +4325,7 @@ public class WifiMetrics { out.cellularSignalStrengthDbm = s.cellularSignalStrengthDbm; out.cellularSignalStrengthDb = s.cellularSignalStrengthDb; out.isSameRegisteredCell = s.isSameRegisteredCell; + out.deviceMobilityState = s.deviceMobilityState; return out; } |