[Galaxy S III Android Development] ninestarkoko:
Contiunuing the revised guide:

- To blur Recents apps screen background,

1) open com/android/systemui/recents/RecentsActivity.smali and

delete

.field mRecentsView:Lcom/android/systemui/recents/views/RecentsView;

if it exists on your smali file

AND search and correct in the file every entry containing mRecentsView like this :

[COLOR="Red"]iget-object v1, p0,[/COLOR] Lcom/android/systemui/recents/RecentsActivity;->mRecentsView:Lcom/android/systemui/recents/views/RecentsView;

or

[COLOR="Red"]iput-boolean v0, p0[/COLOR]...

correct to :

[COLOR="Blue"]sget-object v1, [/COLOR]Lcom/android/systemui/recents/RecentsActivity;->mRecentsView:Lcom/android/systemui/recents/views/RecentsView;

[COLOR="Blue"]sput-boolean v0[/COLOR],....

Now copy and paste this under # static fields:

.field public static kontek:Landroid/content/Context;

.field private static mBlurRadius:I

.field private static mBlurScale:I

.field private static mBlurredRecentAppsEnabled:Z

.field private static mColorFilter:Landroid/graphics/ColorFilter;

.field private static mRecentsActivityRootView:Landroid/widget/FrameLayout;

.field static mRecentsView:Lcom/android/systemui/recents/views/RecentsView;

2) Now go at the end of the file and paste this:

.method public static apdetBlur()V
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"()V"
}
.end annotation

.prologue
const/4 v3, 0x3

const/4 v0, 0x1

.line 489
sget-object v1, Lcom/android/systemui/recents/RecentsActivity;->kontek:Landroid/content/Context;

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

move-result-object v1

.line 491
const-string v2, "BLUR_SCALA"

invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt

