Add hashCode to InputMethodInfo
The uniqueness of InputMethodInfo was guaranteed by mId (like InputMethodInfo#equals), but the hashCode was not implemented in the same way. This change fixes a problem happening when the user gets the hashCode of InputMethodInfo obtained through IPC. Change-Id: Ib876c5cb0d778481100597ec31202f94fb7b8f37
This commit is contained in:
@@ -267763,7 +267763,7 @@
|
||||
deprecated="not deprecated"
|
||||
visibility="public"
|
||||
>
|
||||
<parameter name="arg0" type="T">
|
||||
<parameter name="t" type="T">
|
||||
</parameter>
|
||||
</method>
|
||||
</interface>
|
||||
|
||||
@@ -322,7 +322,12 @@ public final class InputMethodInfo implements Parcelable {
|
||||
InputMethodInfo obj = (InputMethodInfo) o;
|
||||
return mId.equals(obj.mId);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return mId.hashCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to package this object into a {@link Parcel}.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user