Searched refs:cursor (Results 1 - 25 of 412) sorted by relevance

1234567891011>>

/packages/apps/UnifiedEmail/src/com/android/mail/browse/
H A DConversationCursorOperationListener.java24 * Marks all contents of this cursor as seen.
37 * wrapped cursor, or returns.
39 public static void markContentsSeen(final Cursor cursor) { argument
40 if (cursor == null) {
44 if (cursor instanceof ConversationCursorOperationListener) {
45 ((ConversationCursorOperationListener) cursor).markContentsSeen();
46 } else if (cursor instanceof CursorWrapper) {
47 markContentsSeen(((CursorWrapper) cursor).getWrappedCursor());
54 * wrapped cursor, or returns.
56 public static void emptyFolder(final Cursor cursor) { argument
[all...]
/packages/providers/ContactsProvider/src/com/android/providers/contacts/util/
H A DCloseUtils.java27 /** If the argument is non-null, close the cursor. */
28 public static void closeQuietly(Cursor cursor) { argument
29 if (cursor != null) {
30 cursor.close();
/packages/screensavers/PhotoTable/src/com/android/dreams/phototable/
H A DCursorPhotoSource.java23 * Common implementation for sources that load images from a cursor.
27 // An invalid cursor position to represent the uninitialized state.
29 // An invalid cursor position to represent the error state.
42 if (current.cursor == null || current.cursor.isClosed()) {
46 current.cursor.moveToPosition(current.position);
47 current.cursor.moveToNext();
49 if (!current.cursor.isAfterLast()) {
50 data = unpackImageData(current.cursor, null);
51 data.cursor
83 unpackImageData(Cursor cursor, ImageData data) argument
[all...]
H A DLocalSource.java76 Cursor cursor = mResolver.query(uri, projection, null, null, null);
77 if (cursor != null) {
78 cursor.moveToPosition(-1);
80 int dataIndex = cursor.getColumnIndex(MediaStore.Images.Media.DATA);
81 int bucketIndex = cursor.getColumnIndex(MediaStore.Images.Media.BUCKET_ID);
82 int nameIndex = cursor.getColumnIndex(MediaStore.Images.Media.BUCKET_DISPLAY_NAME);
83 int updatedIndex = cursor.getColumnIndex(MediaStore.Images.Media.DATE_TAKEN);
88 while (cursor.moveToNext()) {
89 String id = constructId(internal, cursor.getString(bucketIndex));
97 data.thumbnailUrl = cursor
160 unpackImageData(Cursor cursor, ImageData data) argument
[all...]
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/
H A DSuggestionPosition.java30 public SuggestionPosition(SuggestionCursor cursor) { argument
31 this(cursor, cursor.getPosition());
34 public SuggestionPosition(SuggestionCursor cursor, int suggestionPos) { argument
35 mCursor = cursor;
44 * Gets the suggestion cursor, moved to point to the right suggestion.
H A DCursorBackedSuggestionExtras.java27 * SuggestionExtras taking values from the extra columns in a suggestion cursor.
41 static CursorBackedSuggestionExtras createExtrasIfNecessary(Cursor cursor, int position) { argument
42 List<String> extraColumns = getExtraColumns(cursor);
44 return new CursorBackedSuggestionExtras(cursor, position, extraColumns);
50 static String[] getCursorColumns(Cursor cursor) { argument
52 return cursor.getColumnNames();
60 static boolean cursorContainsExtras(Cursor cursor) { argument
61 String[] columns = getCursorColumns(cursor);
70 static List<String> getExtraColumns(Cursor cursor) { argument
71 String[] columns = getCursorColumns(cursor);
85 CursorBackedSuggestionExtras(Cursor cursor, int position, List<String> extraColumns) argument
[all...]
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/testutil/
H A DCommonDatabaseUtils.java33 public static String[] singleRecordToArray(Cursor cursor) { argument
36 if (cursor.moveToNext()) {
37 result = new String[cursor.getColumnCount()];
38 fillArray(cursor, result);
41 closeQuietly(cursor);
46 public static List<String[]> multiRecordToArray(Cursor cursor) { argument
49 while (cursor.moveToNext()) {
50 String[] record = new String[cursor.getColumnCount()];
51 fillArray(cursor, record);
55 closeQuietly(cursor);
60 fillArray(Cursor cursor, String[] array) argument
66 closeQuietly(Cursor cursor) argument
[all...]
H A DDeletedContactUtil.java40 Cursor cursor = resolver.query(uri, projection, null, null, null);
41 if (cursor.moveToNext()) {
42 return cursor.getLong(0);
51 Cursor cursor = resolver.query(URI, projection, null, null, null);
53 return cursor.getCount();
55 CommonDatabaseUtils.closeQuietly(cursor);
65 Cursor cursor = resolver.query(URI, projection, null, null, null);
66 return CommonDatabaseUtils.multiRecordToArray(cursor);
78 Cursor cursor = resolver.query(URI, projection, selection, args, null);
79 return CommonDatabaseUtils.multiRecordToArray(cursor);
[all...]
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/
H A DSyncCalendarTest.java74 Cursor cursor;
75 cursor = mResolver.query(mEventsUri, null, null, null, null);
77 int countBeforeNewEvent = cursor.getCount();
78 cursor.moveToNext();
81 String newTitle = cursor.getString(cursor.getColumnIndex("title")) + time.toString();
82 long dtStart = cursor.getLong(cursor.getColumnIndex("dtstart"));
83 long dtEnd = cursor.getLong(cursor
[all...]
/packages/apps/Contacts/src/com/android/contacts/util/
H A DStreamItemPhotoEntry.java48 public StreamItemPhotoEntry(Cursor cursor) { argument
49 // This is expected to be populated via a cursor containing a join of all
51 mId = getLong(cursor, StreamItemPhotos._ID);
52 mSortIndex = getInt(cursor, StreamItemPhotos.SORT_INDEX, -1);
53 mPhotoFileId = getLong(cursor, StreamItemPhotos.PHOTO_FILE_ID);
54 mPhotoUri = getString(cursor, StreamItemPhotos.PHOTO_URI);
55 mHeight = getInt(cursor, PhotoFiles.HEIGHT, -1);
56 mWidth = getInt(cursor, PhotoFiles.WIDTH, -1);
57 mFileSize = getInt(cursor, PhotoFiles.FILESIZE, -1);
112 private static String getString(Cursor cursor, Strin argument
116 getInt(Cursor cursor, String columnName, int missingValue) argument
121 getLong(Cursor cursor, String columnName) argument
[all...]
H A DDataStatus.java46 public DataStatus(Cursor cursor) { argument
47 // When creating from cursor row, fill normally
48 fromCursor(cursor);
55 public void possibleUpdate(Cursor cursor) { argument
56 final boolean hasStatus = !isNull(cursor, Data.STATUS);
57 final boolean hasTimestamp = !isNull(cursor, Data.STATUS_TIMESTAMP);
66 final long newTimestamp = getLong(cursor, Data.STATUS_TIMESTAMP, -1);
72 // Fill in remaining details from cursor
73 fromCursor(cursor);
76 private void fromCursor(Cursor cursor) { argument
144 getString(Cursor cursor, String columnName) argument
148 getInt(Cursor cursor, String columnName) argument
152 getInt(Cursor cursor, String columnName, int missingValue) argument
157 getLong(Cursor cursor, String columnName, long missingValue) argument
162 isNull(Cursor cursor, String columnName) argument
[all...]
H A DNotifyingAsyncQueryHandler.java40 void onQueryComplete(int token, Object cookie, Cursor cursor); argument
58 protected void onQueryComplete(int token, Object cookie, Cursor cursor) { argument
61 listener.onQueryComplete(token, cookie, cursor);
62 } else if (cursor != null) {
63 cursor.close();
/packages/apps/Camera2/src/com/android/camera/data/
H A DDataUtils.java33 Cursor cursor = contentResolver.query(contentUri, proj, null, null, null);
34 if (cursor == null) {
38 int columnIndex = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
39 if (!cursor.moveToFirst()) {
42 return cursor.getString(columnIndex);
45 cursor.close();
/packages/experimental/LoaderApp/src/com/android/loaderapp/util/
H A DDataStatus.java44 public DataStatus(Cursor cursor) { argument
45 // When creating from cursor row, fill normally
46 fromCursor(cursor);
53 public void possibleUpdate(Cursor cursor) { argument
54 final boolean hasStatus = !isNull(cursor, Data.STATUS);
55 final boolean hasTimestamp = !isNull(cursor, Data.STATUS_TIMESTAMP);
64 final long newTimestamp = getLong(cursor, Data.STATUS_TIMESTAMP, -1);
70 // Fill in remaining details from cursor
71 fromCursor(cursor);
74 private void fromCursor(Cursor cursor) { argument
138 getString(Cursor cursor, String columnName) argument
142 getInt(Cursor cursor, String columnName) argument
146 getInt(Cursor cursor, String columnName, int missingValue) argument
151 getLong(Cursor cursor, String columnName, long missingValue) argument
156 isNull(Cursor cursor, String columnName) argument
[all...]
/packages/apps/Gallery/src/com/android/camera/gallery/
H A DImageList.java41 Cursor cursor = Media.query(
49 while (cursor.moveToNext()) {
50 hash.put(cursor.getString(1), cursor.getString(0));
54 cursor.close();
115 protected long getImageId(Cursor cursor) { argument
116 return cursor.getLong(INDEX_ID);
120 protected BaseImage loadImageFromCursor(Cursor cursor) { argument
121 long id = cursor.getLong(INDEX_ID);
122 String dataPath = cursor
[all...]
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
H A DContactDirectoryManagerTest.java89 MatrixCursor cursor = new MatrixCursor(
92 cursor.addRow(new Object[] {
100 return cursor;
173 Cursor cursor = mResolver.query(Directory.CONTENT_URI, null, null, null, null);
174 assertEquals(5, cursor.getCount());
176 cursor.moveToPosition(2);
177 assertDirectoryRow(cursor, "test.package1", "authority1", "account-name1", "account-type1",
181 cursor.moveToNext();
182 assertDirectoryRow(cursor, "test.package1", "authority1", "account-name2", "account-type2",
186 cursor
600 addDirectoryRow(MatrixCursor cursor, String accountName, String accountType, String displayName, int typeResourceId, int exportSupport, int shortcutSupport, int photoSupport) argument
614 assertDirectoryRow(Cursor cursor, String packageName, String authority, String accountName, String accountType, String displayName, int typeResourceId, int exportSupport, int shortcutSupport, int photoSupport) argument
[all...]
/packages/providers/PartnerBookmarksProvider/tests/src/com/android/providers/partnerbookmarks/
H A DPartnerBookmarksProviderTest.java40 Cursor cursor = null;
42 cursor = providerClient.query(PartnerBookmarksContract.Bookmarks.CONTENT_URI,
44 assertNotNull("Failed to query for bookmarks", cursor);
46 while (cursor.moveToNext()) {
47 long id = cursor.getLong(
48 cursor.getColumnIndexOrThrow(PartnerBookmarksContract.Bookmarks.ID));
49 long parent = cursor.getLong(
50 cursor.getColumnIndexOrThrow(PartnerBookmarksContract.Bookmarks.PARENT));
51 boolean isFolder = cursor.getInt(
52 cursor
[all...]
/packages/apps/Gallery2/src/com/android/gallery3d/data/
H A DLocalVideo.java75 public LocalVideo(Path path, GalleryApp application, Cursor cursor) { argument
78 loadFromCursor(cursor);
86 Cursor cursor = LocalAlbum.getItemCursor(resolver, uri, PROJECTION, id);
87 if (cursor == null) {
88 throw new RuntimeException("cannot get cursor for: " + path);
91 if (cursor.moveToNext()) {
92 loadFromCursor(cursor);
97 cursor.close();
101 private void loadFromCursor(Cursor cursor) { argument
102 id = cursor
132 updateFromCursor(Cursor cursor) argument
[all...]
/packages/providers/DownloadProvider/src/com/android/providers/downloads/
H A DOpenHelper.java69 final Cursor cursor = downManager.query(new DownloadManager.Query().setFilterById(id));
71 if (!cursor.moveToFirst()) {
75 final Uri localUri = getCursorUri(cursor, COLUMN_LOCAL_URI);
76 final File file = getCursorFile(cursor, COLUMN_LOCAL_FILENAME);
77 String mimeType = getCursorString(cursor, COLUMN_MEDIA_TYPE);
87 final Uri remoteUri = getCursorUri(cursor, COLUMN_URI);
103 cursor.close();
128 final Cursor cursor = context.getContentResolver().query(uri, new String[]{Constants.UID},
130 if (cursor != null) {
132 if (cursor
142 getCursorString(Cursor cursor, String column) argument
146 getCursorUri(Cursor cursor, String column) argument
150 getCursorFile(Cursor cursor, String column) argument
[all...]
/packages/apps/Contacts/src/com/android/contacts/list/
H A DLegacyPhoneNumberListAdapter.java33 * A cursor adapter for the Phones.CONTENT_TYPE content type.
74 Cursor cursor = ((Cursor)getItem(position));
75 long id = cursor.getLong(PHONE_ID_COLUMN_INDEX);
80 protected View newView(Context context, int partition, Cursor cursor, int position, argument
88 protected void bindView(View itemView, int partition, Cursor cursor, int position) { argument
90 bindName(view, cursor);
91 bindPhoneNumber(view, cursor);
94 protected void bindName(final ContactListItemView view, Cursor cursor) { argument
95 view.showDisplayName(cursor, PHONE_DISPLAY_NAME_COLUMN_INDEX, getContactNameDisplayOrder());
96 view.showPhoneticName(cursor, PHONE_PHONETIC_NAME_COLUMN_INDE
99 bindPhoneNumber(ContactListItemView view, Cursor cursor) argument
[all...]
H A DLegacyPostalAddressListAdapter.java33 * A cursor adapter for the ContactMethods.CONTENT_TYPE content type.
75 Cursor cursor = ((Cursor)getItem(position));
76 long id = cursor.getLong(POSTAL_ID_COLUMN_INDEX);
81 protected View newView(Context context, int partition, Cursor cursor, int position, argument
89 protected void bindView(View itemView, int partition, Cursor cursor, int position) { argument
91 bindName(view, cursor);
92 bindPostalAddress(view, cursor);
95 protected void bindName(final ContactListItemView view, Cursor cursor) { argument
96 view.showDisplayName(cursor, POSTAL_DISPLAY_NAME_COLUMN_INDEX,
98 view.showPhoneticName(cursor, POSTAL_PHONETIC_NAME_COLUMN_INDE
101 bindPostalAddress(ContactListItemView view, Cursor cursor) argument
[all...]
/packages/apps/Mms/src/com/android/mms/util/
H A DRecycler.java80 Cursor cursor = getAllThreads(context);
83 while (cursor.moveToNext()) {
84 long threadId = getThreadId(cursor);
88 cursor.close();
122 abstract protected long getThreadId(Cursor cursor); argument
128 abstract protected void dumpMessage(Cursor cursor, Context context); argument
178 protected long getThreadId(Cursor cursor) { argument
179 return cursor.getLong(ID);
184 Cursor cursor = SqliteWrapper.query(context, resolver,
188 return cursor;
235 dumpMessage(Cursor cursor, Context context) argument
318 getThreadId(Cursor cursor) argument
433 dumpMessage(Cursor cursor, Context context) argument
[all...]
/packages/apps/UnifiedEmail/src/com/android/mail/ui/
H A DConversationPositionTracker.java42 /** Did we recalculate positions after updating the cursor? */
56 /** Move cursor to a specific position and return the conversation there */
58 final ConversationCursor cursor = mCallbacks.getConversationListCursor();
59 cursor.moveToPosition(position);
60 final Conversation conv = cursor.getConversation();
69 final ConversationCursor cursor = mCallbacks.getConversationListCursor();
70 if (isDataLoaded(cursor)) {
71 return cursor.getCount();
123 * the positions in the tracker. We need a valid cursor before we can bless the position as
134 /** @return whether or not we have a valid cursor t
135 isDataLoaded(ConversationCursor cursor) argument
[all...]
/packages/apps/Dialer/src/com/android/dialer/dialpad/
H A DSmartDialCursorLoader.java88 /** Constructs a cursor for the returned array of results. */
89 final MatrixCursor cursor = new MatrixCursor(PhoneQuery.PROJECTION_PRIMARY);
98 cursor.addRow(row);
100 return cursor;
104 public void deliverResult(Cursor cursor) { argument
107 releaseResources(cursor);
113 mCursor = cursor;
117 super.deliverResult(cursor);
121 if (oldCursor != null && oldCursor != cursor) {
157 public void onCanceled(Cursor cursor) { argument
164 releaseResources(Cursor cursor) argument
[all...]
/packages/apps/ContactsCommon/src/com/android/contacts/common/list/
H A DContactListAdapter.java34 * A cursor adapter for the {@link ContactsContract.Contacts#CONTENT_TYPE} content type.
161 public Uri getContactUri(int partitionIndex, Cursor cursor) { argument
162 long contactId = cursor.getLong(ContactQuery.CONTACT_ID);
163 String lookupKey = cursor.getString(ContactQuery.CONTACT_LOOKUP_KEY);
179 public boolean isSelectedContact(int partitionIndex, Cursor cursor) { argument
186 cursor.getString(ContactQuery.CONTACT_LOOKUP_KEY))) {
191 && getSelectedContactId() == cursor.getLong(ContactQuery.CONTACT_ID);
195 protected View newView(Context context, int partition, Cursor cursor, int position, argument
208 Cursor cursor) {
213 if (position == 0 && cursor
207 bindSectionHeaderAndDivider(ContactListItemView view, int position, Cursor cursor) argument
227 bindPhoto(final ContactListItemView view, int partitionIndex, Cursor cursor) argument
248 bindName(final ContactListItemView view, Cursor cursor) argument
254 bindPresenceAndStatusMessage(final ContactListItemView view, Cursor cursor) argument
259 bindSearchSnippet(final ContactListItemView view, Cursor cursor) argument
345 changeCursor(int partitionIndex, Cursor cursor) argument
[all...]

Completed in 666 milliseconds

1234567891011>>