With Android O, Google will make it easier for your device to automatically connect to known Wi-Fi networks. A new feature in Android O, currently hidden and disabled in the developer preview, will automatically turn on Wi-Fi when you are near a saved network.
The ‘Turn Wi-Fi back on’ feature will presumably work on the basis of your location, with the matching SSID information being tagged with it. Considering that Wi-Fi is silently used by most Android devices for background scanning on your location, this feature is unlikely to introduce any additional drain on the battery of your device.
While the feature is not yet enabled, it should ideally work this way: once you come in the range of a known Wi-Fi network, the Wi-Fi on your device will automatically enable itself. If the Wi-Fi network is not available for some reason or there is no active internet connection, the Wi-Fi radio will be turned off.
It is possible that we will see Google enable this feature in the upcoming Developer Preview build of Android O.
[Via Android Police]