WiFi disable if out of range less blocks

The phone will regularly check every 20 minutes if wifi is on/off,if it's off,it will turn it on every 20 minutes for 30 seconds for autoconnect,if any connection established,keep wifi on for 20 min,then recheck,if no connection,disable wifi,recheck in 20 minutes.