summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothCodecStatus.java
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2017-08-24 21:25:49 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-08-24 21:25:49 +0000
commit94bbd4256d7261aa1d8ddf660e7856cde5afa49f (patch)
tree8299c300f3b4dbc2a5360c3319ac41bf1b389e55 /framework/java/android/bluetooth/BluetoothCodecStatus.java
parent931010f176faa894f06051c57290f7723dfbcd49 (diff)
parent9e045d26d0128826b40520f523307d8d16473779 (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/BluetoothCodecStatus.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothCodecStatus.java59
1 files changed, 32 insertions, 27 deletions
diff --git a/framework/java/android/bluetooth/BluetoothCodecStatus.java b/framework/java/android/bluetooth/BluetoothCodecStatus.java
index c8cd8d17ce..7ae4cb7062 100644
--- a/framework/java/android/bluetooth/BluetoothCodecStatus.java
+++ b/framework/java/android/bluetooth/BluetoothCodecStatus.java
@@ -38,15 +38,15 @@ public final class BluetoothCodecStatus implements Parcelable {
* profile.
*/
public static final String EXTRA_CODEC_STATUS =
- "android.bluetooth.codec.extra.CODEC_STATUS";
+ "android.bluetooth.codec.extra.CODEC_STATUS";
private final BluetoothCodecConfig mCodecConfig;
private final BluetoothCodecConfig[] mCodecsLocalCapabilities;
private final BluetoothCodecConfig[] mCodecsSelectableCapabilities;
public BluetoothCodecStatus(BluetoothCodecConfig codecConfig,
- BluetoothCodecConfig[] codecsLocalCapabilities,
- BluetoothCodecConfig[] codecsSelectableCapabilities) {
+ BluetoothCodecConfig[] codecsLocalCapabilities,
+ BluetoothCodecConfig[] codecsSelectableCapabilities) {
mCodecConfig = codecConfig;
mCodecsLocalCapabilities = codecsLocalCapabilities;
mCodecsSelectableCapabilities = codecsSelectableCapabilities;
@@ -55,12 +55,11 @@ public final class BluetoothCodecStatus implements Parcelable {
@Override
public boolean equals(Object o) {
if (o instanceof BluetoothCodecStatus) {
- BluetoothCodecStatus other = (BluetoothCodecStatus)o;
- return (Objects.equals(other.mCodecConfig, mCodecConfig) &&
- Objects.equals(other.mCodecsLocalCapabilities,
- mCodecsLocalCapabilities) &&
- Objects.equals(other.mCodecsSelectableCapabilities,
- mCodecsSelectableCapabilities));
+ BluetoothCodecStatus other = (BluetoothCodecStatus) o;
+ return (Objects.equals(other.mCodecConfig, mCodecConfig)
+ && Objects.equals(other.mCodecsLocalCapabilities, mCodecsLocalCapabilities)
+ && Objects.equals(other.mCodecsSelectableCapabilities,
+ mCodecsSelectableCapabilities));
}
return false;
}
@@ -68,37 +67,43 @@ public final class BluetoothCodecStatus implements Parcelable {
@Override
public int hashCode() {
return Objects.hash(mCodecConfig, mCodecsLocalCapabilities,
- mCodecsLocalCapabilities);
+ mCodecsLocalCapabilities);
}
@Override
public String toString() {
- return "{mCodecConfig:" + mCodecConfig +
- ",mCodecsLocalCapabilities:" + Arrays.toString(mCodecsLocalCapabilities) +
- ",mCodecsSelectableCapabilities:" + Arrays.toString(mCodecsSelectableCapabilities) +
- "}";
+ return "{mCodecConfig:" + mCodecConfig
+ + ",mCodecsLocalCapabilities:" + Arrays.toString(mCodecsLocalCapabilities)
+ + ",mCodecsSelectableCapabilities:" + Arrays.toString(mCodecsSelectableCapabilities)
+ + "}";
}
+ @Override
public int describeContents() {
return 0;
}
public static final Parcelable.Creator<BluetoothCodecStatus> CREATOR =
new Parcelable.Creator<BluetoothCodecStatus>() {
- public BluetoothCodecStatus createFromParcel(Parcel in) {
- final BluetoothCodecConfig codecConfig = in.readTypedObject(BluetoothCodecConfig.CREATOR);
- final BluetoothCodecConfig[] codecsLocalCapabilities = in.createTypedArray(BluetoothCodecConfig.CREATOR);
- final BluetoothCodecConfig[] codecsSelectableCapabilities = in.createTypedArray(BluetoothCodecConfig.CREATOR);
-
- return new BluetoothCodecStatus(codecConfig,
- codecsLocalCapabilities,
- codecsSelectableCapabilities);
- }
- public BluetoothCodecStatus[] newArray(int size) {
- return new BluetoothCodecStatus[size];
- }
- };
+ public BluetoothCodecStatus createFromParcel(Parcel in) {
+ final BluetoothCodecConfig codecConfig = in.readTypedObject(
+ BluetoothCodecConfig.CREATOR);
+ final BluetoothCodecConfig[] codecsLocalCapabilities = in.createTypedArray(
+ BluetoothCodecConfig.CREATOR);
+ final BluetoothCodecConfig[] codecsSelectableCapabilities = in.createTypedArray(
+ BluetoothCodecConfig.CREATOR);
+
+ return new BluetoothCodecStatus(codecConfig,
+ codecsLocalCapabilities,
+ codecsSelectableCapabilities);
+ }
+
+ public BluetoothCodecStatus[] newArray(int size) {
+ return new BluetoothCodecStatus[size];
+ }
+ };
+ @Override
public void writeToParcel(Parcel out, int flags) {
out.writeTypedObject(mCodecConfig, 0);
out.writeTypedArray(mCodecsLocalCapabilities, 0);