[Sprint HTC EVO 4G LTE] runandhide05:
How I did it; To help the community

listed are the changes needed to enable longpress on home

these changes are in the android.policy.jar located at /system/framework/

you must decompile the classes.dex file and will find these smali files in a tree of folders

in PhoneWindowsManager.smali

line 1299

from

.method static synthetic access$300(Lcom/android/internal/policy/impl/PhoneWindowManager;J)V
.registers 3
.parameter "x0"
.parameter "x1"

.prologue
.line 199
invoke-direct {p0, p1, p2}, Lcom/android/internal/policy/impl/PhoneWindowManager;->startHtcSpeak(J)V

return-void
.end method

to

.method static synthetic access$300(Lcom/android/internal/policy/impl/PhoneWindowManager;J)V
.registers 3
.parameter "x0"
.parameter "x1"

.prologue
.line 199
invoke-direct {p0, p1, p2}, Lcom/android/internal/policy/impl/PhoneWindowManager;->startRecentTasks(J)V

return-void
.end method

line 2456

from

.method private startHtcSpeak(J)V
.registers 5
.parameter "eventDownTime"

.prologue
.line 4578
:try_start_0
new-instance v0, Landroid/content/Intent;

const-string v1, "com.nuance.vsuite.intent.action.VOICE_COMMAND"

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

.line 4579
.local v0, intent:Landroid/content/Intent;
const/high16 v1, 0x1000

invoke-virtual {v0, v1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

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

if-eqz v1, :cond_17

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

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

.line 4582
iput-wide p1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHtcSpeakDownTime:J
:try_end_17
.catch Landroid/content/ActivityNotFoundException; {:try_start_0 .. :try_end_17} :catch_18

.line 4592
.end local v0 #intent:Landroid/content/Intent;
:cond_17
:goto_17
return-void

.line 4587
:catch_18
move-exception v1

goto :goto_17
.end method

to

.method private startRecentTasks(J)V
.registers 5
.parameter "eventDownTime"

.prologue
.line 4418
.line 4419
:try_start_0
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mStatusBarService:Lcom/android/internal/statusbar/IStatusBarService;

invoke-interface {v0}, Lcom/android/internal/statusbar/IStatusBarService;->toggleRecentApps()V

.line 4422
iput-wide p1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHtcSpeakDownTime:J
:try_end_7
.catch Landroid/content/ActivityNotFoundException; {:try_start_0 .. :try_end_7} :catch_8

.line 4432
.end local v0
:goto_7
return-void

.line 4427
:catch_8
move-exception v1

goto :goto_7
.end method

line 1707

from

.method private handleLongPressOnHome(J)V
.registers 5
.parameter "eventDownTime"

.prologue
const/4 v1, 0x0

.line 1008
iget-boolean v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mAutoMotiveEnabled:Z

if-eqz v0, :cond_17

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

if-eqz v0, :cond_17

.line 1010
const/4 v0, 0x0

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

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

new-instance v1, Lcom/android/internal/policy/impl/PhoneWindowManager$7;

invoke-direct {v1, p0, p1, p2}, Lcom/android/internal/policy/impl/PhoneWindowManager$7;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;J)V

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

.line 1024
:cond_17
return-void
.end method

to

.method private handleLongPressOnHome(J)V
.registers 5
.parameter "eventDownTime"

.prologue
const/4 v1, 0x0

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

if-eqz v0, :cond_17

.line 1010
const/4 v0, 0x0

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

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

new-instance v1, Lcom/android/internal/policy/impl/PhoneWindowManager$7;

invoke-direct {v1, p0, p1, p2}, Lcom/android/internal/policy/impl/PhoneWindowManager$7;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;J)V

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

.line 1024
:cond_17
return-void
.end method

then in PhoneWindowManager$7.smali

line 54

from

#calls: Lcom/android/internal/policy/impl/PhoneWindowManager;->startHtcSpeak(J)V

to

#calls: Lcom/android/internal/policy/impl/PhoneWindowManager;->startRecentTasks(J)V

now to remove the navbar when an app calls for menu is rather simple

decompile the framework-res.apk

and head to res/values/dimens.xml

go to the line that calls the dimens of the narbar

and change

from

<dimen name="navigation_bar_height">48.0dip</dimen>
<dimen name="navigation_bar_width">45.0dip</dimen>

to

<dimen name="navigation_bar_height">0.0dip</dimen>
<dimen name="navigation_bar_width">0.0dip</dimen>

i believe that was everything, and i hope i didnt leave anything out

have fun tweeking.

and hope this helps out

to add a phycical search button to the half press action of the camera button change the following

at \system\usr\keylayout\keypad_8960.kl

from

key 211 FOCUS
key 212 CAMERA
key 116 POWER WAKE_DROPPED
key 114 VOLUME_DOWN WAKE
key 115 VOLUME_UP WAKE
key 102 HOME
key 139 MENU
key 158 BACK
key 217 SEARCH

key 107 ENDCALL WAKE_DROPPED

to

key 211 SEARCH
key 212 CAMERA
key 116 POWER WAKE_DROPPED
key 114 VOLUME_DOWN WAKE
key 115 VOLUME_UP WAKE
key 102 HOME
key 139 MENU
key 158 BACK
key 217 SEARCH

key 107 ENDCALL WAKE_DROPPED