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

"Stay always protected" card re-appears on Xiaomi devices #5126

Closed
ameshkov opened this issue Dec 24, 2023 · 5 comments
Closed

"Stay always protected" card re-appears on Xiaomi devices #5126

ameshkov opened this issue Dec 24, 2023 · 5 comments

Comments

@ameshkov
Copy link
Member

ameshkov commented Dec 24, 2023

Issue Details

"Battery optimization" on Xiaomi devices behaves weirdly and the OS can re-enable it automatically.

Now that we propose "disabling" battery optimization on the main screen, this re-enabling looks strange and causes lots of confusion.

Screenshot

image

Proposed solution

  1. We need to do a better research and see what can be done about that on Xiaomi devices. For example, it seems that on Xiaomi it is necessary to enable "Autostart" before disabling battery optimization, otherwise it will reset after reboot: https://www.reddit.com/r/Xiaomi/comments/qsbpv5/battery_optimization_settings_reset_after_reboot/
  2. We need to see if this is specific to MIUI or there are more Android forks that can behave like that.

If AdGuard is running on such a device, we should provide the user with instruction on what to do.

Alternative solution

No response

@johnconner122
Copy link

It is gone if you set unrestricted mode on this page.
Screenshot_2023-12-24-21-34-52-520-edit_com android settings

@liveonloan
Copy link

liveonloan commented Dec 24, 2023

Poco F5 MIUI Global 14.0.6 (TMRRUXM), Adguard 4.3.
I have this problem too. Turn off and on the protection in Adguard, and battery mode resets to default. Adguard autostart is enabled, application is pinned. There was no such problem in previous release 4.2.

@ameshkov
Copy link
Member Author

@liveonloan

Adguard autostart is enabled

Do you have it enabled in MIUI own settings?

On MIUI 14, there is a new permission to start from the background for each app, in Settings > Apps > Your app > App permissions > Background autostart.

Also, on MIUI 12 there's another "Autostart" available from the app settings:
image

There was no such problem in previous release 4.2.

On v4.2 there was no background optimization mode detection in AdGuard in general.

@ameshkov
Copy link
Member Author

ameshkov commented Dec 26, 2023

Here's what I suggest to do for now in our app:
image

Important points:

  1. The information block should be clearly visible (maybe use a "warning" style for it)
  2. It should only be shown to the users of MIUI.

Suggested text:
On MIUI you are required to additionally manually enable "Autostart" in Settings > Apps > AdGuard. Starting from MIUI 14 there is also a new permission "Background autostart" available in Settings > Apps > AdGuard > App permissions, it should also be enabled.

@ameshkov
Copy link
Member Author

Temporary solution in v4.3.1: don't show that card on MIUI devices.

Better solution is planned for v4.4: #5137

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

No branches or pull requests

6 participants