by Jeremy Jones
This is a simple flow that turns off mobile data and Bluetooth whenever you're connected to a Wi-Fi network unless you're currently on the phone. If you're on the phone when you connect to a Wi-Fi network, then it will wait until you're not on the phone before turning off mobile data and Bluetooth. It will turn back on mobile data and Bluetooth once you disconnect from a Wi-Fi network.
This is a better alternative to turning on airplane mode when connected to Wi-Fi, which would cause an ongoing call to drop should you connect to a Wi-Fi network while on the phone.
Use in conjunction with my "Project Fi: Phone Off/On = Mobile Data On/Off" flow to ensure calls are never dropped while keeping data services to a minimum and thereby preserving battery life.
If you want to keep the "Play a sound" notification block, you'll have to replace it with your own notification tone.