[Sony Cross-Device General] niaboc79:
Many people are asking me how to clone Honami settings. Changing some png is not difficult at all but when we need to edit the smali files it's different.

So I will explain some differents parts such:

How to have black text on google account settings.

How to add Auto Synch Switcher.

How to add your personal sub menu settings.

How to add any applications in settings.

How to have black text on google account settings.

Many are thinking that the color of this text is defined by an xml in styles.xml or with a color. That's why no body exepting me as been able to have the correct text color.

This text color is in fact defined by the google account and the color is white by default. Modding the text color inside google applications is not a good solution for Sony dev as an update would have change the color again.

Sony have choose to convert the white text color to black inside the smali files of settings, so even if the user update the google app, the text will always have the right color.

Instructions

1) Copy GenericSettingsFragment.smali in smali/com/sonymobile/settings

2) Copy ProxyPreferenceRootAdapter in smali/com/sonymobile/settings/preference

3) In smali/com/android/settings/accounts/ManageAccountsSettings.smali

Replace full method addAuthenticatorSettings()V

.method private addAuthenticatorSettings()V
.locals 3

.prologue
.line 357
iget-object v1, p0, Lcom/android/settings/accounts/ManageAccountsSettings;->mAccountType:Ljava/lang/String;

invoke-virtual {p0}, Lcom/android/settings/accounts/ManageAccountsSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;

move-result-object v2

invoke-virtual {p0, v1, v2}, Lcom/android/settings/accounts/ManageAccountsSettings;->addPreferencesForType(Ljava/lang/String;Landroid/preference/PreferenceScreen;)Landroid/preference/PreferenceScreen;

move-result-object v0

.line 358
.local v0, prefs:Landroid/preference/PreferenceScreen;
if-eqz v0, :cond_0

.line 359
invoke-direct {p0, v0}, Lcom/android/settings/accounts/ManageAccountsSettings;->updatePreferenceIntents(Landroid/preference/PreferenceScreen;)V

.line 361
:cond_0
return-void
.end method

by

.method private addAuthenticatorSettings()V
.locals 4

.prologue
.line 364
iget-object v2, p0, Lcom/android/settings/accounts/ManageAccountsSettings;->mAccountType:Ljava/lang/String;

invoke-virtual {p0}, Lcom/android/settings/accounts/ManageAccountsSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;

move-result-object v3

invoke-virtual {p0, v2, v3}, Lcom/android/settings/accounts/ManageAccountsSettings;->addPreferencesForType(Ljava/lang/String;Landroid/preference/PreferenceScreen;)Landroid/preference/PreferenceScreen;

move-result-object v0

.line 365
.local v0, prefs:Landroid/preference/PreferenceScreen;
if-eqz v0, :cond_0

.line 366
invoke-direct {p0, v0}, Lcom/android/settings/accounts/ManageAccountsSettings;->updatePreferenceIntents(Landroid/preference/PreferenceScreen;)V

.line 372
:cond_0
new-instance v1, Lcom/sonymobile/settings/preference/ProxyPreferenceRootAdapter;

invoke-virtual {p0}, Lcom/android/settings/accounts/ManageAccountsSettings;->getActivity()Landroid/app/Activity;

move-result-object v2

invoke-virtual {p0}, Lcom/android/settings/accounts/ManageAccountsSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;

move-result-object v3

invoke-virtual {v3}, Landroid/preference/PreferenceScreen;->getRootAdapter()Landroid/widget/ListAdapter;

move-result-object v3

invoke-direct {v1, v2, v3}, Lcom/sonymobile/settings/preference/ProxyPreferenceRootAdapter;-><init>(Landroid/content/Context;Landroid/widget/ListAdapter;)V

.line 375
.local v1, proxyAdapter:Lcom/sonymobile/settings/preference/ProxyPreferenceRootAdapter;
invoke-virtual {p0}, Lcom/android/settings/accounts/ManageAccountsSettings;->getListView()Landroid/widget/ListView;

move-result-object v2

invoke-virtual {v2, v1}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

.line 376
return-void
.end method