kopia lustrzana https://github.com/sh123/codec2_talkie
Fix hang issue with messages longer than 67 characters
rodzic
df80a982de
commit
2c7eb04b69
|
@ -10,8 +10,8 @@ android {
|
||||||
applicationId "com.radio.codec2talkie"
|
applicationId "com.radio.codec2talkie"
|
||||||
minSdkVersion 23
|
minSdkVersion 23
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 165
|
versionCode 166
|
||||||
versionName "1.65"
|
versionName "1.66"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,14 +94,14 @@ public class AprsDataTextMessage implements AprsData {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// message requires acknowledge {xxxxx (for auto ack)
|
// message requires acknowledge {xxxxx (for auto ack)
|
||||||
p = Pattern.compile("^(.+){0,67}[{](\\d+){1,5}$", Pattern.DOTALL);
|
p = Pattern.compile("^.+[{](\\d+){1,5}$", Pattern.DOTALL);
|
||||||
m = p.matcher(stringMessage);
|
m = p.matcher(stringMessage);
|
||||||
if (m.find()) {
|
if (m.find()) {
|
||||||
this.textMessage = m.group(1);
|
this.textMessage = m.group(1);
|
||||||
String ackNumStr = m.group(2);
|
String ackNumStr = m.group(2);
|
||||||
if (ackNumStr != null)
|
if (ackNumStr != null)
|
||||||
this.ackId = Integer.parseInt(ackNumStr);
|
this.ackId = Integer.parseInt(ackNumStr);
|
||||||
} else if (stringMessage.length() <= 67) {
|
} else {
|
||||||
this.textMessage = stringMessage;
|
this.textMessage = stringMessage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue