forked from upstream-mirrors/OpenTracks
Polar parser
This commit is contained in:
+4
-2
@@ -394,8 +394,10 @@ public class BluetoothConnectionManager {
|
|||||||
|
|
||||||
offset = 0;
|
offset = 0;
|
||||||
|
|
||||||
// Send the obtained bytes to the UI Activity
|
// Send copy of the obtained bytes to the UI Activity.
|
||||||
handler.obtainMessage(MESSAGE_READ, bytes, -1, buffer)
|
// Avoids memory inconsistency issues.
|
||||||
|
byte[] b = buffer.clone();
|
||||||
|
handler.obtainMessage(MESSAGE_READ, bytes, -1, b)
|
||||||
.sendToTarget();
|
.sendToTarget();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.e(Constants.TAG, "disconnected", e);
|
Log.e(Constants.TAG, "disconnected", e);
|
||||||
|
|||||||
Reference in New Issue
Block a user