Fixed registration status after removing account
This commit is contained in:
parent
4860538466
commit
a66d57dc4d
1 changed files with 10 additions and 6 deletions
|
@ -79,10 +79,8 @@ public class StatusBarFragment extends Fragment {
|
||||||
final RegistrationState state,
|
final RegistrationState state,
|
||||||
String smessage) {
|
String smessage) {
|
||||||
if (core.getProxyConfigList() == null) {
|
if (core.getProxyConfigList() == null) {
|
||||||
mStatusLed.setImageResource(R.drawable.led_disconnected);
|
showNoAccountConfigured();
|
||||||
mStatusText.setText(getString(R.string.no_account));
|
return;
|
||||||
} else {
|
|
||||||
mStatusLed.setVisibility(View.VISIBLE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((core.getDefaultProxyConfig() != null
|
if ((core.getDefaultProxyConfig() != null
|
||||||
|
@ -152,6 +150,8 @@ public class StatusBarFragment extends Fragment {
|
||||||
ProxyConfig lpc = core.getDefaultProxyConfig();
|
ProxyConfig lpc = core.getDefaultProxyConfig();
|
||||||
if (lpc != null) {
|
if (lpc != null) {
|
||||||
mListener.onRegistrationStateChanged(core, lpc, lpc.getState(), null);
|
mListener.onRegistrationStateChanged(core, lpc, lpc.getState(), null);
|
||||||
|
} else {
|
||||||
|
showNoAccountConfigured();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
mStatusText.setVisibility(View.VISIBLE);
|
mStatusText.setVisibility(View.VISIBLE);
|
||||||
|
@ -178,11 +178,15 @@ public class StatusBarFragment extends Fragment {
|
||||||
mVoicemailCount.setVisibility(View.VISIBLE);
|
mVoicemailCount.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
if (core.getProxyConfigList().length == 0) {
|
if (core.getProxyConfigList().length == 0) {
|
||||||
|
showNoAccountConfigured();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showNoAccountConfigured() {
|
||||||
mStatusLed.setImageResource(R.drawable.led_disconnected);
|
mStatusLed.setImageResource(R.drawable.led_disconnected);
|
||||||
mStatusText.setText(getString(R.string.no_account));
|
mStatusText.setText(getString(R.string.no_account));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private int getStatusIconResource(RegistrationState state) {
|
private int getStatusIconResource(RegistrationState state) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue