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

Disable Disable battery optimization #422

Closed
MikuChan03 opened this issue Sep 15, 2023 · 4 comments · Fixed by #424
Closed

Disable Disable battery optimization #422

MikuChan03 opened this issue Sep 15, 2023 · 4 comments · Fixed by #424
Assignees
Labels
bug/limitation elsewhere Bug/limitation in the ROM or another project

Comments

@MikuChan03
Copy link

MikuChan03 commented Sep 15, 2023

Hello.

After enabling the "Disable battery optimization" option, the field is grayed out,
meaning I can't disable it again. Even after uninstalling the App in Magisk, this doesn't change.
What can I do to disable the disable battery optimization option?
Thanks

@chenxiaolong chenxiaolong added the bug/limitation elsewhere Bug/limitation in the ROM or another project label Sep 15, 2023
@chenxiaolong chenxiaolong self-assigned this Sep 15, 2023
@chenxiaolong
Copy link
Owner

This is something that can only be changed in Android's settings. It's dumb that it was designed this way. Android only has an API that apps can use to request that setting to be turned on, but not to turn it off.

On Google Pixels and other less customized ROMs, the setting is at Settings -> Apps -> BCR -> App battery usage (Optimized == off, Unrestricted == on). For other devices, you'll likely have to dig around to find the equivalent option.

@MikuChan03
Copy link
Author

Ok, many thanks. On the moto g73, which mostly has stock android 13, it's just as you said. Still, I would have never figured that out on my own. The "Pause app activity if unused" would have been my first guess. Maybe you can add an image or mention the battery submenu or something?
Anyways, have a nice day.

@chenxiaolong chenxiaolong reopened this Sep 17, 2023
@chenxiaolong
Copy link
Owner

That's a great idea. I'll dig around and see if there's a way BCR could open Settings to the correct page. If not, at the very least, I'll stop graying out BCR's option and make it show a message when the user tries to turn it off.

chenxiaolong added a commit that referenced this issue Sep 20, 2023
Currently, BCR will just gray out the `Disable battery optimization`
option after it is enabled because Android does not provide a way for
apps to re-enable optimizations.

This isn't very user-friendly, so this commit updates the option to
never be grayed out, but instead, take the user to the appropriate page
in Android's Settings.

Fixes: #422

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
@chenxiaolong
Copy link
Owner

This is fixed in #424, which will be included in version 1.52. The option will no longer be grayed out. When the user tries to disable it, BCR will open Android's Settings to the correct page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/limitation elsewhere Bug/limitation in the ROM or another project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants