Changeset 1d41c2fd


Ignore:
Timestamp:
Aug 22, 2012 5:41:43 PM (8 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
b6112727
Parents:
7c7e131
Message:

SSU: Workaround for Android ICS bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/transport/udp/UDPReceiver.java

    r7c7e131 r1d41c2fd  
    3232    private final int _id;
    3333
     34    private static final boolean _isAndroid = System.getProperty("java.vendor").contains("Android");
     35
    3436    private static final int TYPE_POISON = -99999;
    3537    private static final int MIN_QUEUE_SIZE = 16;
    3638    private static final int MAX_QUEUE_SIZE = 192;
    37    
     39
    3840    public UDPReceiver(RouterContext ctx, UDPTransport transport, DatagramSocket socket, String name) {
    3941        _context = ctx;
     
    245247                //}
    246248                UDPPacket packet = UDPPacket.acquire(_context, true);
     249
     250                // Android ICS bug
     251                // http://code.google.com/p/android/issues/detail?id=24748
     252                if (_isAndroid)
     253                    packet.getPacket().setLength(UDPPacket.MAX_PACKET_SIZE);
    247254               
    248255                // block before we read...
Note: See TracChangeset for help on using the changeset viewer.