Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa927a51 authored by Anton Hansson's avatar Anton Hansson
Browse files

Fix nullability annotations on equals methods

The equals method in Object takes a Nullable parameter, so all
subclasses must do the same. Fixing these issues allows re-enabling
the InvalidNullabilityOverride error, fix also catches more severe
issues.

Bug: 309908788
Test: m checkapi
Change-Id: I0734ee0731fd8eea170049998e363f7bb1768317
parent ce8b329e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package android.bluetooth;

import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.os.Parcel;
import android.os.Parcelable;

@@ -378,7 +379,7 @@ public final class BluetoothLeAudioCodecConfig implements Parcelable {
    }

    @Override
    public boolean equals(@NonNull Object o) {
    public boolean equals(@Nullable Object o) {
        if (o instanceof BluetoothLeAudioCodecConfig) {
            BluetoothLeAudioCodecConfig other = (BluetoothLeAudioCodecConfig) o;
            return (other.getCodecType() == mCodecType