diff --git a/res/layout/preference_led_connected.xml b/res/layout/preference_led_connected.xml
new file mode 100644
index 000000000..3223c046b
--- /dev/null
+++ b/res/layout/preference_led_connected.xml
@@ -0,0 +1,8 @@
+
+
\ No newline at end of file
diff --git a/res/layout/preference_led_not_connected.xml b/res/layout/preference_led_not_connected.xml
new file mode 100644
index 000000000..8403e1564
--- /dev/null
+++ b/res/layout/preference_led_not_connected.xml
@@ -0,0 +1,8 @@
+
+
\ No newline at end of file
diff --git a/src/org/linphone/LinphoneActivity.java b/src/org/linphone/LinphoneActivity.java
index 2cb9908e7..3305d76aa 100644
--- a/src/org/linphone/LinphoneActivity.java
+++ b/src/org/linphone/LinphoneActivity.java
@@ -331,6 +331,9 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
// }
}
else if (id == R.id.chat) {
+ if (chatStorage == null) {
+ chatStorage = new ChatStorage(this);
+ }
changeCurrentFragment(FragmentsAvailable.CHATLIST, null);
chat.setSelected(true);
}
diff --git a/src/org/linphone/PreferencesActivity.java b/src/org/linphone/PreferencesActivity.java
index 18468663e..b10f20f24 100644
--- a/src/org/linphone/PreferencesActivity.java
+++ b/src/org/linphone/PreferencesActivity.java
@@ -40,6 +40,7 @@ import org.linphone.core.LinphoneCore;
import org.linphone.core.LinphoneCore.EcCalibratorStatus;
import org.linphone.core.LinphoneCore.MediaEncryption;
import org.linphone.core.LinphoneCoreException;
+import org.linphone.core.LinphoneProxyConfig;
import org.linphone.core.Log;
import org.linphone.mediastream.Version;
import org.linphone.mediastream.video.capture.hwconf.AndroidCameraConfiguration;
@@ -158,6 +159,16 @@ public class PreferencesActivity extends LinphonePreferencesActivity implements
return false;
}
});
+
+ for (LinphoneProxyConfig lpc : LinphoneManager.getLc().getProxyConfigList()) {
+ if (lpc.getIdentity().contains(prefs.getString(keyUsername, "")) && lpc.getIdentity().contains(prefs.getString(keyDomain, ""))) {
+ if (lpc.getState() == LinphoneCore.RegistrationState.RegistrationOk)
+ me.setWidgetLayoutResource(R.layout.preference_led_connected);
+ else
+ me.setWidgetLayoutResource(R.layout.preference_led_not_connected);
+ }
+ }
+
parent.addPreference(me);
}
diff --git a/src/org/linphone/StatusFragment.java b/src/org/linphone/StatusFragment.java
index 7fe5a8c00..afb2bbc81 100644
--- a/src/org/linphone/StatusFragment.java
+++ b/src/org/linphone/StatusFragment.java
@@ -372,7 +372,8 @@ public class StatusFragment extends Fragment {
ImageView status = (ImageView) view.findViewById(R.id.State);
TextView identity = (TextView) view.findViewById(R.id.Identity);
- identity.setText(lpc.getIdentity().split("sip:")[1]);
+ String sipAddress = lpc.getIdentity().startsWith("sip:") ? lpc.getIdentity().split("sip:")[1] : lpc.getIdentity();
+ identity.setText(sipAddress);
CheckBox isDefault = (CheckBox) view.findViewById(R.id.Default);
checkboxes.add(isDefault);