/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/ |
D | SyncCalendarTest.java | 73 Cursor cursor; in testEditEventTitle() local 74 cursor = mResolver.query(mEventsUri, null, null, null, null); in testEditEventTitle() 76 int countBeforeNewEvent = cursor.getCount(); in testEditEventTitle() 77 cursor.moveToNext(); in testEditEventTitle() 80 String newTitle = cursor.getString(cursor.getColumnIndex("title")) + time.toString(); in testEditEventTitle() 81 long dtStart = cursor.getLong(cursor.getColumnIndex("dtstart")); in testEditEventTitle() 82 long dtEnd = cursor.getLong(cursor.getColumnIndex("dtend")); in testEditEventTitle() 85 long eventId = cursor.getLong(cursor.getColumnIndex("_id")); in testEditEventTitle() 88 cursor = mResolver.query(mEventsUri, null, null, null, null); in testEditEventTitle() 91 while (cursor.moveToNext()) { in testEditEventTitle() [all …]
|
D | CalendarProviderTest.java | 171 Cursor cursor = mResolver.query(mEventsUri, null, null, null, null); in execute() local 172 assertEquals(expected, cursor.getCount()); in execute() 173 cursor.close(); in execute() 187 Cursor cursor = mResolver.query(mEventsUri, null, null, null, null); in execute() local 188 dumpCursor(cursor); in execute() 189 cursor.close(); in execute() 209 Cursor cursor = queryInstances(begin, end); in execute() local 210 dumpCursor(cursor); in execute() 211 cursor.close(); in execute() 234 Cursor cursor = queryInstances(begin, end); in execute() local [all …]
|
/packages/providers/GoogleContactsProvider/tests/src/com/android/providers/contacts/ |
D | ContactsSyncAdapterTest.java | 76 Cursor cursor; in testUpdateProviderPeople() local 77 cursor = ContactsSyncAdapter.getCursorForTableImpl(serverDiffs, ContactEntry.class); in testUpdateProviderPeople() 79 checkNextCursorToEntry(cursor, entry1); in testUpdateProviderPeople() 80 checkNextCursorToEntry(cursor, entry2); in testUpdateProviderPeople() 81 checkNextCursorToEntry(cursor, entry3); in testUpdateProviderPeople() 82 assertTrue(dumpCursor(cursor), cursor.isLast()); in testUpdateProviderPeople() 84 cursor.close(); in testUpdateProviderPeople() 87 cursor = ContactsSyncAdapter.getCursorForDeletedTableImpl(serverDiffs, ContactEntry.class); in testUpdateProviderPeople() 89 checkNextDeletedCursorToEntry(cursor, entry4); in testUpdateProviderPeople() 90 checkNextDeletedCursorToEntry(cursor, entry5); in testUpdateProviderPeople() [all …]
|
/packages/providers/DownloadProvider/src/com/android/providers/downloads/ |
D | DownloadService.java | 310 Cursor cursor = getContentResolver().query(Downloads.CONTENT_URI, in run() local 313 if (cursor == null) { in run() 318 cursor.moveToFirst(); in run() 326 boolean isAfterLast = cursor.isAfterLast(); in run() 328 int idColumn = cursor.getColumnIndexOrThrow(Downloads._ID); in run() 361 int id = cursor.getInt(idColumn); in run() 364 insertDownload(cursor, arrayPos, networkAvailable, networkRoaming, now); in run() 370 && (!mediaScannerConnected() || !scanFile(cursor, arrayPos))) { in run() 384 cursor.moveToNext(); in run() 385 isAfterLast = cursor.isAfterLast(); in run() [all …]
|
D | DownloadReceiver.java | 85 Cursor cursor = context.getContentResolver().query( in onReceive() local 87 if (cursor != null) { in onReceive() 88 if (cursor.moveToFirst()) { in onReceive() 89 int statusColumn = cursor.getColumnIndexOrThrow(Downloads.COLUMN_STATUS); in onReceive() 90 int status = cursor.getInt(statusColumn); in onReceive() 92 cursor.getColumnIndexOrThrow(Downloads.COLUMN_VISIBILITY); in onReceive() 93 int visibility = cursor.getInt(visibilityColumn); in onReceive() 102 int filenameColumn = cursor.getColumnIndexOrThrow(Downloads._DATA); in onReceive() 104 cursor.getColumnIndexOrThrow(Downloads.COLUMN_MIME_TYPE); in onReceive() 105 String filename = cursor.getString(filenameColumn); in onReceive() [all …]
|
/packages/apps/Contacts/src/com/android/contacts/util/ |
D | DataStatus.java | 44 public DataStatus(Cursor cursor) { in DataStatus() argument 46 fromCursor(cursor); in DataStatus() 53 public void possibleUpdate(Cursor cursor) { in possibleUpdate() argument 54 final boolean hasStatus = !isNull(cursor, Data.STATUS); in possibleUpdate() 55 final boolean hasTimestamp = !isNull(cursor, Data.STATUS_TIMESTAMP); in possibleUpdate() 64 final long newTimestamp = getLong(cursor, Data.STATUS_TIMESTAMP, -1); in possibleUpdate() 71 fromCursor(cursor); in possibleUpdate() 74 private void fromCursor(Cursor cursor) { in fromCursor() argument 75 mPresence = getInt(cursor, Data.PRESENCE, -1); in fromCursor() 76 mStatus = getString(cursor, Data.STATUS); in fromCursor() [all …]
|
/packages/apps/Mms/src/com/android/mms/util/ |
D | Recycler.java | 80 Cursor cursor = getAllThreads(context); in deleteOldMessages() local 83 while (cursor.moveToNext()) { in deleteOldMessages() 84 long threadId = getThreadId(cursor); in deleteOldMessages() 88 cursor.close(); in deleteOldMessages() 122 abstract protected long getThreadId(Cursor cursor); in getThreadId() argument 128 abstract protected void dumpMessage(Cursor cursor, Context context); in dumpMessage() argument 177 protected long getThreadId(Cursor cursor) { in getThreadId() argument 178 return cursor.getLong(ID); in getThreadId() 183 Cursor cursor = SqliteWrapper.query(context, resolver, in getAllThreads() local 187 return cursor; in getAllThreads() [all …]
|
/packages/apps/GlobalSearch/src/com/android/globalsearch/ |
D | SearchableSuggestionSource.java | 165 Cursor cursor = getCursor(query, queryLimit); in getSuggestions() local 168 if (cursor == null) { in getSuggestions() 181 int count = cursor.getCount(); in getSuggestions() 186 ColumnCachingCursor myCursor = new ColumnCachingCursor(cursor, mCallActionMsgCol); in getSuggestions() 188 while (cursor.moveToNext() && suggestions.size() < maxResults) { in getSuggestions() 200 if (cursor != null) { in getSuggestions() 201 cursor.close(); in getSuggestions() 270 Cursor cursor = getValidationCursor(shortcut); in validateShortcut() local 271 if (cursor == null) return null; in validateShortcut() 278 int count = cursor.getCount(); in validateShortcut() [all …]
|
/packages/inputmethods/OpenWnn/libs/libwnnDictionary/engine/ |
D | ndapi.c | 41 static NJ_INT16 check_search_cursor(NJ_CLASS *iwnn, NJ_CURSOR *cursor); 42 static NJ_INT16 search_word(NJ_CLASS *iwnn, NJ_CURSOR *cursor, NJ_UINT8 comp_flg, NJ_UINT8 *exit_fl… 44 static NJ_INT16 get_word_and_search_next_word(NJ_CLASS *iwnn, NJ_CURSOR *cursor, NJ_RESULT *result,… 48 static NJ_INT16 check_search_cursor(NJ_CLASS *iwnn, NJ_CURSOR *cursor) { in check_search_cursor() argument 54 if (cursor->cond.ds == NULL) { in check_search_cursor() 60 loctset = &(cursor->loctset[i]); in check_search_cursor() 61 dicinfo = &(cursor->cond.ds->dic[i]); in check_search_cursor() 84 if (cursor->cond.yomi == NULL) { in check_search_cursor() 89 if (cursor->cond.ylen > NJ_MAX_LEN) { in check_search_cursor() 94 if (cursor->cond.operation == NJ_CUR_OP_LINK) { in check_search_cursor() [all …]
|
/packages/apps/Bluetooth/src/com/android/bluetooth/opp/ |
D | BluetoothOppNotification.java | 166 Cursor cursor = mContext.getContentResolver().query(BluetoothShare.CONTENT_URI, null, in updateActiveNotification() local 168 if (cursor == null) { in updateActiveNotification() 174 for (cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) { in updateActiveNotification() 175 int timeStamp = cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare.TIMESTAMP)); in updateActiveNotification() 176 int dir = cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare.DIRECTION)); in updateActiveNotification() 177 int id = cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare._ID)); in updateActiveNotification() 178 int total = cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare.TOTAL_BYTES)); in updateActiveNotification() 179 int current = cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare.CURRENT_BYTES)); in updateActiveNotification() 181 String fileName = cursor.getString(cursor.getColumnIndexOrThrow(BluetoothShare._DATA)); in updateActiveNotification() 183 fileName = cursor.getString(cursor in updateActiveNotification() [all …]
|
D | BluetoothOppService.java | 400 Cursor cursor = getContentResolver().query(BluetoothShare.CONTENT_URI, null, null, in run() local 403 if (cursor == null) { in run() 407 cursor.moveToFirst(); in run() 412 boolean isAfterLast = cursor.isAfterLast(); in run() 414 int idColumn = cursor.getColumnIndexOrThrow(BluetoothShare._ID); in run() 443 int id = cursor.getInt(idColumn); in run() 446 insertShare(cursor, arrayPos); in run() 448 if (shouldScanFile(arrayPos) && (!scanFile(cursor, arrayPos))) { in run() 459 cursor.moveToNext(); in run() 460 isAfterLast = cursor.isAfterLast(); in run() [all …]
|
/packages/apps/Contacts/src/com/android/contacts/ |
D | JapaneseContactListIndexer.java | 51 public JapaneseContactListIndexer(Cursor cursor, int columnIndex) { in JapaneseContactListIndexer() argument 54 mDataCursor = cursor; in JapaneseContactListIndexer() 56 if (cursor != null) { in JapaneseContactListIndexer() 57 cursor.registerDataSetObserver(this); in JapaneseContactListIndexer() 61 public void setCursor(Cursor cursor) { in setCursor() argument 65 mDataCursor = cursor; in setCursor() 66 if (cursor != null) { in setCursor() 83 final Cursor cursor = mDataCursor; in getPositionForSection() local 85 if (cursor == null || sectionIndex <= 0) { in getPositionForSection() 93 int savedCursorPos = cursor.getPosition(); in getPositionForSection() [all …]
|
/packages/apps/GlobalSearch/tests/src/com/android/globalsearch/ |
D | SuggestionSessionTest.java | 160 final Cursor cursor = mSession.query("a"); in testBasicQuery() local 162 final Snapshot snapshot = getSnapshot(cursor); in testBasicQuery() 173 cursor.requery(); in testBasicQuery() 175 final Snapshot snapshot = getSnapshot(cursor); in testBasicQuery() 187 cursor.requery(); in testBasicQuery() 189 final Snapshot snapshot = getSnapshot(cursor); in testBasicQuery() 236 final Cursor cursor = mSession.query("a"); in testErrorResultNotCached() local 239 cursor.requery(); in testErrorResultNotCached() 241 final Snapshot snapshot = getSnapshot(cursor); in testErrorResultNotCached() 249 final Cursor cursor = mSession.query("a"); in testErrorResultNotCached() local [all …]
|
/packages/apps/Email/src/com/android/email/mail/store/ |
D | LocalStore.java | 270 Cursor cursor = mDb.query("messages", in migrateMessageFlags() local 274 int columnId = cursor.getColumnIndexOrThrow("id"); in migrateMessageFlags() 275 int columnFlags = cursor.getColumnIndexOrThrow("flags"); in migrateMessageFlags() 277 while (cursor.moveToNext()) { in migrateMessageFlags() 278 String oldFlags = cursor.getString(columnFlags); in migrateMessageFlags() 301 int rowId = cursor.getInt(columnId); in migrateMessageFlags() 305 cursor.close(); in migrateMessageFlags() 318 Cursor cursor = null; in getPersonalNamespaces() local 320 cursor = mDb.rawQuery("SELECT name FROM folders", null); in getPersonalNamespaces() 321 while (cursor.moveToNext()) { in getPersonalNamespaces() [all …]
|
/packages/apps/Gallery/src/com/android/camera/gallery/ |
D | ImageList.java | 41 Cursor cursor = Media.query( in getBucketIds() local 49 while (cursor.moveToNext()) { in getBucketIds() 50 hash.put(cursor.getString(1), cursor.getString(0)); in getBucketIds() 54 cursor.close(); in getBucketIds() 116 protected long getImageId(Cursor cursor) { in getImageId() argument 117 return cursor.getLong(INDEX_ID); in getImageId() 121 protected BaseImage loadImageFromCursor(Cursor cursor) { in loadImageFromCursor() argument 122 long id = cursor.getLong(INDEX_ID); in loadImageFromCursor() 123 String dataPath = cursor.getString(INDEX_DATA_PATH); in loadImageFromCursor() 124 long dateTaken = cursor.getLong(INDEX_DATE_TAKEN); in loadImageFromCursor() [all …]
|
D | VideoList.java | 55 protected long getImageId(Cursor cursor) { in getImageId() argument 56 return cursor.getLong(INDEX_ID); in getImageId() 60 protected BaseImage loadImageFromCursor(Cursor cursor) { in loadImageFromCursor() argument 61 long id = cursor.getLong(INDEX_ID); in loadImageFromCursor() 62 String dataPath = cursor.getString(INDEX_DATA_PATH); in loadImageFromCursor() 63 long dateTaken = cursor.getLong(INDEX_DATE_TAKEN); in loadImageFromCursor() 65 dateTaken = cursor.getLong(INDEX_DATE_MODIFIED) * 1000; in loadImageFromCursor() 67 String title = cursor.getString(INDEX_TITLE); in loadImageFromCursor() 68 String displayName = cursor.getString(INDEX_DISPLAY_NAME); in loadImageFromCursor() 69 long miniThumbMagic = cursor.getLong(INDEX_MIMI_THUMB_MAGIC); in loadImageFromCursor() [all …]
|
/packages/apps/Camera/src/com/android/camera/gallery/ |
D | ImageList.java | 41 Cursor cursor = Media.query( in getBucketIds() local 49 while (cursor.moveToNext()) { in getBucketIds() 50 hash.put(cursor.getString(1), cursor.getString(0)); in getBucketIds() 54 cursor.close(); in getBucketIds() 116 protected long getImageId(Cursor cursor) { in getImageId() argument 117 return cursor.getLong(INDEX_ID); in getImageId() 121 protected BaseImage loadImageFromCursor(Cursor cursor) { in loadImageFromCursor() argument 122 long id = cursor.getLong(INDEX_ID); in loadImageFromCursor() 123 String dataPath = cursor.getString(INDEX_DATA_PATH); in loadImageFromCursor() 124 long dateTaken = cursor.getLong(INDEX_DATE_TAKEN); in loadImageFromCursor() [all …]
|
/packages/apps/Mms/src/com/android/mms/ui/ |
D | ManageSimMessages.java | 125 int token, Object cookie, Cursor cursor) { in onQueryComplete() argument 126 mCursor = cursor; in onQueryComplete() 189 final Cursor cursor = (Cursor) mListAdapter.getItem(info.position); in onContextItemSelected() local 193 copyToPhoneMemory(cursor); in onContextItemSelected() 199 deleteFromSim(cursor); in onContextItemSelected() 204 viewMessage(cursor); in onContextItemSelected() 227 private void copyToPhoneMemory(Cursor cursor) { in copyToPhoneMemory() argument 228 String address = cursor.getString( in copyToPhoneMemory() 229 cursor.getColumnIndexOrThrow("address")); in copyToPhoneMemory() 230 String body = cursor.getString(cursor.getColumnIndexOrThrow("body")); in copyToPhoneMemory() [all …]
|
/packages/apps/Launcher/src/com/android/launcher/ |
D | LiveFolderAdapter.java | 48 LiveFolderAdapter(Launcher launcher, LiveFolderInfo info, Cursor cursor) { in LiveFolderAdapter() argument 49 super(launcher, cursor, true); in LiveFolderAdapter() 62 public View newView(Context context, Cursor cursor, ViewGroup parent) { in newView() argument 76 holder.idIndex = cursor.getColumnIndexOrThrow(LiveFolders._ID); in newView() 77 holder.nameIndex = cursor.getColumnIndexOrThrow(LiveFolders.NAME); in newView() 78 holder.descriptionIndex = cursor.getColumnIndex(LiveFolders.DESCRIPTION); in newView() 79 holder.intentIndex = cursor.getColumnIndex(LiveFolders.INTENT); in newView() 80 holder.iconBitmapIndex = cursor.getColumnIndex(LiveFolders.ICON_BITMAP); in newView() 81 holder.iconResourceIndex = cursor.getColumnIndex(LiveFolders.ICON_RESOURCE); in newView() 82 holder.iconPackageIndex = cursor.getColumnIndex(LiveFolders.ICON_PACKAGE); in newView() [all …]
|
/packages/apps/Launcher2/src/com/android/launcher2/ |
D | LiveFolderAdapter.java | 48 LiveFolderAdapter(Launcher launcher, LiveFolderInfo info, Cursor cursor) { in LiveFolderAdapter() argument 49 super(launcher, cursor, true); in LiveFolderAdapter() 62 public View newView(Context context, Cursor cursor, ViewGroup parent) { in newView() argument 76 holder.idIndex = cursor.getColumnIndexOrThrow(LiveFolders._ID); in newView() 77 holder.nameIndex = cursor.getColumnIndexOrThrow(LiveFolders.NAME); in newView() 78 holder.descriptionIndex = cursor.getColumnIndex(LiveFolders.DESCRIPTION); in newView() 79 holder.intentIndex = cursor.getColumnIndex(LiveFolders.INTENT); in newView() 80 holder.iconBitmapIndex = cursor.getColumnIndex(LiveFolders.ICON_BITMAP); in newView() 81 holder.iconResourceIndex = cursor.getColumnIndex(LiveFolders.ICON_RESOURCE); in newView() 82 holder.iconPackageIndex = cursor.getColumnIndex(LiveFolders.ICON_PACKAGE); in newView() [all …]
|
/packages/apps/Phone/src/com/android/phone/ |
D | BluetoothAtPhonebook.java | 66 public Cursor cursor; // result set of last query field in BluetoothAtPhonebook.PhonebookResult 94 Cursor cursor = mContext.getContentResolver().query(Calls.CONTENT_URI, projection, in getLastDialledNumber() local 97 if (cursor.getCount() < 1) { in getLastDialledNumber() 98 cursor.close(); in getLastDialledNumber() 101 cursor.moveToNext(); in getLastDialledNumber() 102 int column = cursor.getColumnIndexOrThrow(Calls.NUMBER); in getLastDialledNumber() 103 String number = cursor.getString(column); in getLastDialledNumber() 104 cursor.close(); in getLastDialledNumber() 149 int size = pbr.cursor.getCount(); in register() 214 if (pbr.cursor.getCount() == 0 || index1 <= 0 || index2 < index1 || in register() [all …]
|
/packages/apps/VoiceDialer/src/com/android/voicedialer/ |
D | VoiceContact.java | 123 Cursor cursor = activity.getContentResolver().query( in getVoiceContacts() local 128 final int phoneIdColumn = cursor.getColumnIndexOrThrow(Phone._ID); in getVoiceContacts() 129 final int typeColumn = cursor.getColumnIndexOrThrow(Phone.TYPE); in getVoiceContacts() 130 final int isPrimaryColumn = cursor.getColumnIndexOrThrow(Phone.IS_PRIMARY); in getVoiceContacts() 131 int labelColumn = cursor.getColumnIndexOrThrow(Phone.LABEL); in getVoiceContacts() 132 final int nameColumn = cursor.getColumnIndexOrThrow(Phone.DISPLAY_NAME); in getVoiceContacts() 134 final int personIdColumn = cursor.getColumnIndexOrThrow(Phone.CONTACT_ID); in getVoiceContacts() 146 cursor.moveToFirst(); in getVoiceContacts() 147 while (cursor.moveToNext()) { in getVoiceContacts() 148 long phoneIdAtCursor = cursor.getLong(phoneIdColumn); in getVoiceContacts() [all …]
|
/packages/apps/Calendar/src/com/android/calendar/ |
D | SelectCalendarsAdapter.java | 79 public SelectCalendarsAdapter(Context context, Cursor cursor) { in SelectCalendarsAdapter() argument 80 super(context, cursor); in SelectCalendarsAdapter() 83 updateIsCheckedArray(cursor.getCount()); in SelectCalendarsAdapter() 87 public View newView(Context context, Cursor cursor, ViewGroup parent) { in newView() argument 92 public void bindView(View view, Context context, Cursor cursor) { in bindView() argument 93 int idColumn = cursor.getColumnIndexOrThrow(Calendars._ID); in bindView() 94 int nameColumn = cursor.getColumnIndexOrThrow(Calendars.DISPLAY_NAME); in bindView() 95 int selectedColumn = cursor.getColumnIndexOrThrow(Calendars.SELECTED); in bindView() 96 int colorColumn = cursor.getColumnIndexOrThrow(Calendars.COLOR); in bindView() 97 … view.findViewById(R.id.color).setBackgroundDrawable(getColorChip(cursor.getInt(colorColumn))); in bindView() [all …]
|
/packages/apps/GlobalSearch/benchmarks/src/com/android/globalsearch/benchmarks/ |
D | SourceLatency.java | 154 Cursor cursor = null; in checkSourceInternal() local 157 cursor = mSearchManager.getSuggestions(searchable, query); in checkSourceInternal() 160 if (cursor == null) { in checkSourceInternal() 164 Log.d(TAG, src + ": " + cursor.getCount() + " rows in " + formatTime(elapsed) in checkSourceInternal() 169 if (cursor != null) { in checkSourceInternal() 170 cursor.close(); in checkSourceInternal() 199 Cursor cursor = null; in run() local 202 cursor = mSearchManager.getSuggestions(mSearchable, mQuery); in run() 205 if (cursor == null) { in run() 209 Log.d(TAG, mSrc + ": " + cursor.getCount() + " rows in " + formatTime(elapsed) in run() [all …]
|
/packages/apps/Mms/src/com/android/mms/transaction/ |
D | RetryScheduler.java | 114 Cursor cursor = SqliteWrapper.query(mContext, mContentResolver, in scheduleRetry() local 117 if (cursor != null) { in scheduleRetry() 119 if ((cursor.getCount() == 1) && cursor.moveToFirst()) { in scheduleRetry() 120 int msgType = cursor.getInt(cursor.getColumnIndexOrThrow( in scheduleRetry() 123 int retryIndex = cursor.getInt(cursor.getColumnIndexOrThrow( in scheduleRetry() 195 int columnIndex = cursor.getColumnIndexOrThrow( in scheduleRetry() 197 long id = cursor.getLong(columnIndex); in scheduleRetry() 205 cursor.close(); in scheduleRetry() 212 Cursor cursor = SqliteWrapper.query(mContext, mContentResolver, in getResponseStatus() local 215 if (cursor.moveToFirst()) { in getResponseStatus() [all …]
|