Lot of little fix

This commit is contained in:
Erwan Croze 2017-10-03 17:30:34 +02:00
parent 58da65b26e
commit 56bf83129f
6 changed files with 15 additions and 5 deletions

View file

@ -1344,6 +1344,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
}
public void refreshHistory() {
if (history == null || chatRoom == null) return;
history.clear();
LinphoneChatMessage[] messages = chatRoom.getHistory();
history.addAll(Arrays.asList(messages));

View file

@ -427,6 +427,8 @@ public class HistoryListFragment extends Fragment implements OnClickListener, On
view.setTag(holder);
}
if (mLogs == null || mLogs.size() < position) return view;
final LinphoneCallLog log = mLogs.get(position);
long timestamp = log.getTimestamp();
LinphoneAddress address;

View file

@ -1683,7 +1683,8 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
}
public void refreshAccounts(){
if (LinphoneManager.getLc().getProxyConfigList().length > 1) {
if (LinphoneManager.getLc().getProxyConfigList() != null &&
LinphoneManager.getLc().getProxyConfigList().length > 1) {
accountsList.setVisibility(View.VISIBLE);
accountsList.setAdapter(new AccountsListAdapter());
accountsList.setOnItemClickListener(new AdapterView.OnItemClickListener() {

View file

@ -476,6 +476,10 @@ public class LinphonePreferences {
LinphoneAuthInfo old_info = getAuthInfo(n);
try {
LinphoneProxyConfig prxCfg = getProxyConfig(n);
if (prxCfg == null) {
Log.e("Error, no proxy config at index " + n);
return;
}
prxCfg.edit();
prxCfg.setIdentity(identity);
prxCfg.enableRegister(true);

View file

@ -279,7 +279,7 @@ public final class LinphoneUtils {
try {
bm = MediaStore.Images.Media.getBitmap(c.getContentResolver(),tUri);
} catch (IOException e) {
LinphoneActivity.instance().displayCustomToast("Something wrong happened", Toast.LENGTH_LONG);
Log.e("Error in setThumbnailPictureFromUri: " + e);
return;
}
if (bm != null) {

View file

@ -1351,9 +1351,11 @@ public class SettingsFragment extends PreferencesListFragment {
@Override
public void onPause() {
if (LinphoneActivity.isInstanciated() && LinphoneManager.isInstanciated()) {
if (LinphoneManager.getInstance().getEchoTesterStatus())
stopEchoTester();
LinphoneActivity.instance().hideTopBar();
}
super.onPause();
}
}