[Android General] wlryss:
Hi.. Compared to Android 10 with warning about turning on high brightness and harm to the eyes in Android 11 there is a warning about the dangers of high brightness for charging the battery.

SystemUI/smali/com/android/settings/ToggleSliderView.smali

method .method private showUsingHighBrightnessDialog()V has a string

.method private showUsingHighBrightnessDialog()V
.locals 3

iget-object v0, p0, Lcom/android/systemui/settings/ToggleSliderView;->mUsingHighBrightnessDialog:Lcom/android/systemui/statusbar/phone/SystemUIDialog;

if-nez v0, :cond_0

new-instance v0, Lcom/android/systemui/statusbar/phone/SystemUIDialog;

iget-object v1, p0, Lcom/android/systemui/settings/ToggleSliderView;->mContext:Landroid/content/Context;

invoke-direct {v0, v1}, Lcom/android/systemui/statusbar/phone/SystemUIDialog;-><init>(Landroid/content/Context;)V

iput-object v0, p0, Lcom/android/systemui/settings/ToggleSliderView;->mUsingHighBrightnessDialog:Lcom/android/systemui/statusbar/phone/SystemUIDialog;

iget-object v0, p0, Lcom/android/systemui/settings/ToggleSliderView;->mContext:Landroid/content/Context;

invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

move-result-object v0

!!! sget v1, Lcom/android/systemui/R$string;->sec_brightness_using_high_brightness_dialog_message:I !!!

invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

move-result-object v0

iget-object v1, p0, Lcom/android/systemui/settings/ToggleSliderView;->mUsingHighBrightnessDialog:Lcom/android/systemui/statusbar/phone/SystemUIDialog;

invoke-virtual {v1, v0}, Landroid/app/AlertDialog;->setMessage(Ljava/lang/CharSequence;)V

iget-object v0, p0, Lcom/android/systemui/settings/ToggleSliderView;->mUsingHighBrightnessDialog:Lcom/android/systemui/statusbar/phone/SystemUIDialog;

sget v1, Lcom/android/systemui/R$string;->sec_brightness_using_high_brightness_dialog_button:I

const/4 v2, 0x0

invoke-virtual {v0, v1, v2}, Lcom/android/systemui/statusbar/phone/SystemUIDialog;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)V

iget-object v0, p0, Lcom/android/systemui/settings/ToggleSliderView;->mUsingHighBrightnessDialog:Lcom/android/systemui/statusbar/phone/SystemUIDialog;

new-instance v1, Lcom/android/systemui/settings/ToggleSliderView$4;

invoke-direct {v1, p0}, Lcom/android/systemui/settings/ToggleSliderView$4;-><init>(Lcom/android/systemui/settings/ToggleSliderView;)V

invoke-virtual {v0, v1}, Landroid/app/AlertDialog;->setOnDismissListener(Landroid/content/DialogInterface$OnDismissListener;)V

iget-object p0, p0, Lcom/android/systemui/settings/ToggleSliderView;->mUsingHighBrightnessDialog:Lcom/android/systemui/statusbar/phone/SystemUIDialog;

invoke-virtual {p0}, Landroid/app/AlertDialog;->show()V

:cond_0
return-void
.end method

SystemUI/res/values/strings.xml

<string name="sec_brightness_using_high_brightness_dialog_message">Using high brightness for long periods increases battery consumption.</string>

You need delete this toast alert with this string and button OK..

Look at .method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V in this class

You find such code

check-cast p1, Lcom/android/systemui/util/SettingsHelper;

invoke-virtual {p1}, Lcom/android/systemui/util/SettingsHelper;->isUsingHighBrightnessDialogEnabled()Z

move-result p1

iput-boolean p1, p0, Lcom/android/systemui/settings/ToggleSliderView;->mUsingHighBrightnessDialogEnabled:Z

In class SystemUI/smali_classes2/com/android/systemui/util/SettingsHelper.smali in method

.method public isUsingHighBrightnessDialogEnabled()Z - change 0x1 for 0x0

.method public isUsingHighBrightnessDialogEnabled()Z
.locals 1

iget-object p0, p0, Lcom/android/systemui/util/SettingsHelper;->mItemLists:Lcom/android/systemui/util/SettingsHelper$ItemMap;

const-string v0, "shown_max_brightness_dialog"

invoke-virtual {p0, v0}, Lcom/android/systemui/util/SettingsHelper$ItemMap;->get(Ljava/lang/String;)Lcom/android/systemui/util/SettingsHelper$Item;

move-result-object p0

invoke-virtual {p0}, Lcom/android/systemui/util/SettingsHelper$Item;->getIntValue()I

move-result p0

if-nez p0, :cond_0

const/4 p0, 0x0 ### previously it was 0x1 !!!

goto :goto_0

:cond_0
const/4 p0, 0x0

:goto_0
return p0
.end method

And finally in SystemUI/smali/com/android/systemui/settings/ToggleSliderView$4.smali in method

.method public onDismiss(Landroid/content/DialogInterface;)V - change value

.method public onDismiss(Landroid/content/DialogInterface;)V
.locals 2

iget-object p1, p0, Lcom/android/systemui/settings/ToggleSliderView$4;->this$0:Lcom/android/systemui/settings/ToggleSliderView;

const/4 v0, 0x0

invoke-static {p1, v0}, Lcom/android/systemui/settings/ToggleSliderView;->access$1402(Lcom/android/systemui/settings/ToggleSliderView;Lcom/android/systemui/statusbar/phone/SystemUIDialog;)Lcom/android/systemui/statusbar/phone/SystemUIDialog;

iget-object p1, p0, Lcom/android/systemui/settings/ToggleSliderView$4;->this$0:Lcom/android/systemui/settings/ToggleSliderView;

const/4 v0, 0x0

invoke-static {p1, v0}, Lcom/android/systemui/settings/ToggleSliderView;->access$902(Lcom/android/systemui/settings/ToggleSliderView;Z)Z

iget-object p1, p0, Lcom/android/systemui/settings/ToggleSliderView$4;->this$0:Lcom/android/systemui/settings/ToggleSliderView;

invoke-static {p1}, Lcom/android/systemui/settings/ToggleSliderView;->access$1100(Lcom/android/systemui/settings/ToggleSliderView;)I

move-result v0

const/4 v1, 0x1

add-int/2addr v0, v1

invoke-virtual {p1, v0}, Lcom/android/systemui/settings/ToggleSliderView;->setValue(I)V

iget-object p0, p0, Lcom/android/systemui/settings/ToggleSliderView$4;->this$0:Lcom/android/systemui/settings/ToggleSliderView;

invoke-static {p0}, Lcom/android/systemui/settings/ToggleSliderView;->access$2100(Lcom/android/systemui/settings/ToggleSliderView;)Landroid/content/Context;

move-result-object p0

invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object p0

const-string/jumbo p1, "shown_max_brightness_dialog"

const/4 v0, 0x0 ### previously it was -0x2 !!!

invoke-static {p0, p1, v1, v0}, Landroid/provider/Settings$System;->semPutIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)Z

return-void
.end method

Try it and write of this works..

Sorry for my English