forked from upstream-mirrors/OpenTracks
Polar parser
This commit is contained in:
+4
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user