summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothAudioConfig.java
diff options
context:
space:
mode:
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothAudioConfig.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothAudioConfig.java33
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() {