2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 13:47:41 +00:00

Use Long.hashCode() in SMSHelper.

This commit is contained in:
Isira Seneviratne 2020-10-17 19:47:52 +05:30 committed by Simon Redman
parent 34dee23197
commit 96a51a6e77

View File

@ -798,26 +798,26 @@ public class SMSHelper {
* Represent an ID used to uniquely identify a message thread
*/
public static class ThreadID {
final Long threadID;
final long threadID;
static final String lookupColumn = Telephony.Sms.THREAD_ID;
public ThreadID(Long threadID) {
public ThreadID(long threadID) {
this.threadID = threadID;
}
@NonNull
public String toString() {
return threadID.toString();
return Long.toString(threadID);
}
@Override
public int hashCode() {
return threadID.hashCode();
return Long.hashCode(threadID);
}
@Override
public boolean equals(Object other) {
return other.getClass().isAssignableFrom(ThreadID.class) && ((ThreadID) other).threadID.equals(this.threadID);
return other.getClass().isAssignableFrom(ThreadID.class) && ((ThreadID) other).threadID == this.threadID;
}
}