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"
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 30
|
||||
versionCode 165
|
||||
versionName "1.65"
|
||||
versionCode 166
|
||||
versionName "1.66"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
|
|
@ -94,14 +94,14 @@ public class AprsDataTextMessage implements AprsData {
|
|||
}
|
||||
} else {
|
||||
// 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);
|
||||
if (m.find()) {
|
||||
this.textMessage = m.group(1);
|
||||
String ackNumStr = m.group(2);
|
||||
if (ackNumStr != null)
|
||||
this.ackId = Integer.parseInt(ackNumStr);
|
||||
} else if (stringMessage.length() <= 67) {
|
||||
} else {
|
||||
this.textMessage = stringMessage;
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue