A Tiny app for developers who are dissatisfied with 'Settings > Developer Options > Stay awake when charging' option. This option keep screen on while just charging.
- This app will listen ACTION_POWER_CONNECTED and DISCONNECTED
- Acquire wake lock while pc usb is attached, and release wake lock when detached.
- It may take some time to listen event. in my case, Nexus 5x takes about 3 minutes, but Galaxy S4 take few seconds.
- If your phone can not distinguish AC connected and USB connected, this app may not work properly.