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:
satok
2011-03-25 13:52:48 +09:00
parent 8da36372a3
commit c50232d517
2 changed files with 7 additions and 2 deletions

View File

@@ -267763,7 +267763,7 @@
deprecated="not deprecated"
visibility="public"
>
<parameter name="arg0" type="T">
<parameter name="t" type="T">
</parameter>
</method>
</interface>

View File

@@ -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}.
*