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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user