summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorRobert Greenwalt <rgreenwalt@google.com>2013-11-13 18:22:26 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2013-11-13 18:22:26 +0000
commit18490abd9bcb401f0d75a314056fb2a44dd61f07 (patch)
treed07a96d6cc25250050a27d2883d084c868fd606a /services
parent01e42c0be27f492a7325141f509755aa064923f3 (diff)
parent151d3032eb81337b0b876b0a43c6faefe54e516a (diff)
downloadframeworks_base-18490abd9bcb401f0d75a314056fb2a44dd61f07.zip
frameworks_base-18490abd9bcb401f0d75a314056fb2a44dd61f07.tar.gz
frameworks_base-18490abd9bcb401f0d75a314056fb2a44dd61f07.tar.bz2
Merge "Fix NPE in ConnectivityService"
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/ConnectivityService.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index 29c546e..10b1bef 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -1432,9 +1432,12 @@ public class ConnectivityService extends IConnectivityManager.Stub {
return false;
}
NetworkStateTracker tracker = mNetTrackers[networkType];
- DetailedState netState = tracker.getNetworkInfo().getDetailedState();
+ DetailedState netState = DetailedState.DISCONNECTED;
+ if (tracker != null) {
+ netState = tracker.getNetworkInfo().getDetailedState();
+ }
- if (tracker == null || (netState != DetailedState.CONNECTED &&
+ if ((netState != DetailedState.CONNECTED &&
netState != DetailedState.CAPTIVE_PORTAL_CHECK) ||
tracker.isTeardownRequested()) {
if (VDBG) {