summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2015-08-12 03:38:57 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-08-12 03:38:57 +0000
commite022cb085f6ebc2801f843bb47c9fd23f6daa3ea (patch)
tree3ccac60e2c728eb362a40dab8b87520ff5a516e9 /services
parent968fc3ab75b0de71f298c6241cab1be1e6d5c86e (diff)
parent31e19f34f56a01a7b4133cd1dccf13b18b469ac7 (diff)
downloadframeworks_base-e022cb085f6ebc2801f843bb47c9fd23f6daa3ea.zip
frameworks_base-e022cb085f6ebc2801f843bb47c9fd23f6daa3ea.tar.gz
frameworks_base-e022cb085f6ebc2801f843bb47c9fd23f6daa3ea.tar.bz2
Merge "Don't attempt to stop the receive thread if we never started it." into mnc-dev
Diffstat (limited to 'services')
-rw-r--r--services/net/java/android/net/dhcp/DhcpClient.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/services/net/java/android/net/dhcp/DhcpClient.java b/services/net/java/android/net/dhcp/DhcpClient.java
index 2d40291..9ee9cf4 100644
--- a/services/net/java/android/net/dhcp/DhcpClient.java
+++ b/services/net/java/android/net/dhcp/DhcpClient.java
@@ -603,7 +603,10 @@ public class DhcpClient extends BaseDhcpStateMachine {
@Override
public void exit() {
cancelOneshotTimeout();
- mReceiveThread.halt(); // Also closes sockets.
+ if (mReceiveThread != null) {
+ mReceiveThread.halt(); // Also closes sockets.
+ mReceiveThread = null;
+ }
clearDhcpState();
}