The Android O beta is in works on certain eligible devices and everyday we are learning new features about it. One of them is “automatically switching WiFi on near trusted networks”. When the first developer preview came out, he toggle was non-functional, but now it works in developer preview 2.
The option can be accessed in Network and internet > WiFi > WiFi Preferences. The toggle is placed at the top: “Turn on WiFi Automatically.” So, when you turn WiFi off in Android O and later get back to your trusted location, this feature automatically turns WiFi back on. After all, Google knows where your phone is and what WiFi networks you use.
The feature was first pointed out in DP1, but now it’s available and it works. The phone also notes on the WiFi screen that your WiFi can turn back on automatically.