Fix date format in finish

fix some crash
This commit is contained in:
Margaux Clerc 2016-03-07 16:38:04 +01:00 committed by Jehan Monnier
parent 6a2449f3b6
commit acb734823c
4 changed files with 25 additions and 24 deletions

View file

@ -9,11 +9,6 @@
<string name="notification_registered">Rekisteröity kohteeseen %s</string> <string name="notification_registered">Rekisteröity kohteeseen %s</string>
<string name="notification_register_failure">Epäonnistui rekisteröidä kohteeseen %s</string> <string name="notification_register_failure">Epäonnistui rekisteröidä kohteeseen %s</string>
<string name="sync_account_name">linphone yhteystiedot</string> <string name="sync_account_name">linphone yhteystiedot</string>
<string name="history_date_format">VVV, p KKK esim. Maanantai, 1 Tam</string>
<string name="history_detail_date_format">vvvv/KK/dd - TT:mm - esim 2012/11/22 - 12:34</string>
<string name="messages_date_format">pp/KK, TT:mm esim 22/11, 12:34</string>
<string name="messages_list_date_format">pp/KK esim 22/11</string>
<string name="today_date_format">TT:mm esim. 11:11</string>
<string name="picture_name_format">linphone-mms-%s.jpg</string> <string name="picture_name_format">linphone-mms-%s.jpg</string>
<string name="tunnel_host"></string> <string name="tunnel_host"></string>
<!--Common--> <!--Common-->

View file

@ -479,8 +479,10 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
public void dispayMessageList() { public void dispayMessageList() {
messagesList.setChoiceMode(AbsListView.CHOICE_MODE_MULTIPLE); messagesList.setChoiceMode(AbsListView.CHOICE_MODE_MULTIPLE);
adapter = new ChatMessageAdapter(getActivity(), chatRoom.getHistory()); if(chatRoom != null) {
messagesList.setAdapter(adapter); adapter = new ChatMessageAdapter(getActivity(), chatRoom.getHistory());
messagesList.setAdapter(adapter);
}
} }
private void displayChatHeader(LinphoneAddress address) { private void displayChatHeader(LinphoneAddress address) {
@ -1049,9 +1051,11 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
public List<ContactAddress>getContactsList(){ public List<ContactAddress>getContactsList(){
List<ContactAddress> list = new ArrayList<ContactAddress>(); List<ContactAddress> list = new ArrayList<ContactAddress>();
for(Contact con: ContactsManager.getInstance().getAllContacts()){ if(ContactsManager.getInstance().getAllContacts() != null) {
for(String numberOrAddress : con.getNumbersOrAddresses()){ for (Contact con : ContactsManager.getInstance().getAllContacts()) {
list.add(new ContactAddress(con, numberOrAddress)); for (String numberOrAddress : con.getNumbersOrAddresses()) {
list.add(new ContactAddress(con, numberOrAddress));
}
} }
} }
return list; return list;

View file

@ -316,19 +316,21 @@ public class StatusFragment extends Fragment {
super.onResume(); super.onResume();
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull(); LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
LinphoneCall call = lc.getCurrentCall(); if(lc != null) {
if (isInCall && (call != null || lc.getConferenceSize() > 1 || lc.getCallsNb() > 0)) { LinphoneCall call = lc.getCurrentCall();
if (call != null) { if (isInCall && (call != null || lc.getConferenceSize() > 1 || lc.getCallsNb() > 0)) {
startCallQuality(); if (call != null) {
refreshStatusItems(call, call.getCurrentParamsCopy().getVideoEnabled()); startCallQuality();
} refreshStatusItems(call, call.getCurrentParamsCopy().getVideoEnabled());
menu.setVisibility(View.INVISIBLE); }
encryption.setVisibility(View.VISIBLE); menu.setVisibility(View.INVISIBLE);
callQuality.setVisibility(View.VISIBLE); encryption.setVisibility(View.VISIBLE);
callQuality.setVisibility(View.VISIBLE);
// We are obviously connected // We are obviously connected
statusLed.setImageResource(R.drawable.led_connected); statusLed.setImageResource(R.drawable.led_connected);
statusText.setText(getString(R.string.status_connected)); statusText.setText(getString(R.string.status_connected));
}
} else { } else {
statusText.setVisibility(View.VISIBLE); statusText.setVisibility(View.VISIBLE);
encryption.setVisibility(View.GONE); encryption.setVisibility(View.GONE);

View file

@ -96,7 +96,7 @@ public class AssistantActivity extends Activity implements OnClickListener {
@Override @Override
public void registrationState(LinphoneCore lc, LinphoneProxyConfig cfg, LinphoneCore.RegistrationState state, String smessage) { public void registrationState(LinphoneCore lc, LinphoneProxyConfig cfg, LinphoneCore.RegistrationState state, String smessage) {
if(accountCreated && !newAccount){ if(accountCreated && !newAccount){
if(address != null && address.asString().equals(cfg.getIdentity()) ) { if(address != null && address.asString().equals(cfg.getAddress().asString()) ) {
if (state == RegistrationState.RegistrationOk) { if (state == RegistrationState.RegistrationOk) {
if(progress != null) if(progress != null)
progress.dismiss(); progress.dismiss();
@ -341,7 +341,7 @@ public class AssistantActivity extends Activity implements OnClickListener {
e.printStackTrace(); e.printStackTrace();
} }
if(displayName != null && !displayName.equals("")){ if(address != null && displayName != null && !displayName.equals("")){
address.setDisplayName(displayName); address.setDisplayName(displayName);
} }