Searched refs:cursor (Results 1 - 25 of 626) 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/apps/Dialer/java/com/android/dialer/voicemailstatus/
H A DVoicemailStatusHelper.java41 * @param cursor The caller is responsible for the life cycle of the cursor and resetting the
44 public static int getNumberActivityVoicemailSources(Cursor cursor) { argument
46 if (!cursor.moveToFirst()) {
50 if (isVoicemailSourceActive(cursor)) {
53 } while (cursor.moveToNext());
58 * Returns whether the source status in the cursor corresponds to an active source. A source is
65 private static boolean isVoicemailSourceActive(Cursor cursor) { argument
66 return cursor.getString(VoicemailStatusQuery.SOURCE_PACKAGE_INDEX) != null
68 && !cursor
[all...]
/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
85 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/src/com/android/providers/contacts/
H A DPhoneLookupWithStarPrefix.java34 * Returns a cursor with a subset of the rows passed into this function. If {@param number}
35 * starts with a "*" then only rows from {@param cursor} that have a number equal to
37 * only rows from {@param cursor} that have numbers without starting "*" characters
43 * @param cursor this function takes ownership of the cursor. The calling scope MUST NOT
44 * use or close() the cursor passed into this function. The cursor must contain
47 * @return a cursor that the calling context owns
49 public static Cursor removeNonStarMatchesFromCursor(String number, Cursor cursor) { argument
52 Cursor unreturnedCursor = cursor;
122 matchingNumberStartsWithStar(Cursor cursor) argument
134 cursorValue(Cursor cursor, int column) argument
[all...]
/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/apps/Dialer/java/com/android/dialer/calllog/ui/
H A DNewCallLogAdapter.java27 private final Cursor cursor; field in class:NewCallLogAdapter
30 NewCallLogAdapter(Cursor cursor) { argument
31 this.cursor = cursor;
32 timestampIndex = cursor.getColumnIndexOrThrow(CoalescedAnnotatedCallLog.TIMESTAMP);
44 cursor.moveToPosition(position);
45 long timestamp = cursor.getLong(timestampIndex);
51 return cursor.getCount();
/packages/apps/Contacts/src/com/android/contacts/util/
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...]
/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/Settings/tests/robotests/src/com/android/settings/search/
H A DDatabaseIndexingManagerTest.java190 Cursor cursor = mDb.rawQuery("SELECT * FROM prefs_index", null);
191 assertThat(cursor.getCount()).isEqualTo(1);
203 Cursor cursor = mDb.rawQuery("SELECT * FROM prefs_index WHERE enabled = 0", null);
204 assertThat(cursor.getCount()).isEqualTo(1);
212 Cursor cursor = mDb.rawQuery("SELECT * FROM prefs_index", null);
213 cursor.moveToPosition(0);
216 assertThat(cursor.getString(0)).isEqualTo(localeStr);
218 assertThat(cursor.getInt(1)).isEqualTo(raw.rank);
220 assertThat(cursor.getString(2)).isEqualTo(updatedTitle);
222 assertThat(cursor
[all...]
/packages/apps/Dialer/java/com/android/dialer/searchfragment/cp2/
H A DSearchContactCursor.java37 * Wrapper for a cursor returned by {@link SearchContactsCursorLoader}.
39 * <p>This cursor removes duplicate phone numbers associated with the same contact and can filter
44 private final Cursor cursor; field in class:SearchContactCursor
45 // List of cursor ids that are valid for displaying after filtering.
66 * @param cursor with projection {@link Projections#PHONE_PROJECTION}.
67 * @param query to filter cursor results.
69 public SearchContactCursor(Cursor cursor, @Nullable String query) { argument
71 this.cursor = cursor;
109 cursor
[all...]
/packages/providers/TvProvider/tests/src/com/android/providers/tv/
H A DColumnFilterTest.java88 Cursor cursor = mResolver.query(Channels.CONTENT_URI, projection, null, null, null);
89 assertNotNull(cursor);
90 cursor.moveToNext();
91 assertEquals(FAKE_INPUT_ID, cursor.getString(0));
92 assertNull(cursor.getString(1));
93 assertEquals(channelId, cursor.getLong(2));
98 Cursor cursor = mResolver.query(Channels.CONTENT_URI, null, null, null, null);
99 assertNotNull(cursor);
100 assertEquals(1, cursor.getCount());
108 Cursor cursor
[all...]
/packages/apps/Messaging/tests/src/com/android/messaging/ui/conversation/
H A DConversationMessageViewTest.java72 final FakeCursor cursor = TestDataFactory.getConversationMessageCursor();
73 cursor.moveToFirst();
75 view.bind(cursor);
76 verifyContent(view, TestDataFactory.getMessageText(cursor, 0), true, Dates
77 .getMessageTimeString((Long) cursor.getAt("received_timestamp", 0)).toString());
83 final FakeCursor cursor = TestDataFactory.getConversationMessageCursor();
84 cursor.moveToFirst();
85 view.bind(cursor);
87 cursor.moveToNext();
88 view.bind(cursor);
[all...]
/packages/providers/ContactsProvider/test_common/src/com/android/providers/contacts/testutil/
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...]
H A DCommonDatabaseUtils.java40 public static String[] singleRecordToArray(Cursor cursor) { argument
43 if (cursor.moveToNext()) {
44 result = new String[cursor.getColumnCount()];
45 fillArray(cursor, result);
48 closeQuietly(cursor);
53 public static List<String[]> multiRecordToArray(Cursor cursor) { argument
56 while (cursor.moveToNext()) {
57 String[] record = new String[cursor.getColumnCount()];
58 fillArray(cursor, record);
62 closeQuietly(cursor);
67 fillArray(Cursor cursor, String[] array) argument
73 closeQuietly(Cursor cursor) argument
[all...]
/packages/apps/Contacts/src/com/android/contacts/list/
H A DLegacyPhoneNumberListAdapter.java30 * A cursor adapter for the Phones.CONTENT_TYPE content type.
71 Cursor cursor = ((Cursor)getItem(position));
72 long id = cursor.getLong(PHONE_ID_COLUMN_INDEX);
78 Context context, int partition, Cursor cursor, int position, ViewGroup parent) {
80 super.newView(context, partition, cursor, position, parent);
86 protected void bindView(View itemView, int partition, Cursor cursor, int position) { argument
87 super.bindView(itemView, partition, cursor, position);
89 bindName(view, cursor);
90 bindViewId(view, cursor, PHONE_ID_COLUMN_INDEX);
91 bindPhoneNumber(view, cursor);
77 newView( Context context, int partition, Cursor cursor, int position, ViewGroup parent) argument
94 bindName(final ContactListItemView view, Cursor cursor) argument
99 bindPhoneNumber(ContactListItemView view, Cursor cursor) argument
[all...]
H A DLegacyPostalAddressListAdapter.java30 * A cursor adapter for the ContactMethods.CONTENT_TYPE content type.
72 Cursor cursor = ((Cursor)getItem(position));
73 long id = cursor.getLong(POSTAL_ID_COLUMN_INDEX);
79 Context context, int partition, Cursor cursor, int position, ViewGroup parent) {
86 protected void bindView(View itemView, int partition, Cursor cursor, int position) { argument
87 super.bindView(itemView, partition, cursor, position);
89 bindName(view, cursor);
90 bindViewId(view, cursor, POSTAL_ID_COLUMN_INDEX);
91 bindPostalAddress(view, cursor);
94 protected void bindName(final ContactListItemView view, Cursor cursor) { argument
78 newView( Context context, int partition, Cursor cursor, int position, ViewGroup parent) argument
100 bindPostalAddress(ContactListItemView view, Cursor cursor) 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/apps/EmergencyInfo/tests/robolectric/src/com/android/emergency/
H A DEmergencySearchIndexablesProviderTest.java50 Cursor cursor = mProvider.queryXmlResources(
52 assertThat(cursor.getColumnNames()).isEqualTo(
54 assertThat(cursor.getCount()).isNotEqualTo(0);
60 assertThat(cursor.isBeforeFirst()).isTrue();
62 while (cursor.moveToNext()) {
63 xmlResIds.add(cursor.getInt(SearchIndexablesContract.COLUMN_INDEX_XML_RES_RESID));
70 Cursor cursor = mProvider.queryRawData(SearchIndexablesContract.INDEXABLES_RAW_COLUMNS);
71 assertThat(cursor.getColumnNames()).isEqualTo(
73 assertThat(cursor.getCount()).isEqualTo(0);
78 Cursor cursor
[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/Messaging/tests/src/com/android/messaging/ui/contact/
H A DContactListItemViewTest.java79 final FakeCursor cursor = TestDataFactory.getAllContactListCursor();
81 cursor.moveToPosition(row);
82 view.bind(cursor, mockHost, false, null);
83 verifyContent(view, (String) cursor.getAt(Contacts.DISPLAY_NAME, row),
84 (String) cursor.getAt(Phone.NUMBER, row),
85 (String) cursor.getAt(Contacts.PHOTO_THUMBNAIL_URI, row), true);
90 final FakeCursor cursor = TestDataFactory.getAllContactListCursor();
92 cursor.moveToPosition(row);
93 view.bind(cursor, mockHost, false, null);
94 verifyContent(view, (String) cursor
[all...]
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/archives/
H A DReadableArchiveTest.java85 final Cursor cursor = mArchive.queryChildDocuments(
88 assertTrue(cursor.moveToFirst());
91 cursor.getString(cursor.getColumnIndexOrThrow(Document.COLUMN_DOCUMENT_ID)));
93 cursor.getString(cursor.getColumnIndexOrThrow(Document.COLUMN_DISPLAY_NAME)));
95 cursor.getString(cursor.getColumnIndexOrThrow(Document.COLUMN_MIME_TYPE)));
97 cursor.getInt(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...]

Completed in 2424 milliseconds

1234567891011>>