Fix a bunch of lint warning

This commit is contained in:
CappielloAntonio 2021-08-14 17:06:49 +02:00
parent 9c661bd283
commit a49626aa43
7 changed files with 34 additions and 24 deletions

View file

@ -100,6 +100,25 @@ public class Server implements Parcelable {
this.timestamp = timestamp;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Server server = (Server) o;
return serverId.equals(server.getServerId());
}
@Override
public int hashCode() {
return serverId.hashCode();
}
@Override
public String toString() {
return serverId;
}
@Override
public int describeContents() {
return 0;
@ -125,4 +144,10 @@ public class Server implements Parcelable {
this.salt = in.readString();
this.timestamp = in.readLong();
}
public static final Creator<Server> CREATOR = new Creator<Server>() {
public Server createFromParcel(Parcel in) { return new Server(in); }
public Server[] newArray(int size) { return new Server[size]; }
};
}