Cherry-picking for allowing disable/remove of the only account finished
This commit is contained in:
parent
be0f7fa3d7
commit
6eb4cb5c7f
3 changed files with 4 additions and 2 deletions
|
@ -96,7 +96,7 @@ public class AccountPreferencesFragment extends PreferencesListFragment {
|
||||||
outboundProxy.setKey(getString(R.string.pref_enable_outbound_proxy_key) + key);
|
outboundProxy.setKey(getString(R.string.pref_enable_outbound_proxy_key) + key);
|
||||||
|
|
||||||
final Preference disable = advanced.getPreference(2);
|
final Preference disable = advanced.getPreference(2);
|
||||||
disable.setEnabled(prefs.getInt(getString(R.string.pref_default_account_key), 0) != n);
|
disable.setEnabled(true);
|
||||||
Compatibility.setPreferenceChecked(disable, prefs.getBoolean(getString(R.string.pref_disable_account_key) + key, false));
|
Compatibility.setPreferenceChecked(disable, prefs.getBoolean(getString(R.string.pref_disable_account_key) + key, false));
|
||||||
disable.setKey(getString(R.string.pref_disable_account_key) + key);
|
disable.setKey(getString(R.string.pref_disable_account_key) + key);
|
||||||
|
|
||||||
|
|
|
@ -762,6 +762,8 @@ public class LinphoneActivity extends FragmentActivity implements
|
||||||
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
||||||
if (lc != null && lc.getDefaultProxyConfig() != null)
|
if (lc != null && lc.getDefaultProxyConfig() != null)
|
||||||
statusFragment.registrationStateChanged(lc.getDefaultProxyConfig().getState());
|
statusFragment.registrationStateChanged(lc.getDefaultProxyConfig().getState());
|
||||||
|
else
|
||||||
|
statusFragment.registrationStateChanged(RegistrationState.RegistrationNone);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -592,7 +592,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
||||||
copyIfNotExist(R.raw.ringback,mRingbackSoundFile);
|
copyIfNotExist(R.raw.ringback,mRingbackSoundFile);
|
||||||
copyIfNotExist(R.raw.toy_mono,mPauseSoundFile);
|
copyIfNotExist(R.raw.toy_mono,mPauseSoundFile);
|
||||||
copyFromPackage(R.raw.linphonerc, new File(mLinphoneInitialConfigFile).getName());
|
copyFromPackage(R.raw.linphonerc, new File(mLinphoneInitialConfigFile).getName());
|
||||||
//copyIfNotExist(R.raw.lpconfig, new File(mLPConfigXsd).getName());
|
copyIfNotExist(R.raw.lpconfig, new File(mLPConfigXsd).getName());
|
||||||
copyIfNotExist(R.raw.rootca, new File(mLinphoneRootCaFile).getName());
|
copyIfNotExist(R.raw.rootca, new File(mLinphoneRootCaFile).getName());
|
||||||
}
|
}
|
||||||
private void copyIfNotExist(int ressourceId,String target) throws IOException {
|
private void copyIfNotExist(int ressourceId,String target) throws IOException {
|
||||||
|
|
Loading…
Reference in a new issue