Use index in SparseArray access properly

The original code was calling get() rather than valueAt(),
treating index as if it was a key.

Change-Id: I52539dfcb49b3d2ee3cb027d38c50b46f73b5ee7
Signed-off-by: Igor Chernyshev <igorc@google.com>
This commit is contained in:
Igor Chernyshev
2013-11-12 18:56:21 -08:00
parent 01e42c0be2
commit b94d654d36

View File

@@ -353,7 +353,7 @@ public final class Bundle implements Parcelable, Cloneable {
SparseArray<? extends Parcelable> array =
(SparseArray<? extends Parcelable>) obj;
for (int n = array.size() - 1; n >= 0; n--) {
if ((array.get(n).describeContents()
if ((array.valueAt(n).describeContents()
& Parcelable.CONTENTS_FILE_DESCRIPTOR) != 0) {
fdFound = true;
break;