Home
last modified time | relevance | path

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

12345678910>>...16

/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
DContactDirectoryManagerTest.java89 MatrixCursor cursor = new MatrixCursor( in query() local
92 cursor.addRow(new Object[] { in query()
100 return cursor; in query()
173 Cursor cursor = mResolver.query(Directory.CONTENT_URI, null, null, null, null); in testScanAllProviders() local
174 assertEquals(5, cursor.getCount()); in testScanAllProviders()
176 cursor.moveToPosition(2); in testScanAllProviders()
177 assertDirectoryRow(cursor, "test.package1", "authority1", "account-name1", "account-type1", in testScanAllProviders()
181 cursor.moveToNext(); in testScanAllProviders()
182 assertDirectoryRow(cursor, "test.package1", "authority1", "account-name2", "account-type2", in testScanAllProviders()
186 cursor.moveToNext(); in testScanAllProviders()
[all …]
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/
DCalendarProvider2Test.java269 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 …]
DSyncCalendarTest.java74 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/Contacts/src/com/android/contacts/model/
DContactLoader.java356 Cursor cursor = resolver.query(entityUri, ContactQuery.COLUMNS, null, null, in loadContactEntity() local
358 if (cursor == null) { in loadContactEntity()
364 if (!cursor.moveToFirst()) { in loadContactEntity()
365 cursor.close(); in loadContactEntity()
370 Contact contact = loadContactHeaderData(cursor, contactUri); in loadContactEntity()
381 long rawContactId = cursor.getLong(ContactQuery.RAW_CONTACT_ID); in loadContactEntity()
386 rawContact = new RawContact(loadRawContactValues(cursor)); in loadContactEntity()
389 if (!cursor.isNull(ContactQuery.DATA_ID)) { in loadContactEntity()
390 ContentValues data = loadDataValues(cursor); in loadContactEntity()
393 if (!cursor.isNull(ContactQuery.PRESENCE) in loadContactEntity()
[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/Bluetooth/src/com/android/bluetooth/opp/
DBluetoothOppService.java426 Cursor cursor = getContentResolver().query(BluetoothShare.CONTENT_URI, null, null, in run() local
429 if (cursor == null) { in run()
433 cursor.moveToFirst(); in run()
438 boolean isAfterLast = cursor.isAfterLast(); in run()
440 int idColumn = cursor.getColumnIndexOrThrow(BluetoothShare._ID); in run()
469 int id = cursor.getInt(idColumn); in run()
472 insertShare(cursor, arrayPos); in run()
474 if (shouldScanFile(arrayPos) && (!scanFile(cursor, arrayPos))) { in run()
485 cursor.moveToNext(); in run()
486 isAfterLast = cursor.isAfterLast(); in run()
[all …]
DBluetoothOppNotification.java213 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/Email/src/com/android/email/activity/
DMailboxFragmentAdapter.java202 public void bindView(View view, Context context, Cursor cursor) { in bindView() argument
204 bindListItem(view, context, cursor); in bindView()
206 bindListHeader(view, context, cursor); in bindView()
211 public View newView(Context context, Cursor cursor, ViewGroup parent) { in newView() argument
212 if (cursor.getInt(cursor.getColumnIndex(ROW_TYPE)) == ROW_TYPE_HEADER) { in newView()
242 private static boolean isAccountRow(Cursor cursor) { in isAccountRow() argument
243 return getRowType(cursor) == ROW_TYPE_ACCOUNT; in isAccountRow()
247 private static boolean isHeaderRow(Cursor cursor) { in isHeaderRow() argument
248 return getRowType(cursor) == ROW_TYPE_HEADER; in isHeaderRow()
255 private static boolean isMailboxRow(Cursor cursor) { in isMailboxRow() argument
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/dictionarypack/
DMetadataDbHelper.java288 final Cursor cursor = defaultDb.query(MetadataDbHelper.CLIENT_TABLE_NAME, in getMetadataUriAsString() local
294 if (!cursor.moveToFirst()) return null; in getMetadataUriAsString()
295 return MetadataUriGetter.getUri(context, cursor.getString(0), cursor.getString(1)); in getMetadataUriAsString()
297 cursor.close(); in getMetadataUriAsString()
318 final Cursor cursor = MetadataDbHelper.queryClientIds(context); in saveLastUpdateTimeOfUri() local
319 if (null == cursor) return; in saveLastUpdateTimeOfUri()
321 if (!cursor.moveToFirst()) return; in saveLastUpdateTimeOfUri()
323 final String clientId = cursor.getString(0); in saveLastUpdateTimeOfUri()
330 } while (cursor.moveToNext()); in saveLastUpdateTimeOfUri()
332 cursor.close(); in saveLastUpdateTimeOfUri()
[all …]
/packages/apps/Mms/src/com/android/mms/util/
DRecycler.java80 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
178 protected long getThreadId(Cursor cursor) { in getThreadId() argument
179 return cursor.getLong(ID); in getThreadId()
184 Cursor cursor = SqliteWrapper.query(context, resolver, in getAllThreads() local
188 return cursor; in getAllThreads()
[all …]
/packages/apps/Gallery2/tests/src/com/android/photos/data/
DPhotoProviderTest.java92 Cursor cursor = db.query(Metadata.TABLE, projection, null, null, null, null, null); in setUp() local
93 cursor.moveToNext(); in setUp()
94 mMetadataId = cursor.getLong(0); in setUp()
95 cursor.close(); in setUp()
142 Cursor cursor = mResolver.query(Metadata.CONTENT_URI, null, null, null, null); in testDeleteMetadataId() local
143 assertEquals(0, cursor.getCount()); in testDeleteMetadataId()
144 cursor.close(); in testDeleteMetadataId()
156 Cursor cursor = mResolver.query(Photos.CONTENT_URI, PhotoDatabaseUtils.PROJECTION_PHOTOS, in testDeleteAlbumCascade() local
158 assertEquals(0, cursor.getCount()); in testDeleteAlbumCascade()
159 cursor.close(); in testDeleteAlbumCascade()
[all …]
/packages/screensavers/PhotoTable/src/com/android/dreams/phototable/
DPicasaSource.java116 data.cursor = mResolver.query(picasaUriBuilder.build(), in openCursor()
123 if (data.cursor == null) { in findPosition()
126 if (data.cursor != null) { in findPosition()
127 int idIndex = data.cursor.getColumnIndex(PICASA_ID); in findPosition()
128 data.cursor.moveToPosition(-1); in findPosition()
129 while (data.position == -1 && data.cursor.moveToNext()) { in findPosition()
130 String id = data.cursor.getString(idIndex); in findPosition()
132 data.position = data.cursor.getPosition(); in findPosition()
144 protected ImageData unpackImageData(Cursor cursor, ImageData data) { in unpackImageData() argument
148 int idIndex = cursor.getColumnIndex(PICASA_ID); in unpackImageData()
[all …]
DLocalSource.java65 Cursor cursor = mResolver.query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, in findAlbums() local
67 if (cursor != null) { in findAlbums()
68 cursor.moveToPosition(-1); in findAlbums()
70 int dataIndex = cursor.getColumnIndex(MediaStore.Images.Media.DATA); in findAlbums()
71 int bucketIndex = cursor.getColumnIndex(MediaStore.Images.Media.BUCKET_ID); in findAlbums()
72 int nameIndex = cursor.getColumnIndex(MediaStore.Images.Media.BUCKET_DISPLAY_NAME); in findAlbums()
73 int updatedIndex = cursor.getColumnIndex(MediaStore.Images.Media.DATE_TAKEN); in findAlbums()
78 while (cursor.moveToNext()) { in findAlbums()
79 String id = TAG + ":" + cursor.getString(bucketIndex); in findAlbums()
87 data.thumbnailUrl = cursor.getString(dataIndex); in findAlbums()
[all …]
/packages/apps/Mms/src/com/android/mms/ui/
DMessageListAdapter.java156 public void bindView(View view, Context context, Cursor cursor) { in bindView() argument
158 String type = cursor.getString(mColumnsMap.mColumnMsgType); in bindView()
159 long msgId = cursor.getLong(mColumnsMap.mColumnMsgId); in bindView()
161 MessageItem msgItem = getCachedMessageItem(type, msgId, cursor); in bindView()
164 int position = cursor.getPosition(); in bindView()
218 public View newView(Context context, Cursor cursor, ViewGroup parent) { in newView() argument
219 int boxType = getItemViewType(cursor); in newView()
244 private boolean isCursorValid(Cursor cursor) { in isCursorValid() argument
246 if (cursor == null || cursor.isClosed() || cursor.isBeforeFirst() || cursor.isAfterLast()) { in isCursorValid()
281 Cursor cursor = (Cursor)getItem(position); in getItemViewType() local
[all …]
/packages/apps/ContactsCommon/src/com/android/contacts/common/list/
DContactListAdapter.java152 public Uri getContactUri(int partitionIndex, Cursor cursor) { in getContactUri() argument
153 long contactId = cursor.getLong(ContactQuery.CONTACT_ID); in getContactUri()
154 String lookupKey = cursor.getString(ContactQuery.CONTACT_LOOKUP_KEY); in getContactUri()
170 public boolean isSelectedContact(int partitionIndex, Cursor cursor) { in isSelectedContact() argument
177 cursor.getString(ContactQuery.CONTACT_LOOKUP_KEY))) { in isSelectedContact()
182 && getSelectedContactId() == cursor.getLong(ContactQuery.CONTACT_ID); in isSelectedContact()
186 protected View newView(Context context, int partition, Cursor cursor, int position, in newView() argument
196 Cursor cursor) { in bindSectionHeaderAndDivider() argument
201 if (position == 0 && cursor.getInt(ContactQuery.CONTACT_IS_USER_PROFILE) == 1) { in bindSectionHeaderAndDivider()
215 protected void bindPhoto(final ContactListItemView view, int partitionIndex, Cursor cursor) { in bindPhoto() argument
[all …]
DContactEntryListAdapter.java342 public void changeDirectories(Cursor cursor) { in changeDirectories() argument
343 if (cursor.getCount() == 0) { in changeDirectories()
352 int idColumnIndex = cursor.getColumnIndex(Directory._ID); in changeDirectories()
353 int directoryTypeColumnIndex = cursor.getColumnIndex(DirectoryListLoader.DIRECTORY_TYPE); in changeDirectories()
354 int displayNameColumnIndex = cursor.getColumnIndex(Directory.DISPLAY_NAME); in changeDirectories()
355 int photoSupportColumnIndex = cursor.getColumnIndex(Directory.PHOTO_SUPPORT); in changeDirectories()
359 cursor.moveToPosition(-1); in changeDirectories()
360 while (cursor.moveToNext()) { in changeDirectories()
361 long id = cursor.getLong(idColumnIndex); in changeDirectories()
366 partition.setDirectoryType(cursor.getString(directoryTypeColumnIndex)); in changeDirectories()
[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/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/apps/Contacts/src/com/android/contacts/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/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.java110 public LocalImage(Path path, GalleryApp application, Cursor cursor) { in LocalImage() argument
113 loadFromCursor(cursor); in LocalImage()
121 Cursor cursor = LocalAlbum.getItemCursor(resolver, uri, PROJECTION, id); in LocalImage() local
122 if (cursor == null) { in LocalImage()
126 if (cursor.moveToNext()) { in LocalImage()
127 loadFromCursor(cursor); in LocalImage()
132 cursor.close(); in LocalImage()
136 private void loadFromCursor(Cursor cursor) { in loadFromCursor() argument
137 id = cursor.getInt(INDEX_ID); in loadFromCursor()
138 caption = cursor.getString(INDEX_CAPTION); in loadFromCursor()
[all …]
/packages/providers/CalendarProvider/src/com/android/providers/calendar/
DCalendarDatabaseHelper.java1132 Cursor cursor = null; in removeOrphans() local
1135 cursor = db.rawQuery(SELECT_ATTENDEES_ORPHANS, null); in removeOrphans()
1136 DatabaseUtils.dumpCursor(cursor); in removeOrphans()
1138 if (cursor != null) { in removeOrphans()
1139 cursor.close(); in removeOrphans()
1146 cursor = null; in removeOrphans()
1149 cursor = db.rawQuery(SELECT_REMINDERS_ORPHANS, null); in removeOrphans()
1150 DatabaseUtils.dumpCursor(cursor); in removeOrphans()
1152 if (cursor != null) { in removeOrphans()
1153 cursor.close(); in removeOrphans()
[all …]
/packages/apps/Browser/src/com/android/browser/
DBrowserBookmarksPage.java117 public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) { in onLoadFinished() argument
121 while (cursor.moveToNext()) { in onLoadFinished()
122 String accountName = cursor.getString(0); in onLoadFinished()
123 String accountType = cursor.getString(1); in onLoadFinished()
149 adapter.changeCursor(cursor); in onLoadFinished()
201 Cursor cursor = adapter.getItem(childPosition); in handleContextItem() local
203 cursor.getString(BookmarksLoader.COLUMN_INDEX_TITLE), in handleContextItem()
204 cursor.getString(BookmarksLoader.COLUMN_INDEX_URL), in handleContextItem()
205 getBitmap(cursor, BookmarksLoader.COLUMN_INDEX_FAVICON), in handleContextItem()
206 getBitmap(cursor, BookmarksLoader.COLUMN_INDEX_THUMBNAIL)); in handleContextItem()
[all …]
/packages/apps/Email/emailcommon/src/com/android/emailcommon/provider/
DEmailContent.java133 public abstract void restore (Cursor cursor); in restore() argument
177 static public <T extends EmailContent> T getContent(Cursor cursor, Class<T> klass) { in getContent() argument
180 content.mId = cursor.getLong(0); in getContent()
181 content.restore(cursor); in getContent()
363 private static Body restoreBodyWithCursor(Cursor cursor) { in restoreBodyWithCursor() argument
365 if (cursor.moveToFirst()) { in restoreBodyWithCursor()
366 return getContent(cursor, Body.class); in restoreBodyWithCursor()
371 cursor.close(); in restoreBodyWithCursor()
464 public void restore(Cursor cursor) { in restore() argument
466 mMessageKey = cursor.getLong(CONTENT_MESSAGE_KEY_COLUMN); in restore()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/hfp/
DAtPhonebook.java70 public Cursor cursor; // result set of last query field in AtPhonebook.PhonebookResult
121 Cursor cursor = mContentResolver.query(Calls.CONTENT_URI, projection, in getLastDialledNumber() local
124 if (cursor == null) return null; in getLastDialledNumber()
126 if (cursor.getCount() < 1) { in getLastDialledNumber()
127 cursor.close(); in getLastDialledNumber()
130 cursor.moveToNext(); in getLastDialledNumber()
131 int column = cursor.getColumnIndexOrThrow(Calls.NUMBER); in getLastDialledNumber()
132 String number = cursor.getString(column); in getLastDialledNumber()
133 cursor.close(); in getLastDialledNumber()
218 int size = pbr.cursor.getCount(); in handleCpbsCommand()
[all …]

12345678910>>...16