diff options
Diffstat (limited to 'service/java/com/android/server/wifi/WifiStateMachine.java')
-rw-r--r-- | service/java/com/android/server/wifi/WifiStateMachine.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java index 60fc02060..8f0d950bf 100644 --- a/service/java/com/android/server/wifi/WifiStateMachine.java +++ b/service/java/com/android/server/wifi/WifiStateMachine.java @@ -629,6 +629,8 @@ public class WifiStateMachine extends StateMachine { /* Supplicant is trying to associate to a given SSID */ static final int CMD_TARGET_SSID = BASE + 148; + static final int CMD_GET_SIM_INFO = BASE + 149; + /* Wifi state machine modes of operation */ /* CONNECT_MODE - connect to any 'known' AP when it becomes available */ public static final int CONNECT_MODE = 1; @@ -2146,6 +2148,17 @@ public class WifiStateMachine extends StateMachine { } /** + * Get sim info synchronously + */ + + public WifiEapSimInfo syncGetSimInfo(AsyncChannel channel) { + Message resultMsg = channel.sendMessageSynchronously(CMD_GET_SIM_INFO); + WifiEapSimInfo mWifiEapSimInfo = (WifiEapSimInfo) resultMsg.obj; + resultMsg.recycle(); + return mWifiEapSimInfo; + } + + /** * Get link layers stats for adapter synchronously */ public WifiLinkLayerStats syncGetLinkLayerStats(AsyncChannel channel) { @@ -4809,6 +4822,9 @@ public class WifiStateMachine extends StateMachine { replyToMessage(message, message.what, 0); } break; + case CMD_GET_SIM_INFO: + replyToMessage(message,message.what, (WifiEapSimInfo) null); + break; case CMD_GET_LINK_LAYER_STATS: // Not supported hence reply with error message replyToMessage(message, message.what, null); @@ -5424,6 +5440,15 @@ public class WifiStateMachine extends StateMachine { loge("Failed to set frequency band " + band); } break; + case CMD_GET_SIM_INFO: + String mSimInfo = mWifiNative.getSimInfoNative(); + WifiEapSimInfo mWifiEapSimInfo = new WifiEapSimInfo(mSimInfo); + if (mWifiEapSimInfo != null) { + replyToMessage(message, message.what ,(WifiEapSimInfo) mWifiEapSimInfo); + } else { + replyToMessage(message, message.what ,(WifiEapSimInfo) null); + } + break; case CMD_BLUETOOTH_ADAPTER_STATE_CHANGE: mBluetoothConnectionActive = (message.arg1 != BluetoothAdapter.STATE_DISCONNECTED); |