[Android General] parth111999:
[GUIDE]How To Remove High Brightness Warning on Android 7.0

Decompile SystemUI.apk

Go to SystemUI/smali/com/android/systemui/settings/ToggleSlider.smali

and Search For the method '' .method private showStrainWarningPopup()V ''

Add Blue lines

.method private showStrainWarningPopup()V
.locals 4

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

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

move-result-object v1

const v2, 0x7f0f03b9
[COLOR=BLUE]
goto: goto_rs [/COLOR]

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

move-result-object v0

new-instance v1, Landroid/app/AlertDialog$Builder;

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

invoke-direct {v1, v2}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

const v2, 0x1080027

invoke-virtual {v1, v2}, Landroid/app/AlertDialog$Builder;->setIcon(I)Landroid/app/AlertDialog$Builder;

move-result-object v1

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

move-result-object v1

new-instance v2, Lcom/android/systemui/settings/ToggleSlider$6;

invoke-direct {v2, p0}, Lcom/android/systemui/settings/ToggleSlider$6;-><init>(Lcom/android/systemui/settings/ToggleSlider;)V

const v3, 0x104000a

invoke-virtual {v1, v3, v2}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

move-result-object v1

new-instance v2, Lcom/android/systemui/settings/ToggleSlider$7;

invoke-direct {v2, p0}, Lcom/android/systemui/settings/ToggleSlider$7;-><init>(Lcom/android/systemui/settings/ToggleSlider;)V

const/high16 v3, 0x1040000

invoke-virtual {v1, v3, v2}, Landroid/app/AlertDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

move-result-object v1

invoke-virtual {v1}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

move-result-object v1

iput-object v1, p0, Lcom/android/systemui/settings/ToggleSlider;->mAlertDialog:Landroid/app/AlertDialog;

iget-object v1, p0, Lcom/android/systemui/settings/ToggleSlider;->mAlertDialog:Landroid/app/AlertDialog;

new-instance v2, Lcom/android/systemui/settings/ToggleSlider$8;

invoke-direct {v2, p0}, Lcom/android/systemui/settings/ToggleSlider$8;-><init>(Lcom/android/systemui/settings/ToggleSlider;)V

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

iget-object v1, p0, Lcom/android/systemui/settings/ToggleSlider;->mAlertDialog:Landroid/app/AlertDialog;

invoke-virtual {v1}, Landroid/app/AlertDialog;->getWindow()Landroid/view/Window;

move-result-object v1

const/16 v2, 0x7d9

invoke-virtual {v1, v2}, Landroid/view/Window;->setType(I)V

const-string/jumbo v1, "ToggleSlider"

const-string/jumbo v2, "show StrainWarningPopup "

invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

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

invoke-static {v1}, Lcom/android/keyguard/KeyguardUpdateMonitor;->getInstance(Landroid/content/Context;)Lcom/android/keyguard/KeyguardUpdateMonitor;

move-result-object v1

iget-object v2, p0, Lcom/android/systemui/settings/ToggleSlider;->mScreenOnOffCallback:Lcom/android/keyguard/KeyguardUpdateMonitorCallback;

invoke-virtual {v1, v2}, Lcom/android/keyguard/KeyguardUpdateMonitor;->registerCallback(Lcom/android/keyguard/KeyguardUpdateMonitorCallback;)V

iget-object v1, p0, Lcom/android/systemui/settings/ToggleSlider;->mAlertDialog:Landroid/app/AlertDialog;

invoke-virtual {v1}, Landroid/app/AlertDialog;->show()V
[COLOR=BLUE]
: goto_rs [/COLOR]

return-void
.end method

Recompile SystemUI ^.^​