[Android General] tdunham:
__________________________________________________

[Guide How-to] Link Notification & Ringer Volume Android 4.4.x & Android L

This will allow you to link Notification and Ringer volume to act as one.

framework.jar 4.4.x smali edit:

smali\android\media\AudioService.smali

At the very end of the method make the following changes.
[B]Code Before[/B]:
.method public constructor <init>(Landroid/content/Context;)V
.
.
.
:array_2
.array-data 0x4
0x0t 0x0t 0x0t 0x0t
0x1t 0x0t 0x0t 0x0t
0x2t 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
0x4t 0x0t 0x0t 0x0t
0x5t 0x0t 0x0t 0x0t
0x6t 0x0t 0x0t 0x0t
0x7t 0x0t 0x0t 0x0t
0x0t 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
0x0t 0x0t 0x0t 0x0t
0x0t 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
.end array-data

:array_3
.array-data 0x4
0x0t 0x0t 0x0t 0x0t
0x1t 0x0t 0x0t 0x0t
0x2t 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
0x4t 0x0t 0x0t 0x0t
0x2t 0x0t 0x0t 0x0t
0x6t 0x0t 0x0t 0x0t
0x7t 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
0x0t 0x0t 0x0t 0x0t
0x0t 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
.end array-data
.end method

[B]After[/B]:
Note the new changes in [COLOR="Blue"]BLUE[/COLOR]
Comments added to show what each value controls
:array_2
.array-data 0x4
0x0t 0x0t 0x0t 0x0t ## STREAM_VOICE_CALL
0x1t 0x0t 0x0t 0x0t ## STREAM_SYSTEM
0x2t 0x0t 0x0t 0x0t ## STREAM_RING
0x3t 0x0t 0x0t 0x0t ## STREAM_MUSIC
0x4t 0x0t 0x0t 0x0t ## STREAM_ALARM
[COLOR="Blue"]0x2t[/COLOR] 0x0t 0x0t 0x0t ## STREAM_NOTIFICATION
0x6t 0x0t 0x0t 0x0t ## STREAM_BLUETOOTH_SCO
[COLOR="Blue"]0x2t[/COLOR] 0x0t 0x0t 0x0t ## STREAM_SYSTEM_ENFORCED
0x0t 0x0t 0x0t 0x0t ## STREAM_DTMF
0x3t 0x0t 0x0t 0x0t ## STREAM_TTS
0x3t 0x0t 0x0t 0x0t ## STREAM_FM_RADIO
0x0t 0x0t 0x0t 0x0t ## STREAM_VIDEO_CALL
0x0t 0x0t 0x0t 0x0t ## STREAM_SEC_COMMUNICATION
0x3t 0x0t 0x0t 0x0t ## STREAM_VOICENOTE
.end array-data

:array_3
.array-data 0x4
0x0t 0x0t 0x0t 0x0t
0x1t 0x0t 0x0t 0x0t
0x2t 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
0x4t 0x0t 0x0t 0x0t
0x2t 0x0t 0x0t 0x0t
0x6t 0x0t 0x0t 0x0t
[COLOR="Blue"]0x2t[/COLOR] 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
0x0t 0x0t 0x0t 0x0t
0x0t 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
.end array-data
.end method

Android L changes:

[B]framework.jar [COLOR="Red"]5.x[/COLOR] smali edit[/B]:
[B]smali\android\media\AudioService.smali[/B]
At the very end of the method make the following changes.
[B]Before[/B]:
.method public constructor <init>(Landroid/content/Context;)V
.
.
.
:array_2
.array-data 4
0x0
0x1
0x2
0x3
0x4
0x5
0x6
0x7
0x0
0x3
0x3
0x0
0x0
0x3
.end array-data

:array_3
.array-data 4
0x3
0x3
0x3
0x3
0x3
0x3
0x3
0x3
0x3
0x3
0x3
0x3
0x3
0x3
.end array-data

:array_4
.array-data 4
0x0
0x1
0x2
0x3
0x4
0x2
0x6
0x7
0x3
0x3
0x3
0x0
0x0
0x3
.end array-data
.end method

[B]After[/B]:
Note changes in [COLOR="Blue"]BLUE[/COLOR]:
:array_2
.array-data 4
0x0 ## STREAM_VOICE_CALL
0x1 ## STREAM_SYSTEM
0x2 ## STREAM_RING
0x3 ## STREAM_MUSIC
0x4 ## STREAM_ALARM
[COLOR="Blue"]0x2[/COLOR] ## STREAM_NOTIFICATION
0x6 ## STREAM_BLUETOOTH_SCO
[COLOR="Blue"]0x2[/COLOR] ## STREAM_SYSTEM_ENFORCED
0x0 ## STREAM_DTMF
0x3 ## STREAM_TTS
0x3 ## STREAM_FM_RADIO
0x0 ## STREAM_VIDEO_CALL
0x0 ## STREAM_SEC_COMMUNICATION
0x3 ## STREAM_VOICENOTE
.end array-data

:array_3
.array-data 4
0x3
0x3
0x3
0x3
0x3
0x3
0x3
0x3
0x3
0x3
0x3
0x3
0x3
0x3
.end array-data

:array_4
.array-data 4
0x0
0x1
0x2
0x3
0x4
0x2
0x6
[COLOR="Blue"]0x2[/COLOR]
0x3
0x3
0x3
0x0
0x0
0x3
.end array-data
.end method

__________________________________________________

[Guide How-to] Remove Power Saving Notification

This will hide the ongoing Power Saving notification in the pulldown.

SecSettings.apk smali edit:

smali\com\android\settings\powersavingmode\PowerNotiReceiver.smali

Add new code in BLUE to skip to the bottom of the method.

.method public notificationCreate(Landroid/content/Context;)V
.locals 11

[COLOR="Blue"]goto :goto_td[/COLOR]
.
.
.
[COLOR="Blue"]:goto_td
[/COLOR] return-void
.end method

__________________________________________________

[Guide How-to] Remove Hotspot Ongoing Notification

This will hide the ongoing Hotspot notification in the pulldown and hide the icon as well.

services.jar smali edit:

smali\com\android\server\connectivity\Tethering.smali

Add the new code in BLUE

.method private showTetheredVendorNotification(I)V
.locals 11

[COLOR="Blue"]goto :goto_td[/COLOR]
.
.
.
[COLOR="Blue"]:goto_td
return-void[/COLOR]
.end method

__________________________________________________

[Guide How-to] Back to Kill Mod Lollipop

This will add the long press back to kill.

android.policy.jar smali edits:

ADD NEW SMALI ATTACHED TO THE BOTTOM OF THIS POST INTO:

smali\com\android\internal\policy\impl\

smali\com\android\internal\policy\impl\PhoneWindowManager.smali

Add new code in BLUE

.field private final mLogDecelerateInterpolator:Lcom/android/internal/policy/impl/LogDecelerateInterpolator;

[COLOR="Blue"].field mLongPressKill:Ljava/lang/Runnable;
[/COLOR]
.field private mLongPressOnHomeBehavior:I

Add new code in BLUE to the end of this method before the return-void:

.method public constructor <init>()V
.
.
.
[COLOR="Blue"]new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$LongPressKill;

invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$LongPressKill;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V

iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mLongPressKill:Ljava/lang/Runnable;
[/COLOR]
return-void
.end method

Add new method before

.method private launchAssistAction()V

.method private BacktoKill()V
.locals 2

iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;

iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mLongPressKill:Ljava/lang/Runnable;

invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

return-void
.end method

Add new method before

.method public hasNavigationBar()Z

.method public handleRightLongPress()V
.locals 0

invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->BacktoKill()V

return-void
.end method

smali\com\android\internal\policy\impl\sec\SamsungPhoneWindowManager.smali

Add new method before

.method public handleWakingUp()V

.method public handleRightLongPress()V
.locals 1

iget-object v0, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mPWM:Lcom/android/internal/policy/impl/PhoneWindowManager;

invoke-virtual {v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleRightLongPress()V

return-void
.end method

smali\com\android\internal\policy\impl\multiwindow\MultiPhoneWindowManager.smali

Add new/changed code in BLUE, and also the new code in GREEN above the :cond_td but see the important note below about that value.

Delete the line indicated in RED

Important - Note the value in GREEN in the new code and the entry in GREEN at the bottom that matches it. Your value in the new code must also match this Goto!

Note

:

This may look like we're adding a toggle but it is actually using the sql entry for detecting Multiwindows and will disable the back to kill feature when Multiwindows is active to prevent conflict.

.method public interceptKeyBeforeDispatching(ZIZLandroid/view/WindowManagerPolicy$WindowState;)I
[COLOR="Blue"].locals 8[/COLOR]
.
.
.
:cond_2
if-eqz p1, :cond_5

iget v3, p0, Lcom/android/internal/policy/impl/multiwindow/MultiPhoneWindowManager;->mEnableMultiWindowUISetting:I

[COLOR="Red"]if-eqz v3, :cond_4[/COLOR]

if-ne p2, v4, :cond_3

if-nez p3, :cond_3

iget-boolean v3, p0, Lcom/android/internal/policy/impl/multiwindow/MultiPhoneWindowManager;->mIsTrayBarUI:Z

if-eqz v3, :cond_3

[COLOR="Blue"]iget-object v5, p0, Lcom/android/internal/policy/impl/multiwindow/MultiPhoneWindowManager;->mContext:Landroid/content/Context;

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

move-result-object v5

const-string v6, "multi_window_enabled"

const/4 v7, 0x0

invoke-static {v5, v6, v7}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v5

if-nez v5, :cond_td

iget-object v6, p0, Lcom/android/internal/policy/impl/multiwindow/MultiPhoneWindowManager;->mSPWM:Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;

invoke-virtual {v6}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->handleRightLongPress()V[/COLOR]

[COLOR="Green"]goto :goto_0[/COLOR]

[COLOR="Blue"]:cond_td[/COLOR]

invoke-virtual {p0, p4}, Lcom/android/internal/policy/impl/multiwindow/MultiPhoneWindowManager;->toggleMultiWindowTray(Landroid/view/WindowManagerPolicy$WindowState;)Z

move-result v2

iput-boolean v2, p0, Lcom/android/internal/policy/impl/multiwindow/MultiPhoneWindowManager;->mConsumeBackKeyUp:Z

const-string v2, "MultiPhoneWindowManager"

new-instance v3, Ljava/lang/StringBuilder;

invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

const-string v4, "MultiWindowTrayBar toggle / "

invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v3

iget-boolean v4, p0, Lcom/android/internal/policy/impl/multiwindow/MultiPhoneWindowManager;->mConsumeBackKeyUp:Z

invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

move-result-object v3

invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

move-result-object v3

invoke-static {v2, v3}, Landroid/util/Slog;->i(Ljava/lang/String;Ljava/lang/String;)I

[COLOR="Green"]goto :goto_0[/COLOR]

__________________________________________________

[Guide How-to] Custom Key Mapping for Android L

Remap the capacitive and hardware keys.

Prerequistes

:

To make it easier, just add the file attached at the bottom of this post and also the smali's listed below.

All smali edits are in android.policy.jar.

smali\com\android\internal\policy\impl\PhoneWindowManager.smali

Add new method above .method private hideRecentApps(ZZ)V

.method private hapticFeedback()V
.locals 4

iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;

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

move-result-object v1

const-string v2, "disable_haptic"

const/4 v3, 0x0

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

move-result v1

if-nez v1, :cond_0

const/4 v1, 0x0

const/4 v2, 0x0

const/4 v3, 0x0

move-object/from16 v0, p0

invoke-virtual {v0, v1, v2, v3}, Lcom/android/internal/policy/impl/PhoneWindowManager;->performHapticFeedbackLw(Landroid/view/WindowManagerPolicy$WindowState;IZ)Z

:cond_0
return-void
.end method

Add new method above .method private updateLockScreenTimeout()V

.method private toggleTorch()V
.locals 3

new-instance v0, Landroid/content/Intent;

const-string v1, "net.cactii.flash2.TOGGLE_FLASHLIGHT"

invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

const-string v1, "net.cactii.flash2.EXTRA_DISABLE_NOTIFICATION"

const/4 v2, 0x1

invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;

invoke-virtual {v1, v0}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V

return-void
.end method

smali\com\android\internal\policy\impl\sec\SamsungPhoneWindowManager.smali

Add new method above .method public interceptKeyBeforeDispatching(Landroid/view/KeyEvent;)Z

.method public injectionKeyEventMenu(I)V
.locals 2

iget-object v0, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mKeyEventInjectionThread:Ljava/lang/Thread;

if-eqz v0, :cond_0

iget-object v0, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mKeyEventInjectionThread:Ljava/lang/Thread;

invoke-virtual {v0}, Ljava/lang/Thread;->isAlive()Z

move-result v0

if-eqz v0, :cond_0

iget-object v0, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mKeyEventInjectionThread:Ljava/lang/Thread;

invoke-virtual {v0}, Ljava/lang/Thread;->interrupt()V

:cond_0
new-instance v0, Ljava/lang/Thread;

new-instance v1, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager$9;

invoke-direct {v1, p0, p1}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager$9;-><init>(Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;I)V

invoke-direct {v0, v1}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V

iput-object v0, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mKeyEventInjectionThread:Ljava/lang/Thread;

iget-object v0, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mKeyEventInjectionThread:Ljava/lang/Thread;

invoke-virtual {v0}, Ljava/lang/Thread;->start()V

return-void
.end method

Custom Actions

:

These are the custom action lines that you can add to the smali in the indicated areas.

[B]Voicecommand[/B]

iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSPWM:Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;

invoke-virtual {v0}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->launchVoiceCommand()V

[B]Recent Apps[/B]

invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->toggleRecentApps()V

[B]Screenshot[/B]

invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->takeScreenshot()V

[B]Torch[/B]

invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->toggleTorch()V

[B]Search[/B]

invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->launchAssistAction()V

[B]Menu[/B]

const/16 v1, 0x52

iget-object v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSPWM:Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;

invoke-virtual {v2, v1}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->injectionKeyEventMenu(I)V

Left Short Press key mapping

smali\com\android\internal\policy\impl\PhoneWindowManager.smali

Add new lines in BLUE

Make sure the goto value defined in BLUE matches the goto at the bottom of this addition

.method public interceptKeyBeforeDispatching(Landroid/view/WindowManagerPolicy$WindowState;Landroid/view/KeyEvent;I)J
.
.
.
invoke-direct/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->cancelPreloadRecentApps()V

const-wide/16 v6, -0x1

goto/16 :goto_1

:cond_2d
[COLOR="Blue"]const v3, 0x1

move-object/from16 v0, p0

invoke-direct {v0, v3}, Lcom/android/internal/policy/impl/PhoneWindowManager;->leftShortPress(I)V

goto :goto_9
[/COLOR]
invoke-direct/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->toggleRecentApps()V

goto :goto_9

Add new method above .method public hasNavigationBar()Z

.method private leftShortPress(I)V
.locals 3

# the below lines in GREEN are optional and will disable the feature if the lockscreen is active

[COLOR="Green"]iget-boolean v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

if-nez v0, :cond_td[/COLOR]

[COLOR="Blue"]ADD ACTION LINE(S) HERE!!![/COLOR]

# the following line in PURPLE will provide haptic feedback for the feature and is optional

[COLOR="Purple"]invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->hapticFeedback()V[/COLOR]

[COLOR="Green"]:cond_td[/COLOR]

return-void
.end method

Left Long Press key mapping

smali\com\android\internal\policy\impl\PhoneWindowManager.smali

Add new method above .method public hasNavigationBar()Z

.method public handleLeftLongPress()V
.locals 1

const v0, 0x1

invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->leftLongPress(I)V

return-void
.end method

Add new method above .method public hasNavigationBar()Z

.method private leftLongPress(I)V
.locals 3

# the below lines in GREEN are optional and will disable the feature if the lockscreen is active

[COLOR="Green"]iget-boolean v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

if-nez v0, :cond_td[/COLOR]

[COLOR="Blue"]ADD ACTION LINE(S) HERE!!![/COLOR]

# the following line in PURPLE will provide haptic feedback for the feature and is optional

[COLOR="Purple"]invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->hapticFeedback()V[/COLOR]

[COLOR="Green"]:cond_td[/COLOR]

return-void
.end method

smali\com\android\internal\policy\impl\sec\SamsungPhoneWindowManager.smali

REPLACE the 4 lines at the bottom of this method in BLUE (the 4 lines right above the last goto)

.method public handleLongPressOnRecent()V
.
.
.
:cond_1
const/4 v2, 0x1

iput-boolean v2, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mRecentConsumed:Z

[COLOR="Blue"]iget-object v0, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mPWM:Lcom/android/internal/policy/impl/PhoneWindowManager;

invoke-virtual {v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleLeftLongPress()V

const/4 v2, 0x1

iput-boolean v2, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mRecentConsumed:Z
[/COLOR]
goto :goto_0
.end method

Home Long Press key mapping

smali\com\android\internal\policy\impl\PhoneWindowManager.smali

Remove the line in RED and replace with the lines in BLUE

.method private handleLongPressOnHome()V
.
.
.
:cond_2
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mLongPressOnHomeBehavior:I

const/4 v1, 0x2

if-ne v0, v1, :cond_3

[COLOR="Red"] invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->launchAssistAction()V
[/COLOR]
[COLOR="Blue"]const/4 v2, 0x1

invoke-direct {p0, v2}, Lcom/android/internal/policy/impl/PhoneWindowManager;->HomeLongPress(I)V
[/COLOR]
goto :goto_0

Add new method above .method public hasNavigationBar()Z

.method private HomeLongPress(I)V
.locals 3

# the below lines in GREEN are optional and will disable the feature if the lockscreen is active

[COLOR="Green"]iget-boolean v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

if-nez v0, :cond_td[/COLOR]

[COLOR="Blue"]ADD ACTION LINE(S) HERE!!![/COLOR]

# the following line in PURPLE will provide haptic feedback for the feature and is optional

[COLOR="Purple"]invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->hapticFeedback()V[/COLOR]

[COLOR="Green"]:cond_td[/COLOR]

return-void
.end method

Home Double & Tripletap key mapping

smali\com\android\internal\policy\impl\PhoneWindow Manager.smali

Add new methods above .method public hasNavigationBar()Z

.method public handleDoubleTapOnHome2()V
.locals 2

const v0, 0x1

invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->HomeDoubleTap(I)V

return-void
.end method

.method public handleTripleTapOnHome()V
.locals 4

const v0, 0x1

invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->HomeTripleTap(I)V

return-void
.end method

Add new methods above .method public hasNavigationBar()Z

.method private HomeDoubleTap(I)V
.locals 3

# the below lines in GREEN are optional and will disable the feature if the lockscreen is active

[COLOR="Green"]iget-boolean v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

if-nez v0, :cond_td[/COLOR]

[COLOR="Blue"]ADD ACTION LINE(S) HERE!!![/COLOR]

# the following line in PURPLE will provide haptic feedback for the feature and is optional

[COLOR="Purple"]invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->hapticFeedback()V[/COLOR]

[COLOR="Green"]:cond_td[/COLOR]

return-void
.end method

.method private HomeTripleTap(I)V
.locals 3

# the below lines in GREEN are optional and will disable the feature if the lockscreen is active

[COLOR="Green"]iget-boolean v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

if-nez v0, :cond_td[/COLOR]

[COLOR="Blue"]ADD ACTION LINE(S) HERE!!![/COLOR]

# the following line in PURPLE will provide haptic feedback for the feature and is optional

[COLOR="Purple"]invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->hapticFeedback()V[/COLOR]

[COLOR="Green"]:cond_td[/COLOR]

return-void
.end method

smali\com\android\internal\policy\impl\sec\SamsungPhoneWindowManager.smali

Add new methods above .method public handleHomeKeyInRinging()I

.method public handleDoubleTapOnHome()V
.locals 1

iget-object v0, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mPWM:Lcom/android/internal/policy/impl/PhoneWindowManager;

invoke-virtual {v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleDoubleTapOnHome2()V

return-void
.end method

.method public handleTripleTapOnHome()V
.locals 1

iget-object v0, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mPWM:Lcom/android/internal/policy/impl/PhoneWindowManager;

invoke-virtual {v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleTripleTapOnHome()V

return-void
.end method

Find and replace both of these entire methods.

They aren't located together in the smali.

.method public isDoubleTapOnHomeEnabled()Z
.locals 1

const/4 v0, 0x1

return v0
.end method

.method public isTripleTapOnHomeEnabled()Z
.locals 1

const/4 v0, 0x1

return v0
.end method

smali\com\android\internal\policy\impl\sec\MultitapKeyManager.smali

Replace the line in RED with the code in BLUE

.method private handleTripleTapOnHome()V
.
.
.
const-string v0, "MultitapKeyManager"

const-string v1, "Home tripleTap : DeviceProvisioned"

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

iget-object v0, p0, Lcom/android/internal/policy/impl/sec/MultitapKeyManager;->mSPWM:Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;

[COLOR="Red"]invoke-virtual {v0}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->sendBroadcastForAccessibility()V
[/COLOR]
[COLOR="Blue"]invoke-virtual {v0}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->handleTripleTapOnHome()V
[/COLOR]
:goto_0
return-void

Replace the line in RED with the code in BLUE

.method public handleDoubleTapOnHome()V
.
.
.
:cond_2
const/4 v1, 0x1

iput-boolean v1, p0, Lcom/android/internal/policy/impl/sec/MultitapKeyManager;->mHomeConsumed:Z

iget-object v1, p0, Lcom/android/internal/policy/impl/sec/MultitapKeyManager;->mSPWM:Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;

[COLOR="Red"]invoke-virtual {v1}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->launchVoiceCommand()V
[/COLOR]
[COLOR="Blue"]invoke-virtual {v1}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->handleDoubleTapOnHome()V
[/COLOR]
goto :goto_0
.end method

Power DoubleTap key mapping

smali\com\android\internal\policy\impl\PhoneWindow Manager.smali

Add new method above .method public hasNavigationBar()Z

.method public handleDoubleTapOnPower()V
.locals 1

const v0, 0x1

invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->PowerDoubleTap(I)V

return-void
.end method

Add new methods above .method public hasNavigationBar()Z

.method private PowerDoubleTap(I)V
.locals 3

# the below lines in GREEN are optional and will disable the feature if the lockscreen is active

[COLOR="Green"]iget-boolean v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mShowingLockscreen:Z

if-nez v0, :cond_td[/COLOR]

[COLOR="Blue"]ADD ACTION LINE(S) HERE!!![/COLOR]

# the following line in PURPLE will provide haptic feedback for the feature and is optional

[COLOR="Purple"]invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->hapticFeedback()V[/COLOR]

[COLOR="Green"]:cond_td[/COLOR]

return-void
.end method

smali\com\android\internal\policy\impl\sec\Samsung PhoneWindowManager.smali

Add new method above .method public handleHomeKeyInRinging()I

.method public handleDoubleTapOnPower()V
.locals 1

iget-object p0, p0, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->mPWM:Lcom/android/internal/policy/impl/PhoneWindowManager;

invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleDoubleTapOnPower()V

return-void
.end method

Replace entire method

.method public isDoubleTapOnPowerEnabled()Z
.locals 1

const/4 v0, 0x1

return v0
.end method

smali\com\android\internal\policy\impl\sec\MultitapKeyManager.smali Replace the line in RED with the code in BLUE

.method private handleDoubleTapOnPower()V
.
.
.
iget-object v0, p0, Lcom/android/internal/policy/impl/sec/MultitapKeyManager;->mSPWM:Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;

[COLOR="Red"] invoke-virtual {v0}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->callAccessibilityScreenCurtain()V
[/COLOR]
[COLOR="Blue"]invoke-virtual {v0}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->handleDoubleTapOnPower()V
[/COLOR]
return-void
.end method

Add screenoff to custom key mapping