Track changes to Posix.* API.

We need to flip() the byte buffer before attempting to read
the data written to it.

bug: 18641009

(cherry picked from commit 96f656c39e)

Change-Id: Ib796fafa1e4cf81351245fff6763ce17924acde9
This commit is contained in:
Narayan Kamath
2014-12-09 13:28:37 +00:00
parent 3d751e1d9c
commit 0e87f2b861

View File

@@ -130,6 +130,7 @@ public class PingTest extends AndroidTestCase {
// Check the response is an echo reply.
byte[] response = new byte[bytesRead];
responseBuffer.flip();
responseBuffer.get(response, 0, bytesRead);
assertEquals((byte) 0x81, response[0]);