Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add QuickSettings Tile to disable AutoFreeze service temporarily. #142

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

juanitobananas
Copy link
Contributor

Tapping on it allows to set the amount of time AutoFreeze should be disabled for. 1, 5 , 10, 30, 60 or 120 minutes. It can also be disabled completely and the re-enabled.

I hope you like it 😄 I've been using it for quite some time now and find it very useful.

I also wanted to change the AutoFreeze notification so that it indicates that the service is disabled (and says until when), but I didn't manage as fast as I would've liked. I would've also liked to change the "Auto-Freeze" button on the notification, for something like "Re-enable Auto-Freeze". If Auto-Freeze is temporarily disabled, the button in the notification doesn't work, which is the only thing that doesn't really work as I think would make sense. I still believe it's good enough as is. Let me know if you like it and if you'd like me to work on the Notification. I had already done it a very long time ago, but didn't manage to port it to the newest upstream code). So it should be doable 😊

Cheers,
Juanito

Tapping on it allows to set the amount of time AutoFreeze should be
disabled for. 1, 5 , 10, 30, 60 or 120 minutes. It can also be disabled
completely and the re-enabled.
@aistra0528
Copy link
Owner

Thanks for your contribution!
Hail enable/disable AutoFreezeService because stopService can't actually stop the AutoFreezeService after granting access to notifications (enable "Skip notifying app" in settings). When the AutoFreezeService is disabled, the foreground notification will not be displayed and the notification buttons will not be available.
If you just need to temporarily suspend the "Auto freeze" action, there is no need to stop/disable AutoFreezeService, just unregister the ScreenOffReceiver with a "Later" (or "Not now" or something) button on the notification 😄 This makes it easier to show the remaining time and to continue the "Auto freeze" action with a notification button. There is no need to add an extra TileService.
If you do want to temporarily "disable" AutoFreezeService and enable it with a tile, please let me know 😊
Thanks again for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants