[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] loserskater:
android.policy.jar

Navigate to /smali/com/android/internal/policy/impl/PhoneWindowManager$SettingsObserver.smali

.method observe()V

const-string v1, "incall_power_button_behavior"

invoke-static {v1}, Landroid/provider/Settings$Secure;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;

move-result-object v1

invoke-virtual {v0, v1, v2, p0}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V

[COLOR="Red"]const-string v1, "long_press_kill"

invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;

move-result-object v1

invoke-virtual {v0, v1, v2, p0}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V[/COLOR]

.line 878
const-string v1, "accelerometer_rotation"

invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;

move-result-object v1

invoke-virtual {v0, v1, v2, p0}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V

Navigate to /smali/com/android/internal/policy/impl/PhoneWindowManager.smali

.field mAssistKeyLongPressed:Z

.field mBackLongPress:Ljava/lang/Runnable;

[COLOR="Red"].field mBackLongPressKill:Ljava/lang/Runnable;[/COLOR]

.field mBlockCollapseStatusBar:Z

.field mBootCompleteReceiver:Landroid/content/BroadcastReceiver;

.field mLongPressOnPowerBehavior:I

.field mLongPressVibePattern:[J

[COLOR="red"].field mLongPressKill:I[/COLOR]

.field mMenuLongPress:Ljava/lang/Runnable;

[COLOR="red"].field mMenuLongPressKill:Ljava/lang/Runnable;[/COLOR]

.field mMirrorLinkDockEnablesAccelerometer:Z

.field mMirrorLinkDockIntent:Landroid/content/Intent;

.method public constructor <init>()V

new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$8;

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

iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mMenuLongPress:Ljava/lang/Runnable;

[COLOR="red"]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;->mMenuLongPressKill:Ljava/lang/Runnable;[/COLOR]

.line 1494
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$9;

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

iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;

[COLOR="red"] 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;->mBackLongPressKill:Ljava/lang/Runnable;[/COLOR]

.line 1505
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$10;

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

iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mCameraLongPress:Ljava/lang/Runnable;

Add the following methods after .method static getAudioService()Landroid/media/IAudioService;

.method private getBackKillRunnable()Ljava/lang/Runnable;
.locals 1

.prologue
.line 69
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mLongPressKill:I

if-eqz v0, :cond_0

.line 70
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;

.line 72
:goto_0
return-object v0

:cond_0
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPressKill:Ljava/lang/Runnable;

goto :goto_0
.end method

.method private getMenuKillRunnable()Ljava/lang/Runnable;
.locals 1

.prologue
.line 69
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mLongPressKill:I

if-nez v0, :cond_0

.line 70
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mMenuLongPress:Ljava/lang/Runnable;

.line 72
:goto_0
return-object v0

:cond_0
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mMenuLongPressKill:Ljava/lang/Runnable;

goto :goto_0
.end method

.method public interceptKeyBeforeDispatching(Landroid/view/WindowManagerPolicy$WindowState;Landroid/view/KeyEvent;I)J

move-object/from16 v0, p0

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

move-object/from16 v40, v0

move-object/from16 v0, p0

[COLOR="Blue"]iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mMenuLongPress:Ljava/lang/Runnable;

move-object/from16 v41, v0[/COLOR]

[COLOR="RED"]invoke-direct {v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->getMenuKillRunnable()Ljava/lang/Runnable;

move-result-object v41[/COLOR]

invoke-static {}, Landroid/view/ViewConfiguration;->getGlobalActionKeyTimeout()J

move-result-wide v42

invoke-virtual/range {v40 .. v43}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

move-object/from16 v0, p0

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

move-object/from16 v40, v0

move-object/from16 v0, p0

[COLOR="blue"]iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mMenuLongPress:Ljava/lang/Runnable;

move-object/from16 v41, v0[/COLOR]

[COLOR="Red"]invoke-direct {v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->getMenuKillRunnable()Ljava/lang/Runnable;

move-result-object v41[/COLOR]

invoke-virtual/range {v40 .. v41}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V

move-object/from16 v0, p0

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

move-object/from16 v40, v0

move-object/from16 v0, p0

[COLOR="Blue"]iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;

move-object/from16 v41, v0[/COLOR]

[COLOR="red"]invoke-direct {v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->getBackKillRunnable()Ljava/lang/Runnable;

move-result-object v41[/COLOR]

invoke-static {}, Landroid/view/ViewConfiguration;->getGlobalActionKeyTimeout()J

move-result-wide v42

invoke-virtual/range {v40 .. v43}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

move-object/from16 v0, p0

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

move-object/from16 v40, v0

move-object/from16 v0, p0

[COLOR="Blue"]iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;

move-object/from16 v41, v0[/COLOR]

[COLOR="Red"]invoke-direct {v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->getBackKillRunnable()Ljava/lang/Runnable;

move-result-object v41[/COLOR]

invoke-virtual/range {v40 .. v41}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V

.method public updateSettings()V

const-string v19, "incall_power_button_behavior"

const/16 v20, 0x1

move-object/from16 v0, v19

move/from16 v1, v20

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

move-result v9

[COLOR="red"]const-string v19, "long_press_kill"

const/16 v20, 0x0

move-object/from16 v0, v19

move/from16 v1, v20

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

move-result v3

move-object/from16 v0, p0

iput v3, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mLongPressKill:I[/COLOR]

.line 2006
.local v9, incallPowerBehavior:I
const-string v19, "user_rotation"

const/16 v20, 0x0

move-object/from16 v0, v19

move/from16 v1, v20

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

move-result v17

Now download the file attached to this post and extract to your android.policy.jar folder.

That's it. Compile and test!