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

Commit 753d754c authored by Wink Saville's avatar Wink Saville Committed by Android (Google) Code Review
Browse files

Merge "Fix NPE if mobile is not supported in checkMobileProvisioning." into jb-mr2-dev

parents 697184b5 68e6c645
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -3553,6 +3553,16 @@ public class ConnectivityService extends IConnectivityManager.Stub {
            timeOutMs = CheckMp.MAX_TIMEOUT_MS;
        }

        // Check that mobile networks are supported
        if (!isNetworkSupported(ConnectivityManager.TYPE_MOBILE)
                || !isNetworkSupported(ConnectivityManager.TYPE_MOBILE_HIPRI)) {
            log("checkMobileProvisioning: X no mobile network");
            if (resultReceiver != null) {
                resultReceiver.send(ConnectivityManager.CMP_RESULT_CODE_NO_CONNECTION, null);
            }
            return timeOutMs;
        }

        final long token = Binder.clearCallingIdentity();
        try {
            CheckMp checkMp = new CheckMp(mContext, this);