0 votos

¿Cómo puedo desactivar la advertencia "El uso del brillo alto durante periodos prolongados aumenta el consumo de batería" para que no vuelva a aparecer?

Yo uso Android 10 con el Samsung Galaxy S9. Siempre que pongo el brillo alto me sale el aviso:

Utilizar el brillo alto durante periodos prolongados aumenta el consumo de batería.

¿Cómo puedo desactivar este aviso para que no vuelva a aparecer?

enter image description here

0voto

La página https://forum.xda-developers.com/t/mods-samsung-not-Android-mods-collection-exynos.3772017/page-81 ( espejo ) parece discutir cómo se puede desactivar la advertencia "Usar el brillo alto durante largos periodos aumenta el consumo de batería".

A continuación un mod de wlryss :

Hola.. En comparación con Android 10 con la advertencia sobre el encendido de alto brillo y el daño a los ojos en Android 11 hay una advertencia sobre los peligros de alto brillo para cargar la batería. SystemUI/smali/com/android/settings/ToggleSliderView.smali
método .method private showUsingHighBrightnessDialog() tiene una cadena

Código:

.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

Código:

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

Usted necesita eliminar esta alerta tostada con esta cadena y el botón OK ..
Mira el método constructor público <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V de esta clase
Encontrará dicho código

Código:

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

En la clase SystemUI/smali_classes2/com/Android/systemui/util/SettingsHelper.smali en el método
.method public isUsingHighBrightnessDialogEnabled()Z - cambiar 0x1 por 0x0

Código:

.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

Y finalmente en SystemUI/smali/com/Android/systemui/settings/ToggleSliderView$4.smali en el método
.method public onDismiss(Landroid/content/DialogInterfaceV - cambiar valor

Código:

.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

PreguntAndroid.com

PreguntAndroid es una comunidad de usuarios de Android en la que puedes resolver tus problemas y dudas.
Puedes consultar las preguntas de otros usuarios, hacer tus propias preguntas o resolver las de los demás.

Powered by:

X