[Galaxy Y GT-S5360 Android Development] Ganesh A:
Change Recent Apps Panel Button Function​

Hi Guys,

Ever thought of changing the panel button function which appears when you long press your Home Button showing Task Manager. This guide will show you how to change the Panel Button from Task Manager to any other app like Music Player or Browser or any other.

I will be showing you in this guide to change it to

Music Player

.

All Credit goes to SpaceCaker, as he is the real founder of this mod. I just modded it a little to make it easy and sharing it here.

Files Needed :

1) android.policy.jar

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

2) framework-res.apk

layout/recent_apps_dialog.xml

values/strings.xml

values/public.xml

ANDROID.POLICY.JAR

STEP 1 :

Decompile android.policy.jar

STEP 2 :

Navigate to smali\com\android\internal\policy\impl\ and open RecentApplicationsDialog.smali in Notepad++

Search for

# static fields

Then Under it, Find

.field public static final INTENT_ACTION_JOB_MANAGER:Ljava/lang/String; = "com.sec.android.app.controlpanel.MAIN"

Note

: The com.sec.android.app.controlpanel.MAIN is the APK package name of Task Manager app. We should change it to Music Player app whose APK package name is com.android.music.PLAYBACK_VIEWER

So, Change

.field public static final INTENT_ACTION_JOB_MANAGER:Ljava/lang/String; = "com.sec.android.app.controlpanel.MAIN"

To

.field public static final INTENT_ACTION_JOB_MANAGER:Ljava/lang/String; = "com.android.music.PLAYBACK_VIEWER"

STEP 3 :

Find

.method private isJobManagerInstalled()Z

Then Under it, Find

const-string v3, "com.sec.android.app.controlpanel.MAIN"

And, Change it To

const-string v3, "com.android.music.PLAYBACK_VIEWER"

Find

const-string v7, "com.sec.android.app.controlpanel.MAIN"

And, Change it To

const-string v7, "com.android.music.PLAYBACK_VIEWER"

STEP 4 :

Compile android.policy.jar

Note

: As I said before, you can change Task Manager to any other app like Browser, MMS or any other. For this instead of com.android.music.PLAYBACK_VIEWER, use the APK package name of the app you wish to. You can find the package name in Android.Manifest.xml

FRAMEWORK-RES.APK

STEP 1:

Decompile framework-res.apk

STEP 2 :

Open public.xml under res/values/

Search for

job_manager

You will see something like

<public type="string" name="job_manager" id="0x01040438" />

Now change

job_manager

to

music_player

(or anything else)

So, it will look like

<public type="string" name="music_player" id="0x01040438" />

Note : The id can be different for you...

STEP 3 :

Open strings.xml under res/values/

Add a string like this

<string name="music_player">Music Player</string>

(The Music Player will be the Name that will Displayed in the Panel Button)

Note

: You need to change the music_player inside the string tag to the same name as you have entered in the public.xml. This will link to each so it will work perfectly.

STEP 4 :

Open recent_apps_dialog.xml under /res/layout/

Search for

android:text="@string/job_manager

And replace it with

android:text="@string/music_player

Note

: You will find 2 android:text="@string/job_manager. So, replace both with android:text="@string/music_player

STEP 5 :

Compile framework-res.apk

Please post a screenshot of the panel button that you modded...

Mine :

Thank You For Following My Guide...