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

updates

parent 47c63b27
Branches
No related tags found
No related merge requests found
...@@ -55,7 +55,7 @@ def getBugfenderApiKey() { ...@@ -55,7 +55,7 @@ def getBugfenderApiKey() {
android { android {
compileSdkVersion 23 compileSdkVersion 23
buildToolsVersion "23.0.3" buildToolsVersion '25.0.0'
// FIXME - replace with URLConnection. This is used in ManageCNLActivity. // FIXME - replace with URLConnection. This is used in ManageCNLActivity.
useLibrary 'org.apache.http.legacy' useLibrary 'org.apache.http.legacy'
......
...@@ -165,9 +165,6 @@ public abstract class ReadHistoryBaseRequestMessage<T extends AbstractResponseMe ...@@ -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, "*** GOT A MULTIPACKET SEGMENT "+ packetNumber + ", count:" + this.segmentCount());
Log.d(TAG, "*** PAYLOAD:" + HexDump.dumpHexString(segmentPayload)); 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() && if (packetNumber == this.lastPacketNumber() &&
segmentPayload.length != this.lastPacketSize) { segmentPayload.length != this.lastPacketSize) {
throw new InvalidMessageException("Multipacket Transfer last packet size mismatch"); throw new InvalidMessageException("Multipacket Transfer last packet size mismatch");
...@@ -183,9 +180,16 @@ public abstract class ReadHistoryBaseRequestMessage<T extends AbstractResponseMe ...@@ -183,9 +180,16 @@ public abstract class ReadHistoryBaseRequestMessage<T extends AbstractResponseMe
throw new InvalidMessageException("Total segment size mismatch"); 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... // TODO - all of this should go into different classes...
// Decompress the message // Decompress the message
if (segmentPayload.readUInt16BE(0x00) === 0x030E) { if ((buffer.getInt(0x00) & 0xffffffffl) == 0x030E) {
const HEADER_SIZE = 12; // TODO should be a static get. const HEADER_SIZE = 12; // TODO should be a static get.
// It's an UnmergedHistoryUpdateCompressed response. We need to decompress it // It's an UnmergedHistoryUpdateCompressed response. We need to decompress it
const dataType = segmentPayload[0x02]; // Returns a HISTORY_DATA_TYPE const dataType = segmentPayload[0x02]; // Returns a HISTORY_DATA_TYPE
...@@ -244,8 +248,6 @@ public abstract class ReadHistoryBaseRequestMessage<T extends AbstractResponseMe ...@@ -244,8 +248,6 @@ public abstract class ReadHistoryBaseRequestMessage<T extends AbstractResponseMe
AckMultipacketCommand.SEGMENT_COMMAND.SEND_NEXT_SEGMENT) AckMultipacketCommand.SEGMENT_COMMAND.SEND_NEXT_SEGMENT)
.send(hidDevice) .send(hidDevice)
.then(() => resolve()); .then(() => resolve());
} else {
resolve();
} }
} }
......
...@@ -5,7 +5,7 @@ buildscript { ...@@ -5,7 +5,7 @@ buildscript {
jcenter() jcenter()
} }
dependencies { 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 // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
classpath 'io.realm:realm-gradle-plugin:2.2.2' 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 distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists 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