Skip to content
Snippets Groups Projects
Commit 699a38ec authored by Volker Richert's avatar Volker Richert
Browse files

updates

parent 47c63b27
No related branches found
No related tags found
No related merge requests found
......@@ -55,7 +55,7 @@ def getBugfenderApiKey() {
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
buildToolsVersion '25.0.0'
// FIXME - replace with URLConnection. This is used in ManageCNLActivity.
useLibrary 'org.apache.http.legacy'
......
......@@ -165,9 +165,6 @@ public abstract class ReadHistoryBaseRequestMessage<T extends AbstractResponseMe
Log.d(TAG, "*** GOT A MULTIPACKET SEGMENT "+ packetNumber + ", count:" + this.segmentCount());
Log.d(TAG, "*** PAYLOAD:" + HexDump.dumpHexString(segmentPayload));
// multiByteSegments don't always come back in a consecutive order.
this.segments[packetNumber] = segmentPayload;
if (packetNumber == this.lastPacketNumber() &&
segmentPayload.length != this.lastPacketSize) {
throw new InvalidMessageException("Multipacket Transfer last packet size mismatch");
......@@ -183,9 +180,16 @@ public abstract class ReadHistoryBaseRequestMessage<T extends AbstractResponseMe
throw new InvalidMessageException("Total segment size mismatch");
}
ByteBuffer buffer = ByteBuffer.allocate(segmentPayload.length);
buffer.order(ByteOrder.BIG_ENDIAN);
buffer.put(segmentPayload);
// multiByteSegments don't always come back in a consecutive order.
this.segments[packetNumber] = buffer.array();
// TODO - all of this should go into different classes...
// Decompress the message
if (segmentPayload.readUInt16BE(0x00) === 0x030E) {
if ((buffer.getInt(0x00) & 0xffffffffl) == 0x030E) {
const HEADER_SIZE = 12; // TODO should be a static get.
// It's an UnmergedHistoryUpdateCompressed response. We need to decompress it
const dataType = segmentPayload[0x02]; // Returns a HISTORY_DATA_TYPE
......@@ -244,8 +248,6 @@ public abstract class ReadHistoryBaseRequestMessage<T extends AbstractResponseMe
AckMultipacketCommand.SEGMENT_COMMAND.SEND_NEXT_SEGMENT)
.send(hidDevice)
.then(() => resolve());
} else {
resolve();
}
}
......
......@@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:2.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'io.realm:realm-gradle-plugin:2.2.2'
......
#Sat Nov 12 11:44:13 AEDT 2016
#Fri Mar 03 15:37:47 CET 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment