diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2013-11-13 18:22:26 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2013-11-13 18:22:26 +0000 |
commit | 18490abd9bcb401f0d75a314056fb2a44dd61f07 (patch) | |
tree | d07a96d6cc25250050a27d2883d084c868fd606a /services | |
parent | 01e42c0be27f492a7325141f509755aa064923f3 (diff) | |
parent | 151d3032eb81337b0b876b0a43c6faefe54e516a (diff) | |
download | frameworks_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.java | 7 |
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) { |