Home
last modified time | relevance | path

Searched refs:cursor (Results 1 – 25 of 517) sorted by relevance

12345678910>>...21

/packages/apps/Bluetooth/tests/src/com/android/bluetooth/tests/pbap/
DContactCursorFilterTest.java36 Cursor cursor = BluetoothPbapVcardManager.ContactCursorFilter.filterByRange(mc, 1, 2); in testFilterByRangeWithoutDup() local
37 assertEquals(2, cursor.getCount()); in testFilterByRangeWithoutDup()
38 assertEquals(1L, getContactsIdFromCursor(cursor, 0)); in testFilterByRangeWithoutDup()
39 assertEquals(2L, getContactsIdFromCursor(cursor, 1)); in testFilterByRangeWithoutDup()
40 cursor.close(); in testFilterByRangeWithoutDup()
43 cursor = BluetoothPbapVcardManager.ContactCursorFilter.filterByRange(mc, 1, 3); in testFilterByRangeWithoutDup()
44 assertEquals(3, cursor.getCount()); in testFilterByRangeWithoutDup()
45 assertEquals(1L, getContactsIdFromCursor(cursor, 0)); in testFilterByRangeWithoutDup()
46 assertEquals(2L, getContactsIdFromCursor(cursor, 1)); in testFilterByRangeWithoutDup()
47 assertEquals(3L, getContactsIdFromCursor(cursor, 2)); in testFilterByRangeWithoutDup()
[all …]
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
DContactDirectoryManagerTest.java90 MatrixCursor cursor = new MatrixCursor( in query() local
93 cursor.addRow(new Object[] { in query()
101 return cursor; in query()
177 Cursor cursor = mResolver.query(Directory.CONTENT_URI, null, null, null, in testScanAllProviders() local
181 TestUtils.dumpCursor(cursor); in testScanAllProviders()
182 assertEquals(5, cursor.getCount()); in testScanAllProviders()
184 assertTrue(cursor.moveToPosition(0)); in testScanAllProviders()
185 assertDirectoryRow(cursor, "test.package1", "authority1", "account-name1", "account-type1", in testScanAllProviders()
189 assertTrue(cursor.moveToPosition(1)); in testScanAllProviders()
190 assertDirectoryRow(cursor, "test.package1", "authority1", "account-name2", "account-type2", in testScanAllProviders()
[all …]
/packages/providers/MediaProvider/src/com/android/providers/media/
DMediaDocumentsProvider.java106 private void copyNotificationUri(MatrixCursor result, Cursor cursor) { in copyNotificationUri() argument
107 result.setNotificationUri(getContext().getContentResolver(), cursor.getNotificationUri()); in copyNotificationUri()
235 Cursor cursor = null; in queryDocument() local
242 cursor = resolver.query(Images.Media.EXTERNAL_CONTENT_URI, in queryDocument()
245 copyNotificationUri(result, cursor); in queryDocument()
246 if (cursor.moveToFirst()) { in queryDocument()
247 includeImagesBucket(result, cursor); in queryDocument()
251 cursor = resolver.query(Images.Media.EXTERNAL_CONTENT_URI, in queryDocument()
254 copyNotificationUri(result, cursor); in queryDocument()
255 if (cursor.moveToFirst()) { in queryDocument()
[all …]
/packages/inputmethods/OpenWnn/libs/libwnnDictionary/engine/
Dndapi.c41 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/ContactsCommon/src/com/android/contacts/common/util/
DDataStatus.java46 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/experimental/LoaderApp/src/com/android/loaderapp/util/
DDataStatus.java44 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/screensavers/PhotoTable/src/com/android/dreams/phototable/
DPicasaSource.java114 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 …]
DLocalSource.java76 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 …]
DCursorPhotoSource.java42 if (current.cursor == null || current.cursor.isClosed()) { in naturalNext()
46 current.cursor.moveToPosition(current.position); in naturalNext()
47 current.cursor.moveToNext(); in naturalNext()
49 if (!current.cursor.isAfterLast()) { in naturalNext()
50 data = unpackImageData(current.cursor, null); in naturalNext()
51 data.cursor = current.cursor; in naturalNext()
52 data.position = current.cursor.getPosition(); in naturalNext()
59 if (current.cursor == null || current.cursor.isClosed()) { in naturalPrevious()
63 current.cursor.moveToPosition(current.position); in naturalPrevious()
64 current.cursor.moveToPrevious(); in naturalPrevious()
[all …]
/packages/providers/ContactsProvider/src/com/android/providers/contacts/
DPhoneLookupWithStarPrefix.java49 public static Cursor removeNonStarMatchesFromCursor(String number, Cursor cursor) { in removeNonStarMatchesFromCursor() argument
52 Cursor unreturnedCursor = cursor; in removeNonStarMatchesFromCursor()
57 return cursor; in removeNonStarMatchesFromCursor()
62 && !matchingNumberStartsWithStar(cursor)) { in removeNonStarMatchesFromCursor()
63 cursor.moveToPosition(-1); in removeNonStarMatchesFromCursor()
65 return cursor; in removeNonStarMatchesFromCursor()
68 final MatrixCursor matrixCursor = new MatrixCursor(cursor.getColumnNames()); in removeNonStarMatchesFromCursor()
74 cursor.moveToPosition(-1); in removeNonStarMatchesFromCursor()
75 while (cursor.moveToNext()) { in removeNonStarMatchesFromCursor()
76 final int numberIndex = cursor.getColumnIndex(PhoneLookup.NUMBER); in removeNonStarMatchesFromCursor()
[all …]
/packages/apps/Messaging/src/com/android/messaging/datamodel/
DBugleDatabaseOperations.java260 Cursor cursor = null; in getExistingConversation() local
263 cursor = dbWrapper.rawQuery("SELECT " + ConversationColumns._ID in getExistingConversation()
268 if (cursor.moveToFirst()) { in getExistingConversation()
269 Assert.isTrue(cursor.getCount() == 1); in getExistingConversation()
270 conversationId = cursor.getString(0); in getExistingConversation()
273 if (cursor != null) { in getExistingConversation()
274 cursor.close(); in getExistingConversation()
294 Cursor cursor = null; in getThreadId() local
296 cursor = dbWrapper.query(DatabaseHelper.CONVERSATIONS_TABLE, in getThreadId()
302 if (cursor.moveToFirst()) { in getThreadId()
[all …]
/packages/apps/ContactsCommon/src/com/android/contacts/common/model/
DContactLoader.java482 Cursor cursor = resolver.query(entityUri, ContactQuery.COLUMNS, null, null, in loadContactEntity() local
484 if (cursor == null) { in loadContactEntity()
490 if (!cursor.moveToFirst()) { in loadContactEntity()
491 cursor.close(); in loadContactEntity()
496 Contact contact = loadContactHeaderData(cursor, contactUri); in loadContactEntity()
507 long rawContactId = cursor.getLong(ContactQuery.RAW_CONTACT_ID); in loadContactEntity()
512 rawContact = new RawContact(loadRawContactValues(cursor)); in loadContactEntity()
515 if (!cursor.isNull(ContactQuery.DATA_ID)) { in loadContactEntity()
516 ContentValues data = loadDataValues(cursor); in loadContactEntity()
519 if (!cursor.isNull(ContactQuery.PRESENCE) in loadContactEntity()
[all …]
/packages/apps/ContactsCommon/src/com/android/contacts/common/list/
DContactListAdapter.java173 public Uri getContactUri(int partitionIndex, Cursor cursor) { in getContactUri() argument
174 long contactId = cursor.getLong(ContactQuery.CONTACT_ID); in getContactUri()
175 String lookupKey = cursor.getString(ContactQuery.CONTACT_LOOKUP_KEY); in getContactUri()
186 final Cursor cursor = (Cursor) getItem(position); in isEnterpriseContact() local
187 if (cursor != null) { in isEnterpriseContact()
188 final long contactId = cursor.getLong(ContactQuery.CONTACT_ID); in isEnterpriseContact()
200 public boolean isSelectedContact(int partitionIndex, Cursor cursor) { in isSelectedContact() argument
207 cursor.getString(ContactQuery.CONTACT_LOOKUP_KEY))) { in isSelectedContact()
212 && getSelectedContactId() == cursor.getLong(ContactQuery.CONTACT_ID); in isSelectedContact()
217 Context context, int partition, Cursor cursor, int position, ViewGroup parent) { in newView() argument
[all …]
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/
DCalendarProvider2Test.java277 Cursor cursor = mResolver.query(mEventsUri, null, null, null, null); in execute() local
278 assertEquals(expected, cursor.getCount()); in execute()
279 cursor.close(); in execute()
293 Cursor cursor = mResolver.query(mEventsUri, null, null, null, null); in execute() local
294 dumpCursor(cursor); in execute()
295 cursor.close(); in execute()
315 Cursor cursor = queryInstances(begin, end); in execute() local
316 dumpCursor(cursor); in execute()
317 cursor.close(); in execute()
340 Cursor cursor = queryInstances(begin, end); in execute() local
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/dictionarypack/
DMetadataDbHelper.java360 final Cursor cursor = defaultDb.query(MetadataDbHelper.CLIENT_TABLE_NAME, in getMetadataUriAsString() local
365 if (!cursor.moveToFirst()) return null; in getMetadataUriAsString()
366 return sMetadataUriGetter.getUri(context, cursor.getString(0)); in getMetadataUriAsString()
368 cursor.close(); in getMetadataUriAsString()
389 final Cursor cursor = MetadataDbHelper.queryClientIds(context); in saveLastUpdateTimeOfUri() local
390 if (null == cursor) return; in saveLastUpdateTimeOfUri()
392 if (!cursor.moveToFirst()) return; in saveLastUpdateTimeOfUri()
394 final String clientId = cursor.getString(0); in saveLastUpdateTimeOfUri()
401 } while (cursor.moveToNext()); in saveLastUpdateTimeOfUri()
403 cursor.close(); in saveLastUpdateTimeOfUri()
[all …]
/packages/apps/Dialer/tests/src/com/android/dialer/database/
DFilteredNumberProviderTest.java62 Cursor cursor = mResolver.query( in testQuery() local
64 assertNotNull(cursor); in testQuery()
65 assertEquals(cursor.getCount(), 0); in testQuery()
66 cursor.close(); in testQuery()
75 Cursor cursor = mResolver.query(uri, null, null, null, null); in testInsertAndQuery() local
76 assertNotNull(cursor); in testInsertAndQuery()
77 assertEquals(cursor.getCount(), 1); in testInsertAndQuery()
79 cursor.moveToFirst(); in testInsertAndQuery()
80 assertCursorValues(cursor, testValues); in testInsertAndQuery()
81 cursor.close(); in testInsertAndQuery()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/gadget/
DWidgetDatabaseHelper.java78 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/apps/Bluetooth/src/com/android/bluetooth/opp/
DBluetoothOppService.java438 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 …]
DBluetoothOppNotification.java215 Cursor cursor = mContext.getContentResolver().query(BluetoothShare.CONTENT_URI, null, in updateActiveNotification() local
217 if (cursor == null) { in updateActiveNotification()
223 if (cursor.getCount() > 0) { in updateActiveNotification()
231 final int timestampIndex = cursor.getColumnIndexOrThrow(BluetoothShare.TIMESTAMP); in updateActiveNotification()
232 final int directionIndex = cursor.getColumnIndexOrThrow(BluetoothShare.DIRECTION); in updateActiveNotification()
233 final int idIndex = cursor.getColumnIndexOrThrow(BluetoothShare._ID); in updateActiveNotification()
234 final int totalBytesIndex = cursor.getColumnIndexOrThrow(BluetoothShare.TOTAL_BYTES); in updateActiveNotification()
235 final int currentBytesIndex = cursor.getColumnIndexOrThrow(BluetoothShare.CURRENT_BYTES); in updateActiveNotification()
236 final int dataIndex = cursor.getColumnIndexOrThrow(BluetoothShare._DATA); in updateActiveNotification()
237 final int filenameHintIndex = cursor.getColumnIndexOrThrow(BluetoothShare.FILENAME_HINT); in updateActiveNotification()
[all …]
/packages/providers/DownloadProvider/src/com/android/providers/downloads/
DDownloadStorageProvider.java88 private void copyNotificationUri(MatrixCursor result, Cursor cursor) { in copyNotificationUri() argument
89 result.setNotificationUri(getContext().getContentResolver(), cursor.getNotificationUri()); in copyNotificationUri()
189 Cursor cursor = null; in queryDocument() local
191 cursor = mDm.query(new Query().setFilterById(Long.parseLong(docId))); in queryDocument()
192 copyNotificationUri(result, cursor); in queryDocument()
193 if (cursor.moveToFirst()) { in queryDocument()
196 includeDownloadFromCursor(result, cursor); in queryDocument()
199 IoUtils.closeQuietly(cursor); in queryDocument()
218 Cursor cursor = null; in queryChildDocuments() local
220 cursor = mDm.query(new DownloadManager.Query().setOnlyIncludeVisibleInDownloadsUi(true) in queryChildDocuments()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/data/
DLocalVideo.java75 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 …]
DLocalImage.java107 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/apps/Messaging/src/com/android/messaging/sms/
DBugleApnSettingsLoader.java391 Cursor cursor = null; in loadFromSystem() local
396 cursor = querySystem(uri, true/*checkCurrent*/, apnName); in loadFromSystem()
397 if (cursor != null) { in loadFromSystem()
400 cursor = querySystem(uri, false/*checkCurrent*/, apnName); in loadFromSystem()
401 if (cursor != null) { in loadFromSystem()
404 cursor = querySystem(uri, true/*checkCurrent*/, null/*apnName*/); in loadFromSystem()
405 if (cursor != null) { in loadFromSystem()
408 cursor = querySystem(uri, false/*checkCurrent*/, null/*apnName*/); in loadFromSystem()
415 if (cursor == null) { in loadFromSystem()
419 if (cursor.moveToFirst()) { in loadFromSystem()
[all …]
/packages/apps/Dialer/src/com/android/dialer/calllog/
DCallLogGroupBuilder.java105 public void addGroups(Cursor cursor) { in addGroups() argument
106 final int count = cursor.getCount(); in addGroups()
116 cursor.moveToFirst(); in addGroups()
119 final long firstDate = cursor.getLong(CallLogQuery.DATE); in addGroups()
120 final long firstRowId = cursor.getLong(CallLogQuery.ID); in addGroups()
125 String groupNumber = cursor.getString(CallLogQuery.NUMBER); in addGroups()
127 ? cursor.getString(CallLogQuery.POST_DIAL_DIGITS) : ""; in addGroups()
129 ? cursor.getString(CallLogQuery.VIA_NUMBER) : ""; in addGroups()
130 int groupCallType = cursor.getInt(CallLogQuery.CALL_TYPE); in addGroups()
131 String groupAccountComponentName = cursor.getString(CallLogQuery.ACCOUNT_COMPONENT_NAME); in addGroups()
[all …]
/packages/apps/UnifiedEmail/src/com/android/mail/providers/
DAccount.java311 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 …]

12345678910>>...21