Remove redundant initializers from WebRTC Java code.
Removes redundant field initializers such as null, 0 and false. Bug: webrtc:9742 Change-Id: I1e54f6c6000885cf95f7af8e2701875a78445497 Reviewed-on: https://webrtc-review.googlesource.com/99481 Reviewed-by: Henrik Andreassson <henrika@webrtc.org> Reviewed-by: Artem Titov <titovartem@webrtc.org> Commit-Queue: Sami Kalliomäki <sakal@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24676}
This commit is contained in:
committed by
Commit Bot
parent
ef73f59de6
commit
3d50a31aad
@ -41,18 +41,18 @@ class WebRtcAudioEffects {
|
||||
// Contains the available effect descriptors returned from the
|
||||
// AudioEffect.getEffects() call. This result is cached to avoid doing the
|
||||
// slow OS call multiple times.
|
||||
private static @Nullable Descriptor[] cachedEffects = null;
|
||||
private static @Nullable Descriptor[] cachedEffects;
|
||||
|
||||
// Contains the audio effect objects. Created in enable() and destroyed
|
||||
// in release().
|
||||
private @Nullable AcousticEchoCanceler aec = null;
|
||||
private @Nullable NoiseSuppressor ns = null;
|
||||
private @Nullable AcousticEchoCanceler aec;
|
||||
private @Nullable NoiseSuppressor ns;
|
||||
|
||||
// Affects the final state given to the setEnabled() method on each effect.
|
||||
// The default state is set to "disabled" but each effect can also be enabled
|
||||
// by calling setAEC() and setNS().
|
||||
private boolean shouldEnableAec = false;
|
||||
private boolean shouldEnableNs = false;
|
||||
private boolean shouldEnableAec;
|
||||
private boolean shouldEnableNs;
|
||||
|
||||
// Returns true if all conditions for supporting HW Acoustic Echo Cancellation (AEC) are
|
||||
// fulfilled.
|
||||
|
||||
@ -63,10 +63,10 @@ class WebRtcAudioRecord {
|
||||
|
||||
private @Nullable ByteBuffer byteBuffer;
|
||||
|
||||
private @Nullable AudioRecord audioRecord = null;
|
||||
private @Nullable AudioRecordThread audioThread = null;
|
||||
private @Nullable AudioRecord audioRecord;
|
||||
private @Nullable AudioRecordThread audioThread;
|
||||
|
||||
private volatile boolean microphoneMute = false;
|
||||
private volatile boolean microphoneMute;
|
||||
private byte[] emptyBytes;
|
||||
|
||||
private final @Nullable AudioRecordErrorCallback errorCallback;
|
||||
|
||||
@ -21,11 +21,11 @@ import android.os.Process;
|
||||
import java.lang.Thread;
|
||||
import java.nio.ByteBuffer;
|
||||
import javax.annotation.Nullable;
|
||||
import org.webrtc.CalledByNative;
|
||||
import org.webrtc.Logging;
|
||||
import org.webrtc.ThreadUtils;
|
||||
import org.webrtc.audio.JavaAudioDeviceModule.AudioTrackErrorCallback;
|
||||
import org.webrtc.audio.JavaAudioDeviceModule.AudioTrackStartErrorCode;
|
||||
import org.webrtc.CalledByNative;
|
||||
|
||||
class WebRtcAudioTrack {
|
||||
private static final String TAG = "WebRtcAudioTrackExternal";
|
||||
@ -69,13 +69,13 @@ class WebRtcAudioTrack {
|
||||
|
||||
private ByteBuffer byteBuffer;
|
||||
|
||||
private @Nullable AudioTrack audioTrack = null;
|
||||
private @Nullable AudioTrackThread audioThread = null;
|
||||
private @Nullable AudioTrack audioTrack;
|
||||
private @Nullable AudioTrackThread audioThread;
|
||||
private final VolumeLogger volumeLogger;
|
||||
|
||||
// Samples to be played are replaced by zeros if |speakerMute| is set to true.
|
||||
// Can be used to ensure that the speaker is fully muted.
|
||||
private volatile boolean speakerMute = false;
|
||||
private volatile boolean speakerMute;
|
||||
private byte[] emptyBytes;
|
||||
|
||||
private final @Nullable AudioTrackErrorCallback errorCallback;
|
||||
|
||||
Reference in New Issue
Block a user