summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2013-08-05 16:22:07 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-08-05 16:22:07 +0000
commitf239d9d7bb15fbdbe026835d5ee6b0c91d3ac5f0 (patch)
treec2c6fa3cd2cdf304d78d4882ecc2184a62406b51
parent0bd2667e20f795d47efe834f3a947fcbfc3886b9 (diff)
parent97d50425a48e7ac297da02b9a05612e373a672db (diff)
downloadframeworks_base-f239d9d7bb15fbdbe026835d5ee6b0c91d3ac5f0.zip
frameworks_base-f239d9d7bb15fbdbe026835d5ee6b0c91d3ac5f0.tar.gz
frameworks_base-f239d9d7bb15fbdbe026835d5ee6b0c91d3ac5f0.tar.bz2
Merge "Don't doubly initialize fields in constructor"
-rw-r--r--media/java/android/media/AudioRecord.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/media/java/android/media/AudioRecord.java b/media/java/android/media/AudioRecord.java
index e3f4c07..aa3c530 100644
--- a/media/java/android/media/AudioRecord.java
+++ b/media/java/android/media/AudioRecord.java
@@ -122,11 +122,11 @@ public class AudioRecord
/**
* The audio data sampling rate in Hz.
*/
- private int mSampleRate = 22050;
+ private int mSampleRate;
/**
* The number of input audio channels (1 is mono, 2 is stereo)
*/
- private int mChannelCount = 1;
+ private int mChannelCount;
/**
* The audio channel mask
*/
@@ -136,11 +136,11 @@ public class AudioRecord
* @see AudioFormat#ENCODING_PCM_8BIT
* @see AudioFormat#ENCODING_PCM_16BIT
*/
- private int mAudioFormat = AudioFormat.ENCODING_PCM_16BIT;
+ private int mAudioFormat;
/**
* Where the audio data is recorded from.
*/
- private int mRecordSource = MediaRecorder.AudioSource.DEFAULT;
+ private int mRecordSource;
/**
* Indicates the state of the AudioRecord instance.
*/
@@ -208,7 +208,6 @@ public class AudioRecord
public AudioRecord(int audioSource, int sampleRateInHz, int channelConfig, int audioFormat,
int bufferSizeInBytes)
throws IllegalArgumentException {
- mState = STATE_UNINITIALIZED;
mRecordingState = RECORDSTATE_STOPPED;
// remember which looper is associated with the AudioRecord instanciation