diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-08-24 21:25:49 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-08-24 21:25:49 +0000 |
commit | 94bbd4256d7261aa1d8ddf660e7856cde5afa49f (patch) | |
tree | 8299c300f3b4dbc2a5360c3319ac41bf1b389e55 /framework/java/android/bluetooth/BluetoothAudioConfig.java | |
parent | 931010f176faa894f06051c57290f7723dfbcd49 (diff) | |
parent | 9e045d26d0128826b40520f523307d8d16473779 (diff) |
Merge changes from topic "bt-fix-checkstyle-errors"
* changes:
Fix checkstyle errors (2/2)
Fix checkstyle errors (1/2)
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothAudioConfig.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothAudioConfig.java | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/framework/java/android/bluetooth/BluetoothAudioConfig.java b/framework/java/android/bluetooth/BluetoothAudioConfig.java index 03176b9e07..a4410563c9 100644 --- a/framework/java/android/bluetooth/BluetoothAudioConfig.java +++ b/framework/java/android/bluetooth/BluetoothAudioConfig.java @@ -41,10 +41,9 @@ public final class BluetoothAudioConfig implements Parcelable { @Override public boolean equals(Object o) { if (o instanceof BluetoothAudioConfig) { - BluetoothAudioConfig bac = (BluetoothAudioConfig)o; - return (bac.mSampleRate == mSampleRate && - bac.mChannelConfig == mChannelConfig && - bac.mAudioFormat == mAudioFormat); + BluetoothAudioConfig bac = (BluetoothAudioConfig) o; + return (bac.mSampleRate == mSampleRate && bac.mChannelConfig == mChannelConfig + && bac.mAudioFormat == mAudioFormat); } return false; } @@ -60,23 +59,26 @@ public final class BluetoothAudioConfig implements Parcelable { + ",mAudioFormat:" + mAudioFormat + "}"; } + @Override public int describeContents() { return 0; } public static final Parcelable.Creator<BluetoothAudioConfig> CREATOR = new Parcelable.Creator<BluetoothAudioConfig>() { - public BluetoothAudioConfig createFromParcel(Parcel in) { - int sampleRate = in.readInt(); - int channelConfig = in.readInt(); - int audioFormat = in.readInt(); - return new BluetoothAudioConfig(sampleRate, channelConfig, audioFormat); - } - public BluetoothAudioConfig[] newArray(int size) { - return new BluetoothAudioConfig[size]; - } - }; + public BluetoothAudioConfig createFromParcel(Parcel in) { + int sampleRate = in.readInt(); + int channelConfig = in.readInt(); + int audioFormat = in.readInt(); + return new BluetoothAudioConfig(sampleRate, channelConfig, audioFormat); + } + public BluetoothAudioConfig[] newArray(int size) { + return new BluetoothAudioConfig[size]; + } + }; + + @Override public void writeToParcel(Parcel out, int flags) { out.writeInt(mSampleRate); out.writeInt(mChannelConfig); @@ -85,6 +87,7 @@ public final class BluetoothAudioConfig implements Parcelable { /** * Returns the sample rate in samples per second + * * @return sample rate */ public int getSampleRate() { @@ -94,6 +97,7 @@ public final class BluetoothAudioConfig implements Parcelable { /** * Returns the channel configuration (either {@link android.media.AudioFormat#CHANNEL_IN_MONO} * or {@link android.media.AudioFormat#CHANNEL_IN_STEREO}) + * * @return channel configuration */ public int getChannelConfig() { @@ -103,6 +107,7 @@ public final class BluetoothAudioConfig implements Parcelable { /** * Returns the channel audio format (either {@link android.media.AudioFormat#ENCODING_PCM_16BIT} * or {@link android.media.AudioFormat#ENCODING_PCM_8BIT} + * * @return audio format */ public int getAudioFormat() { |