Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aedae722 authored by Raju Yadav's avatar Raju Yadav Committed by Johan Redestig
Browse files

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
parent 2a88ff2f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);
            }
        };