Address UnnecessaryParentheses errorprone warnings

These prevent the roll of Chromium, see [1].

[1] - https://ci.chromium.org/ui/p/webrtc/builders/try/android_arm_dbg/60719/overview

Bug: None
Change-Id: Ia98e0e5c390507eda512096080ec25597f723cef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363944
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43100}
This commit is contained in:
Mirko Bonadei 2024-09-28 11:40:31 +00:00 committed by WebRTC LUCI CQ
parent db54ea73e3
commit f0a57db2e4

View File

@ -283,7 +283,7 @@ class WebRtcAudioRecord {
final int bytesPerFrame = channels * getBytesPerSample(audioFormat);
final int framesPerBuffer = sampleRate / BUFFERS_PER_SECOND;
byteBuffer = ByteBuffer.allocateDirect(bytesPerFrame * framesPerBuffer);
if (!(byteBuffer.hasArray())) {
if (!byteBuffer.hasArray()) {
reportWebRtcAudioRecordInitError("ByteBuffer does not have backing array.");
return -1;
}
@ -721,7 +721,7 @@ class WebRtcAudioRecord {
// Returns true if device A parameters matches those of device B.
// TODO(henrika): can be improved by adding AudioDeviceInfo#getAddress() but it requires API 29.
private static boolean checkDeviceMatch(AudioDeviceInfo devA, AudioDeviceInfo devB) {
return ((devA.getId() == devB.getId() && (devA.getType() == devB.getType())));
return (devA.getId() == devB.getId() && (devA.getType() == devB.getType()));
}
private static String audioStateToString(int state) {