Skip to content
Snippets Groups Projects
Commit 568b07b2 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

preferences: fix saving general preferences

Change-Id: I5e9a9ee91354269beb470b95d610761ca736239c
parent fca619f7
No related branches found
No related tags found
No related merge requests found
...@@ -213,9 +213,11 @@ public class GeneralAccountFragment extends BasePreferenceFragment<GeneralAccoun ...@@ -213,9 +213,11 @@ public class GeneralAccountFragment extends BasePreferenceFragment<GeneralAccoun
} }
@Override @Override
public void addJamiPreferences() { public void addJamiPreferences(String accountId) {
PreferenceManager pm = getPreferenceManager();
pm.setSharedPreferencesMode(Context.MODE_PRIVATE);
pm.setSharedPreferencesName(SharedPreferencesServiceImpl.PREFS_ACCOUNT+accountId);
addPreferencesFromResource(R.xml.account_prefs_jami); addPreferencesFromResource(R.xml.account_prefs_jami);
} }
@Override @Override
......
...@@ -61,7 +61,7 @@ public class GeneralAccountPresenter extends RootPresenter<GeneralAccountView> { ...@@ -61,7 +61,7 @@ public class GeneralAccountPresenter extends RootPresenter<GeneralAccountView> {
mAccount = mAccountService.getAccount(accountId); mAccount = mAccountService.getAccount(accountId);
if (mAccount != null) { if (mAccount != null) {
if (mAccount.isRing()) { if (mAccount.isRing()) {
getView().addJamiPreferences(); getView().addJamiPreferences(mAccount.getAccountID());
} else { } else {
getView().addSipPreferences(); getView().addSipPreferences();
} }
......
...@@ -25,7 +25,7 @@ import cx.ring.model.Account; ...@@ -25,7 +25,7 @@ import cx.ring.model.Account;
public interface GeneralAccountView { public interface GeneralAccountView {
void addJamiPreferences(); void addJamiPreferences(String accountId);
void addSipPreferences(); void addSipPreferences();
......
...@@ -77,7 +77,7 @@ public class TVSettingsFragment extends LeanbackSettingsFragmentCompat { ...@@ -77,7 +77,7 @@ public class TVSettingsFragment extends LeanbackSettingsFragmentCompat {
} }
@Override @Override
public void addJamiPreferences() { public void addJamiPreferences(String acccouontId) {
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment