Merge commit '5546e9e6721a5b05678ea6ceb3be433219f53fe6' into eclair-mr2-plus-aosp * commit '5546e9e6721a5b05678ea6ceb3be433219f53fe6': Avoid NPE when callers send null selection args.
This commit is contained in:
@@ -545,8 +545,12 @@ public class ContentProviderOperation implements Parcelable {
|
|||||||
"only updates, deletes, and asserts can have selections");
|
"only updates, deletes, and asserts can have selections");
|
||||||
}
|
}
|
||||||
mSelection = selection;
|
mSelection = selection;
|
||||||
mSelectionArgs = new String[selectionArgs.length];
|
if (selectionArgs == null) {
|
||||||
System.arraycopy(selectionArgs, 0, mSelectionArgs, 0, selectionArgs.length);
|
mSelectionArgs = null;
|
||||||
|
} else {
|
||||||
|
mSelectionArgs = new String[selectionArgs.length];
|
||||||
|
System.arraycopy(selectionArgs, 0, mSelectionArgs, 0, selectionArgs.length);
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user