Loading android/app/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -337,6 +337,7 @@ android_app { "-Xep:EmptyBlockTag:ERROR", "-Xep:EmptyCatch:ERROR", "-Xep:EqualsGetClass:ERROR", "-Xep:EqualsHashCode:ERROR", "-Xep:FallThrough:ERROR", "-Xep:Finalize:ERROR", "-Xep:HidingField:ERROR", Loading android/app/src/com/android/bluetooth/avrcpcontroller/AvrcpItem.java +6 −2 Original line number Diff line number Diff line Loading @@ -269,11 +269,10 @@ public class AvrcpItem { return true; } if (!(o instanceof AvrcpItem)) { if (!(o instanceof AvrcpItem other)) { return false; } AvrcpItem other = ((AvrcpItem) o); return Objects.equals(mUuid, other.getUuid()) && Objects.equals(mDevice, other.getDevice()) && mUid == other.getUid() Loading @@ -293,6 +292,11 @@ public class AvrcpItem { && Objects.equals(mImageUri, other.getCoverArtLocation()); } @Override public int hashCode() { return Objects.hash(mUuid); } /** Builder for an AvrcpItem */ public static class Builder { private static final String TAG = "AvrcpItem.Builder"; Loading android/app/src/com/android/bluetooth/avrcpcontroller/BrowseTree.java +8 −4 Original line number Diff line number Diff line Loading @@ -357,12 +357,16 @@ public class BrowseTree { } @Override public boolean equals(Object other) { if (!(other instanceof BrowseNode)) { public boolean equals(Object obj) { if (!(obj instanceof BrowseNode other)) { return false; } BrowseNode otherNode = (BrowseNode) other; return getID().equals(otherNode.getID()); return getID().equals(other.getID()); } @Override public int hashCode() { return Objects.hash(getID()); } public synchronized void toTreeString(int depth, StringBuilder sb) { Loading android/app/src/com/android/bluetooth/avrcpcontroller/bip/BipAttachmentFormat.java +11 −0 Original line number Diff line number Diff line Loading @@ -160,6 +160,17 @@ public class BipAttachmentFormat { && Objects.equals(a.getModifiedDate(), getModifiedDate()); } @Override public int hashCode() { return Objects.hash( getContentType(), getName(), getCharset(), getSize(), getCreatedDate(), getModifiedDate()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); Loading android/app/src/com/android/bluetooth/avrcpcontroller/bip/BipDateTime.java +5 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,11 @@ public class BipDateTime { return d.isUtc() == isUtc() && Objects.equals(d.getTime(), getTime()); } @Override public int hashCode() { return Objects.hash(isUtc(), getTime()); } @Override @SuppressLint("ToStringReturnsNull") public String toString() { Loading Loading
android/app/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -337,6 +337,7 @@ android_app { "-Xep:EmptyBlockTag:ERROR", "-Xep:EmptyCatch:ERROR", "-Xep:EqualsGetClass:ERROR", "-Xep:EqualsHashCode:ERROR", "-Xep:FallThrough:ERROR", "-Xep:Finalize:ERROR", "-Xep:HidingField:ERROR", Loading
android/app/src/com/android/bluetooth/avrcpcontroller/AvrcpItem.java +6 −2 Original line number Diff line number Diff line Loading @@ -269,11 +269,10 @@ public class AvrcpItem { return true; } if (!(o instanceof AvrcpItem)) { if (!(o instanceof AvrcpItem other)) { return false; } AvrcpItem other = ((AvrcpItem) o); return Objects.equals(mUuid, other.getUuid()) && Objects.equals(mDevice, other.getDevice()) && mUid == other.getUid() Loading @@ -293,6 +292,11 @@ public class AvrcpItem { && Objects.equals(mImageUri, other.getCoverArtLocation()); } @Override public int hashCode() { return Objects.hash(mUuid); } /** Builder for an AvrcpItem */ public static class Builder { private static final String TAG = "AvrcpItem.Builder"; Loading
android/app/src/com/android/bluetooth/avrcpcontroller/BrowseTree.java +8 −4 Original line number Diff line number Diff line Loading @@ -357,12 +357,16 @@ public class BrowseTree { } @Override public boolean equals(Object other) { if (!(other instanceof BrowseNode)) { public boolean equals(Object obj) { if (!(obj instanceof BrowseNode other)) { return false; } BrowseNode otherNode = (BrowseNode) other; return getID().equals(otherNode.getID()); return getID().equals(other.getID()); } @Override public int hashCode() { return Objects.hash(getID()); } public synchronized void toTreeString(int depth, StringBuilder sb) { Loading
android/app/src/com/android/bluetooth/avrcpcontroller/bip/BipAttachmentFormat.java +11 −0 Original line number Diff line number Diff line Loading @@ -160,6 +160,17 @@ public class BipAttachmentFormat { && Objects.equals(a.getModifiedDate(), getModifiedDate()); } @Override public int hashCode() { return Objects.hash( getContentType(), getName(), getCharset(), getSize(), getCreatedDate(), getModifiedDate()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); Loading
android/app/src/com/android/bluetooth/avrcpcontroller/bip/BipDateTime.java +5 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,11 @@ public class BipDateTime { return d.isUtc() == isUtc() && Objects.equals(d.getTime(), getTime()); } @Override public int hashCode() { return Objects.hash(isUtc(), getTime()); } @Override @SuppressLint("ToStringReturnsNull") public String toString() { Loading