fix crash in case of call faillure (not the good thread to display things)

This commit is contained in:
Simon Morlat 2011-11-09 18:22:09 +01:00
parent dbd9ed5967
commit c87b923685

View file

@ -545,7 +545,11 @@ public class LinphoneActivity extends TabActivity implements
private void showToast(int id, String txt) {
final String msg = String.format(getString(id), txt);
Toast.makeText(this, msg, Toast.LENGTH_LONG).show();
mHandler.post(new Runnable() {
public void run() {
Toast.makeText(LinphoneActivity.this, msg, Toast.LENGTH_LONG).show();
}
});
}
@Override
@ -597,4 +601,4 @@ public class LinphoneActivity extends TabActivity implements
interface ContactPicked {
void setAddressAndGoToDialer(String number, String name, Uri photo);
}
}