From 7d7d0e95636344c01eb4e4d034791c199bee98e9 Mon Sep 17 00:00:00 2001 From: Daisuke Miyakawa Date: Tue, 28 Jun 2011 14:45:34 -0700 Subject: use System.arraycopy Change-Id: I8f9525659ce5bead62f3693f79ce70771d87e384 --- src/com/android/providers/contacts/ContactsProvider2.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/com') diff --git a/src/com/android/providers/contacts/ContactsProvider2.java b/src/com/android/providers/contacts/ContactsProvider2.java index 05edce5..4a61410 100644 --- a/src/com/android/providers/contacts/ContactsProvider2.java +++ b/src/com/android/providers/contacts/ContactsProvider2.java @@ -3748,11 +3748,8 @@ public class ContactsProvider2 extends SQLiteContentProvider implements OnAccoun if (selectionArgs != null) { final int length = selectionArgs.length; doubledSelectionArgs = new String[length * 2]; - for (int i = 0; i < length; i++) { - final String arg = selectionArgs[i]; - doubledSelectionArgs[i] = arg; - doubledSelectionArgs[length + i] = arg; - } + System.arraycopy(selectionArgs, 0, doubledSelectionArgs, 0, length); + System.arraycopy(selectionArgs, 0, doubledSelectionArgs, length, length); } Cursor cursor = db.rawQuery(unionQuery, doubledSelectionArgs); -- cgit v1.1