Fix cursor exception in changeCursor

Check for return value of cursor.moveToFirst() to prevent a
CursorIndexOutOfBoundsException when reading from the cursor.

Bug:18526371
Change-Id: I3d6b180d6794921f13137823ab5b5a22fdd6c128
diff --git a/src/com/android/contacts/common/list/ContactListAdapter.java b/src/com/android/contacts/common/list/ContactListAdapter.java
index 7e9a2e9..9107d04 100644
--- a/src/com/android/contacts/common/list/ContactListAdapter.java
+++ b/src/com/android/contacts/common/list/ContactListAdapter.java
@@ -350,8 +350,7 @@
         super.changeCursor(partitionIndex, cursor);
 
         // Check if a profile exists
-        if (cursor != null && cursor.getCount() > 0) {
-            cursor.moveToFirst();
+        if (cursor != null && cursor.moveToFirst()) {
             setProfileExists(cursor.getInt(ContactQuery.CONTACT_IS_USER_PROFILE) == 1);
         }
     }