mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
override standard Object methods of DcContact
This commit is contained in:
@@ -34,12 +34,29 @@ public class DcContact {
|
||||
this.contactCPtr = contactCPtr;
|
||||
}
|
||||
|
||||
@Override protected void finalize() throws Throwable {
|
||||
@Override
|
||||
protected void finalize() throws Throwable {
|
||||
super.finalize();
|
||||
unrefContactCPtr();
|
||||
contactCPtr = 0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if (other == null || !(other instanceof DcContact)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
DcContact that = (DcContact) other;
|
||||
return this.getId()==that.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getAddr();
|
||||
}
|
||||
|
||||
public native int getId ();
|
||||
public native String getName ();
|
||||
public native String getDisplayName();
|
||||
|
||||
Reference in New Issue
Block a user