(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v2

sput v2, Lcom/android/systemui/recents/RecentsActivity;->mBlurScale:I

.line 493
const-string v2, "BLUR_RADIUS"

invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt

(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v2

sput v2, Lcom/android/systemui/recents/RecentsActivity;->mBlurRadius:I

.line 495
const-string v2, "BLUR_RECENT"

invoke-static {v1, v2, v0}, Landroid/provider/Settings$System;->getInt

(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v1

if-eq v1, v0, :cond_0

const/4 v0, 0x0

:cond_0
sput-boolean v0, Lcom/android/systemui/recents/RecentsActivity;->mBlurredRecentAppsEnabled:Z

return-void
.end method

.method public static blur()Landroid/graphics/Bitmap;
.locals 6

.prologue
const/4 v5, 0x0

.line 411
sget-object v0, Lcom/android/systemui/recents/RecentsActivity;->kontek:Landroid/content/Context;

invoke-static {v0}, Lcom/android/systemui/statusbar/phone/BlurAnu;->ss

(Landroid/content/Context;)Landroid/graphics/Bitmap;

move-result-object v0

.line 412
invoke-static {}, Lcom/android/systemui/recents/RecentsActivity;->getDimens()[I

move-result-object v1

.line 413
invoke-static {}, Lcom/android/systemui/recents/RecentsActivity;->getScala()I

move-result v2

.line 414
aget v3, v1, v5

div-int/2addr v3, v2

.line 415
const/4 v4, 0x1

aget v1, v1, v4

div-int/2addr v1, v2

.line 417
invoke-static {v0, v3, v1, v5}, Landroid/graphics/Bitmap;->createScaledBitmap

(Landroid/graphics/Bitmap;IIZ)Landroid/graphics/Bitmap;

move-result-object v0

.line 418
invoke-static {}, Lcom/android/systemui/recents/RecentsActivity;->getRadius()I

move-result v1

invoke-static {v0, v1}, Lcom/android/systemui/recents/RecentsActivity;->blurBitmap

(Landroid/graphics/Bitmap;I)Landroid/graphics/Bitmap;

move-result-object v0

.line 419
return-object v0
.end method

.method public static blurBitmap(Landroid/graphics/Bitmap;I)Landroid/graphics/Bitmap;
.locals 4

.prologue
.line 500
sget-object v0, Lcom/android/systemui/recents/RecentsActivity;->kontek:Landroid/content/Context;

invoke-static {v0}, Landroid/renderscript/RenderScript;->create

(Landroid/content/Context;)Landroid/renderscript/RenderScript;

move-result-object v0

.line 501
invoke-static {v0}, Landroid/renderscript/Element;->U8_4

(Landroid/renderscript/RenderScript;)Landroid/renderscript/Element;

move-result-object v1

invoke-static {v0, v1}, Landroid/renderscript/ScriptIntrinsicBlur;->create

(Landroid/renderscript/RenderScript;Landroid/renderscript/Element;)Landroid/renderscript/ScriptIntrinsicBlur;

move-result-object v1

.line 502
invoke-static {v0, p0}, Landroid/renderscript/Allocation;->createFromBitmap

(Landroid/renderscript/RenderScript;Landroid/graphics/Bitmap;)Landroid/renderscript/Allocation;

move-result-object v2

.line 503
invoke-virtual {v2}, Landroid/renderscript/Allocation;->getType()Landroid/renderscript/Type;

move-result-object v3

invoke-static {v0, v3}, Landroid/renderscript/Allocation;->createTyped

(Landroid/renderscript/RenderScript;Landroid/renderscript/Type;)Landroid/renderscript/Allocation;

move-result-object v0

.line 504
int-to-float v3, p1

invoke-virtual {v1, v3}, Landroid/renderscript/ScriptIntrinsicBlur;->setRadius(F)V

.line 505
invoke-virtual {v1, v2}, Landroid/renderscript/ScriptIntrinsicBlur;->setInput

(Landroid/renderscript/Allocation;)V

.line 506
invoke-virtual {v1, v0}, Landroid/renderscript/ScriptIntrinsicBlur;->forEach

(Landroid/renderscript/Allocation;)V

.line 507
invoke-virtual {v0, p0}, Landroid/renderscript/Allocation;->copyTo(Landroid/graphics/Bitmap;)V

.line 508
return-object p0
.end method

.method public static ena()Z
.locals 1

.prologue
.line 475
sget-boolean v0, Lcom/android/systemui/recents/RecentsActivity;->mBlurredRecentAppsEnabled:Z

return v0
.end method

.method public static getDimens()[I
.locals 1

.prologue
.line 484
sget-object v0, Lcom/android/systemui/recents/RecentsActivity;->kontek:Landroid/content/Context;

invoke-static {v0}, Lcom/android/systemui/statusbar/phone/BlurAnu;->ukuranLayar

(Landroid/content/Context;)[I

move-result-object v0

.line 485
return-object v0
.end method

.method public static getRadius()I
.locals 1

.prologue
.line 481
sget v0, Lcom/android/systemui/recents/RecentsActivity;->mBlurRadius:I

return v0
.end method

.method public static getScala()I
.locals 1

.prologue
.line 478
sget v0, Lcom/android/systemui/recents/RecentsActivity;->mBlurScale:I

return v0
.end method

.method public static jancuk()V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()V"
}
.end annotation

.prologue
.line 422
sget-object v0, Lcom/android/systemui/recents/RecentsActivity;-

>mRecentsView:Lcom/android/systemui/recents/views/RecentsView;

invoke-virtual {v0}, Lcom/android/systemui/recents/views/RecentsView;->getContext

()Landroid/content/Context;

move-result-object v0

sput-object v0, Lcom/android/systemui/recents/RecentsActivity;->kontek:Landroid/content/Context;

.line 423
invoke-static {}, Lcom/android/systemui/recents/RecentsActivity;->apdetBlur()V

.line 424
sget-object v0, Lcom/android/systemui/recents/RecentsActivity;-

>mRecentsView:Lcom/android/systemui/recents/views/RecentsView;

invoke-virtual {v0}, Lcom/android/systemui/recents/views/RecentsView;->getParent

()Landroid/view/ViewParent;

move-result-object v0

check-cast v0, Landroid/widget/FrameLayout;

sput-object v0, Lcom/android/systemui/recents/RecentsActivity;-

>mRecentsActivityRootView:Landroid/widget/FrameLayout;

.line 425
invoke-static {}, Lcom/android/systemui/recents/RecentsActivity;->jret()V

return-void
.end method

.method public static jret()V
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()V"
}
.end annotation

.prologue
.line 435
sget-object v0, Lcom/android/systemui/recents/RecentsActivity;-

>mRecentsActivityRootView:Landroid/widget/FrameLayout;

if-eqz v0, :cond_0

.line 436
sget-object v1, Lcom/android/systemui/recents/RecentsActivity;-

>mRecentsActivityRootView:Landroid/widget/FrameLayout;

const/4 v0, 0x0

check-cast v0, Landroid/graphics/drawable/Drawable;

invoke-virtual {v1, v0}, Landroid/widget/FrameLayout;->setBackground

(Landroid/graphics/drawable/Drawable;)V

.line 439
:cond_0
sget-boolean v0, Lcom/android/systemui/recents/RecentsActivity;->mBlurredRecentAppsEnabled:Z

if-nez v0, :cond_2

.line 450
:cond_1
:goto_0
return-void

.line 442
:cond_2
invoke-static {}, Lcom/android/systemui/recents/RecentsActivity;->blur()Landroid/graphics/Bitmap;

move-result-object v0

.line 443
invoke-static {}, Lcom/android/systemui/recents/RecentsActivity;->ena()Z

move-result v1

if-eqz v1, :cond_1

if-eqz v0, :cond_1

.line 446
new-instance v1, Landroid/graphics/drawable/BitmapDrawable;

invoke-direct {v1, v0}, Landroid/graphics/drawable/BitmapDrawable;-><init>(Landroid/graphics/Bitmap;)V

.line 447
sget-object v0, Lcom/android/systemui/recents/RecentsActivity;-

>mColorFilter:Landroid/graphics/ColorFilter;

invoke-virtual {v1, v0}, Landroid/graphics/drawable/BitmapDrawable;->setColorFilter

(Landroid/graphics/ColorFilter;)V

.line 450
sget-object v0, Lcom/android/systemui/recents/RecentsActivity;-

>mRecentsActivityRootView:Landroid/widget/FrameLayout;

invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->setBackground

(Landroid/graphics/drawable/Drawable;)V

goto :goto_0
.end method

.method public static onConfigurationChanged()V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"()V"
}
.end annotation

.prologue
.line 431
invoke-static {}, Lcom/android/systemui/recents/RecentsActivity;->recycle()V

return-void
.end method

.method private static recycle()V
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()V"
}
.end annotation

.prologue
const/4 v1, 0x0

.line 455
sget-object v0, Lcom/android/systemui/recents/RecentsActivity;-

>mRecentsActivityRootView:Landroid/widget/FrameLayout;

if-nez v0, :cond_1

.line 469
:cond_0
:goto_0
return-void

.line 459
:cond_1
sget-object v0, Lcom/android/systemui/recents/RecentsActivity;-

>mRecentsActivityRootView:Landroid/widget/FrameLayout;

invoke-virtual {v0}, Landroid/widget/FrameLayout;->getBackground()Landroid/graphics/drawable/Drawable;

move-result-object v0

if-eqz v0, :cond_0

.line 462
sget-object v0, Lcom/android/systemui/recents/RecentsActivity;-

>mRecentsActivityRootView:Landroid/widget/FrameLayout;

invoke-virtual {v0}, Landroid/widget/FrameLayout;->getBackground()Landroid/graphics/drawable/Drawable;

move-result-object v0

check-cast v0, Landroid/graphics/drawable/BitmapDrawable;

invoke-virtual {v0}, Landroid/graphics/drawable/BitmapDrawable;->getBitmap()Landroid/graphics/Bitmap;

move-result-object v0

.line 463
if-eqz v0, :cond_2

.line 465
invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V

move-object v0, v1

.line 466
check-cast v0, Landroid/graphics/Bitmap;

.line 469
:cond_2
sget-object v0, Lcom/android/systemui/recents/RecentsActivity;-

>mRecentsActivityRootView:Landroid/widget/FrameLayout;

check-cast v1, Landroid/graphics/drawable/Drawable;

invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->setBackground

(Landroid/graphics/drawable/Drawable;)V

goto :goto_0
.end method

3) Now find .method public onCreate and find this line

invoke-virtual {p0}, Lcom/android/systemui/recents/RecentsActivity;->inflateDebugOverlay()V

and put this new code under it, like this:

.....
invoke-virtual {p0}, Lcom/android/systemui/recents/RecentsActivity;->inflateDebugOverlay()V

[COLOR="Blue"] invoke-static {}, Lcom/android/systemui/recents/RecentsActivity;->jancuk()V[/COLOR]
.....

4) Now save and close the smali file and open com/android/systemui/statusbar/BaseStatusBar.smali

add a line of code to "toggleRecents" method like shown here (NOT "togglerecentapps" method!):

.method protected toggleRecents()V
.locals 4

iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;-

>mRecents:Lcom/android/systemui/RecentsComponent;

if-eqz v0, :cond_0
[COLOR="Blue"]
invoke-static {}, Lcom/android/systemui/recents/RecentsActivity;->jret()V[/COLOR]

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

- If you want to control the settings for the Blur radius and scala, you can add options to your stock Settings app.

1) Take your Settings.apk file, decompile it and open display_settings.xml in res/xml

Add this code to the file:

<PreferenceScreen android:title="Expanded Blur" android:key="blur" android:fragment="in.para****.BlurFragment" />

BE CAREFUL: the **** above are the censored word s h i t

. Correct it

I put it just before the Daydream settings, as shown here.

<PreferenceScreen android:title="Expanded Blur" android:key="blur" android:fragment="in.para****.BlurFragment" />
<PreferenceScreen android:title="@string/screensaver_settings_title" android:key="screensaver" android:fragment="com.android.settings.DreamSettings" />

2) Open AndroidManifest.xml and add this code at the end, just before the " </application> "

<activity android:label="Blur Setting" android:name="in.para****.BlurFragment">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>

BE CAREFUL: the **** above are the censored word s h i t

. Correct it

3) Now take the Blur.xml file you can find in the for_include_to_setting.zip in the first post and put it in res/XML folder.

4) recompile and decompile the app, go to res/values/public.xml and find the Id for "Blur".

Copy it and put it in the file Blurfragment.smali you can find in the same zip.

The file contains the id: 0x7f080093

you must replace it with your own id.

Now put the Blurfragment.smali in smali/in/para**** folder (create it).

BE CAREFUL: the **** above are the censored word s h i t

. Correct it

Recompile again and it's done. You ll find the option in Settings->display in the position you chose in the first step