Fix the wrong logic to check if the element in SparseArray

Bug: 178046780
Test: manual by using a sample app.
Change-Id: Iab7d8a946a32e3be6393e8bdd4d69670d85819f9
1 file changed