Porównaj commity

...

2 Commity

Autor SHA1 Wiadomość Data
sh123 b53785f261 Limit length of the message to 67 characters 2023-12-07 14:31:38 +02:00
sh123 2c7eb04b69 Fix hang issue with messages longer than 67 characters 2023-12-07 14:26:07 +02:00
3 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

@ -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"
}

Wyświetl plik

@ -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;
}
}

Wyświetl plik

@ -23,6 +23,7 @@
<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/messages_edit"
android:layout_width="0dp"
android:maxLength="67"
android:layout_height="wrap_content"
app:layout_constraintEnd_toStartOf="@+id/messages_send"
app:layout_constraintStart_toStartOf="parent"