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

Commit b4377fc2 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: I6b4040aee02b0f2838ba27e2edd35bdcdcbcfc8b
parent 2c1ccb5a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.media.audiopolicy;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.media.AudioAttributes;
import android.media.AudioSystem;
@@ -107,7 +108,7 @@ public final class AudioVolumeGroup implements Parcelable {
    }

    @Override
    public boolean equals(@NonNull Object o) {
    public boolean equals(@Nullable Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;