[UI] fix history details

This commit is contained in:
Brieuc Viel 2016-04-27 17:35:25 +02:00
parent 07d5755739
commit 4540cad7f7
5 changed files with 48 additions and 28 deletions

View file

@ -135,7 +135,6 @@
android:paddingTop="5dp">
<TextView
android:id="@+id/direction"
android:text="@string/history_log_label"
style="@style/font9"
android:layout_marginTop="2dp"
@ -143,6 +142,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -150,6 +150,13 @@
android:gravity="center"
android:padding="10dp">
<ImageView
android:id="@+id/direction"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/date"
style="@style/font2"

View file

@ -134,14 +134,14 @@
android:paddingTop="5dp">
<TextView
android:id="@+id/direction"
android:text="@string/history_log_label"
android:text="@string/call"
style="@style/font9"
android:layout_marginTop="2dp"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -149,6 +149,13 @@
android:gravity="center"
android:padding="10dp">
<ImageView
android:id="@+id/direction"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/date"
style="@style/font2"

View file

@ -167,14 +167,14 @@
<TextView
android:id="@+id/date"
style="@style/font10"
style="@style/font2"
android:paddingRight="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/time"
style="@style/font10"
style="@style/font2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

View file

@ -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

@ -1 +1 @@
Subproject commit ad382a060c447e134abe2e91e444d3b71e6590c5
Subproject commit 293c265e7d7c66ff20fd9ba217ebe0a60f37720f