title: Bug in automatic connection to Wi-Fi, multiple identical points of connection are creating
body: <p>My code for automatic connection to Wi-Fi:</p>
  
  <pre><code>  int networkId = wifi.getConnectionInfo().getNetworkId();
   wifi.removeNetwork(networkId);
   int netId = wifi.addNetwork(conf);
   wifi.enableNetwork(netId, true);
   wifi.saveConfiguration();
   wifi.reconnect();
  </code></pre>
  
  <p>Everything is connecting correctly, but in the settings many identical Wi-Fi points appears. It can be fixed only by turning on/off the Wi-Fi.
  I understand that I can solve this by disabling / enabling wifi. But is there any better solution?
  Thank you all!</p>