BlackyHawky / Clock

Privacy-conscious open-source clock, based on AOSP Clock
Apache License 2.0
162 stars 11 forks source link

Is the Ignore Battery Optimizations permission really necessary? #31

Closed brian6932 closed 3 months ago

brian6932 commented 3 months ago

Is your feature request related to a problem? Please describe.

There are some permissions I don't want/have to grant in particular the Ignore Battery Optimizations permission. Without granting this permission, the permission dialog is displayed every time the application is launched.

Describe the solution you'd like Remove Ignore Battery Optimizations permission.

BlackyHawky commented 3 months ago

@brian6932 Can you please specify which permissions you don't want to grant?

As discussed in #27, this message only appears if essential permissions are not granted, and these guarantee correct alarm operation. In the permissions management page, essential permissions are indicated by Highly recommended in the Requirement field.

@qw123wh, @odmfl, @Nilsu11: As this is the 2nd issue on this subject, can I have your opinion on this topic ?

brian6932 commented 3 months ago

I don't think that granting ignore battery optimizations is a necessary thing, may be on some devices, but for me the Google Clock app (AOSP based) works perfectly fine without it.

BlackyHawky commented 3 months ago

Is your Google Clock app a system application?

Moreover, I did a little test:

So I'm not sure whether this authorization should be removed.

brian6932 commented 3 months ago

Is your Google Clock app a system application?

No, battery optimization depends on the device, ROM, and Kernel.

qw123wh commented 3 months ago

Battery authorization is required on some devices, while on others it is not.

So it's right that it's there, because if removed there will be 1000 other problems that the alarm doesn't ring.

The only thing that could be done is that if the permissions are not granted the warning does not appear again.

Then it's not that if you grant permission the app consumes the battery, the consumption is equal to 0. In fact this permission is also very useful in energy saving mode otherwise the alarm wouldn't sound. Even the lineage clock app itself does not appear to have authorization but if you go into the app settings you can't even deactivate the battery authorization.

odmfl commented 3 months ago

The only solution that comes to mind for me too is to stop the message from appearing if the user doesn't want to give permission, practically having the same behavior as for "non-essential" permissions.

If the app does not work correctly, the user will give permissions manually.

BlackyHawky commented 3 months ago

@qw123wh: Thank you for the clarification.

Instead of the message, I will try to display a message which will only be present in the settings. I'll keep you informed.

I closed this conversation which rather concerned the Ignore Battery Optimizations permission. About the toast message, this will be covered in #27.