title: Internet connection in android emulator always displays connected state
body: <p>I tried in many ways to check Internet connection in my android emulator </p>
  
  <pre><code>  ConnectivityManager conMgr = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);  
  
     NetworkInfo info= conMgr.getActiveNetworkInfo();  
  
           if(info != null || info.isConnected()) {  
                Log.v("NetworkInfo","Connected State");  
           }  
          else{  
              Log.v("NetworkInfo","Not Connected state");  
              Log.v("Reason",info.getReason());  
          } 
  </code></pre>
  
  <p>even if i disable Internet connection in my system ,my code  seems to display Connected state 
  so i guessed this may work </p>
  
  <pre><code> if ( conMgr.getNetworkInfo(1).getState() == NetworkInfo.State.CONNECTED
          ||  conMgr.getNetworkInfo(0).getState() == NetworkInfo.State.CONNECTED  ) {
  
        Log.v("Congr","Connection Present");
  
      }
      else if ( conMgr.getNetworkInfo(1).getState() == NetworkInfo.State.DISCONNECTED
          ||  conMgr.getNetworkInfo(0).getState() == NetworkInfo.State.DISCONNECTED) {
  
        Log.v("conMgr"," No Connection");
  
      } 
  </code></pre>
  
  <p>but the above code also displays "Connection Present" even when i disconnect Internet cables.
  .Please help to find a correct way to do this .I have ACCESS_NETWORK_STATE and INTERNET permission in my manifest file   </p>