diff options
| author | 2011-06-07 17:19:02 -0700 | |
|---|---|---|
| committer | 2011-06-07 17:19:02 -0700 | |
| commit | f5969553727e7a9058820291439403bb3f9b327f (patch) | |
| tree | d5fcf06d381e9b7e127fd0896b5b7a0ef5fcd068 | |
| parent | 48076da85cfd0c68214b719167c958dae6a25ebd (diff) | |
| parent | 5e4d0206486378ffc7d2992750e439d54df15147 (diff) | |
am 5e4d0206: am b400184a: Merge "Handle AsyncChannel disconnect in WifiService" into honeycomb-LTE
* commit '5e4d0206486378ffc7d2992750e439d54df15147':
Handle AsyncChannel disconnect in WifiService
| -rw-r--r-- | services/java/com/android/server/WifiService.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/services/java/com/android/server/WifiService.java b/services/java/com/android/server/WifiService.java index 41ec63a53c90..4e2501b460e7 100644 --- a/services/java/com/android/server/WifiService.java +++ b/services/java/com/android/server/WifiService.java @@ -321,6 +321,13 @@ public class WifiService extends IWifiManager.Stub { } break; } + case AsyncChannel.CMD_CHANNEL_DISCONNECTED: { + Slog.e(TAG, "WifiStateMachine channel lost, msg.arg1 =" + msg.arg1); + mWifiStateMachineChannel = null; + //Re-establish connection to state machine + mWsmChannel.connect(mContext, this, mWifiStateMachine.getHandler()); + break; + } default: { Slog.d(TAG, "WifiStateMachineHandler.handleMessage ignoring msg=" + msg); break; @@ -593,7 +600,12 @@ public class WifiService extends IWifiManager.Stub { */ public WifiConfiguration getWifiApConfiguration() { enforceAccessPermission(); - return mWifiStateMachine.syncGetWifiApConfiguration(mWifiStateMachineChannel); + if (mWifiStateMachineChannel != null) { + return mWifiStateMachine.syncGetWifiApConfiguration(mWifiStateMachineChannel); + } else { + Slog.e(TAG, "mWifiStateMachineChannel is not initialized"); + return null; + } } /** |