Call equals() comparing different types

See: http://review.cyanogenmod.org/#/c/28642/
https://android-review.googlesource.com/#/c/45430/

Change-Id: I1ef553e5d64cb36e96fdb28e7f437efb9edd5c6d