Added error and inprogress registration states to status bar

This commit is contained in:
Sylvain Berfini 2012-07-17 11:24:26 +02:00
parent bad47c6ddd
commit b331a16e1b
2 changed files with 8 additions and 0 deletions

View file

@ -258,6 +258,8 @@
<string name="add_to_contacts">Add to contacts</string>
<string name="status_connected">CONNECTED</string>
<string name="status_not_connected">NOT CONNECTED</string>
<string name="status_in_progress">CONNECTING</string>
<string name="status_error">ERROR</string>
<!-- Used by Android to help blind people by describing them images -->
<string name="content_description_add_contact">Add to contacts button</string>

View file

@ -95,6 +95,12 @@ public class StatusFragment extends Fragment {
if (state == RegistrationState.RegistrationOk && LinphoneManager.getLc().getDefaultProxyConfig().isRegistered()) {
statusLed.setImageResource(R.drawable.led_connected);
statusText.setText(getString(R.string.status_connected));
} else if (state == RegistrationState.RegistrationProgress) {
statusLed.setImageResource(R.drawable.led_inprogress);
statusText.setText(getString(R.string.status_in_progress));
} else if (state == RegistrationState.RegistrationFailed) {
statusLed.setImageResource(R.drawable.led_error);
statusText.setText(getString(R.string.status_error));
} else {
statusLed.setImageResource(R.drawable.led_disconnected);
statusText.setText(getString(R.string.status_not_connected));