Fix crash on 2.2 emulator by turning of ipv6 on emulator. per

workarounds found online.  Suggested fix is to use io instead of nio.
This commit is contained in:
Andy2 2010-11-03 20:54:35 -07:00
parent d1fcdb69da
commit c630697c59

View file

@ -34,6 +34,7 @@ import android.telephony.SmsManager;
import android.content.Intent;
import android.app.PendingIntent;
import android.content.Context;
import android.os.Build;
import android.os.Handler;
import android.os.Message;
@ -117,7 +118,11 @@ public class CommsTransport extends Thread implements TransportProcs {
@Override
public void run()
{
try {
try {
if ( Build.PRODUCT.contains("sdk") ) {
System.setProperty("java.net.preferIPv6Addresses", "false");
}
m_selector = Selector.open();
loop();
@ -354,6 +359,8 @@ public class CommsTransport extends Thread implements TransportProcs {
// }
break;
case COMMS_CONN_BT:
default:
Assert.fail();
break;
}