Copy the selection args when creating a CPO since callers often reuse the passed in array.

Bug: 2221947
Change-Id: I3b7d5cbef61777d76ca7fc0d7c91c44553e609a9
This commit is contained in:
Jeff Hamilton
2009-10-28 14:14:54 -05:00
parent 25aa87b2fd
commit acff20bda4

View File

@@ -545,7 +545,8 @@ public class ContentProviderOperation implements Parcelable {
"only updates, deletes, and asserts can have selections");
}
mSelection = selection;
mSelectionArgs = selectionArgs;
mSelectionArgs = new String[selectionArgs.length];
System.arraycopy(selectionArgs, 0, mSelectionArgs, 0, selectionArgs.length);
return this;
}