title: Verify Android Internet Connection and Error
body: <p>in a Service I'm using the following function for verifying internet connection:</p>
  
  <pre><code> public static boolean isNetworkAvailable(Context context) {
      ConnectivityManager connMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
      NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
      return !(networkInfo == null || !networkInfo.isConnected());
  }
  </code></pre>
  
  <p>The problem is that if I have no Internet connection, I obtain the following in the Log:</p>
  
  <pre><code> I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
   I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
   I/System.out: KnoxVpnUidStorageknoxVpnSupported API value returned is false
  </code></pre>
  
  <p>So Android 5.1.1 are saying me that my application is slowing up my device and there are always error.</p>
  
  <p>What's the problem? Thanks.</p>