Update status bar & notification when all accounts are removed
Conflicts: src/org/linphone/LinphoneManager.java
This commit is contained in:
parent
97ac11bc47
commit
be0f7fa3d7
4 changed files with 10 additions and 5 deletions
|
@ -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"
|
||||
|
|
|
@ -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 {
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue