From b94d654d36d6352d56847d877450b80da7e0d5b4 Mon Sep 17 00:00:00 2001 From: Igor Chernyshev Date: Tue, 12 Nov 2013 18:56:21 -0800 Subject: [PATCH] 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 --- core/java/android/os/Bundle.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/os/Bundle.java b/core/java/android/os/Bundle.java index b8769b4d50fb7..ad54a141d7953 100644 --- a/core/java/android/os/Bundle.java +++ b/core/java/android/os/Bundle.java @@ -353,7 +353,7 @@ public final class Bundle implements Parcelable, Cloneable { SparseArray array = (SparseArray) 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;