diff --git a/res/layout-sw533dp-land/history_detail.xml b/res/layout-sw533dp-land/history_detail.xml index 53c6f1607..08a985ff3 100644 --- a/res/layout-sw533dp-land/history_detail.xml +++ b/res/layout-sw533dp-land/history_detail.xml @@ -135,7 +135,6 @@ android:paddingTop="5dp"> + + + + + + diff --git a/src/org/linphone/LinphoneManager.java b/src/org/linphone/LinphoneManager.java index e46ff8a8e..b0d4b316b 100644 --- a/src/org/linphone/LinphoneManager.java +++ b/src/org/linphone/LinphoneManager.java @@ -352,20 +352,23 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag } public void enableProxyPublish( boolean enabled) { - LinphoneCore lc = getLcIfManagerNotDestroyedOrNull(); - if(lc != null ) { - LinphoneProxyConfig[] proxyList = lc.getProxyConfigList(); - if(!enabled) - changeStatusToOffline(); - for (LinphoneProxyConfig proxyConfig : proxyList) { - proxyConfig.edit(); - proxyConfig.enablePublish(enabled); - proxyConfig.done(); - } - subscribeFriendList(enabled); - if(enabled) - changeStatusToOnline(); - } + LinphoneCore lc = getLcIfManagerNotDestroyedOrNull(); + if (lc != null ) { + if ((lc.getGlobalState() == GlobalState.GlobalOn) && (LinphoneService.isReady())) { + Log.e("===>>> enableProxyPublish in the loop" ); + LinphoneProxyConfig[] proxyList = lc.getProxyConfigList(); + if (!enabled) + changeStatusToOffline(); + for (LinphoneProxyConfig proxyConfig : proxyList) { + proxyConfig.edit(); + proxyConfig.enablePublish(enabled); + proxyConfig.done(); + } + subscribeFriendList(enabled); + if (enabled) + changeStatusToOnline(); + } + } } public void subscribeFriendList(boolean enabled){ @@ -377,12 +380,13 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag } public void changeStatusToOnline() { - - LinphoneCore lc = getLcIfManagerNotDestroyedOrNull(); - if (isInstanciated() && lc != null ){ - PresenceModel model = LinphoneCoreFactory.instance().createPresenceModel(PresenceActivityType.TV, null); - lc.setPresenceModel(model); - } + LinphoneCore lc = getLcIfManagerNotDestroyedOrNull(); + if (isInstanciated() && lc != null) { + if ((lc.getGlobalState() == GlobalState.GlobalOn) && (LinphoneService.isReady())) { + PresenceModel model = LinphoneCoreFactory.instance().createPresenceModel(PresenceActivityType.TV, null); + lc.setPresenceModel(model); + } + } } public void changeStatusToOnThePhone() { @@ -617,8 +621,10 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag mLc = LinphoneCoreFactory.instance().createLinphoneCore(this, mLinphoneConfigFile, mLinphoneFactoryConfigFile, null, c); //TODO: server test Presence - PresenceModel model = LinphoneCoreFactory.instance().createPresenceModel(PresenceActivityType.TV, null); - mLc.setPresenceModel(model); + //PresenceModel model = LinphoneCoreFactory.instance().createPresenceModel(PresenceActivityType.TV, null); + //mLc.setPresenceModel(model); + //changeStatusToOnline(); + instance.enableProxyPublish(true); TimerTask lTask = new TimerTask() { @Override diff --git a/submodules/linphone b/submodules/linphone index ad382a060..293c265e7 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit ad382a060c447e134abe2e91e444d3b71e6590c5 +Subproject commit 293c265e7d7c66ff20fd9ba217ebe0a60f37720f