FORUMS
Remove All Ads from XDA

(guide) how to port blur with option (cm13/6.0 cm12,cm12.1 and stock)

391 posts
Thanks Meter: 218
 
By kingdj, Senior Member on 30th April 2016, 02:25 PM
Post Reply Email Thread
Hello guys this time i wana share you how to port blur effect to your expanded&recent, it has option to switch on or off the blur just like xposed module do but this time we do it via smali huge thanks to @serajr for source&tips fix also to @psidco as builder&thinker

If you not familiar with smali or dcrc your system app i suggest you dig about that before doing this guide/mod

ALWAYS BACKUP BEFORE YOU MODIFY YOUR ROM
I don.t take any responsibility for any damage that may occur while you doing this, you are free no force to do this


GUIDE Expanded Blur With Realtime Change Effect

This Blur Was Already Tested On
Samsung S3 Cm13 Pure By Me Via Smali
Samsung Note2 Cm13 Pure Build From Source
And Many Os&Device On Maaadr Group Fb
Salute&Credit For
Dedy Prayetno/psidco Creator&Builder Of The Mod
Serajr For The Source&Fix Tips Of Headsup Blur And Blank Lockscreen
Maaadr (Mediatek Android Art&Dev Reborn )
You


RESPECT OUR JOB&HARDWORK GIVE PROPER CREDIT IF YOU WANT TO USE ON YOUR ROM OR MOD
WE DIDN.T ASK FOR NOTHING ONLY PROPER CREDIT FOR OUR COUNTLESS TIME DURING BUILD THIS MOD
YOU HAD NO IDEA HOW MUCH TIME&HEADACHE WE FEEL FOR THIS MOD
OKE SKIP BLA BLA BLA LETS START


OPEN notifpanelview smali

PASTE THIS LINE

Code:
# static fields

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

.field private static mBlurRadius:I

.field private static mBlurScale:I

.field private static mBlurredStatusBarExpandedEnabled:Z

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

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

