[Android General] Grouxho:
Native Samsung Blur in Panel

1.- Decompile SystemUi

2.- Edit StatusBarWindowManager.smali

3.- Look for the next method and add the blue line

.method private apply(Lcom/android/systemui/statusbar/phone/StatusBarWindowManager$State;)V
.locals 4

invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowManager;->applyKeyguardFlags(Lcom/android/systemui/statusbar/phone/StatusBarWindowManager$State;)V

invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowManager;->applyForceStatusBarVisibleFlag(Lcom/android/systemui/statusbar/phone/StatusBarWindowManager$State;)V

invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowManager;->applyFocusableFlag(Lcom/android/systemui/statusbar/phone/StatusBarWindowManager$State;)V

....

invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowManager;->applyHasTopUi(Lcom/android/systemui/statusbar/phone/StatusBarWindowManager$State;)V

[COLOR="blue"]	invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/StatusBarWindowManager;->grx_applyQSColoringBlurEffect()V ### add this line[/COLOR]

const-class v1, Lcom/android/systemui/coloring/QSColoringServiceManager;

4.- At the end of the smali add this method

.method public grx_applyQSColoringBlurEffect()V
.locals 5

iget-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarWindowManager;->mContext:Landroid/content/Context;

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

move-result-object v0

const-string v1, "b_ga_panel_blur"

const v2, 0xa

invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v0

int-to-float v0, v0

const v2, 0x64

int-to-float v2, v2

div-float v4, v0, v2

iget-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarWindowManager;->mCurrentState:Lcom/android/systemui/statusbar/phone/StatusBarWindowManager$State;

iget-boolean v0, v0, Lcom/android/systemui/statusbar/phone/StatusBarWindowManager$State;->keyguardShowing:Z

if-eqz v0, :cond_0

iget-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarWindowManager;->mCurrentState:Lcom/android/systemui/statusbar/phone/StatusBarWindowManager$State;

iget-boolean v0, v0, Lcom/android/systemui/statusbar/phone/StatusBarWindowManager$State;->qsExpanded:Z

if-nez v0, :cond_1

:cond_0
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarWindowManager;->mCurrentState:Lcom/android/systemui/statusbar/phone/StatusBarWindowManager$State;

iget-boolean v0, v0, Lcom/android/systemui/statusbar/phone/StatusBarWindowManager$State;->keyguardShowing:Z

if-nez v0, :cond_2

iget-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarWindowManager;->mCurrentState:Lcom/android/systemui/statusbar/phone/StatusBarWindowManager$State;

iget-boolean v0, v0, Lcom/android/systemui/statusbar/phone/StatusBarWindowManager$State;->panelExpanded:Z

if-eqz v0, :cond_2

:cond_1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarWindowManager;->mLpChanged:Landroid/view/WindowManager$LayoutParams;

iget v1, v0, Landroid/view/WindowManager$LayoutParams;->flags:I

or-int/lit8 v1, v1, 0x2

iput v1, v0, Landroid/view/WindowManager$LayoutParams;->flags:I

iget-object v1, p0, Lcom/android/systemui/statusbar/phone/StatusBarWindowManager;->mLpChanged:Landroid/view/WindowManager$LayoutParams;

iput v4, v1, Landroid/view/WindowManager$LayoutParams;->dimAmount:F

iget-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarWindowManager;->mLpChanged:Landroid/view/WindowManager$LayoutParams;

iget v1, v0, Landroid/view/WindowManager$LayoutParams;->samsungFlags:I

or-int/lit8 v1, v1, 0x40

iput v1, v0, Landroid/view/WindowManager$LayoutParams;->samsungFlags:I

:goto_0
return-void

:cond_2
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarWindowManager;->mLpChanged:Landroid/view/WindowManager$LayoutParams;

iget v1, v0, Landroid/view/WindowManager$LayoutParams;->flags:I

and-int/lit8 v1, v1, -0x3

iput v1, v0, Landroid/view/WindowManager$LayoutParams;->flags:I

iget-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarWindowManager;->mLpChanged:Landroid/view/WindowManager$LayoutParams;

iget v1, v0, Landroid/view/WindowManager$LayoutParams;->samsungFlags:I

and-int/lit8 v1, v1, -0x41

iput v1, v0, Landroid/view/WindowManager$LayoutParams;->samsungFlags:I

goto :goto_0
.end method

5.- Add a seekbar in your RC, min value = 0 , max value = 30 (you can add more but you will see nothing..), default value = 0 and interval 1 , key "b_ga_panel_blur" (change method name, key, etc to your taste of course)

If you are using grxsettings v2 this is the code

<GrxSeekBar android:title="Native Blur Amount" android:key="b_ga_panel_blur" android:defaultValue="0" grx:interval="1" grx:maxValue="35" grx:minValue="0" grx:seekbarColor="?complementary_color2" grx:showPopup="true" grx:units=" %" />

In 6th gear it is similar and you will not have problems.

The mod is on fly. If the user install the good lock pluging (qstuner) the plugin will override the mod, so no problem with this.

enjoy.

ADD-ON TO MOD - Add a switch to enable - disable blur if the mod interferes in other background views you added (matrix, bg image, whatever..) -> press here - Many thanks to [MENTION=4715658]wlryss[/MENTION] for the advice and first version of switch :good::good: