diff options
author | Raju Yadav <raju.yadav@sonymobile.com> | 2014-12-22 14:54:13 +0100 |
---|---|---|
committer | Johan Redestig <johan.redestig@sonymobile.com> | 2015-03-10 14:12:14 +0000 |
commit | aedae722fd148724d470124aff2f65215baa1a38 (patch) | |
tree | 42cf9b317e050f9853a07c900d7983b0bc87af0f /packages/SystemUI | |
parent | 2a88ff2fe1849a3823962a2c239afdf6339fedc9 (diff) | |
download | frameworks_base-aedae722fd148724d470124aff2f65215baa1a38.zip frameworks_base-aedae722fd148724d470124aff2f65215baa1a38.tar.gz frameworks_base-aedae722fd148724d470124aff2f65215baa1a38.tar.bz2 |
systemui: Handle case when network has been lost
If the network is immediately lost after becoming
available the onAvailable callback may not yet
have finished and is working with a lost network.
In this case networkCapabilities may be null, so
handle that.
Change-Id: I588586ae0e844667cca4e2fd992d9694432a2198
Diffstat (limited to 'packages/SystemUI')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityControllerImpl.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityControllerImpl.java index 2fbb812..f0dd943 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityControllerImpl.java @@ -190,7 +190,8 @@ public class SecurityControllerImpl implements SecurityController { NetworkCapabilities networkCapabilities = mConnectivityManager.getNetworkCapabilities(network); if (DEBUG) Log.d(TAG, "onAvailable " + network.netId + " : " + networkCapabilities); - if (networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_VPN)) { + if (networkCapabilities != null && + networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_VPN)) { setCurrentNetid(network.netId); } }; |