henrichg / PhoneProfilesPlus

Profile manager for Android - event triggered
Apache License 2.0
417 stars 32 forks source link

Changing screen brightness issue #91

Closed AlgebraTheBard closed 2 years ago

AlgebraTheBard commented 2 years ago

The changeing of brightness in PhoneProfilePlus is not working properly with Android 12, please check.

henrichg commented 2 years ago

Write here device name, PPP version. Thanks.

AlgebraTheBard commented 2 years ago

My device is Doogee S98, in latest android 12, PPP is the latest one., V6.0.1(6810)

Sent from MailDroid

-----Original Message----- From: Henrich Gron @.> To: henrichg/PhoneProfilesPlus @.> Cc: AlgebraTheBard @.>, Author @.> Sent: Fri, 30 Sep 2022 15:31 Subject: Re: [henrichg/PhoneProfilesPlus] Changing screen brightness issue (Issue #91)

Write here Android version, device name, PPP version. Thanks.

-- Reply to this email directly or view it on GitHub: https://github.com/henrichg/PhoneProfilesPlus/issues/91#issuecomment-1263212131 You are receiving this because you authored the thread.

Message ID: @.***>

henrichg commented 2 years ago

Problem with brightness is:

In source code is tested Doogee. And for it is not used exponecial brightness. And max. value is 255. Check for Doogee was added, because was reported by another user.

Question: you using adaptive brightness?

AlgebraTheBard commented 2 years ago
Dear Sir The result is the same either adaptive brightness is selected. Regards, Leo Yan From: Henrich GronSent: Monday, 3 October 2022 17:04To: henrichg/PhoneProfilesPlusCc: AlgebraTheBard; AuthorSubject: Re: [henrichg/PhoneProfilesPlus] Changing screen brightness issue (Issue #91) Problem with brightness is:max brighness value may be > 255brightness level may be exponencialIn source code is tested Doogee. And for it is not used exponecial brightness. And max. value is 255.Check for Doogee was added, because was reported by another user.Question: you using adaptive brightness?—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***> 
henrichg commented 2 years ago

Please fix your last post. Is not readable.

And write me:

  1. when you set brightness in profile to 0%. Is in device settings set to min value?
  2. when you set brightness in profile to 50%. Is in device settings set to half value?
  3. when you set brightness in profile to 100%. Is in device settings set to max value?
henrichg commented 2 years ago

Question: in your device is rom from manufacturer or custom rom? Because PPP tests to identify Doogee device:

return Build.BRAND.equalsIgnoreCase("doogee") ||
                Build.MANUFACTURER.equalsIgnoreCase("doogee") ||
                Build.FINGERPRINT.toLowerCase().contains("doogee");
AlgebraTheBard commented 2 years ago

NO custom ROM or unlock bootloader either

AlgebraTheBard commented 2 years ago

The brightness level would change some times, may be 1 in 10, no matter I have adaptive selected. It worked perfectly with the Doogee S95Pro in Android 10.

henrichg commented 2 years ago

OK please install this beta version. In it is logged brightness value change. https://drive.google.com/file/d/1CR4y2u3V8PCwQK9sw1P88JrlpSdA2Ou4/view?usp=drivesdk

Then in device settings (not in PPP):

  1. set brightness to min
  2. wait for 5 seconds, then set brightness to half
  3. wait for 5 seconds, then set brightness to max
  4. wait for 5 seconds, then send me log file. For this use in Editor menu Support/"E-mail debug log files to author".

Thank you.

AlgebraTheBard commented 2 years ago

Just sent the log, please check.

henrichg commented 2 years ago

E-mail with attached log files is not received to henrich.gron@gmail.com. :-( Please repeat send.

AlgebraTheBard commented 2 years ago

Re-sent

henrichg commented 2 years ago

Yes but: you changed brightness in device Settings? And:

  1. minimal value
  2. half value
  3. maximal value ?

Because in log are not these values.

In log is:

This si half? This value is form start of PPP: 6.10.22 17:25:40:7 [ E ] [ SettingsContentObserver.onChange ]: savedBrightnessMode=0 6.10.22 17:25:40:8 [ E ] [ SettingsContentObserver.onChange ]: savedBrightness=51 6.10.22 17:25:40:8 [ E ] [ SettingsContentObserver.onChange ]: savedAdaptiveBrightness=-1.0

This is minimum? 6.10.22 17:25:43:7 [ E ] [ SettingsContentObserver.onChange ]: savedBrightnessMode=1 6.10.22 17:25:43:7 [ E ] [ SettingsContentObserver.onChange ]: savedBrightness=6 6.10.22 17:25:43:7 [ E ] [ SettingsContentObserver.onChange ]: savedAdaptiveBrightness=-1.0

And this is which value? 6.10.22 17:25:52:2 [ E ] [ SettingsContentObserver.onChange ]: savedBrightnessMode=0 6.10.22 17:25:52:2 [ E ] [ SettingsContentObserver.onChange ]: savedBrightness=11 6.10.22 17:25:52:2 [ E ] [ SettingsContentObserver.onChange ]: savedAdaptiveBrightness=-1.0

Maxumim value must be >= 255 not 51

Again: do not activate profile. Change brightness in DEVICE SETTINGS. This is important!

AlgebraTheBard commented 2 years ago

I am not sure on the log, I am not able to set the 50% brightness as there is no place to input the value.

But I sent another log for your investigation.

henrichg commented 2 years ago

In progress bar in device settings is possible to set min (start of bar), max (end of bar), half (center of bar). Use it.

AlgebraTheBard commented 2 years ago

I redo the process, and sent the log.

henrichg commented 2 years ago

In your data. All in profiles is configured: "Screen"/"Screen brightness". When you manually activate profile. Brightness is not changed? Or changed but not as you want?

All is configured as manual brightness.

Test brightness change with manula profile activation.

AlgebraTheBard commented 2 years ago

Correct, the brightness of screen not changing most of the time, either manually or automatic.

AlgebraTheBard commented 2 years ago

My default profile is Outdoor_Day, the screen would truned to max brightness at the most beginning, but the screen brightness not changing at all (most of the time), even manually switch profile or by PPP itself.

AlgebraTheBard commented 2 years ago

Even the brightness change, e.g. 0% from the setting, it always goes to 20%.

henrichg commented 2 years ago

OK, test this.

  1. Do backup of your data. Use Editor menu "Backup/restore"/"Backup settings".

  2. Remove from all profiles "Keep screen on". Set it to "Do not change".

  3. Add profile with "Keep screen on"="Off" and activate it. This dislables "keep screen on", when is activated.

  4. Test brightness by profile activations. Maybe will be working, when "keep screen on" is disabled.

henrichg commented 2 years ago

In this version is fixed not worked brightness = 0%. Not worked also in Pixel 6. https://drive.google.com/file/d/1CR4y2u3V8PCwQK9sw1P88JrlpSdA2Ou4/view?usp=drivesdk

henrichg commented 2 years ago

"Even the brightness change, e.g. 0% from the setting, it always goes to 20%." I do not understand this. You have in device Settings brightnes to minimum (0%) and profile activation do not change it to 20%? Profile "Outdoor_night" has this configuration.

AlgebraTheBard commented 2 years ago

I mean the brightness change to 20%, when the profile (0% brightness) is activated by PPP or manual.

Let me try the other version of the app

AlgebraTheBard commented 2 years ago

In this version is fixed not worked brightness = 0%. Not worked also in Pixel 6. https://drive.google.com/file/d/1CR4y2u3V8PCwQK9sw1P88JrlpSdA2Ou4/view?usp=drivesdk

This one seems worked for my phone

henrichg commented 2 years ago

"I mean the brightness change to 20%, when the profile (0% brightness) is activated by PPP or manual." Hm, interesting. OK, check brightness changes, when "Keep screen on" is disabled. For disabling it, activate profile with "Keep screen on"="Off".

AlgebraTheBard commented 2 years ago
I re-set the brightness level with 0 or 50, tried with adaptive on or off, the results are the same. Regards, Leo Yan From: Henrich GronSent: Monday, 3 October 2022 17:04To: henrichg/PhoneProfilesPlusCc: AlgebraTheBard; AuthorSubject: Re: [henrichg/PhoneProfilesPlus] Changing screen brightness issue (Issue #91) Problem with brightness is:max brighness value may be > 255brightness level may be exponencialIn source code is tested Doogee. And for it is not used exponecial brightness. And max. value is 255.Check for Doogee was added, because was reported by another user.Question: you using adaptive brightness?—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***> 
henrichg commented 2 years ago

"re-set the brightness level with 0 or 50, tried with adaptive on or off, the results are the same." I do not understand.

My questions:

  1. Set brightness to 0 or 50 is by profile activation? And this do not change brightness? After profile activation, what is configured in device Settings?
  2. Or set brightness by profile activation working, but after activation not working change of level by device Settings? Or you change it with slider in notification panel? And this not working?
AlgebraTheBard commented 2 years ago
  1. I did the brightness change manually for the log, I have adaptive de-select for all profiles.
  2. The brightnesses change as per the profile set after using the seccond version of the app.
henrichg commented 2 years ago

"1. I did the brightness change manually for the log, I have adaptive de-select for all profiles." Please answer me: Is profile activated from PPP? And this working, brightness is changed, when in profile is configured brightness 0, 50? Manual = manual profile activation (from Activator, Editor, widget, ...), not from event.

"The brightnesses change as per the profile set after using the seccond version of the app." This is oposite of first quesation. Brightness change form device Settings or notification slider working?

AlgebraTheBard commented 2 years ago
  1. Activated by manually selected in Activator, brightness change as per profile values; brightness values in Setting is same as the profiles.
  2. Brightness changes with PPP automatically, brightness values change same as profile setting.
henrichg commented 2 years ago

Then working. When in device Settings is the same value as in activated profile, then all working good. So what is the problem?

AlgebraTheBard commented 2 years ago

Then working. When in device Settings is the same value as in activated profile, then all working good. So what is the problem?

I am answering your question 22 hours ago, no problem now.

henrichg commented 2 years ago

OK then. Thank you.