CominAtYou / BatteryTile

An Android Quick Settings tile that displays the current battery state and percentage, and a long-press action to open the battery settings.
Apache License 2.0
49 stars 3 forks source link

Feature: Disabling Data Saver #12

Closed VadosG closed 3 months ago

VadosG commented 4 months ago

Hi. On my Nubia Neo 5G, when Battery Saver is enabled, Data Saver is also enables. When I turn Battery Saver off, using the system tile - everything turns off.

But when I do it with the app tile - all turns on correctly, but after turn off - Data Saver remains enabled. Maybe there is some workaround? Android 13. And of course, WRITE_SECURE_SETTINGS is granted. Thx.

VadosG commented 4 months ago

In other words, maybe the "Also turn off Data Saver" option?

CominAtYou commented 3 months ago

Tried looking around for a way to make this work and I don't think this is possible, unfortunately. There doesn't seem to be any public API that the app can use to toggle data saver, or a Settings constant for doing so (which is what the app uses to manipulate the battery saver setting).

Looking at the Android source, things like Settings and the battery saver tile use internal system APIs to change the state of battery saver, which are unfortunately not accessible to the app.