Do not use deprecated method for equality check

Change-Id: I30e1316ba85fabb3a9dced9d8b0fd4c2921d1d1e
Merge "Do not use deprecated method for equality check"