[Android General] jahid0068:
[Guide] How To Add Show Hide Screen Edge Effect (Tested Stock & Cm12.1 Lolipop)

[N.B] I'm not responsible for any damages will be held! Do at your own risk!

Requirments:

1. Apktool 2.0/2.1.1

2. Basic Knowledge Of Decompile & Recompile.

3. Notepad++ Or Other Xml Editor.

4. Brain;);)

Now, Go to work........

<<Decompile Settings.apk (Using ApkTOOl)>>​

* Merge Files From Settings Folder (Download Link Is Given Below).

* Open res/xml/display_settings.xml.

* Add This Line Or Whenever You Want.

<com.android.settings.mod.YusrilSwitchOnPreference android:title="Edge Effect Animations" android:key="alee_edge_effect" android:defaultValue="false" />

* Recompile, Sign & Push Your System...

<<Decomple SystemUI.apk (Using ApkTOOl)>>​

* Merge Files From SystemUI Folder (Download Link Is Given Below)

* Open res/layout/status_bar.xml

* Find This Line:

schemas.android.com/apk/res/com.android.systemui">

*Add this Line Below:

<include android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/alee_edge_effect" />

* Open res/layout/navigation_bar.xml

* Find Those Lines:

<com.android.systemui.statusbar.phone.NavigationBarView android:background="@drawable/system_bar_background" android:layout_width="fill_parent" android:layout_height="fill_parent"
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent">

* Now, Add this Line Below:

<include android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/alee_edge_effect" />

[N:B] If You Use Dynamic System Bar Then You Have To Paste This Line Below Dynamic Systen Bar Codes

<<Start Process On Smali>>​

* Open smali/com/android/systemui/statusbar/BaseStatusBar.smali

* Search This Method:

# instance fields

* Add This Line Method:

.field protected mAleeEdgeEffection:Landroid/widget/FrameLayout;

* Search This Line:

# virtual methods

* Add This Line below:

.method protected addAleeEdgeEffection()V
.locals 3

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

const v1, 0x7f047839

const/4 v2, 0x0

invoke-static {v0, v1, v2}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

move-result-object v0

check-cast v0, Landroid/widget/FrameLayout;

iput-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mAleeEdgeEffection:Landroid/widget/FrameLayout;

.line 1811
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mWindowManager:Landroid/view/WindowManager;

iget-object v1, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mAleeEdgeEffection:Landroid/widget/FrameLayout;

const/4 v2, 0x3

invoke-virtual {p0, v2}, Lcom/android/systemui/statusbar/BaseStatusBar;->getAleeEdgeEffectionLayoutParams(I)Landroid/view/WindowManager$LayoutParams;

move-result-object v2

invoke-interface {v0, v1, v2}, Landroid/view/WindowManager;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

.line 1813
return-void
.end method

* Search This Method:

.method protected getNotificationLongClicker

* You See Some lines Like This:

.method protected getNotificationLongClicker()Lcom/android/systemui/SwipeHelper$LongPressListener;
.locals 1

.prologue
.line 911
new-instance v0, Lcom/android/systemui/statusbar/BaseStatusBar$10;

invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/BaseStatusBar$10;-><init>(Lcom/android/systemui/statusbar/BaseStatusBar;)V

return-object v0
.end method

* Now, Add Those Line Below .end method:

.method protected getAleeEdgeEffectionLayoutParams(I)Landroid/view/WindowManager$LayoutParams;
.locals 6

.prologue
.line 1823
new-instance v0, Landroid/view/WindowManager$LayoutParams;

const/4 v1, -0x1

const/4 v2, -0x1

const/16 v3, 0x7d6

const v4, 0x840068

const/4 v5, -0x3

invoke-direct/range {v0 .. v5}, Landroid/view/WindowManager$LayoutParams;-><init>(IIIII)V

.line 1834
iget v1, v0, Landroid/view/WindowManager$LayoutParams;->privateFlags:I

or-int/lit8 v1, v1, 0x40

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

.line 1836
const-string v1, "AleeEdgeEffection"

invoke-virtual {v0, v1}, Landroid/view/WindowManager$LayoutParams;->setTitle(Ljava/lang/CharSequence;)V

.line 1838
return-object v0
.end method

* Search This Line:

.method public start()V

Scroll down & You see a line like this

iput-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mBarService:Lcom/android/internal/statusbar/IStatusBarService;

* Now Add This Line Below:

invoke-virtual/range {p0 .. p0}, Lcom/android/systemui/statusbar/BaseStatusBar;->addAleeEdgeEffection()V

* Recompile & Decompile Again:

* Open res/values/public.xml

* And Also Open BaseStatusBar.smali [In SystemUI]

* In Public.xml Search This Id:

<public type="layout" name="alee_edge_effect" id="0x7f......" />

* Replace this id with your BaseStatusBar.smali id

************************************

Replace This Id 0x7f047839 To Your Public Id...

const v1, 0x7f.....

Like This.

************************************

DONE...

* Recompile, Sign & Push You System...

*****************************************************************************************************************

***---Fix Installation Problem---***​

* Decompile PackageInstaller.apk [From Your Rom]

* Open res/layout/install_confirm.xml

* Search This android:id="@id/ok_button" In This Line Remove This Code = android:filterTouchesWhenObscured="true"

*****************************************************************************************************************

Download Link: Set&SysUI Files