From 9402df1a0e664923bdbc444ca8c6d4d0ecaf5457 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Thu, 8 Nov 2018 16:29:28 +0100 Subject: [PATCH] Hiding LIME & group chat feature if default proxy config doesn't supports it + cleaning non_localizable_custom --- res/values/non_localizable_custom.xml | 199 +++++++++--------- .../linphone/chat/ChatCreationFragment.java | 6 +- .../org/linphone/chat/ChatListFragment.java | 2 +- 3 files changed, 104 insertions(+), 103 deletions(-) diff --git a/res/values/non_localizable_custom.xml b/res/values/non_localizable_custom.xml index d645dcba4..138c45cff 100644 --- a/res/values/non_localizable_custom.xml +++ b/res/values/non_localizable_custom.xml @@ -1,119 +1,120 @@ - - sip.linphone.org - sip:conference-factory@sip.linphone.org - org.linphone.provider - org.linphone - vnd.android.cursor.item/org.linphone.profile - sip:rls@sip.linphone.org - LinphoneAndroid - false - false - false - true + + sip.linphone.org + sip:conference-factory@sip.linphone.org + org.linphone.provider + org.linphone + vnd.android.cursor.item/org.linphone.profile + sip:rls@sip.linphone.org + LinphoneAndroid + false + false + false + true + true - - EEE, d MMM - yyyy/MM/dd - HH:mm - - yyyy/MM/dd - dd - dd/MM, HH:mm - dd/MM - HH:mm + + EEE, d MMM + yyyy/MM/dd - HH:mm - + yyyy/MM/dd + dd + dd/MM, HH:mm + dd/MM + HH:mm - - true - 86400000 + + true + 86400000 - - true + + true - - false - false + + false + false - false - false - false - true - false - false - false - false - false - true + false + false + false + true + false + false + false + false + false + true - - false - false - false - true + + false + false + false + true - - false - 5 - 86400000 - true + + false + 5 + 86400000 + true - - true - 929724111839 - firebase + + true + 929724111839 + firebase - - false - true - true - false - true - false - false + + false + true + true + false + true + false + false - - false - false - false - true - stun.linphone.org - false + + false + false + false + true + stun.linphone.org + false - - false - false - false - linphone-android-photo-temp - linphone-android-photo-%s - false - true - true + + false + false + false + linphone-android-photo-temp + linphone-android-photo-%s + false + true + true - - false - false - false - false - false - false - true - false - false - false + + false + false + false + false + false + false + true + false + false + false - - false - false + + false + false - - GNU General Public License V2\n © 2010-2018 Belledonne Communications - linphone-android@belledonne-communications.com - true - true - linphone_notification_service_id - linphone_notification_id - 1000 - 7000 + + GNU General Public License V2\n © 2010-2018 Belledonne Communications + linphone-android@belledonne-communications.com + true + true + linphone_notification_service_id + linphone_notification_id + 1000 + 7000 false diff --git a/src/android/org/linphone/chat/ChatCreationFragment.java b/src/android/org/linphone/chat/ChatCreationFragment.java index e9e07d626..c009c73e3 100644 --- a/src/android/org/linphone/chat/ChatCreationFragment.java +++ b/src/android/org/linphone/chat/ChatCreationFragment.java @@ -167,9 +167,9 @@ public class ChatCreationFragment extends Fragment implements View.OnClickListen mSecurityToggle.setChecked(mChatRoomEncrypted); ProxyConfig lpc = LinphoneManager.getLc().getDefaultProxyConfig(); if ((mChatRoomSubject != null && mChatRoomAddress != null) || (lpc == null || lpc.getConferenceFactoryUri() == null)) { - mSecurityToggle.setEnabled(false); - mSecurityToggleOn.setOnClickListener(null); - mSecurityToggleOff.setOnClickListener(null); + mSecurityToggle.setVisibility(View.GONE); + mSecurityToggleOn.setVisibility(View.GONE); + mSecurityToggleOff.setVisibility(View.GONE); } LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity().getApplicationContext()); diff --git a/src/android/org/linphone/chat/ChatListFragment.java b/src/android/org/linphone/chat/ChatListFragment.java index 9aeeddea1..3bfced89b 100644 --- a/src/android/org/linphone/chat/ChatListFragment.java +++ b/src/android/org/linphone/chat/ChatListFragment.java @@ -212,7 +212,7 @@ public class ChatListFragment extends Fragment implements ContactsUpdatedListene refreshChatRoomsList(); ProxyConfig lpc = lc.getDefaultProxyConfig(); - mNewGroupDiscussionButton.setEnabled(lpc != null && lpc.getConferenceFactoryUri() != null); + mNewGroupDiscussionButton.setVisibility((lpc != null && lpc.getConferenceFactoryUri() != null) ? View.VISIBLE : View.GONE); } @Override