Cherry-picking for allowing disable/remove of the only account finished

This commit is contained in:
Sylvain Berfini 2012-11-19 14:12:46 +01:00 committed by Sylvain Berfini
parent be0f7fa3d7
commit 6eb4cb5c7f
3 changed files with 4 additions and 2 deletions

View file

@ -96,7 +96,7 @@ public class AccountPreferencesFragment extends PreferencesListFragment {
outboundProxy.setKey(getString(R.string.pref_enable_outbound_proxy_key) + key);
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));
disable.setKey(getString(R.string.pref_disable_account_key) + key);

View file

@ -762,6 +762,8 @@ public class LinphoneActivity extends FragmentActivity implements
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
if (lc != null && lc.getDefaultProxyConfig() != null)
statusFragment.registrationStateChanged(lc.getDefaultProxyConfig().getState());
else
statusFragment.registrationStateChanged(RegistrationState.RegistrationNone);
}
}

View file

@ -592,7 +592,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
copyIfNotExist(R.raw.ringback,mRingbackSoundFile);
copyIfNotExist(R.raw.toy_mono,mPauseSoundFile);
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());
}
private void copyIfNotExist(int ressourceId,String target) throws IOException {