FORUMS

Top Forum Discussions

[Solved] Kitkat dialer without Favorites tab

448 posts
Thanks Meter: 118
 
By josephpatrick, Senior Member on 19th June 2015, 02:32 AM
Post Reply Subscribe to Thread Email Thread
this is all after months of trial and error method, finally got it working.......please thank me if someone is using it in their ROM...took a lot of efforts to get it the way i wanted it (many had tried and given up hope).

assuming that you know how to decompile and recompile, have basic knowledge on how to edit smali files and also that you have a similar version of seccontacts..apk, here goes.

1) after decompiling, go to "\smali\com\android\contacts\activities" and open "ActionBarAdapter.smali".
2) search for method ".method protected addTab(III)V" and look for "new-instance v1, Ljava/lang/IllegalStateException;"
3) right above this, you should have a "if-eq p1, v1, :cond_1" . Change this to goto :cond_1 This skips the check of the tab index. This is a very important step.
4) search for method "method protected setupTabs()V" and hash out the following 4 lines:

#sget v0, Lcom/samsung/contacts/activities/ContactsTab;->FAVORITES:I
#const v1, 0x7f02014e
#const v2, 0x7f0e01ab
#invoke-virtual {p0, v0, v1, v2}, Lcom/android/contacts/activities/ActionBarAdapter;->addTab(III)V


This moves the text/icon of the contacts tab to the position of Favorites tab
5) Next file, under "smali\com\samsung\contacts\activities" look for "Contactstab.smali" and look for method ".method private static setupTabState(Z)V"
6) this is where all the tab order, position are defined...took me months to stumble across this method.

change the top section of the method as follows: ensure that the 3 tabs for which i have put comments are matching the variables below

.method private static setupTabState(Z)V
.locals 5
.parameter "hideDialerNLogs"

.prologue
const/4 v4, 0x0

const/4 v3, 0x3 ==>v3 looks like tab count, so we are reducing it from 4 to 3

const/4 v2, 0x2 => v2 is contacts tab and you are moving it to position 2 from 3

const/4 v1, 0x4 ==> v1 is favorites tab you are moving it to position 4 (out of the equation)

const/4 v0, 0x1

.line 75
if-nez p0, :cond_0

.line 76
sput v4, Lcom/samsung/contacts/activities/ContactsTab;->DIALER:I

.line 77
sput v0, Lcom/samsung/contacts/activities/ContactsTab;->CALLLOG:I

.line 78
sput v1, Lcom/samsung/contacts/activities/ContactsTab;->FAVORITES:I

.line 79
sput v2, Lcom/samsung/contacts/activities/ContactsTab;->ALL:I

.line 80
sput v3, Lcom/samsung/contacts/activities/ContactsTab;->GROUPS:I

.line 81
sput v3, Lcom/samsung/contacts/activities/ContactsTab;->COUNT:I

.line 82
sput v2, Lcom/samsung/contacts/activities/ContactsTab;->DEFAULT:I

Note that the bold highlights are edits made.

Save changes, recompile and you are done.
Enjoy...for all those who always found "Favorites" tab irritating and of no use.

http://forum.xda-developers.com/atta...1&d=1434214242
Last edited by josephpatrick; 20th June 2015 at 01:51 AM.
The Following 2 Users Say Thank You to josephpatrick For This Useful Post: [ View ]
 
 
19th June 2015, 03:30 AM |#2  
Member
Thanks Meter: 14
 
More
Quote:
Originally Posted by josephpatrick

Hi everyone,

i will only post the guide/how to only if anyone is interested and that will be based on thread responses and PM's.

I am interested. Post to me sir. Tq
19th June 2015, 07:08 AM |#3  
OP Senior Member
Flag Bangalore
Thanks Meter: 118
 
More
Quote:
Originally Posted by tahula2004

I am interested. Post to me sir. Tq

will do it once i reach home
The Following User Says Thank You to josephpatrick For This Useful Post: [ View ]
19th June 2015, 07:21 AM |#4  
Member
Thanks Meter: 14
 
More
Tq sir
19th June 2015, 06:11 PM |#5  
OP Senior Member
Flag Bangalore
Thanks Meter: 118
 
More
Quote:
Originally Posted by tahula2004

Tq sir

OP updated with instructions
The Following User Says Thank You to josephpatrick For This Useful Post: [ View ]
21st June 2015, 05:16 PM |#6  
OP Senior Member
Flag Bangalore
Thanks Meter: 118
 
More
Quote:
Originally Posted by tahula2004

Tq sir

were you able to get it working?
21st June 2015, 05:20 PM |#7  
Member
Thanks Meter: 14
 
More
I have not tried it yet. Quite busy with my work. I shall inform you when I have tried it. Tq sir
29th June 2015, 12:32 PM |#8  
haikal14's Avatar
Member
Flag Probolinggo
Thanks Meter: 113
 
More
"4) search for method "method protected setupTabs()V" and hash out the following 4 lines:

#sget v0, Lcom/samsung/contacts/activities/ContactsTab;->FAVORITES:I
#const v1, 0x7f02014e
#const v2, 0x7f0e01ab
#invoke-virtual {p0, v0, v1, v2}, Lcom/android/contacts/activities/ActionBarAdapter;->addTab(III)V

This moves the text/icon of the contacts tab to the position of Favorites tab"


I still confused with this step, can you explaind to me?
26th August 2015, 03:38 AM |#9  
OP Senior Member
Flag Bangalore
Thanks Meter: 118
 
More
Quote:
Originally Posted by haikal14

"4) search for method "method protected setupTabs()V" and hash out the following 4 lines:

#sget v0, Lcom/samsung/contacts/activities/ContactsTab;->FAVORITES:I
#const v1, 0x7f02014e
#const v2, 0x7f0e01ab
#invoke-virtual {p0, v0, v1, v2}, Lcom/android/contacts/activities/ActionBarAdapter;->addTab(III)V

This moves the text/icon of the contacts tab to the position of Favorites tab"


I still confused with this step, can you explaind to me?

what explanation are you looking for?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes