Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50a5a8be authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "avoid NPE/fatal exception if wpa_supplicant fails" into gingerbread

parents a9e322ec 827f8ce9
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -969,7 +969,9 @@ public class WifiStateTracker extends NetworkStateTracker {
                    resetConnections(true);
                }
                // When supplicant dies, kill the DHCP thread
                if (mDhcpTarget != null) {
                    mDhcpTarget.getLooper().quit();
                }

                mContext.removeStickyBroadcast(new Intent(WifiManager.NETWORK_STATE_CHANGED_ACTION));
                if (ActivityManagerNative.isSystemReady()) {
@@ -1441,8 +1443,10 @@ public class WifiStateTracker extends NetworkStateTracker {
        NetworkUtils.resetConnections(mInterfaceName);

        // Stop DHCP
        if (mDhcpTarget != null) {
            mDhcpTarget.setCancelCallback(true);
            mDhcpTarget.removeMessages(EVENT_DHCP_START);
        }

        if (!NetworkUtils.stopDhcp(mInterfaceName)) {
            Log.e(TAG, "Could not stop DHCP");