Fixed username / password edition in account settings
This commit is contained in:
parent
f35380958d
commit
aa608f2e72
1 changed files with 9 additions and 0 deletions
|
@ -203,6 +203,10 @@ public class AccountSettingsFragment extends Fragment {
|
||||||
new SettingListenerBase() {
|
new SettingListenerBase() {
|
||||||
@Override
|
@Override
|
||||||
public void onTextValueChanged(String newValue) {
|
public void onTextValueChanged(String newValue) {
|
||||||
|
if (newValue.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (mAuthInfo != null) {
|
if (mAuthInfo != null) {
|
||||||
mAuthInfo.setUsername(newValue);
|
mAuthInfo.setUsername(newValue);
|
||||||
} else {
|
} else {
|
||||||
|
@ -229,6 +233,7 @@ public class AccountSettingsFragment extends Fragment {
|
||||||
public void onTextValueChanged(String newValue) {
|
public void onTextValueChanged(String newValue) {
|
||||||
if (mAuthInfo != null) {
|
if (mAuthInfo != null) {
|
||||||
mAuthInfo.setUserid(newValue);
|
mAuthInfo.setUserid(newValue);
|
||||||
|
|
||||||
Core core = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
Core core = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
||||||
if (core != null) {
|
if (core != null) {
|
||||||
core.refreshRegisters();
|
core.refreshRegisters();
|
||||||
|
@ -244,9 +249,12 @@ public class AccountSettingsFragment extends Fragment {
|
||||||
@Override
|
@Override
|
||||||
public void onTextValueChanged(String newValue) {
|
public void onTextValueChanged(String newValue) {
|
||||||
if (mAuthInfo != null) {
|
if (mAuthInfo != null) {
|
||||||
|
mAuthInfo.setHa1(null);
|
||||||
mAuthInfo.setPassword(newValue);
|
mAuthInfo.setPassword(newValue);
|
||||||
|
|
||||||
Core core = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
Core core = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
||||||
if (core != null) {
|
if (core != null) {
|
||||||
|
core.addAuthInfo(mAuthInfo);
|
||||||
core.refreshRegisters();
|
core.refreshRegisters();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -605,6 +613,7 @@ public class AccountSettingsFragment extends Fragment {
|
||||||
if (mProxyConfig != null) {
|
if (mProxyConfig != null) {
|
||||||
Address identityAddress = mProxyConfig.getIdentityAddress();
|
Address identityAddress = mProxyConfig.getIdentityAddress();
|
||||||
mAuthInfo = mProxyConfig.findAuthInfo();
|
mAuthInfo = mProxyConfig.findAuthInfo();
|
||||||
|
|
||||||
NatPolicy natPolicy = mProxyConfig.getNatPolicy();
|
NatPolicy natPolicy = mProxyConfig.getNatPolicy();
|
||||||
if (natPolicy == null) {
|
if (natPolicy == null) {
|
||||||
natPolicy = core.createNatPolicy();
|
natPolicy = core.createNatPolicy();
|
||||||
|
|
Loading…
Reference in a new issue