Add @Nullable to Object#equals()

This is a partial cherry-pick of change:
I5eedb571c9d78862115dfdc5dae1cf2a35343580

for connectivity classes.

Bug: 170883422
Test: m
Merged-In: I5eedb571c9d78862115dfdc5dae1cf2a35343580
Change-Id: I7dc661863b73f4198ddb4f3a1566583d0f07db3c
This commit is contained in:
Roman Kalukiewicz
2020-10-14 15:59:06 -07:00
committed by Remi NGUYEN VAN
parent 1b2443d1c5
commit 384a8c63f2
11 changed files with 15 additions and 12 deletions

View File

@@ -18,6 +18,7 @@ package android.net;
import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -124,7 +125,7 @@ public final class IpPrefix implements Parcelable {
* @return {@code true} if both objects are equal, {@code false} otherwise.
*/
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (!(obj instanceof IpPrefix)) {
return false;
}