Polar parser

This commit is contained in:
JohnG
2011-05-01 15:13:34 -04:00
parent 8aae77ff70
commit 8c10b7ba04
@@ -394,8 +394,10 @@ public class BluetoothConnectionManager {
offset = 0;
// Send the obtained bytes to the UI Activity
handler.obtainMessage(MESSAGE_READ, bytes, -1, buffer)
// Send copy of the obtained bytes to the UI Activity.
// Avoids memory inconsistency issues.
byte[] b = buffer.clone();
handler.obtainMessage(MESSAGE_READ, bytes, -1, b)
.sendToTarget();
} catch (IOException e) {
Log.e(Constants.TAG, "disconnected", e);