summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorRobert Greenwalt <rgreenwalt@google.com>2013-11-13 10:25:30 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2013-11-13 10:25:30 -0800
commit6eddb39c857b178672218a345a276c4304e7ad37 (patch)
treedb20fbbe123bccd81d42d61734c6cc2a0cdf9d99 /services
parent221080078a36f4b30fe6edc8c91f339a5b84ed83 (diff)
parent18490abd9bcb401f0d75a314056fb2a44dd61f07 (diff)
downloadframeworks_base-6eddb39c857b178672218a345a276c4304e7ad37.zip
frameworks_base-6eddb39c857b178672218a345a276c4304e7ad37.tar.gz
frameworks_base-6eddb39c857b178672218a345a276c4304e7ad37.tar.bz2
am 18490abd: Merge "Fix NPE in ConnectivityService"
* commit '18490abd9bcb401f0d75a314056fb2a44dd61f07': 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 cb4e89c..7c43c17 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -1439,9 +1439,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) {