diff --git a/res/layout/status.xml b/res/layout/status.xml index fab32ec51..72e07d701 100644 --- a/res/layout/status.xml +++ b/res/layout/status.xml @@ -169,7 +169,7 @@ android:contentDescription="@string/content_description_led" android:id="@+id/statusLed" android:paddingLeft="5dp" - android:src="@drawable/led_error" + android:src="@drawable/led_disconnected" android:adjustViewBounds="true" android:layout_centerVertical="true" android:layout_width="wrap_content" diff --git a/src/org/linphone/LinphoneManager.java b/src/org/linphone/LinphoneManager.java index 7099ebf55..c0f6dc055 100644 --- a/src/org/linphone/LinphoneManager.java +++ b/src/org/linphone/LinphoneManager.java @@ -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 { @@ -665,7 +665,7 @@ public final class LinphoneManager implements LinphoneCoreListener { } LinphoneProxyConfig lDefaultProxyConfig = mLc.getDefaultProxyConfig(); - if (lDefaultProxyConfig !=null) { + if (lDefaultProxyConfig != null) { //prefix String lPrefix = getPrefString(R.string.pref_prefix_key, null); if (lPrefix != null) { @@ -673,6 +673,8 @@ public final class LinphoneManager implements LinphoneCoreListener { } //escape + lDefaultProxyConfig.setDialEscapePlus(getPrefBoolean(R.string.pref_escape_plus_key, false)); + } else if (LinphoneService.isReady()) { + LinphoneService.instance().onRegistrationStateChanged(RegistrationState.RegistrationNone, null); } } diff --git a/src/org/linphone/LinphoneService.java b/src/org/linphone/LinphoneService.java index 6481260c1..fee07cf23 100644 --- a/src/org/linphone/LinphoneService.java +++ b/src/org/linphone/LinphoneService.java @@ -518,6 +518,9 @@ public final class LinphoneService extends Service implements LinphoneServiceLis if ((state == RegistrationState.RegistrationFailed || state == RegistrationState.RegistrationCleared) && (LinphoneManager.getLc().getDefaultProxyConfig() == null || !LinphoneManager.getLc().getDefaultProxyConfig().isRegistered())) { sendNotification(IC_LEVEL_OFFLINE, R.string.notification_register_failure); } + if (state == RegistrationState.RegistrationNone) { + sendNotification(IC_LEVEL_OFFLINE, R.string.notification_started); + } mHandler.post(new Runnable() { public void run() { diff --git a/src/org/linphone/StatusFragment.java b/src/org/linphone/StatusFragment.java index 8f27c5e3b..0309ce5df 100644 --- a/src/org/linphone/StatusFragment.java +++ b/src/org/linphone/StatusFragment.java @@ -231,7 +231,7 @@ public class StatusFragment extends Fragment { e.printStackTrace(); } - return -1; + return R.drawable.led_disconnected; } private String getStatusIconText(LinphoneCore.RegistrationState state) { @@ -253,7 +253,7 @@ public class StatusFragment extends Fragment { e.printStackTrace(); } - return null; + return context.getString(R.string.status_not_connected); } private void startCallQuality() {