am db011499: am 753d754c: Merge "Fix NPE if mobile is not supported in checkMobileProvisioning." into jb-mr2-dev

* commit 'db011499c80f663b30564f1978f3e8e56d60f6c6':
  Fix  NPE if mobile is not supported in checkMobileProvisioning.
This commit is contained in:
Wink Saville
2013-07-02 12:36:47 -07:00
committed by Android Git Automerger

View File

@@ -3553,6 +3553,16 @@ public class ConnectivityService extends IConnectivityManager.Stub {
timeOutMs = CheckMp.MAX_TIMEOUT_MS; 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(); final long token = Binder.clearCallingIdentity();
try { try {
CheckMp checkMp = new CheckMp(mContext, this); CheckMp checkMp = new CheckMp(mContext, this);