SmartPack / SmartPack-Kernel-Manager

Source code of SmartPack-Kernel Manager, the Ultimate Tool to Manage your Kernel
https://play.google.com/store/apps/details?id=com.smartpack.kernelmanager.pro
GNU General Public License v3.0
639 stars 71 forks source link

Please split "Doze enable" setting to light and deep doze #98

Closed ioctl-user closed 3 years ago

ioctl-user commented 3 years ago

Some devices go full doze mode after some timeout regardless of background applications settings and activity. From the other hand, completely disabling doze is not good for battery.

Could you, please, split "Doze enable" option to "Light doze enable" and "Deep doze enable"? That should be configured the following shell commands:

dumpsys deviceidle enable light dumpsys deviceidle disable light dumpsys deviceidle enable deep dumpsys deviceidle disable deep

sunilpaulmathew commented 3 years ago

@ioctl-user Thanks, & I'll look at it before I update the app next time.

sunilpaulmathew commented 3 years ago

@ioctl-user I guess it is done. So, closing this issue. In case if you think it's not the case after my next release, feel free to reopen this issue. Thanks

ioctl-user commented 3 years ago

@sunilpaulmathew, thank you for implementation!

However, it look like this change can confuse a user and may work unpredictable while enabled on startup.

As I know, for now in Android the "doze" setting exactly equal to "light doze" + "deep doze".

For example, user turn off light doze and deep doze, and turn on doze and enable "apply on boot" setting.

When phone start, it can first disable light doze, deep doze and enable doze -- in this case doze will be enabled. From the other hand, it can fist enabled doze, then disable light doze and deep doze -- in this case doze will be disabled.

I would suggest eliminate old doze setting.

sunilpaulmathew commented 3 years ago

@sunilpaulmathew, thank you for implementation!

However, it look like this change can confuse a user and may work unpredictable while enabled on startup.

As I know, for now in Android the "doze" setting exactly equal to "light doze" + "deep doze".

For example, user turn off light doze and deep doze, and turn on doze and enable "apply on boot" setting.

When phone start, it can first disable light doze, deep doze and enable doze -- in this case doze will be enabled. From the other hand, it can fist enabled doze, then disable light doze and deep doze -- in this case doze will be disabled.

I would suggest eliminate old doze setting.

So, your suggestion is to remove the last (Force Doze) Option so that the feature will behave like the following

  1. Disable - Disable all
  2. Light Doze - Enable only light mode
  3. Deep Doze - Enable Light + Deep mode which is essentially the Force Doze (same as in the old implementation). Please reply.
ioctl-user commented 3 years ago

So, your suggestion is to remove the last (Force Doze) Option

Yes.

  1. Disable - Disable all
  2. Light Doze - Enable only light mode
  3. Deep Doze - Enable Light + Deep mode which is essentially the Force Doze (same as in the old implementation).

In this case user cannot disable light doze with deep doze enabled. It may be useful for users, who want make device go Deep Doze as soon as possible to safe battery. I.e. something like ForceDoze app do. I just make a simple test. Disabling Light Doze only actually prevent Deep Doze from working. But on some other devices this configuration can work and make sense.

So, I would suggest two independent options:

  1. Light Doze: enable/disable
  2. Deep Doze: enable/disable
sunilpaulmathew commented 3 years ago

So, I would suggest two independent options:

I will check, but I think it will be more complicated to handle (plus very little benefit). So, I'll go with the setup that I mentioned in the last post for now (that is 1. Disable + 2. Light Doze, & 3. Deep Doze (equals Force-doze). I shall look for a better solution in the future.

ioctl-user commented 3 years ago

Anyway, it's much better, than was before.

Thanks!