Integrate Android 12 "Extra Dim" setting into Dim Screen action

e.t.l

Member
Android 12 introduces a native quick setting tile to dim the screen by a certain set amount. It would be great to have an option, when configuring the Dim Screen action, to select whether to use Android 12's native dimmer versus Macrodroid's dimmer overlay.
 

tanutanu

Well-known member
I think the MD dimmer no make sense for battery saving on LCD because the back light is the exact same level.
It makes sense on OLED screen:)
 

Attachments

  • IMG_20211031_042143.jpg
    IMG_20211031_042143.jpg
    187.5 KB · Views: 15
  • IMG_20211031_042200.jpg
    IMG_20211031_042200.jpg
    149 KB · Views: 14
Last edited:

e.t.l

Member
^That's a good point. Integrating the native Extra Dim would probably improve battery life too.

And good news @MacroDroidDev ! I figured out what setting controls this. In the System Settings action with [Secure] config, the Known key reduce_bright_colors_activated() controls this. A value of 1 activates Extra Dim, and a value of 0 deactivates it. So whatever code that action uses as the backend could probably easily be added as a toggle, checkbox, or configuration in the Dimmer action. (I'm less confident about how to set the intensity of the dimmer programatically, but from exploring AOSP I think it's related to ColorDisplayManager.setReduceBrightColorsStrength(xx), where "xx" is the slider % value. Alternatively, you could send the user to com.android.settings.Settings$ReduceBrightColorsSettingsActivity to set their preference directly.)
 

tanutanu

Well-known member
^That's a good point. Integrating the native Extra Dim would probably improve battery life too.

And good news @MacroDroidDev ! I figured out what setting controls this. In the System Settings action with [Secure] config, the Known key reduce_bright_colors_activated() controls this. A value of 1 activates Extra Dim, and a value of 0 deactivates it. So whatever code that action uses as the backend could probably easily be added as a toggle, checkbox, or configuration in the Dimmer action. (I'm less confident about how to set the intensity of the dimmer programatically, but from exploring AOSP I think it's related to ColorDisplayManager.setReduceBrightColorsStrength(xx), where "xx" is the slider % value. Alternatively, you could send the user to com.android.settings.Settings$ReduceBrightColorsSettingsActivity to set their preference directly.)
^That's a good point. Integrating the native Extra Dim would probably improve battery life too.

And good news @MacroDroidDev ! I figured out what setting controls this. In the System Settings action with [Secure] config, the Known key reduce_bright_colors_activated() controls this. A value of 1 activates Extra Dim, and a value of 0 deactivates it. So whatever code that action uses as the backend could probably easily be added as a toggle, checkbox, or configuration in the Dimmer action. (I'm less confident about how to set the intensity of the dimmer programatically, but from exploring AOSP I think it's related to ColorDisplayManager.setReduceBrightColorsStrength(xx), where "xx" is the slider % value. Alternatively, you could send the user to com.android.settings.Settings$ReduceBrightColorsSettingsActivity to set their preference directly.)
I hope Google makes a miracle:)
I think peek brightness level depends on the screen hardware spec, the panel dynamic range.
The color gradation and color space almost fully meets one of the standard color requirement and devices are well calibrated basically.
However cheap, cost sensitive device is so so, while premium model has quite specular display though. Software can never override the limitation and the basic role is reproduce the source color value accurately.
However, I expect a brand new "fake painting" technology, enough competitive to Apple's sales marketing strategy. All people want easy to do everything but professional-ick experience on high-spec-ish device:)
 

Jacob L

Moderator (Lawsonator)
If it is in secure settings you should be able to use the system setting action to change these
 

Pepy

Member
^That's a good point. Integrating the native Extra Dim would probably improve battery life too.
Third party dimming features also don't dim the navigation bar, status bar, quick settings, lock screen, settings app, and will cover screenshots if not disabled beforehand.
If it is in secure settings you should be able to use the system setting action to change these
Unfortunately on OneUI 5.1 there is no associated setting.
 
Last edited:

hsurB

Well-known member
Third party dimming features also don't dim the navigation bar, status bar, quick settings, lock screen, settings app, and will also cover screenshots if not disabled beforehand.

Unfortunately on OneUI 5.1 there is no associated setting.

I am on oneui6 now but oneui5 has option called very dark or something in quick settings right? And you can display notification from macrodroid and set up routine in samsungs app when notification from macrodroid received with chosen phrase enable very dark mode. Macrodroid can clear notification as well so it works decently + you can use set brightness action with it.
Not sure if it gets as dark as overlay
 

GiladB

Member
I am on oneui6 now but oneui5 has option called very dark or something in quick settings right? And you can display notification from macrodroid and set up routine in samsungs app when notification from macrodroid received with chosen phrase enable very dark mode. Macrodroid can clear notification as well so it works decently + you can use set brightness action with it.
Not sure if it gets as dark as overlay
That's actually a very clever workaround. I remember I wanted to use airplane mode on MacroDroid before it was supported, and I wanted to do use Routines but couldn't figure out a way.
 

Pepy

Member
I'm on One UI 5.1 and I have it and have been using it for quite a while.
In the screenshot is all I have. Do you have the "Use helper app" checked in the System setting action by any chance?
 

Attachments

  • Screenshot_20231120_120722_MacroDroid.png
    Screenshot_20231120_120722_MacroDroid.png
    136.2 KB · Views: 5

GiladB

Member
Indeed it did 🥳
The helper app was needed to initially create the settings but can now function without the option checked.

This toggles it.

And this controls the intensity.

However, the quick settings tile doesn't update properly when set via Macrodroid.
I'm glad you made it!
I don't remember having to use the first setting.
There's a "bug" with quick tiles in MacroDroid that the dev said that will be fixed, but I didn't check it yet.
If you're trying to change the name or icon of the tile and it doesn't update, use an action to turn off and then on (or reversed) the tile for it to update.
 

Pepy

Member
I don't remember having to use the first setting.
Oh well, they serve different purposes. For the one you mentioned I found that it goes from 0 to 100. -1 also works but not exactly sure what intensity that's at.
There's a "bug" with quick tiles in MacroDroid that the dev said that will be fixed, but I didn't check it yet.
If you're trying to change the name or icon of the tile and it doesn't update, use an action to turn off and then on (or reversed) the tile for it to update.
Ah, I meant the official one that I was using in the screen recording where I tried using the macro you shared. Even now the results are the same; although I can set the two settings neither show in the System setting action list nor am I able to retrieve the current value using magic text.
 
Top