Searched refs:cursor (Results 26 - 50 of 207) sorted by relevance

123456789

/frameworks/base/core/java/android/widget/
H A DCursorFilter.java32 CharSequence convertToString(Cursor cursor); argument
35 void changeCursor(Cursor cursor); argument
49 Cursor cursor = mClient.runQueryOnBackgroundThread(constraint);
52 if (cursor != null) {
53 results.count = cursor.getCount();
54 results.values = cursor;
H A DAlphabetIndexer.java28 * invalidates the cache if changes occur in the cursor.
30 * Your adapter is responsible for updating the cursor by calling {@link #setCursor} if the
31 * cursor changes. {@link #getPositionForSection} method does the binary search for the starting
42 * The index of the cursor column that this list is sorted on.
58 * the dataset changes or the cursor changes.
74 * @param cursor the cursor containing the data set
75 * @param sortedColumnIndex the column number in the cursor that is sorted
82 public AlphabetIndexer(Cursor cursor, int sortedColumnIndex, CharSequence alphabet) { argument
83 mDataCursor = cursor;
112 setCursor(Cursor cursor) argument
[all...]
/frameworks/support/cursoradapter/src/main/java/androidx/cursoradapter/widget/
H A DCursorFilter.java33 CharSequence convertToString(Cursor cursor); argument
36 void changeCursor(Cursor cursor); argument
50 Cursor cursor = mClient.runQueryOnBackgroundThread(constraint);
53 if (cursor != null) {
54 results.count = cursor.getCount();
55 results.values = cursor;
/frameworks/base/services/core/java/com/android/server/notification/
H A DCalendarTracker.java99 Cursor cursor = null;
101 cursor = mUserContext.getContentResolver().query(Calendars.CONTENT_URI, projection,
103 while (cursor != null && cursor.moveToNext()) {
104 rt.add(cursor.getLong(0));
107 if (cursor != null) {
108 cursor.close();
120 final Cursor cursor = mUserContext.getContentResolver().query(uri, INSTANCE_PROJECTION,
126 while (cursor != null && cursor
[all...]
/frameworks/support/tv-provider/src/main/java/androidx/tvprovider/media/tv/
H A DChannel.java56 * try (Cursor cursor = resolver.query(channelUri, null, null, null, null)) {
57 * if (cursor != null && cursor.getCount() != 0) {
58 * cursor.moveToNext();
59 * channel = Channel.fromCursor(cursor);
407 * Creates a Channel object from a cursor including the fields defined in {@link Channels}.
409 * @param cursor A row from the TV Input Framework database.
410 * @return A channel with the values taken from the cursor.
412 public static Channel fromCursor(Cursor cursor) { argument
416 if ((index = cursor
[all...]
H A DBasePreviewProgram.java445 * Sets the fields in the cursor to the given builder instance.
447 * @param cursor A row from the TV Input Framework database.
450 static void setFieldsFromCursor(Cursor cursor, Builder builder) { argument
452 BaseProgram.setFieldsFromCursor(cursor, builder);
456 cursor.getColumnIndex(PreviewProgramColumns.COLUMN_INTERNAL_PROVIDER_ID)) >= 0
457 && !cursor.isNull(index)) {
458 builder.setInternalProviderId(cursor.getString(index));
461 cursor.getColumnIndex(PreviewProgramColumns.COLUMN_PREVIEW_VIDEO_URI)) >= 0
462 && !cursor.isNull(index)) {
463 builder.setPreviewVideoUri(Uri.parse(cursor
[all...]
H A DPreviewProgram.java54 * try (Cursor cursor = resolver.query(previewProgramUri, null, null, null, null)) {
55 * if (cursor != null && cursor.getCount() != 0) {
56 * cursor.moveToNext();
57 * previewProgram = PreviewProgram.fromCursor(cursor);
165 * Creates a Program object from a cursor including the fields defined in
168 * @param cursor A row from the TV Input Framework database.
169 * @return A Program with the values taken from the cursor.
171 public static PreviewProgram fromCursor(Cursor cursor) { argument
174 BasePreviewProgram.setFieldsFromCursor(cursor, builde
[all...]
H A DProgram.java51 * try (Cursor cursor = resolver.query(programUri, null, null, null, null)) {
52 * if (cursor != null && cursor.getCount() != 0) {
53 * cursor.moveToNext();
54 * program = Program.fromCursor(cursor);
169 * Creates a Program object from a cursor including the fields defined in {@link Programs}.
171 * @param cursor A row from the TV Input Framework database.
172 * @return A Program with the values taken from the cursor.
174 public static Program fromCursor(Cursor cursor) { argument
177 BaseProgram.setFieldsFromCursor(cursor, builde
[all...]
/frameworks/base/tests/LocationTracker/src/com/android/locationtracker/data/
H A DTrackerEntry.java208 static TrackerEntry createEntry(Cursor cursor) { argument
209 String timestamp = cursor.getString(cursor.getColumnIndex(TIMESTAMP));
210 String tag = cursor.getString(cursor.getColumnIndex(TAG));
211 String sType = cursor.getString(cursor.getColumnIndex(ENTRY_TYPE));
216 location.setLatitude(cursor.getFloat(cursor
218 location.setLongitude(cursor
245 getNullableFloat(Cursor cursor, String colName) argument
[all...]
H A DTrackerListHelper.java50 Cursor cursor = mActivity.managedQuery(TrackerProvider.CONTENT_URI,
53 TrackerAdapter adapter = new TrackerAdapter(mActivity, layout, cursor);
55 cursor.setNotificationUri(mActivity.getContentResolver(),
67 public void bindView(View view, Context context, Cursor cursor) { argument
71 .createEntry(cursor));
/frameworks/support/room/runtime/src/main/java/androidx/room/paging/
H A DLimitOffsetDataSource.java86 Cursor cursor = mDb.query(sqLiteQuery);
88 if (cursor.moveToFirst()) {
89 return cursor.getInt(0);
93 cursor.close();
105 protected abstract List<T> convertRows(Cursor cursor); argument
152 Cursor cursor = null;
154 cursor = mDb.query(sqLiteQuery);
155 List<T> rows = convertRows(cursor);
159 if (cursor != null) {
160 cursor
[all...]
/frameworks/base/core/java/android/database/
H A DDatabaseUtils.java251 * Fills the specified cursor window by iterating over the contents of the cursor.
252 * The window is filled until the cursor is exhausted or the window runs out
255 * The original position of the cursor is left unchanged by this operation.
257 * @param cursor The cursor that contains the data to put in the window.
262 public static void cursorFillWindow(final Cursor cursor, argument
264 if (position < 0 || position >= cursor.getCount()) {
267 final int oldPos = cursor.getPosition();
268 final int numColumns = cursor
468 dumpCursor(Cursor cursor) argument
479 dumpCursor(Cursor cursor, PrintStream stream) argument
500 dumpCursor(Cursor cursor, StringBuilder sb) argument
521 dumpCursorToString(Cursor cursor) argument
532 dumpCurrentRow(Cursor cursor) argument
542 dumpCurrentRow(Cursor cursor, PrintStream stream) argument
566 dumpCurrentRow(Cursor cursor, StringBuilder sb) argument
590 dumpCurrentRowToString(Cursor cursor) argument
603 cursorStringToContentValues(Cursor cursor, String field, ContentValues values) argument
616 cursorStringToInsertHelper(Cursor cursor, String field, InsertHelper inserter, int index) argument
629 cursorStringToContentValues(Cursor cursor, String field, ContentValues values, String key) argument
641 cursorIntToContentValues(Cursor cursor, String field, ContentValues values) argument
653 cursorIntToContentValues(Cursor cursor, String field, ContentValues values, String key) argument
670 cursorLongToContentValues(Cursor cursor, String field, ContentValues values) argument
683 cursorLongToContentValues(Cursor cursor, String field, ContentValues values, String key) argument
701 cursorDoubleToCursorValues(Cursor cursor, String field, ContentValues values) argument
714 cursorDoubleToContentValues(Cursor cursor, String field, ContentValues values, String key) argument
730 cursorRowToContentValues(Cursor cursor, ContentValues values) argument
903 cursorStringToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument
919 cursorLongToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument
935 cursorShortToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument
951 cursorIntToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument
967 cursorFloatToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument
983 cursorDoubleToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument
[all...]
/frameworks/base/core/java/android/database/sqlite/
H A DSQLiteDirectCursorDriver.java25 * A cursor driver that uses the given query directly.
47 final Cursor cursor;
52 cursor = new SQLiteCursor(this, mEditTable, query);
54 cursor = factory.newCursor(mDatabase, this, mEditTable, query);
62 return cursor;
77 public void cursorRequeried(Cursor cursor) { argument
/frameworks/base/services/core/java/com/android/server/accounts/
H A DAccountsDb.java338 Cursor cursor = db.query(CE_TABLE_AUTHTOKENS,
344 while (cursor.moveToNext()) {
345 final String type = cursor.getString(0);
346 final String authToken = cursor.getString(1);
350 cursor.close();
405 Cursor cursor = db.query(
410 if (cursor.moveToNext()) {
411 return cursor.getLong(0);
415 cursor.close();
442 try (Cursor cursor
[all...]
/frameworks/base/core/tests/coretests/src/android/app/
H A DSuggestionProvider.java69 MatrixCursor cursor = new MatrixCursor(COLUMNS);
72 addRow(cursor, query + suffix);
74 return cursor;
80 private void addRow(MatrixCursor cursor, String string) { argument
81 long id = cursor.getCount();
82 cursor.newRow().add(id).add(string).add(Intent.ACTION_SEARCH).add(string);
H A DDownloadManagerFunctionalTest.java87 Cursor cursor = getCursor(dlRequest);
89 verifyInt(cursor, DownloadManager.COLUMN_REASON, error);
91 cursor.close();
134 Cursor cursor = mDownloadManager.query(new Query().setFilterById(requestId));
136 assertEquals(1, cursor.getCount());
137 assertTrue(cursor.moveToFirst());
144 cursor.close();
169 Cursor cursor = getCursor(dlRequest);
172 verifyInt(cursor, DownloadManager.COLUMN_STATUS, DownloadManager.STATUS_SUCCESSFUL);
174 cursor
[all...]
H A DDownloadManagerBaseTest.java147 Cursor cursor = dm.query(new Query().setFilterById(id));
149 if (cursor.moveToFirst()) {
150 int status = cursor.getInt(cursor.getColumnIndex(
157 cursor.close();
454 protected void logDBColumnData(Cursor cursor, String column) { argument
455 int index = cursor.getColumnIndex(column);
457 Log.i(LOG_TAG, "columnValue: " + cursor.getString(index));
488 Cursor cursor = mDownloadManager.query(new Query().setFilterById(requestId));
491 assertEquals(1, cursor
968 verifyInt(Cursor cursor, String columnName, int expected) argument
981 verifyString(Cursor cursor, String columnName, String expected) argument
[all...]
/frameworks/support/leanback/src/main/java/androidx/leanback/widget/
H A DCursorObjectAdapter.java52 * Changes the underlying cursor to a new cursor. If there is
53 * an existing cursor it will be closed if it is different than the new
54 * cursor.
56 * @param cursor The new cursor to be used.
58 public void changeCursor(Cursor cursor) { argument
59 if (cursor == mCursor) {
65 mCursor = cursor;
74 * @param cursor Th
76 swapCursor(Cursor cursor) argument
[all...]
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/
H A DRecoverableKeyStoreDb.java129 Cursor cursor = db.query(
138 int count = cursor.getCount();
149 cursor.moveToFirst();
150 byte[] nonce = cursor.getBlob(
151 cursor.getColumnIndexOrThrow(KeysEntry.COLUMN_NAME_NONCE));
152 byte[] keyMaterial = cursor.getBlob(
153 cursor.getColumnIndexOrThrow(KeysEntry.COLUMN_NAME_WRAPPED_KEY));
154 int generationId = cursor.getInt(
155 cursor.getColumnIndexOrThrow(KeysEntry.COLUMN_NAME_GENERATION_ID));
156 int recoveryStatus = cursor
[all...]
/frameworks/base/core/tests/coretests/src/android/provider/
H A DTestFontsProvider.java65 void setCustomCursor(MatrixCursor cursor) { argument
66 mCustomCursor = cursor;
81 MatrixCursor cursor;
83 cursor = new MatrixCursor(new String[] { FontsContract.Columns._ID,
87 cursor.addRow(new Object[] { 1, TTC_INDEX, VARIATION_SETTINGS, 400, 0, mResultCode });
89 cursor = new MatrixCursor(new String[] { FontsContract.Columns._ID });
90 cursor.addRow(new Object[] { 1 });
92 return cursor;
/frameworks/base/media/java/android/media/
H A DExternalRingtonesCursorWrapper.java34 public ExternalRingtonesCursorWrapper(Cursor cursor, int userId) { argument
35 super(cursor);
/frameworks/ex/common/java/com/android/common/contacts/
H A DDataUsageStatUpdater.java120 final Cursor cursor = mResolver.query(Email.CONTENT_URI,
124 if (cursor == null) {
127 final Set<Long> contactIds = new HashSet<Long>(cursor.getCount());
128 final Set<Long> dataIds = new HashSet<Long>(cursor.getCount());
130 cursor.move(-1);
131 while(cursor.moveToNext()) {
132 contactIds.add(cursor.getLong(0));
133 dataIds.add(cursor.getLong(1));
136 cursor.close();
170 final Cursor cursor
[all...]
H A DBaseEmailAddressAdapter.java174 Cursor cursor = null;
185 cursor = mContentResolver.query(uri, EmailQuery.PROJECTION, null, null, null);
186 results.count = cursor.getCount();
188 results.values = new Cursor[] { directoryCursor, cursor };
238 Cursor cursor = mContentResolver.query(
240 results.values = cursor;
247 Cursor cursor = (Cursor) results.values;
248 onPartitionLoadFinished(constraint, mPartitionIndex, cursor);
314 protected View newView(Context context, int partitionIndex, Cursor cursor, argument
325 protected void bindView(View v, int partition, Cursor cursor, in argument
500 onPartitionLoadFinished( CharSequence constraint, int partitionIndex, Cursor cursor) argument
528 removeDuplicatesAndTruncate(int partition, Cursor cursor) argument
554 hasDuplicates(Cursor cursor, int partition) argument
589 makeDisplayString(Cursor cursor) argument
[all...]
/frameworks/support/content/src/main/java/androidx/contentpager/content/
H A DInMemoryCursor.java36 * <p>Unlike {@link android.database.MatrixCursor}, this cursor is not mutable at runtime.
83 * @param cursor source of data to copy. Ownership is reserved to the called, meaning
86 InMemoryCursor(Cursor cursor, int offset, int length, int disposition) { argument
87 checkArgument(offset < cursor.getCount());
89 // NOTE: The cursor could simply be saved to a field, but we choose to wrap
91 // to the cursor...so future authors are not enticed to think there's
92 // a live link between the delegate cursor and this cursor.
93 mObserverRelay = new ObserverRelay(cursor);
95 mColumnNames = cursor
267 ObserverRelay(Cursor cursor) argument
[all...]
/frameworks/base/telephony/java/com/android/internal/telephony/
H A DCallerInfo.java169 * @param cursor the first object in the cursor is used to build the CallerInfo object.
173 public static CallerInfo getCallerInfo(Context context, Uri contactRef, Cursor cursor) { argument
184 if (VDBG) Rlog.v(TAG, "getCallerInfo() based on cursor...");
186 if (cursor != null) {
187 if (cursor.moveToFirst()) {
195 columnIndex = cursor.getColumnIndex(PhoneLookup.DISPLAY_NAME);
197 info.name = cursor.getString(columnIndex);
201 columnIndex = cursor.getColumnIndex(PhoneLookup.NUMBER);
203 info.phoneNumber = cursor
505 getColumnIndexForPersonId(Uri contactRef, Cursor cursor) argument
[all...]

Completed in 515 milliseconds

123456789