mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-31 22:25:08 +00:00
Use Long.hashCode() in SMSHelper.
This commit is contained in:
committed by
Simon Redman
parent
34dee23197
commit
96a51a6e77
@@ -798,26 +798,26 @@ public class SMSHelper {
|
|||||||
* Represent an ID used to uniquely identify a message thread
|
* Represent an ID used to uniquely identify a message thread
|
||||||
*/
|
*/
|
||||||
public static class ThreadID {
|
public static class ThreadID {
|
||||||
final Long threadID;
|
final long threadID;
|
||||||
static final String lookupColumn = Telephony.Sms.THREAD_ID;
|
static final String lookupColumn = Telephony.Sms.THREAD_ID;
|
||||||
|
|
||||||
public ThreadID(Long threadID) {
|
public ThreadID(long threadID) {
|
||||||
this.threadID = threadID;
|
this.threadID = threadID;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return threadID.toString();
|
return Long.toString(threadID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return threadID.hashCode();
|
return Long.hashCode(threadID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object other) {
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user