Merge "Simplify UserHandle.equals"

This commit is contained in:
Santiago Seifert
2023-06-09 18:03:00 +00:00
committed by Gerrit Code Review

View File

@@ -597,12 +597,9 @@ public final class UserHandle implements Parcelable {
@Override
public boolean equals(@Nullable Object obj) {
try {
if (obj != null) {
UserHandle other = (UserHandle)obj;
return mHandle == other.mHandle;
}
} catch (ClassCastException ignore) {
if (obj instanceof UserHandle) {
UserHandle other = (UserHandle) obj;
return mHandle == other.mHandle;
}
return false;
}