[Samsung Galaxy S II Plus] klurosu:
Very thanks, credits and regards to:

majdinj

xpeiacle

grilleld

I only port the MOD to our i9105 and i9105P phones.

Now, here we go!

You'll need:

Android.policy.jar

HoloxTool_v1.0.1

1. Open “Android.policy.jar” with “WinRAR” and take the “classes.dex” file to your folder “dex” (within “HoloxTool_v1.0.1”). Choose option "2" when you execute “HoloxTool.bat”

2. Go to: “HoloxTool_v1.0.1\database\dex\classout\com/android/internal/policy/impl" and open: “PhoneWindowManager.smali” file.

3. Search the line:".field static final LONG_PRESS_POWER_SHUT_OFF:I = 0x2" and add the blue lines (just like you can see under this lines):

.field static final LONG_PRESS_POWER_SHUT_OFF:I = 0x2

[COLOR=Blue].field private static final LONG_PRESS_TIMEOUT:I = 0x190[/COLOR]

.field static final MINI_APP_DIALOG_LAYER:I = 0x5

- Search for this field ".field private mIsVisibleSPenGestureView:Z" and add these two lines bellow it (the blue ones):

.field private mIsVisibleSPenGestureView:Z

[COLOR=Blue].field mIsVolumeAction:Z

.field mIsVolumeBlocking:Z[/COLOR]

.field mKeyboardTapVibePattern:[J

- Search for the field ".field private mVolumeDownKeyTriggered:Z" and add this line bellow it (the blue one):

.field private mVolumeDownKeyTriggered:Z

[COLOR=Blue].field mVolumeDownLongPress:Ljava/lang/Runnable;[/COLOR]

.field private final mVolumeKeyLongPressforOneTouchReport:Ljava/lang/Runnable;

- Search for the field ".field private mVolumeUpKeyTriggered:Z" and add this line bellow it (the blue one):

.field private mVolumeUpKeyTriggered:Z

[COLOR=Blue].field mVolumeUpLongPress:Ljava/lang/Runnable;[/COLOR]

.field mWindowManager:Landroid/view/IWindowManager;

- Search for the method ".method public constructor <init>()V" and go to the end of this method and add these lines (the blue ones) before "return-void" line:

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

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

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

[COLOR=Blue]new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$Skip1;

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

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

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

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

iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;[/COLOR]

.line 8501
return-void
.end method

- Search for the method ".method handleVolumeKey(II)V" and add these lines above "invoke-static" line (the blue ones), and add extra condition line (the blue line) above "goto" command:

. method handleVolumeKey(II)V
.registers 8
.parameter "stream"
.parameter "keycode"

.prologue
.line 5673
[B][COLOR=Blue]move-object/from16 v0, p0

iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsVolumeBlocking:Z

if-nez v0, :cond_c[/COLOR][/B]

invoke-static {}, Lcom/android/internal/policy/impl/PhoneWindowManager;->getAudioService()Landroid/media/IAudioService;

move-result-object v0

.line 5674
.local v0, audioService:Landroid/media/IAudioService;
if-nez v0, :cond_7

.line 5705
[B][COLOR=Blue]:cond_c[/COLOR][/B]
:goto_[B][COLOR=Blue]c[/COLOR][/B]
return-void;

- Still in the same method, search down for "Landroid/os/PowerManager$WakeLock;->release()V" and change :goto value to the same as the one in the previous:

before:

.line 5703
iget-object v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;

invoke-virtual {v2}, Landroid/os/PowerManager$WakeLock;->release()V

goto :goto_[COLOR=Red][B]6[/B][/COLOR]

After:

.line 5703
iget-object v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;

invoke-virtual {v2}, Landroid/os/PowerManager$WakeLock;->release()V

goto :goto_[COLOR=Blue][B]c[/B][/COLOR]

- There is another one..!! Search down again for "Landroid/os/PowerManager$WakeLock;->release()V" and change :goto value to the same as the one in the previous step:

Before:

iget-object v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;

invoke-virtual {v2}, Landroid/os/PowerManager$WakeLock;->release()V

goto :goto_[COLOR=Red][B]6[/B][/COLOR]

After:

.line 5703
iget-object v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBroadcastWakeLock:Landroid/os/PowerManager$WakeLock;

invoke-virtual {v2}, Landroid/os/PowerManager$WakeLock;->release()V

goto :goto_[COLOR=Blue][B]c[/B][/COLOR]

- Now at the end of the previous method ".method handleVolumeKey(II)V" and before the next method ".method public hasNavigationBar()Z", add these two new methods:

[B][COLOR=Blue].method handleVolumeLongPress(I)V
.registers 6

const/4 v1, 0x1

move-object/from16 v0, p0

iput-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsVolumeBlocking:Z

const/4 v1, 0x0

iput-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsVolumeAction:Z

const/16 v1, 0x18

if-ne p1, v1, :cond_majdi

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

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

sget v2, Lcom/android/internal/policy/impl/PhoneWindowManager;->LONG_PRESS_TIMEOUT:I

int-to-long v2, v2

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

return-void

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

goto :goto_nj
.end method

.method handleVolumeLongPressAbort()V
.registers 3

const/4 v1, 0x0

move-object/from16 v0, p0

iput-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsVolumeBlocking:Z

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

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

invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;V

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

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

invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;V

return-void
.end method[/COLOR][/B]

- Now search for the method ".method public interceptKeyBeforeQueueing(Landroid/view/KeyEvent;IZ)I", then search down for "Lcom/android/internal/policy/impl/PhoneWindowManager;->mSamsungVolumeControlThread:Lcom/android/internal/policy/impl/PhoneWindowManager$SamsungVolumeControlThread;" and add these lines ABOVE it (the blue ones):

. line 6234
.end local v7 #ex:Landroid/os/RemoteException;
:cond_4d3
move-object/from16 v0, p0

[COLOR=Blue]iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mScreenOnEarly:Z

if-nez v0, :cond_dinj

invoke-virtual/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->isMusicActive()Z

move-result v29

if-eqz p0, :cond_dinj

move-object/from16 v0, p0

move/from16 v15, v19

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

:cond_dinj
move-object/from16 v0, p0[/COLOR]

iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSamsungVolumeControlThread:Lcom/android/internal/policy/impl/PhoneWindowManager$SamsungVolumeControlThread;

move-object/from16 v29, v0

if-nez v29, :cond_68

- Still in the same method, and after adding the previous lines, just go down for few lines and you will see a line starts with a defined condition (:cond_), just add these lines (the blue ones) bellow that defined condition:

- Now at the end of the method ".method sendCloseSystemWindows(Ljava/lang/String;V" and above the method ".method setAttachedWindowFrames(Landroid/view/WindowManagerPolicy$WindowState;IILandroid/view/WindowManagerPolicy$WindowState;ZLandroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;I)V" add this new method:

Save changes.

[FONT=&quot]4. Now add the two [/FONT][FONT=&quot]extra smalis resources[/FONT][FONT=&quot] in com/android/internal/policy/impl folder and recompile pressing the option "3" in “HoloxTool_v1.0.1” menu.[/FONT]

[FONT=&quot]5. Copy the “new-classes.dex” file (in “HoloxTool_v1.0.1\database\dex”) to your desktop and rename it to “classes.dex”.[/FONT]

[FONT=&quot]6. Open“[/FONT][FONT=&quot]Android.policy.jar” with “WinRAR” and pass the “classes.dex” file[/FONT]

[FONT=&quot][/FONT]

[FONT=&quot]Thats all ;)

[/FONT]