/packages/providers/MediaProvider/src/com/android/providers/media/ |
D | MediaDocumentsProvider.java | 105 private void copyNotificationUri(MatrixCursor result, Cursor cursor) { in copyNotificationUri() argument 106 result.setNotificationUri(getContext().getContentResolver(), cursor.getNotificationUri()); in copyNotificationUri() 205 Cursor cursor = null; in queryDocument() local 212 cursor = resolver.query(Images.Media.EXTERNAL_CONTENT_URI, in queryDocument() 215 copyNotificationUri(result, cursor); in queryDocument() 216 if (cursor.moveToFirst()) { in queryDocument() 217 includeImagesBucket(result, cursor); in queryDocument() 221 cursor = resolver.query(Images.Media.EXTERNAL_CONTENT_URI, in queryDocument() 224 copyNotificationUri(result, cursor); in queryDocument() 225 if (cursor.moveToFirst()) { in queryDocument() [all …]
|
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ |
D | ContactDirectoryManagerTest.java | 89 MatrixCursor cursor = new MatrixCursor( in query() local 92 cursor.addRow(new Object[] { in query() 100 return cursor; in query() 176 Cursor cursor = mResolver.query(Directory.CONTENT_URI, null, null, null, null); in testScanAllProviders() local 177 assertEquals(5, cursor.getCount()); in testScanAllProviders() 179 cursor.moveToPosition(2); in testScanAllProviders() 180 assertDirectoryRow(cursor, "test.package1", "authority1", "account-name1", "account-type1", in testScanAllProviders() 184 cursor.moveToNext(); in testScanAllProviders() 185 assertDirectoryRow(cursor, "test.package1", "authority1", "account-name2", "account-type2", in testScanAllProviders() 189 cursor.moveToNext(); in testScanAllProviders() [all …]
|
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/ |
D | CalendarProvider2Test.java | 269 Cursor cursor = mResolver.query(mEventsUri, null, null, null, null); in execute() local 270 assertEquals(expected, cursor.getCount()); in execute() 271 cursor.close(); in execute() 285 Cursor cursor = mResolver.query(mEventsUri, null, null, null, null); in execute() local 286 dumpCursor(cursor); in execute() 287 cursor.close(); in execute() 307 Cursor cursor = queryInstances(begin, end); in execute() local 308 dumpCursor(cursor); in execute() 309 cursor.close(); in execute() 332 Cursor cursor = queryInstances(begin, end); in execute() local [all …]
|
D | SyncCalendarTest.java | 74 Cursor cursor; in testEditEventTitle() local 75 cursor = mResolver.query(mEventsUri, null, null, null, null); in testEditEventTitle() 77 int countBeforeNewEvent = cursor.getCount(); in testEditEventTitle() 78 cursor.moveToNext(); in testEditEventTitle() 81 String newTitle = cursor.getString(cursor.getColumnIndex("title")) + time.toString(); in testEditEventTitle() 82 long dtStart = cursor.getLong(cursor.getColumnIndex("dtstart")); in testEditEventTitle() 83 long dtEnd = cursor.getLong(cursor.getColumnIndex("dtend")); in testEditEventTitle() 86 long eventId = cursor.getLong(cursor.getColumnIndex("_id")); in testEditEventTitle() 89 cursor = mResolver.query(mEventsUri, null, null, null, null); in testEditEventTitle() 92 while (cursor.moveToNext()) { in testEditEventTitle() [all …]
|
/packages/apps/ContactsCommon/src/com/android/contacts/common/model/ |
D | ContactLoader.java | 464 Cursor cursor = resolver.query(entityUri, ContactQuery.COLUMNS, null, null, in loadContactEntity() local 466 if (cursor == null) { in loadContactEntity() 472 if (!cursor.moveToFirst()) { in loadContactEntity() 473 cursor.close(); in loadContactEntity() 478 Contact contact = loadContactHeaderData(cursor, contactUri); in loadContactEntity() 489 long rawContactId = cursor.getLong(ContactQuery.RAW_CONTACT_ID); in loadContactEntity() 494 rawContact = new RawContact(loadRawContactValues(cursor)); in loadContactEntity() 497 if (!cursor.isNull(ContactQuery.DATA_ID)) { in loadContactEntity() 498 ContentValues data = loadDataValues(cursor); in loadContactEntity() 501 if (!cursor.isNull(ContactQuery.PRESENCE) in loadContactEntity() [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/inputmethods/LatinIME/java/src/com/android/inputmethod/dictionarypack/ |
D | MetadataDbHelper.java | 330 final Cursor cursor = defaultDb.query(MetadataDbHelper.CLIENT_TABLE_NAME, in getMetadataUriAsString() local 336 if (!cursor.moveToFirst()) return null; in getMetadataUriAsString() 337 return MetadataUriGetter.getUri(context, cursor.getString(0), cursor.getString(1)); in getMetadataUriAsString() 339 cursor.close(); in getMetadataUriAsString() 360 final Cursor cursor = MetadataDbHelper.queryClientIds(context); in saveLastUpdateTimeOfUri() local 361 if (null == cursor) return; in saveLastUpdateTimeOfUri() 363 if (!cursor.moveToFirst()) return; in saveLastUpdateTimeOfUri() 365 final String clientId = cursor.getString(0); in saveLastUpdateTimeOfUri() 372 } while (cursor.moveToNext()); in saveLastUpdateTimeOfUri() 374 cursor.close(); in saveLastUpdateTimeOfUri() [all …]
|
/packages/apps/Bluetooth/src/com/android/bluetooth/opp/ |
D | BluetoothOppService.java | 438 Cursor cursor = getContentResolver().query(BluetoothShare.CONTENT_URI, null, null, in run() local 441 if (cursor == null) { in run() 445 cursor.moveToFirst(); in run() 450 boolean isAfterLast = cursor.isAfterLast(); in run() 452 int idColumn = cursor.getColumnIndexOrThrow(BluetoothShare._ID); in run() 482 int id = cursor.getInt(idColumn); in run() 485 insertShare(cursor, arrayPos); in run() 487 if (shouldScanFile(arrayPos) && (!scanFile(cursor, arrayPos))) { in run() 498 cursor.moveToNext(); in run() 499 isAfterLast = cursor.isAfterLast(); in run() [all …]
|
D | BluetoothOppNotification.java | 213 Cursor cursor = mContext.getContentResolver().query(BluetoothShare.CONTENT_URI, null, in updateActiveNotification() local 215 if (cursor == null) { in updateActiveNotification() 221 if (cursor.getCount() > 0) { in updateActiveNotification() 229 final int timestampIndex = cursor.getColumnIndexOrThrow(BluetoothShare.TIMESTAMP); in updateActiveNotification() 230 final int directionIndex = cursor.getColumnIndexOrThrow(BluetoothShare.DIRECTION); in updateActiveNotification() 231 final int idIndex = cursor.getColumnIndexOrThrow(BluetoothShare._ID); in updateActiveNotification() 232 final int totalBytesIndex = cursor.getColumnIndexOrThrow(BluetoothShare.TOTAL_BYTES); in updateActiveNotification() 233 final int currentBytesIndex = cursor.getColumnIndexOrThrow(BluetoothShare.CURRENT_BYTES); in updateActiveNotification() 234 final int dataIndex = cursor.getColumnIndexOrThrow(BluetoothShare._DATA); in updateActiveNotification() 235 final int filenameHintIndex = cursor.getColumnIndexOrThrow(BluetoothShare.FILENAME_HINT); in updateActiveNotification() [all …]
|
/packages/apps/Mms/src/com/android/mms/util/ |
D | Recycler.java | 81 Cursor cursor = getAllThreads(context); in deleteOldMessages() local 84 while (cursor.moveToNext()) { in deleteOldMessages() 85 long threadId = getThreadId(cursor); in deleteOldMessages() 89 cursor.close(); in deleteOldMessages() 123 abstract protected long getThreadId(Cursor cursor); in getThreadId() argument 129 abstract protected void dumpMessage(Cursor cursor, Context context); in dumpMessage() argument 179 protected long getThreadId(Cursor cursor) { in getThreadId() argument 180 return cursor.getLong(ID); in getThreadId() 185 Cursor cursor = SqliteWrapper.query(context, resolver, in getAllThreads() local 189 return cursor; in getAllThreads() [all …]
|
/packages/screensavers/PhotoTable/src/com/android/dreams/phototable/ |
D | PicasaSource.java | 114 data.cursor = mResolver.query(picasaUriBuilder.build(), in openCursor() 121 if (data.cursor == null) { in findPosition() 124 if (data.cursor != null) { in findPosition() 125 int idIndex = data.cursor.getColumnIndex(PICASA_ID); in findPosition() 126 data.cursor.moveToPosition(-1); in findPosition() 127 while (data.position == -1 && data.cursor.moveToNext()) { in findPosition() 128 String id = data.cursor.getString(idIndex); in findPosition() 130 data.position = data.cursor.getPosition(); in findPosition() 142 protected ImageData unpackImageData(Cursor cursor, ImageData data) { in unpackImageData() argument 146 int idIndex = cursor.getColumnIndex(PICASA_ID); in unpackImageData() [all …]
|
D | LocalSource.java | 76 Cursor cursor = mResolver.query(uri, projection, null, null, null); in findAlbums() local 77 if (cursor != null) { in findAlbums() 78 cursor.moveToPosition(-1); in findAlbums() 80 int dataIndex = cursor.getColumnIndex(MediaStore.Images.Media.DATA); in findAlbums() 81 int bucketIndex = cursor.getColumnIndex(MediaStore.Images.Media.BUCKET_ID); in findAlbums() 82 int nameIndex = cursor.getColumnIndex(MediaStore.Images.Media.BUCKET_DISPLAY_NAME); in findAlbums() 83 int updatedIndex = cursor.getColumnIndex(MediaStore.Images.Media.DATE_TAKEN); in findAlbums() 88 while (cursor.moveToNext()) { in findAlbums() 89 String id = constructId(internal, cursor.getString(bucketIndex)); in findAlbums() 97 data.thumbnailUrl = cursor.getString(dataIndex); in findAlbums() [all …]
|
/packages/apps/UnifiedEmail/src/com/android/mail/providers/ |
D | Account.java | 311 public Account buildFrom(Cursor cursor) { in buildFrom() argument 312 return new Account(cursor); in buildFrom() 445 protected Account(Cursor cursor) { in Account() argument 446 displayName = cursor.getString(cursor.getColumnIndex(UIProvider.AccountColumns.NAME)); in Account() 447 senderName = cursor.getString(cursor.getColumnIndex(UIProvider.AccountColumns.SENDER_NAME)); in Account() 448 type = cursor.getString(cursor.getColumnIndex(UIProvider.AccountColumns.TYPE)); in Account() 449 accountManagerName = cursor.getString( in Account() 450 cursor.getColumnIndex(UIProvider.AccountColumns.ACCOUNT_MANAGER_NAME)); in Account() 451 accountId = cursor.getString( in Account() 452 cursor.getColumnIndex(UIProvider.AccountColumns.ACCOUNT_ID)); in Account() [all …]
|
D | Settings.java | 167 public Settings(Cursor cursor) { in Settings() argument 169 cursor.getString(cursor.getColumnIndex(SettingsColumns.SIGNATURE))); in Settings() 170 mAutoAdvance = cursor.getInt(cursor.getColumnIndex(SettingsColumns.AUTO_ADVANCE)); in Settings() 171 snapHeaders = cursor.getInt(cursor.getColumnIndex(SettingsColumns.SNAP_HEADERS)); in Settings() 172 replyBehavior = cursor.getInt(cursor.getColumnIndex(SettingsColumns.REPLY_BEHAVIOR)); in Settings() 173 convListIcon = cursor.getInt(cursor.getColumnIndex(SettingsColumns.CONV_LIST_ICON)); in Settings() 174 confirmDelete = cursor.getInt(cursor.getColumnIndex(SettingsColumns.CONFIRM_DELETE)) != 0; in Settings() 175 confirmArchive = cursor.getInt(cursor.getColumnIndex(SettingsColumns.CONFIRM_ARCHIVE)) != 0; in Settings() 176 confirmSend = cursor.getInt(cursor.getColumnIndex(SettingsColumns.CONFIRM_SEND)) != 0; in Settings() 178 cursor.getString(cursor.getColumnIndex(SettingsColumns.DEFAULT_INBOX))); in Settings() [all …]
|
/packages/providers/DownloadProvider/src/com/android/providers/downloads/ |
D | DownloadStorageProvider.java | 83 private void copyNotificationUri(MatrixCursor result, Cursor cursor) { in copyNotificationUri() argument 84 result.setNotificationUri(getContext().getContentResolver(), cursor.getNotificationUri()); in copyNotificationUri() 166 Cursor cursor = null; in queryDocument() local 168 cursor = mDm.query(new Query().setFilterById(Long.parseLong(docId))); in queryDocument() 169 copyNotificationUri(result, cursor); in queryDocument() 170 if (cursor.moveToFirst()) { in queryDocument() 171 includeDownloadFromCursor(result, cursor); in queryDocument() 174 IoUtils.closeQuietly(cursor); in queryDocument() 188 Cursor cursor = null; in queryChildDocuments() local 190 cursor = mDm.query(new DownloadManager.Query().setOnlyIncludeVisibleInDownloadsUi(true) in queryChildDocuments() [all …]
|
/packages/apps/Mms/src/com/android/mms/ui/ |
D | MessageListAdapter.java | 157 public void bindView(View view, Context context, Cursor cursor) { in bindView() argument 159 String type = cursor.getString(mColumnsMap.mColumnMsgType); in bindView() 160 long msgId = cursor.getLong(mColumnsMap.mColumnMsgId); in bindView() 162 MessageItem msgItem = getCachedMessageItem(type, msgId, cursor); in bindView() 165 int position = cursor.getPosition(); in bindView() 219 public View newView(Context context, Cursor cursor, ViewGroup parent) { in newView() argument 220 int boxType = getItemViewType(cursor); in newView() 245 private boolean isCursorValid(Cursor cursor) { in isCursorValid() argument 247 if (cursor == null || cursor.isClosed() || cursor.isBeforeFirst() || cursor.isAfterLast()) { in isCursorValid() 282 Cursor cursor = (Cursor)getItem(position); in getItemViewType() local [all …]
|
/packages/apps/ContactsCommon/src/com/android/contacts/common/list/ |
D | PhoneNumberListAdapter.java | 282 public Uri getDataUri(int partitionIndex, Cursor cursor) { in getDataUri() argument 286 final long phoneId = cursor.getLong(PhoneQuery.PHONE_ID); in getDataUri() 294 Context context, int partition, Cursor cursor, int position, ViewGroup parent) { in newView() argument 295 ContactListItemView view = super.newView(context, partition, cursor, position, parent); in newView() 302 protected void setHighlight(ContactListItemView view, Cursor cursor) { in setHighlight() argument 309 protected int getResultCount(Cursor cursor) { in getResultCount() argument 310 if (cursor == null) { in getResultCount() 313 cursor.moveToPosition(-1); in getResultCount() 316 while(cursor.moveToNext()) { in getResultCount() 317 final long contactId = cursor.getLong(PhoneQuery.CONTACT_ID); in getResultCount() [all …]
|
D | ContactListAdapter.java | 163 public Uri getContactUri(int partitionIndex, Cursor cursor) { in getContactUri() argument 164 long contactId = cursor.getLong(ContactQuery.CONTACT_ID); in getContactUri() 165 String lookupKey = cursor.getString(ContactQuery.CONTACT_LOOKUP_KEY); in getContactUri() 181 public boolean isSelectedContact(int partitionIndex, Cursor cursor) { in isSelectedContact() argument 188 cursor.getString(ContactQuery.CONTACT_LOOKUP_KEY))) { in isSelectedContact() 193 && getSelectedContactId() == cursor.getLong(ContactQuery.CONTACT_ID); in isSelectedContact() 198 Context context, int partition, Cursor cursor, int position, ViewGroup parent) { in newView() argument 199 ContactListItemView view = super.newView(context, partition, cursor, position, parent); in newView() 211 Cursor cursor) { in bindSectionHeaderAndDivider() argument 221 protected void bindPhoto(final ContactListItemView view, int partitionIndex, Cursor cursor) { in bindPhoto() argument [all …]
|
D | ContactEntryListAdapter.java | 119 Context context, int partition, Cursor cursor, int position, ViewGroup parent) { in newView() argument 127 protected void bindView(View itemView, int partition, Cursor cursor, int position) { in bindView() argument 393 public void changeDirectories(Cursor cursor) { in changeDirectories() argument 394 if (cursor.getCount() == 0) { in changeDirectories() 403 int idColumnIndex = cursor.getColumnIndex(Directory._ID); in changeDirectories() 404 int directoryTypeColumnIndex = cursor.getColumnIndex(DirectoryListLoader.DIRECTORY_TYPE); in changeDirectories() 405 int displayNameColumnIndex = cursor.getColumnIndex(Directory.DISPLAY_NAME); in changeDirectories() 406 int photoSupportColumnIndex = cursor.getColumnIndex(Directory.PHOTO_SUPPORT); in changeDirectories() 410 cursor.moveToPosition(-1); in changeDirectories() 411 while (cursor.moveToNext()) { in changeDirectories() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/gadget/ |
D | WidgetDatabaseHelper.java | 78 private Entry(int id, Cursor cursor) { in Entry() argument 80 type = cursor.getInt(INDEX_WIDGET_TYPE); in Entry() 82 imageUri = cursor.getString(INDEX_IMAGE_URI); in Entry() 83 imageData = cursor.getBlob(INDEX_PHOTO_BLOB); in Entry() 85 albumPath = cursor.getString(INDEX_ALBUM_PATH); in Entry() 86 relativePath = cursor.getString(INDEX_RELATIVE_PATH); in Entry() 90 private Entry(Cursor cursor) { in Entry() argument 91 this(cursor.getInt(INDEX_APPWIDGET_ID), cursor); in Entry() 112 Cursor cursor = db.query("photos", in saveData() local 115 if (cursor == null) return; in saveData() [all …]
|
/packages/experimental/LoaderApp/src/com/android/loaderapp/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/ContactsCommon/src/com/android/contacts/common/util/ |
D | DataStatus.java | 46 public DataStatus(Cursor cursor) { in DataStatus() argument 48 fromCursor(cursor); in DataStatus() 55 public void possibleUpdate(Cursor cursor) { in possibleUpdate() argument 56 final boolean hasStatus = !isNull(cursor, Data.STATUS); in possibleUpdate() 57 final boolean hasTimestamp = !isNull(cursor, Data.STATUS_TIMESTAMP); in possibleUpdate() 66 final long newTimestamp = getLong(cursor, Data.STATUS_TIMESTAMP, -1); in possibleUpdate() 73 fromCursor(cursor); in possibleUpdate() 76 private void fromCursor(Cursor cursor) { in fromCursor() argument 77 mPresence = getInt(cursor, Data.PRESENCE, -1); in fromCursor() 78 mStatus = getString(cursor, Data.STATUS); in fromCursor() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/data/ |
D | LocalVideo.java | 75 public LocalVideo(Path path, GalleryApp application, Cursor cursor) { in LocalVideo() argument 78 loadFromCursor(cursor); in LocalVideo() 86 Cursor cursor = LocalAlbum.getItemCursor(resolver, uri, PROJECTION, id); in LocalVideo() local 87 if (cursor == null) { in LocalVideo() 91 if (cursor.moveToNext()) { in LocalVideo() 92 loadFromCursor(cursor); in LocalVideo() 97 cursor.close(); in LocalVideo() 101 private void loadFromCursor(Cursor cursor) { in loadFromCursor() argument 102 id = cursor.getInt(INDEX_ID); in loadFromCursor() 103 caption = cursor.getString(INDEX_CAPTION); in loadFromCursor() [all …]
|
D | LocalImage.java | 107 public LocalImage(Path path, GalleryApp application, Cursor cursor) { in LocalImage() argument 110 loadFromCursor(cursor); in LocalImage() 118 Cursor cursor = LocalAlbum.getItemCursor(resolver, uri, PROJECTION, id); in LocalImage() local 119 if (cursor == null) { in LocalImage() 123 if (cursor.moveToNext()) { in LocalImage() 124 loadFromCursor(cursor); in LocalImage() 129 cursor.close(); in LocalImage() 133 private void loadFromCursor(Cursor cursor) { in loadFromCursor() argument 134 id = cursor.getInt(INDEX_ID); in loadFromCursor() 135 caption = cursor.getString(INDEX_CAPTION); in loadFromCursor() [all …]
|
/packages/providers/CalendarProvider/src/com/android/providers/calendar/ |
D | CalendarDatabaseHelper.java | 1133 Cursor cursor = null; in removeOrphans() local 1136 cursor = db.rawQuery(SELECT_ATTENDEES_ORPHANS, null); in removeOrphans() 1137 DatabaseUtils.dumpCursor(cursor); in removeOrphans() 1139 if (cursor != null) { in removeOrphans() 1140 cursor.close(); in removeOrphans() 1147 cursor = null; in removeOrphans() 1150 cursor = db.rawQuery(SELECT_REMINDERS_ORPHANS, null); in removeOrphans() 1151 DatabaseUtils.dumpCursor(cursor); in removeOrphans() 1153 if (cursor != null) { in removeOrphans() 1154 cursor.close(); in removeOrphans() [all …]
|