From f119808ee28f9b46245c2309d6b5564133b12f45 Mon Sep 17 00:00:00 2001 From: Luca Stefani Date: Wed, 4 Oct 2023 10:59:03 +0200 Subject: [PATCH] Recorder: Remove not needed & 0xff The byte is already bounded to <= 0xff per definition. Change-Id: Id68fd6f931b215d83d10a136310d2d5e37f85be3 --- .../org/lineageos/recorder/service/HighQualityRecorder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/lineageos/recorder/service/HighQualityRecorder.java b/app/src/main/java/org/lineageos/recorder/service/HighQualityRecorder.java index 14a6aa4a..055fb415 100644 --- a/app/src/main/java/org/lineageos/recorder/service/HighQualityRecorder.java +++ b/app/src/main/java/org/lineageos/recorder/service/HighQualityRecorder.java @@ -155,7 +155,7 @@ private void recordingThreadImpl() { if (status != 0) { if (mTrackAmplitude.get()) { for (int i = 0; i < status; i = i + 2) { - int value = Math.abs(data[i] & 0xff | data[i + 1] << 8); + int value = Math.abs(data[i] | data[i + 1] << 8); if (mMaxAmplitude < value) { mMaxAmplitude = value; }