.field public static mDimen:[I

.field private static final mDummyDirtyRect:Landroid/graphics/Rect;

.field private static mKeyguardShowing:Z

.field public static tmp:Landroid/graphics/Bitmap;


Delete Field Keyguardshowing That Already Exist On Your Smali That.S Not Needeed Anymore
Paste This Line At The End Of Your Method Static Synthetic Accsess

Code:

.method static synthetic access$L1000028()I
    .locals 1

    sget v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurScale:I

    return v0
.end method

.method static synthetic access$L1000029()I
    .locals 1

    sget v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurRadius:I

    return v0
.end method

.method static synthetic access$L1000030()Z
    .locals 1

    sget-boolean v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurredStatusBarExpandedEnabled:Z

    return v0
.end method

.method static synthetic access$S1000028(I)V
    .locals 0

    sput p0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurScale:I

    return-void
.end method

.method static synthetic access$S1000029(I)V
    .locals 0

    sput p0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurRadius:I

    return-void
.end method

.method static synthetic access$S1000030(Z)V
    .locals 0

    sput-boolean p0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurredStatusBarExpandedEnabled:Z

    return-void
.end method



Above Method .method private calculatePanelHeightQsExpanded()I
Code:

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

    .prologue
    const/4 v1, 0x4

    const/4 v5, 0x0

    .line 564
    invoke-static {}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->apdetBlur()V

    .line 566
    invoke-static {}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->isKeyguard()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 567
    sget-object v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurredView:Landroid/widget/FrameLayout;

    invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->setVisibility(I)V

    .line 588
    :goto_0
    return-void

    .line 571
    :cond_0
    invoke-static {}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->ena()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 572
    invoke-static {}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->getTemp()Landroid/graphics/Bitmap;

    move-result-object v0

    .line 573
    invoke-static {}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->getDimens()[I

    move-result-object v1

    .line 574
    invoke-static {}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->getScala()I

    move-result v2

    .line 575
    aget v3, v1, v5

    div-int/2addr v3, v2

    .line 576
    const/4 v4, 0x1

    aget v4, v1, v4

    div-int v2, v4, v2

    .line 578
    invoke-static {v0, v3, v2, v5}, Landroid/graphics/Bitmap;->createScaledBitmap(Landroid/graphics/Bitmap;IIZ)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 579
    invoke-static {}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->getRadius()I

    move-result v2

    invoke-static {v0, v2}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->blurBitmap(Landroid/graphics/Bitmap;I)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 580
    sget-object v2, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurredView:Landroid/widget/FrameLayout;

    invoke-virtual {v2}, Landroid/widget/FrameLayout;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v2

    aget v1, v1, v5

    iput v1, v2, Landroid/view/ViewGroup$LayoutParams;->width:I

    .line 581
    sget-object v1, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurredView:Landroid/widget/FrameLayout;

    invoke-virtual {v1}, Landroid/widget/FrameLayout;->requestLayout()V

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

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

    .line 583
    new-instance v0, Landroid/graphics/PorterDuffColorFilter;

    const v2, -0xbbbbbc

    sget-object v3, Landroid/graphics/PorterDuff$Mode;->MULTIPLY:Landroid/graphics/PorterDuff$Mode;

    invoke-direct {v0, v2, v3}, Landroid/graphics/PorterDuffColorFilter;-><init>(ILandroid/graphics/PorterDuff$Mode;)V

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

    .line 584
    sget-object v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurredView:Landroid/widget/FrameLayout;

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

    .line 585
    sget-object v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurredView:Landroid/widget/FrameLayout;

    invoke-virtual {v0, v5}, Landroid/widget/FrameLayout;->setVisibility(I)V

    goto :goto_0

    .line 588
    :cond_1
    sget-object v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurredView:Landroid/widget/FrameLayout;

    invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->setVisibility(I)V

    goto :goto_0
.end method

.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 553
    sget-object v1, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->kontek:Landroid/content/Context;

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

    move-result-object v1

    .line 555
    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/statusbar/phone/NotificationPanelView;->mBlurScale:I

    .line 557
    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/statusbar/phone/NotificationPanelView;->mBlurRadius:I

    .line 559
    const-string v2, "BLUR"

    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/statusbar/phone/NotificationPanelView;->mBlurredStatusBarExpandedEnabled:Z

    return-void
.end method

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

    .prologue
    .line 585
    sget-object v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->kontek:Landroid/content/Context;

    invoke-static {v0}, Landroid/renderscript/RenderScript;->create(Landroid/content/Context;)Landroid/renderscript/RenderScript;

    move-result-object v0

    .line 586
    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 587
    invoke-static {v0, p0}, Landroid/renderscript/Allocation;->createFromBitmap(Landroid/renderscript/RenderScript;Landroid/graphics/Bitmap;)Landroid/renderscript/Allocation;

    move-result-object v2

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

  ove-result-objectSS v3

    invoke-static {v0, v3}, Landroid/renderscript/Allocation;->createTyped(Landroid/renderscript/RenderScript;Landroid/renderscript/Type;)Landroid/renderscript/Allocation;

    move-result-object v0

    .line 589
    int-to-float v3, p1

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

    .line 590
    invoke-virtual {v1, v2}, Landroid/renderscript/ScriptIntrinsicBlur;->setInput(Landroid/renderscript/Allocation;)V

    .line 591
    invoke-virtual {v1, v0}, Landroid/renderscript/ScriptIntrinsicBlur;->forEach(Landroid/renderscript/Allocation;)V

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

    .line 593
    return-object p0
.end method


Above Method .method private flingExpandsQs(F)Z
Code:

.method public static ena()Z
    .locals 1

    .prologue
    .line 539
    sget-boolean v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurredStatusBarExpandedEnabled:Z

    return v0
.end method


Above Method .method private getFadeoutAlpha()F
Code:

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

    .prologue
    .line 549
    sget-object v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mDimen:[I

    return-object v0
.end method


Above Method .method private getScrollViewScrollY()I
Code:
.method public static getRadius()I
    .locals 1

    .prologue
    .line 545
    sget v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurRadius:I

    return v0
.end method

.method public static getScala()I
    .locals 1

    .prologue
    .line 542
    sget v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurScale:I

    return v0
.end method


Above Method .method private getTempQsMaxExpansion()I
Code:

.method public static getTemp()Landroid/graphics/Bitmap;
    .locals 1

    .prologue
    .line 533
    sget-object v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->tmp:Landroid/graphics/Bitmap;

    return-object v0
.end method


Below Method .method private isInSettings()Z
Code:

.method public static isKeyguard()Z
    .locals 1

    .prologue
    .line 537
    sget-boolean v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mKeyguardShowing:Z

    return v0
.end method


Above Method .method private requestScrollerTopPaddingUpdate(Z)V
Code:

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

    .prologue
    const/4 v1, 0x0

    .line 613
    sget-object v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurredView:Landroid/widget/FrameLayout;

    if-eqz v0, :cond_1

    sget-object v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurredView:Landroid/widget/FrameLayout;

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

    move-result-object v0

    if-eqz v0, :cond_1

    .line 615
    sget-object v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurredView:Landroid/widget/FrameLayout;

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

    move-result-object v0

    instance-of v0, v0, Landroid/graphics/drawable/BitmapDrawable;

    if-eqz v0, :cond_0

    .line 616
    sget-object v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurredView: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 617
    if-eqz v0, :cond_0

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

    move-object v0, v1

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

    .line 623
    :cond_0
    sget-object v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurredView:Landroid/widget/FrameLayout;

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

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

    .line 625
    :cond_1
    sget-object v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurredView:Landroid/widget/FrameLayout;

    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->setVisibility(I)V

    return-void
.end method


Below Method .method private shouldQuickSettingsIntercept(FFF)Z
Code:

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

    .prologue
    .line 610
    sget-object v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->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 611
    sput-object v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->tmp:Landroid/graphics/Bitmap;

    .line 612
    sget-object v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->kontek:Landroid/content/Context;

    invoke-static {v0}, Lcom/android/systemui/statusbar/phone/BlurAnu;->ukuranLayar(Landroid/content/Context;)[I

    move-result-object v0

    sput-object v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mDimen:[I

    .line 614
    invoke-static {}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->isKeyguard()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 615
    sget-object v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurredView:Landroid/widget/FrameLayout;

    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->setVisibility(I)V

    .line 620
    :goto_0
    return-void

    .line 619
    :cond_0
    invoke-static {}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->apdetBlur()V

    .line 620
    invoke-static {}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->apdet()V

    goto :goto_0
.end method


Below Method .method protected isTrackingBlocked()Z
Code:

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

    .prologue
    const/4 v3, 0x0

    const/4 v2, -0x1

    .line 519
    invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->getContext()Landroid/content/Context;

    move-result-object v0

    sput-object v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->kontek:Landroid/content/Context;

    .line 525
    new-instance v0, Landroid/widget/FrameLayout;

    iget-object v1, p0, Landroid/view/View;->mContext:Landroid/content/Context;

    invoke-direct {v0, v1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    sput-object v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurredView:Landroid/widget/FrameLayout;

    .line 526
    sget-object v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurredView:Landroid/widget/FrameLayout;

    new-instance v1, Landroid/widget/FrameLayout$LayoutParams;

    invoke-direct {v1, v2, v2}, Landroid/widget/FrameLayout$LayoutParams;-><init>(II)V

    invoke-virtual {p0, v0, v3, v1}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V

    .line 528
    invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->requestLayout()V

    .line 530
    sget-object v0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mBlurredView:Landroid/widget/FrameLayout;

    invoke-virtual {v0, v3}, Landroid/widget/FrameLayout;->setVisibility(I)V

    return-void
.end method


On Method Protected Onfinish Inflate Add
Code:

   .line 437
    invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->jancuk()V


Looks Like This Below

Code:

   check-cast v0, Lcom/android/systemui/qs/QSDragPanel;

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mQsPanel:Lcom/android/systemui/qs/QSDragPanel;

    .line 437
    invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->jancuk()V


NEXT
PhoneStatusBar.smali
On Method .method private updateKeyguardState(ZZ)V

Code:

    .line 4570
    :goto_1
    invoke-static {}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->recycle()V

Looks Like Below
Code:
.line 4565
    iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mIconPolicy:Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;

    invoke-virtual {v1, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->setKeyguardShowing(Z)V

    .line 4570
    :goto_1
    invoke-static {}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->recycle()V
	
	iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/NotificationPanelView;

    iget v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mState:I


On Method .method makeExpandedInvisible()V
Add

Code:
.line 2786
    :cond_1
    invoke-static {}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->recycle()V

Looks like below
Code:
.line 2781
    iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedVisible:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

    if-nez v0, :cond_1

    .line 2782
    :cond_0
    return-void

    .line 2786
    :cond_1
    invoke-static {}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->recycle()V


On Method .method makeExpandedVisible(Z)V

Add

Code:

.line 2673
    invoke-static {}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->startBlurTask()V/

Looks Like Below
Code:
.line 2672
    invoke-virtual {p0, v1, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setInteracting(IZ)V

    .line 2673
    invoke-static {}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->startBlurTask()V
	
	.line 2655
    return-void

    .line 2658
    :cond_2
    return-void

    :cond_3
    move v0, v1

    .line 2671
    goto :goto_0
.end method

NEXT

NOTE!!!!!!!!!!!!
You Must Change Default Instance Inside Your Smali
Example

BEFORE
Code:
iget-boolean v3, p0,Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mKeyguardShowing:Z

AFTER
Code:
sget-boolean v3, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mKeyguardShowing:Z


Do That On Every Line Inside Your Notifpanel Smali That Have End Line Like This "mkeyguardshowing;Z"

On My Smali I Had To Change About 15 Until 20 Line So Check Carefully Yours
If You Forgot 1 Line It Will Fc
The Point Is To Change From Instance To Be Static Field

Continue to part2
Attached Files
File Type: zip smali.zip - [Click for QR Code] (4.9 KB, 440 views)
File Type: zip for include to setting.zip - [Click for QR Code] (2.4 KB, 456 views)
File Type: zip for edit tile blur option.zip - [Click for QR Code] (5.3 KB, 402 views)
The Following 13 Users Say Thank You to kingdj For This Useful Post: [ View ] Gift kingdj Ad-Free
 
 
30th April 2016, 02:28 PM |#2  
kingdj's Avatar
OP Senior Member
Flag sweet city,pangkalanbun
Thanks Meter: 218
 
More
PART 2 BLUR RECENT

OPEN Recentactivity.smali

Paste Line Below

Code:
# 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;

Delete Field Default That Already Exist On Your Smali
Code:
.field mRecentsView:Lcom/android/systemui/recents/views/RecentsView
NEXT
Above
.method private getResizeTaskDebugDialog()Lcom/android/systemui/recents/RecentsResizeTaskDialog;
Paste Line Below

Code:
.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

Above This Method Paste
# virtual methods
.method dismissRecentsToFocusedTaskOrHome(Z)Z

Code:
.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

NEXT
On method public onCreate(Landroid/os/BundleV

Code:
.line 400
    invoke-static {}, Lcom/android/systemui/recents/RecentsActivity;->jancuk()V
	
	penampakan /looks like below
	.line 372
    invoke-virtual {p0}, Lcom/android/systemui/recents/RecentsActivity;->inflateDebugOverlay()V

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

NEXT
BaseStatusbar.smalI
On .method protected toggleRecents()V

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

penampakan /looks like below
Code:
.method protected toggleRecents()V
    .locals 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()V"
        }
    .end annotation

    .prologue
    .line 1163
    iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mRecents:Lcom/android/systemui/RecentsComponent;

    if-eqz v0, :cond_0

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

    .line 1166
    iget-object v0, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;


NOTE!!!!!!!!!!!!
again you should change default field from iget to be sget
like we did before on notifpanel smali

BEFORE
Code:
iget-object v1, p0,Lcom/android/systemui/recents/RecentsActivity;->mRecentsView:Lcom/android/systemui/recents/views/RecentsView;
AFTER
Code:
sget-object v1, Lcom/android/systemui/recents/RecentsActivity;->mRecentsView:Lcom/android/systemui/recents/views/RecentsView;
Do It On Every Line That Have End Line Like Thi
Code:
Lcom/android/systemui/recents/RecentsActivity;->mRecentsView:Lcom/android/systemui/recents/views/RecentsView;
About 15 Or 20 Change Just Follow My Guide It Should Fine

PART 3 Settings
For Non Qs Edit Tile Option Use This For Include In To Setting
Code:
"realtime_effect_blur_expanded_recent_para****"
you must complete the blur guide before apply this mod
#For non QSsetting like Pure CM13,
tested: DU 10.1 Sprout Device
DC your Settings.apk
Remove The Stuff In To The Place
Add This To display_settings.xml or wherever you like


Code:
<PreferenceScreen android:title="Expanded Blurr" android:key="blur" android:fragment="in.para****.BlurFragment" />
Add To Your Androidmanifest.xml Above </application>
Code:
<activity android:label="Blur Setting" android:name="in.para****.BlurFragment">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
            </intent-filter>
        </activity>
RC and DC again..
Change Public id 0x7f080093 > xml="blur" with your own public values
oke? DONE!

Credit::
Dedy Prayetno/psidco
Serajr
Abdullah Ba'agil/ kingdj
MAAaDr (mediatek android art&dev) on fb
sidik ahmad (for non apk guide)
The Following 10 Users Say Thank You to kingdj For This Useful Post: [ View ] Gift kingdj Ad-Free
30th April 2016, 02:36 PM |#3  
kingdj's Avatar
OP Senior Member
Flag sweet city,pangkalanbun
Thanks Meter: 218
 
More
Screenshoot

Thank to @@DSttr for help to create this guide


Screenrecord
https://m.youtube.com/watch?v=t0Qnos...ature=youtu.be

NO BUG SO FAR EXCEPT THAT HEADSUP BLUR WILL TRY TO UPDATE THE GUIDE FOR REMOVE IT
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20160423-211410.jpg
Views:	1530
Size:	54.9 KB
ID:	3735370   Click image for larger version

Name:	Screenshot_20160423-211436.jpg
Views:	1508
Size:	48.0 KB
ID:	3735371   Click image for larger version

Name:	Screenshot_20160423-220205.jpg
Views:	1482
Size:	69.7 KB
ID:	3735372   Click image for larger version

Name:	Screenshot_20160423-211620.jpg
Views:	1446
Size:	43.0 KB
ID:	3735373  
The Following 6 Users Say Thank You to kingdj For This Useful Post: [ View ] Gift kingdj Ad-Free
30th April 2016, 03:02 PM |#5  
niaboc79's Avatar
Recognized Developer / Themer
Flag Enghien
Thanks Meter: 66,549
 
Donate to Me
More
Amazing job

Envoyé de mon D6503 en utilisant Tapatalk
The Following 2 Users Say Thank You to niaboc79 For This Useful Post: [ View ]
30th April 2016, 03:09 PM |#6  
kingdj's Avatar
OP Senior Member
Flag sweet city,pangkalanbun
Thanks Meter: 218
 
More
Quote:
Originally Posted by niaboc79

Amazing job

Envoyé de mon D6503 en utilisant Tapatalk

Waiting for feedback
30th April 2016, 03:51 PM |#7  
psidco's Avatar
Senior Member
Thanks Meter: 29
 
More
Waiting @serajr release the new live blur code 😁

Sent from my GT-N7100 using XDA-Developers mobile app
The Following 3 Users Say Thank You to psidco For This Useful Post: [ View ] Gift psidco Ad-Free
30th April 2016, 03:54 PM |#8  
kingdj's Avatar
OP Senior Member
Flag sweet city,pangkalanbun
Thanks Meter: 218
 
More
Quote:
Originally Posted by psidco

Waiting @serajr release the new live blur code

Sent from my GT-N7100 using XDA-Developers mobile app

Can.t wait to taste the new source
The Following User Says Thank You to kingdj For This Useful Post: [ View ] Gift kingdj Ad-Free
30th April 2016, 04:16 PM |#9  
serajr's Avatar
Recognized Developer / Recognized Themer
Flag Rafard - SP
Thanks Meter: 18,300
 
Donate to Me
More
Thumbs up Masterpiece!
I really like to see part of my work being ported everywhere, but this time with so such mastery... omg!!
Hats off!!
The Following 7 Users Say Thank You to serajr For This Useful Post: [ View ]
30th April 2016, 04:44 PM |#10  
@DSttr's Avatar
Member
Flag Tasikmalaya
Thanks Meter: 34
 
More
there is something wrong,? wkwkwk

Sent from my MI 3W using XDA-Developers mobile app
30th April 2016, 04:47 PM |#11  
kingdj's Avatar
OP Senior Member
Flag sweet city,pangkalanbun
Thanks Meter: 218
 
More
..
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes