From 2bb56aa74dcad6946b1201cab016fd3f1fa410d7 Mon Sep 17 00:00:00 2001 From: Roshan Pius Date: Mon, 6 Jun 2016 15:25:37 -0700 Subject: WifiStateMachine: Return null link layer stats Modify |CMD_GET_LINK_LAYER_STATS| handling to return a null object when the stats cannot be retrieved from wifi HAL. We've added a feature check in |WifiServiceImpl.reportActivityInfo| method to check if the device supports link layer stats reporting or not. So, there is no need to fake an empty object if the retrieval fails. BUG:29117407 Change-Id: Iaf8e060912611773398210785ebfaae7371db77c --- service/java/com/android/server/wifi/WifiStateMachine.java | 4 ---- 1 file changed, 4 deletions(-) (limited to 'service') diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java index da39371c8..900330070 100644 --- a/service/java/com/android/server/wifi/WifiStateMachine.java +++ b/service/java/com/android/server/wifi/WifiStateMachine.java @@ -4486,10 +4486,6 @@ public class WifiStateMachine extends StateMachine implements WifiNative.WifiRss break; case CMD_GET_LINK_LAYER_STATS: WifiLinkLayerStats stats = getWifiLinkLayerStats(DBG); - if (stats == null) { - // When firmware doesnt support link layer stats, return an empty object - stats = new WifiLinkLayerStats(); - } replyToMessage(message, message.what, stats); break; case CMD_RESET_SIM_NETWORKS: -- cgit v1.2.3