Skip to content

Commit

Permalink
Reapply a few bug fixes that got clobbered in the prior rollback and …
Browse files Browse the repository at this point in the history
…changes.
  • Loading branch information
VanceVagell committed Dec 25, 2024
1 parent cc1ee23 commit c9a5de7
Show file tree
Hide file tree
Showing 3 changed files with 196 additions and 171 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,8 @@ private void handleChatPacket(APRSPacket aprsPacket) {
}
}

// If the message type is unknown, we at least display the raw contents as a comment.
if (aprsMessage.type == APRSMessage.UNKNOWN_TYPE && (null == comment || comment.trim().length() == 0)) {
// If there is a fault in the packet, or the message type is unknown, we at least display the raw contents as a comment.
if (aprsPacket.hasFault() || aprsMessage.type == APRSMessage.UNKNOWN_TYPE && (null == comment || comment.trim().length() == 0)) {
if (null != infoField) {
try {
comment = "Raw: " + new String(infoField.getRawBytes(), "UTF-8");
Expand Down Expand Up @@ -1370,6 +1370,12 @@ private void initAudioRecorder() {
return;
}

if (null != audioRecord) {
audioRecord.stop();
audioRecord.release();
audioRecord = null;
}

audioRecord = new AudioRecord(MediaRecorder.AudioSource.VOICE_COMMUNICATION, RadioAudioService.AUDIO_SAMPLE_RATE, channelConfig,
audioFormat, minBufferSize);

Expand Down
Loading

0 comments on commit c9a5de7

Please sign in to comment.