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