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

1234567

/frameworks/support/v17/leanback/src/android/support/v17/leanback/database/
H A DCursorMapper.java31 protected abstract void bindColumns(Cursor cursor); argument
38 protected abstract Object bind(Cursor cursor); argument
43 public Object convert(Cursor cursor) { argument
44 if (cursor != mCursor) {
45 mCursor = cursor;
/frameworks/base/core/tests/coretests/src/android/database/
H A DMatrixCursorTest.java28 Cursor cursor = new MatrixCursor(new String[] { "a" });
29 assertEquals(0, cursor.getCount());
33 MatrixCursor cursor = new MatrixCursor(new String[] { "a" });
34 cursor.newRow().add(null);
35 cursor.moveToNext();
36 assertTrue(cursor.isNull(0));
37 assertNull(cursor.getString(0));
38 assertNull(cursor.getBlob(0));
39 assertEquals(0, cursor.getShort(0));
40 assertEquals(0, cursor
200 checkValues(MatrixCursor cursor) argument
[all...]
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/
H A DMtpDatabaseTest.java70 private static int getInt(Cursor cursor, String columnName) { argument
71 return cursor.getInt(cursor.getColumnIndex(columnName));
74 private static boolean isNull(Cursor cursor, String columnName) { argument
75 return cursor.isNull(cursor.getColumnIndex(columnName));
78 private static String getString(Cursor cursor, String columnName) { argument
79 return cursor.getString(cursor.getColumnIndex(columnName));
92 final Cursor cursor
[all...]
H A DMtpDocumentsProviderTest.java153 try (final Cursor cursor = mProvider.queryRoots(columns)) {
154 assertEquals(1, cursor.getCount());
155 assertTrue(cursor.moveToNext());
156 assertEquals("Device A", cursor.getString(0));
157 assertEquals(1, cursor.getLong(1));
164 try (final Cursor cursor = mProvider.queryChildDocuments("1", null, (String) null)) {}
211 final Cursor cursor = mProvider.queryRoots(null);
212 assertEquals(2, cursor.getCount());
213 cursor.moveToNext();
214 assertEquals("1", cursor
938 getStrings(Cursor cursor) argument
[all...]
/frameworks/ex/common/java/com/android/common/io/
H A DMoreCloseables.java26 * Closes the supplied cursor iff it is not null.
28 public static void closeQuietly(Cursor cursor) { argument
29 if (cursor != null) {
30 cursor.close();
/frameworks/base/tools/layoutlib/create/src/com/android/tools/layoutlib/java/
H A DIntegralToString.java140 int cursor = bufLen;
144 buf[--cursor] = DIGITS[radix * q - i];
149 buf[--cursor] = '-';
152 return new String(buf, cursor, bufLen - cursor);
210 int cursor = bufLen;
217 buf[--cursor] = ONES[r];
218 buf[--cursor] = TENS[r];
227 buf[--cursor] = DIGITS[r];
232 buf[--cursor]
393 intIntoCharArray(char[] buf, int cursor, int n) argument
[all...]
/frameworks/base/core/java/android/widget/
H A DCursorTreeAdapter.java44 /** The cursor helper that is used to get the groups */
48 * The map of a group position to the group's children cursor helper (the
49 * cursor helper that is used to get the children for that group)
58 * Constructor. The adapter will call {@link Cursor#requery()} on the cursor whenever
61 * @param cursor The cursor from which to get the data for the groups.
63 public CursorTreeAdapter(Cursor cursor, Context context) { argument
64 init(cursor, context, true);
70 * @param cursor The cursor fro
76 CursorTreeAdapter(Cursor cursor, Context context, boolean autoRequery) argument
80 init(Cursor cursor, Context context, boolean autoRequery) argument
139 setGroupCursor(Cursor cursor) argument
221 newGroupView(Context context, Cursor cursor, boolean isExpanded, ViewGroup parent) argument
233 bindGroupView(View view, Context context, Cursor cursor, boolean isExpanded) argument
265 newChildView(Context context, Cursor cursor, boolean isLastChild, ViewGroup parent) argument
277 bindChildView(View view, Context context, Cursor cursor, boolean isLastChild) argument
343 convertToString(Cursor cursor) argument
382 changeCursor(Cursor cursor) argument
408 MyCursorHelper(Cursor cursor) argument
453 changeCursor(Cursor cursor, boolean releaseCursors) argument
[all...]
H A DResourceCursorTreeAdapter.java41 * @param cursor The database cursor
51 public ResourceCursorTreeAdapter(Context context, Cursor cursor, int collapsedGroupLayout, argument
53 super(cursor, context);
68 * @param cursor The database cursor
76 public ResourceCursorTreeAdapter(Context context, Cursor cursor, int collapsedGroupLayout, argument
78 this(context, cursor, collapsedGroupLayout, expandedGroupLayout, childLayout, childLayout);
86 * @param cursor The database cursor
92 ResourceCursorTreeAdapter(Context context, Cursor cursor, int groupLayout, int childLayout) argument
98 newChildView(Context context, Cursor cursor, boolean isLastChild, ViewGroup parent) argument
104 newGroupView(Context context, Cursor cursor, boolean isExpanded, ViewGroup parent) argument
[all...]
H A DSimpleCursorTreeAdapter.java25 * An easy adapter to map columns from a cursor to TextViews or ImageViews
75 * @param cursor The database cursor
102 public SimpleCursorTreeAdapter(Context context, Cursor cursor, int collapsedGroupLayout, argument
105 super(context, cursor, collapsedGroupLayout, expandedGroupLayout, childLayout,
116 * @param cursor The database cursor
139 public SimpleCursorTreeAdapter(Context context, Cursor cursor, int collapsedGroupLayout, argument
142 super(context, cursor, collapsedGroupLayout, expandedGroupLayout, childLayout);
152 * @param cursor Th
172 SimpleCursorTreeAdapter(Context context, Cursor cursor, int groupLayout, String[] groupFrom, int[] groupTo, int childLayout, String[] childFrom, int[] childTo) argument
212 bindView(View view, Context context, Cursor cursor, int[] from, int[] to) argument
241 initFromColumns(Cursor cursor, String[] fromColumnNames, int[] fromColumns) argument
248 bindChildView(View view, Context context, Cursor cursor, boolean isLastChild) argument
258 bindGroupView(View view, Context context, Cursor cursor, boolean isExpanded) argument
324 setViewValue(View view, Cursor cursor, int columnIndex) argument
[all...]
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;
/frameworks/support/tv-provider/src/android/support/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);
392 * Creates a Channel object from a cursor including the fields defined in {@link Channels}.
394 * @param cursor A row from the TV Input Framework database.
395 * @return A channel with the values taken from the cursor.
397 public static Channel fromCursor(Cursor cursor) { argument
401 if ((index = cursor
[all...]
H A DBaseProgram.java309 * Sets the fields in the cursor to the given builder instance.
311 * @param cursor A row from the TV Input Framework database.
314 static void setFieldsFromCursor(Cursor cursor, Builder builder) { argument
317 if ((index = cursor.getColumnIndex(BaseTvColumns._ID)) >= 0 && !cursor.isNull(index)) {
318 builder.setId(cursor.getLong(index));
320 if ((index = cursor.getColumnIndex(BaseTvColumns.COLUMN_PACKAGE_NAME)) >= 0
321 && !cursor.isNull(index)) {
322 builder.setPackageName(cursor.getString(index));
324 if ((index = cursor
[all...]
H A DBasePreviewProgram.java309 * Sets the fields in the cursor to the given builder instance.
311 * @param cursor A row from the TV Input Framework database.
314 static void setFieldsFromCursor(Cursor cursor, Builder builder) { argument
316 BaseProgram.setFieldsFromCursor(cursor, builder);
320 cursor.getColumnIndex(PreviewProgramColumns.COLUMN_INTERNAL_PROVIDER_ID)) >= 0
321 && !cursor.isNull(index)) {
322 builder.setInternalProviderId(cursor.getString(index));
325 cursor.getColumnIndex(PreviewProgramColumns.COLUMN_PREVIEW_VIDEO_URI)) >= 0
326 && !cursor.isNull(index)) {
327 builder.setPreviewVideoUri(Uri.parse(cursor
[all...]
/frameworks/ml/bordeaux/service/src/android/bordeaux/services/
H A DBordeauxSessionStorage.java101 private BordeauxSessionManager.Session getSessionFromCursor(Cursor cursor) { argument
103 String className = cursor.getString(cursor.getColumnIndex(COLUMN_CLASS));
110 byte[] model = cursor.getBlob(cursor.getColumnIndex(COLUMN_MODEL));
116 Cursor cursor = mDbSessions.query(true, SESSION_TABLE,
119 if ((cursor == null) | (cursor.getCount() == 0)) {
120 cursor.close();
123 if (cursor
[all...]
/frameworks/base/core/java/android/provider/
H A DCalendarContract.java114 * <data android:mimeType="vnd.android.cursor.item/event" />
502 * Creates an entity iterator for the given cursor. It assumes the
503 * cursor contains a calendars query.
505 * @param cursor query on {@link #CONTENT_URI}
508 public static EntityIterator newEntityIterator(Cursor cursor) { argument
509 return new EntityIteratorImpl(cursor);
514 public EntityIteratorImpl(Cursor cursor) { argument
515 super(cursor);
519 public Entity getEntityAndIncrementCursor(Cursor cursor) throws RemoteException { argument
520 // we expect the cursor i
1292 newEntityIterator(Cursor cursor, ContentResolver resolver) argument
1304 newEntityIterator(Cursor cursor, ContentProviderClient provider) argument
1348 EntityIteratorImpl(Cursor cursor, ContentResolver resolver) argument
1354 EntityIteratorImpl(Cursor cursor, ContentProviderClient provider) argument
1361 getEntityAndIncrementCursor(Cursor cursor) argument
[all...]
/frameworks/ex/common/java/com/android/common/widget/
H A DCompositeCursorAdapter.java38 Cursor cursor; field in class:CompositeCursorAdapter.Partition
84 * Registers a partition. The cursor for that partition can be set later.
105 Cursor cursor = mPartitions.get(partitionIndex).cursor;
106 if (cursor != null && !cursor.isClosed()) {
107 cursor.close();
122 partition.cursor = null;
133 Cursor cursor = partition.cursor;
216 changeCursor(int partition, Cursor cursor) argument
368 getHeaderView(int partition, Cursor cursor, View convertView, ViewGroup parent) argument
380 newHeaderView(Context context, int partition, Cursor cursor, ViewGroup parent) argument
388 bindHeaderView(View view, int partition, Cursor cursor) argument
394 getView(int partition, Cursor cursor, int position, View convertView, ViewGroup parent) argument
410 newView(Context context, int partition, Cursor cursor, int position, ViewGroup parent) argument
417 bindView(View v, int partition, Cursor cursor, int position) argument
[all...]
/frameworks/opt/telephony/src/java/android/telephony/
H A DCellBroadcastMessage.java36 * in the database cursor returned by the ContentProvider.
125 * @param cursor an open SQLite cursor pointing to the row to read
129 public static CellBroadcastMessage createFromCursor(Cursor cursor) { argument
130 int geoScope = cursor.getInt(
131 cursor.getColumnIndexOrThrow(Telephony.CellBroadcasts.GEOGRAPHICAL_SCOPE));
132 int serialNum = cursor.getInt(
133 cursor.getColumnIndexOrThrow(Telephony.CellBroadcasts.SERIAL_NUMBER));
134 int category = cursor.getInt(
135 cursor
[all...]
/frameworks/base/core/java/android/content/
H A DCursorEntityIterator.java23 * Abstract implementation of EntityIterator that makes it easy to wrap a cursor
32 * Constructor that makes initializes the cursor such that the iterator points to the
34 * @param cursor the cursor that contains the rows that make up the entities
36 public CursorEntityIterator(Cursor cursor) { argument
38 mCursor = cursor;
43 * Returns the entity that the cursor is currently pointing to. This must take care to advance
44 * the cursor past this entity. This will never be called if the cursor is at the end.
45 * @param cursor th
49 getEntityAndIncrementCursor(Cursor cursor) argument
[all...]
H A DCursorLoader.java31 * querying cursors, building on {@link AsyncTaskLoader} to perform the cursor
64 Cursor cursor = getContext().getContentResolver().query(mUri, mProjection, mSelection,
66 if (cursor != null) {
68 // Ensure the cursor window is filled.
69 cursor.getCount();
70 cursor.registerContentObserver(mObserver);
72 cursor.close();
76 return cursor;
97 public void deliverResult(Cursor cursor) { argument
100 if (cursor !
171 onCanceled(Cursor cursor) argument
[all...]
H A DContentQueryMap.java28 * Caches the contents of a cursor into a Map of String->ContentValues and optionally
29 * keeps the cache fresh by registering for updates on the content backing the cursor. The column of
33 * The cursor data is accessed by row key and column name via getValue().
47 /** Set when a cursor change notification is received and is cleared on a call to requery(). */
51 * Creates a ContentQueryMap that caches the content backing the cursor
53 * @param cursor the cursor whose contents should be cached
55 * @param keepUpdated true if the cursor's ContentProvider should be monitored for changes and
62 public ContentQueryMap(Cursor cursor, String columnNameOfKey, boolean keepUpdated, argument
64 mCursor = cursor;
148 readCursorIntoCache(Cursor cursor) argument
[all...]
/frameworks/base/tests/LocationTracker/src/com/android/locationtracker/data/
H A DTrackerDataHelper.java111 Cursor cursor = mContext.getContentResolver().query(
114 if (cursor == null) {
115 return cursor;
117 int pos = (cursor.getCount() < limit ? 0 : cursor.getCount() - limit);
118 cursor.moveToPosition(pos);
119 return cursor;
123 * Retrieves a cursor that starts at the last limit rows
126 * @return a cursor, null if bad things happened
158 * Helper method which converts row referenced by given cursor t
165 getNextOutput(Cursor cursor) argument
[all...]
/frameworks/opt/photoviewer/src/com/android/ex/photo/adapters/
H A DPhotoPagerAdapter.java50 public Fragment getItem(Context context, Cursor cursor, int position) { argument
51 final String photoUri = getPhotoUri(cursor);
52 final String thumbnailUri = getThumbnailUri(cursor);
53 final String contentDescription = getPhotoName(cursor);
54 boolean loading = shouldShowLoadingIndicator(cursor);
102 public String getPhotoUri(Cursor cursor) { argument
103 return getString(cursor, PhotoViewColumns.CONTENT_URI);
106 public String getThumbnailUri(Cursor cursor) { argument
107 return getString(cursor, PhotoViewColumns.THUMBNAIL_URI);
110 public String getContentType(Cursor cursor) { argument
114 getPhotoName(Cursor cursor) argument
118 shouldShowLoadingIndicator(Cursor cursor) argument
127 getString(Cursor cursor, String column) argument
[all...]
/frameworks/support/core-utils/java/android/support/v4/content/
H A DCursorLoader.java59 Cursor cursor = ContentResolverCompat.query(getContext().getContentResolver(),
62 if (cursor != null) {
64 // Ensure the cursor window is filled.
65 cursor.getCount();
66 cursor.registerContentObserver(mObserver);
68 cursor.close();
72 return cursor;
93 public void deliverResult(Cursor cursor) { argument
96 if (cursor != null) {
97 cursor
167 onCanceled(Cursor cursor) argument
[all...]
/frameworks/support/core-ui/java/android/support/v4/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.java98 Cursor cursor = null;
100 cursor = mUserContext.getContentResolver().query(Calendars.CONTENT_URI, projection,
102 while (cursor != null && cursor.moveToNext()) {
103 rt.add(cursor.getLong(0));
106 if (cursor != null) {
107 cursor.close();
119 final Cursor cursor = mUserContext.getContentResolver().query(uri, INSTANCE_PROJECTION,
125 while (cursor != null && cursor
[all...]

Completed in 873 milliseconds

1234567