by נחמן תמיר
Based on Marcelo Vancini's flow.
-Only switch to 4G after 10sec, so a quick glance won't count.
-Switch to default as 4G as it works best on most phones and keeps connected when only 2G is avaliable.
It changes the mobile network to 2G whenever the screen is locked, or the WiFi is connected.
The default timeout is set to 20 sec. Feel free to change it (delay block) to your needs and/or preferences.
As long as the screen is locked, you can turn it on or off and the mobile network remains the same, only after the screen is unlocked the flow starts it up.
The mobile network is never touched unless the call state is idle, the flow waits for the call state to change before switching the network mode.
Screen locked (after timeout) - 2G
Screen unlocked - 3G/LTE
WiFi on - 2G
Start the flow and turn WiFi on or off, or lock and unlock your screen. That's it. Hope you all enjoy.
Root is required.
Feedback is appreciated.