title: SupplicantState COMPLETED but DetailedState OBTAINING_IPADDR while actually connected to Wifi?
body: <p>I'm using API level 27 but run my app on a 6.0 tablet. Here is the suspicious code:</p>
  
  <pre><code>WifiManager wm = (WifiManager)pContext.getSystemService(Context.WIFI_SERVICE);
  WifiInfo wi = wm.getConnectionInfo();
  SupplicantState ss = wi.getSupplicantState();
  NetworkInfo.DetailedState ds = wi.getDetailedStateOf( ss );
  String ssid = wi.getSSID();
  int ip = wi.getIpAddress();
  </code></pre>
  
  <p>My tablet is connected (I see "connected" in the WiFi panel) to an ad hoc network created on a laptop. There is no internet access.</p>
  
  <p><code>ss</code> is <code>COMPLETED</code></p>
  
  <p><code>ds</code> is <code>OBTAINING_IPADDR</code> </p>
  
  <p><code>ip</code> is <code>-745953088</code> (192.168.137.211)</p>
  
  <p>Why is the <code>DetailedState</code> set to <code>OBTAINING_IPADDR</code> rather than <code>CONNECTED</code>?</p>