Loading android/app/Android.bp +12 −1 Original line number Diff line number Diff line Loading @@ -332,6 +332,7 @@ android_app { "-Xep:ClassCanBeStatic:ERROR", "-Xep:DateFormatConstant:ERROR", "-Xep:EmptyBlockTag:ERROR", "-Xep:EqualsGetClass:ERROR", "-Xep:FallThrough:ERROR", "-Xep:HidingField:ERROR", "-Xep:InlineMeInliner:ERROR", Loading @@ -346,7 +347,9 @@ android_app { "-Xep:NonAtomicVolatileUpdate:ERROR", "-Xep:NonCanonicalType:ERROR", "-Xep:NotJavadoc:ERROR", "-Xep:ObjectEqualsForPrimitives:ERROR", "-Xep:OperatorPrecedence:ERROR", "-Xep:ReferenceEquality:ERROR", "-Xep:ReturnAtTheEndOfVoidFunction:ERROR", "-Xep:StringCaseLocaleUsage:ERROR", "-Xep:StringCharset:ERROR", Loading @@ -357,7 +360,15 @@ android_app { "-Xep:UnusedNestedClass:ERROR", "-Xep:UnusedVariable:ERROR", "-Xep:WaitNotInLoop:ERROR", "-XepExcludedPaths:.*/srcjars/.*", // Exclude generated files // After fixing this errorprone, we decided to not merge the change. // It is not very readable and the benefits are minimal when looking // at the size of the maps used in the Bluetooth application. // See https://r.android.com/3200511 "-Xep:AndroidFrameworkEfficientCollections:OFF", // Exclude generated files "-XepExcludedPaths:.*/srcjars/.*", ], }, min_sdk_version: "Tiramisu", Loading android/app/aidl/android/bluetooth/IBluetooth.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import android.os.ResultReceiver; */ interface IBluetooth { // TODO: b/357645528 - delete aidl method @JavaPassthrough(annotation="@android.annotation.RequiresNoPermission") int getState(); Loading android/app/src/com/android/bluetooth/avrcpcontroller/AvrcpItem.java +8 −8 Original line number Diff line number Diff line Loading @@ -276,20 +276,20 @@ public class AvrcpItem { AvrcpItem other = ((AvrcpItem) o); return Objects.equals(mUuid, other.getUuid()) && Objects.equals(mDevice, other.getDevice()) && Objects.equals(mUid, other.getUid()) && Objects.equals(mItemType, other.getItemType()) && Objects.equals(mType, other.getType()) && mUid == other.getUid() && mItemType == other.getItemType() && mType == other.getType() && Objects.equals(mTitle, other.getTitle()) && Objects.equals(mDisplayableName, other.getDisplayableName()) && Objects.equals(mArtistName, other.getArtistName()) && Objects.equals(mAlbumName, other.getAlbumName()) && Objects.equals(mTrackNumber, other.getTrackNumber()) && Objects.equals(mTotalNumberOfTracks, other.getTotalNumberOfTracks()) && mTrackNumber == other.getTrackNumber() && mTotalNumberOfTracks == other.getTotalNumberOfTracks() && Objects.equals(mGenre, other.getGenre()) && Objects.equals(mPlayingTime, other.getPlayingTime()) && mPlayingTime == other.getPlayingTime() && Objects.equals(mCoverArtHandle, other.getCoverArtHandle()) && Objects.equals(mPlayable, other.isPlayable()) && Objects.equals(mBrowsable, other.isBrowsable()) && mPlayable == other.isPlayable() && mBrowsable == other.isBrowsable() && Objects.equals(mImageUri, other.getCoverArtLocation()); } Loading android/app/src/com/android/bluetooth/avrcpcontroller/bip/BipAttachmentFormat.java +11 −8 Original line number Diff line number Diff line Loading @@ -145,16 +145,19 @@ public class BipAttachmentFormat { @Override public boolean equals(Object o) { if (o == this) return true; if (!(o instanceof BipAttachmentFormat)) return false; if (o == this) { return true; } if (!(o instanceof BipAttachmentFormat a)) { return false; } BipAttachmentFormat a = (BipAttachmentFormat) o; return a.getContentType() == getContentType() && a.getName() == getName() && a.getCharset() == getCharset() return a.getContentType().equals(getContentType()) && a.getName().equals(getName()) && Objects.equals(a.getCharset(), getCharset()) && a.getSize() == getSize() && a.getCreatedDate() == getCreatedDate() && a.getModifiedDate() == getModifiedDate(); && Objects.equals(a.getCreatedDate(), getCreatedDate()) && Objects.equals(a.getModifiedDate(), getModifiedDate()); } @Override Loading android/app/src/com/android/bluetooth/avrcpcontroller/bip/BipDateTime.java +7 −4 Original line number Diff line number Diff line Loading @@ -115,11 +115,14 @@ public class BipDateTime { @Override public boolean equals(Object o) { if (o == this) return true; if (!(o instanceof BipDateTime)) return false; if (o == this) { return true; } if (!(o instanceof BipDateTime d)) { return false; } BipDateTime d = (BipDateTime) o; return d.isUtc() == isUtc() && d.getTime() == getTime(); return d.isUtc() == isUtc() && Objects.equals(d.getTime(), getTime()); } @Override Loading Loading
android/app/Android.bp +12 −1 Original line number Diff line number Diff line Loading @@ -332,6 +332,7 @@ android_app { "-Xep:ClassCanBeStatic:ERROR", "-Xep:DateFormatConstant:ERROR", "-Xep:EmptyBlockTag:ERROR", "-Xep:EqualsGetClass:ERROR", "-Xep:FallThrough:ERROR", "-Xep:HidingField:ERROR", "-Xep:InlineMeInliner:ERROR", Loading @@ -346,7 +347,9 @@ android_app { "-Xep:NonAtomicVolatileUpdate:ERROR", "-Xep:NonCanonicalType:ERROR", "-Xep:NotJavadoc:ERROR", "-Xep:ObjectEqualsForPrimitives:ERROR", "-Xep:OperatorPrecedence:ERROR", "-Xep:ReferenceEquality:ERROR", "-Xep:ReturnAtTheEndOfVoidFunction:ERROR", "-Xep:StringCaseLocaleUsage:ERROR", "-Xep:StringCharset:ERROR", Loading @@ -357,7 +360,15 @@ android_app { "-Xep:UnusedNestedClass:ERROR", "-Xep:UnusedVariable:ERROR", "-Xep:WaitNotInLoop:ERROR", "-XepExcludedPaths:.*/srcjars/.*", // Exclude generated files // After fixing this errorprone, we decided to not merge the change. // It is not very readable and the benefits are minimal when looking // at the size of the maps used in the Bluetooth application. // See https://r.android.com/3200511 "-Xep:AndroidFrameworkEfficientCollections:OFF", // Exclude generated files "-XepExcludedPaths:.*/srcjars/.*", ], }, min_sdk_version: "Tiramisu", Loading
android/app/aidl/android/bluetooth/IBluetooth.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import android.os.ResultReceiver; */ interface IBluetooth { // TODO: b/357645528 - delete aidl method @JavaPassthrough(annotation="@android.annotation.RequiresNoPermission") int getState(); Loading
android/app/src/com/android/bluetooth/avrcpcontroller/AvrcpItem.java +8 −8 Original line number Diff line number Diff line Loading @@ -276,20 +276,20 @@ public class AvrcpItem { AvrcpItem other = ((AvrcpItem) o); return Objects.equals(mUuid, other.getUuid()) && Objects.equals(mDevice, other.getDevice()) && Objects.equals(mUid, other.getUid()) && Objects.equals(mItemType, other.getItemType()) && Objects.equals(mType, other.getType()) && mUid == other.getUid() && mItemType == other.getItemType() && mType == other.getType() && Objects.equals(mTitle, other.getTitle()) && Objects.equals(mDisplayableName, other.getDisplayableName()) && Objects.equals(mArtistName, other.getArtistName()) && Objects.equals(mAlbumName, other.getAlbumName()) && Objects.equals(mTrackNumber, other.getTrackNumber()) && Objects.equals(mTotalNumberOfTracks, other.getTotalNumberOfTracks()) && mTrackNumber == other.getTrackNumber() && mTotalNumberOfTracks == other.getTotalNumberOfTracks() && Objects.equals(mGenre, other.getGenre()) && Objects.equals(mPlayingTime, other.getPlayingTime()) && mPlayingTime == other.getPlayingTime() && Objects.equals(mCoverArtHandle, other.getCoverArtHandle()) && Objects.equals(mPlayable, other.isPlayable()) && Objects.equals(mBrowsable, other.isBrowsable()) && mPlayable == other.isPlayable() && mBrowsable == other.isBrowsable() && Objects.equals(mImageUri, other.getCoverArtLocation()); } Loading
android/app/src/com/android/bluetooth/avrcpcontroller/bip/BipAttachmentFormat.java +11 −8 Original line number Diff line number Diff line Loading @@ -145,16 +145,19 @@ public class BipAttachmentFormat { @Override public boolean equals(Object o) { if (o == this) return true; if (!(o instanceof BipAttachmentFormat)) return false; if (o == this) { return true; } if (!(o instanceof BipAttachmentFormat a)) { return false; } BipAttachmentFormat a = (BipAttachmentFormat) o; return a.getContentType() == getContentType() && a.getName() == getName() && a.getCharset() == getCharset() return a.getContentType().equals(getContentType()) && a.getName().equals(getName()) && Objects.equals(a.getCharset(), getCharset()) && a.getSize() == getSize() && a.getCreatedDate() == getCreatedDate() && a.getModifiedDate() == getModifiedDate(); && Objects.equals(a.getCreatedDate(), getCreatedDate()) && Objects.equals(a.getModifiedDate(), getModifiedDate()); } @Override Loading
android/app/src/com/android/bluetooth/avrcpcontroller/bip/BipDateTime.java +7 −4 Original line number Diff line number Diff line Loading @@ -115,11 +115,14 @@ public class BipDateTime { @Override public boolean equals(Object o) { if (o == this) return true; if (!(o instanceof BipDateTime)) return false; if (o == this) { return true; } if (!(o instanceof BipDateTime d)) { return false; } BipDateTime d = (BipDateTime) o; return d.isUtc() == isUtc() && d.getTime() == getTime(); return d.isUtc() == isUtc() && Objects.equals(d.getTime(), getTime()); } @Override Loading