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

123

/frameworks/base/core/tests/coretests/src/android/database/
H A DMatrixCursorTest.java26 Cursor cursor = new MatrixCursor(new String[] { "a" });
27 assertEquals(0, cursor.getCount());
31 MatrixCursor cursor = new MatrixCursor(new String[] { "a" });
32 cursor.newRow().add(null);
33 cursor.moveToNext();
34 assertTrue(cursor.isNull(0));
35 assertNull(cursor.getString(0));
36 assertEquals(0, cursor.getShort(0));
37 assertEquals(0, cursor.getInt(0));
38 assertEquals(0L, cursor
143 checkValues(MatrixCursor cursor) argument
[all...]
H A DDatabaseLocaleTest.java111 Cursor cursor = null;
115 cursor = mDatabase.rawQuery("SELECT data FROM test WHERE id = 1", null);
117 assertNotNull(cursor);
118 assertTrue(cursor.moveToFirst());
119 String actualString = cursor.getString(0);
126 if (cursor != null) cursor.close();
/frameworks/base/core/java/android/widget/
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 DCursorTreeAdapter.java45 /** The cursor helper that is used to get the groups */
49 * The map of a group position to the group's children cursor helper (the
50 * cursor helper that is used to get the children for that group)
59 * Constructor. The adapter will call {@link Cursor#requery()} on the cursor whenever
62 * @param cursor The cursor from which to get the data for the groups.
64 public CursorTreeAdapter(Cursor cursor, Context context) { argument
65 init(cursor, context, true);
71 * @param cursor The cursor fro
77 CursorTreeAdapter(Cursor cursor, Context context, boolean autoRequery) argument
81 init(Cursor cursor, Context context, boolean autoRequery) argument
140 setGroupCursor(Cursor cursor) argument
222 newGroupView(Context context, Cursor cursor, boolean isExpanded, ViewGroup parent) argument
234 bindGroupView(View view, Context context, Cursor cursor, boolean isExpanded) argument
266 newChildView(Context context, Cursor cursor, boolean isLastChild, ViewGroup parent) argument
278 bindChildView(View view, Context context, Cursor cursor, boolean isLastChild) argument
344 convertToString(Cursor cursor) argument
383 changeCursor(Cursor cursor) argument
409 MyCursorHelper(Cursor cursor) argument
454 changeCursor(Cursor cursor, boolean releaseCursors) 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;
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...]
H A DCursorAdapter.java83 * Constructor. The adapter will call requery() on the cursor whenever
86 * @param c The cursor from which to get the data.
95 * @param c The cursor from which to get the data.
98 * cursor whenever it changes so the most recent
120 * Returns the cursor.
121 * @return the cursor.
175 throw new IllegalStateException("this should only be called when the cursor is valid");
178 throw new IllegalStateException("couldn't move cursor to position " + position);
208 * Makes a new view to hold the data pointed to by cursor.
210 * @param cursor Th
215 newView(Context context, Cursor cursor, ViewGroup parent) argument
225 newDropDownView(Context context, Cursor cursor, ViewGroup parent) argument
236 bindView(View view, Context context, Cursor cursor) argument
244 changeCursor(Cursor cursor) argument
278 convertToString(Cursor cursor) argument
[all...]
H A DQuickContactBadge.java244 protected void onQueryComplete(int token, Object cookie, Cursor cursor) { argument
257 if (cursor != null && cursor.moveToFirst()) {
258 long contactId = cursor.getLong(PHONE_ID_COLUMN_INDEX);
259 String lookupKey = cursor.getString(PHONE_LOOKUP_STRING_COLUMN_INDEX);
271 if (cursor != null && cursor.moveToFirst()) {
272 long contactId = cursor.getLong(EMAIL_ID_COLUMN_INDEX);
273 String lookupKey = cursor.getString(EMAIL_LOOKUP_STRING_COLUMN_INDEX);
280 if (cursor !
[all...]
H A DSimpleCursorAdapter.java25 * An easy adapter to map columns from a cursor to TextViews or ImageViews
75 * @param c The database cursor. Can be null if the cursor is not available yet.
77 * if the cursor is not available yet.
81 * parameter. Can be null if the cursor is not available yet.
92 * constructor with their corresponding cursor columns as specified in the
115 public void bindView(View view, Context context, Cursor cursor) { argument
126 bound = binder.setViewValue(v, cursor, from[i]);
130 String text = cursor.getString(from[i]);
186 * @param value the value retrieved from the cursor
288 convertToString(Cursor cursor) argument
371 setViewValue(View view, Cursor cursor, int columnIndex) argument
389 convertToString(Cursor cursor) argument
[all...]
/frameworks/base/core/java/android/database/
H A DDatabaseUtils.java321 * @param cursor the cursor to print
323 public static void dumpCursor(Cursor cursor) { argument
324 dumpCursor(cursor, System.out);
331 * @param cursor the cursor to print
334 public static void dumpCursor(Cursor cursor, PrintStream stream) { argument
335 stream.println(">>>>> Dumping cursor " + cursor);
336 if (cursor !
355 dumpCursor(Cursor cursor, StringBuilder sb) argument
376 dumpCursorToString(Cursor cursor) argument
387 dumpCurrentRow(Cursor cursor) argument
397 dumpCurrentRow(Cursor cursor, PrintStream stream) argument
421 dumpCurrentRow(Cursor cursor, StringBuilder sb) argument
445 dumpCurrentRowToString(Cursor cursor) argument
458 cursorStringToContentValues(Cursor cursor, String field, ContentValues values) argument
471 cursorStringToInsertHelper(Cursor cursor, String field, InsertHelper inserter, int index) argument
484 cursorStringToContentValues(Cursor cursor, String field, ContentValues values, String key) argument
496 cursorIntToContentValues(Cursor cursor, String field, ContentValues values) argument
508 cursorIntToContentValues(Cursor cursor, String field, ContentValues values, String key) argument
525 cursorLongToContentValues(Cursor cursor, String field, ContentValues values) argument
538 cursorLongToContentValues(Cursor cursor, String field, ContentValues values, String key) argument
556 cursorDoubleToCursorValues(Cursor cursor, String field, ContentValues values) argument
569 cursorDoubleToContentValues(Cursor cursor, String field, ContentValues values, String key) argument
585 cursorRowToContentValues(Cursor cursor, ContentValues values) argument
681 cursorStringToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument
697 cursorLongToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument
713 cursorShortToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument
729 cursorIntToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument
745 cursorFloatToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument
761 cursorDoubleToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument
[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...]
/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...]
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/base/core/java/android/webkit/
H A DWebViewDatabase.java399 Cursor cursor = null;
402 cursor = mDatabase.query(mTableNames[tableId], ID_PROJECTION,
404 ret = cursor.moveToFirst() == true;
408 if (cursor != null) cursor.close();
437 Cursor cursor = null;
439 cursor = mDatabase.query(mTableNames[TABLE_COOKIES_ID],
442 if (cursor.moveToFirst()) {
443 int domainCol = cursor.getColumnIndex(COOKIES_DOMAIN_COL);
444 int pathCol = cursor
[all...]
/frameworks/base/core/tests/coretests/src/android/app/
H A DDownloadManagerStressTest.java54 Cursor cursor = null;
76 cursor = mDownloadManager.query(new Query());
77 assertEquals(NUM_FILES, cursor.getCount());
79 while (cursor.moveToNext()) {
80 int status = cursor.getInt(cursor.getColumnIndex(DownloadManager.COLUMN_STATUS));
81 String filename = cursor.getString(cursor.getColumnIndex(
98 if (cursor != null) {
99 cursor
[all...]
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 DDownloadManagerBaseTest.java149 Cursor cursor = dm.query(new Query().setFilterById(id));
151 if (cursor.moveToFirst()) {
152 int status = cursor.getInt(cursor.getColumnIndex(
159 cursor.close();
456 protected void logDBColumnData(Cursor cursor, String column) { argument
457 int index = cursor.getColumnIndex(column);
459 Log.i(LOG_TAG, "columnValue: " + cursor.getString(index));
490 Cursor cursor = mDownloadManager.query(new Query().setFilterById(requestId));
493 assertEquals(1, cursor
949 verifyInt(Cursor cursor, String columnName, int expected) argument
962 verifyString(Cursor cursor, String columnName, String expected) argument
[all...]
/frameworks/base/core/java/android/database/sqlite/
H A DSQLiteContentHelper.java71 Cursor cursor = db.rawQuery(sql, selectionArgs);
72 if (cursor == null) {
76 if (!cursor.moveToFirst()) {
79 byte[] bytes = cursor.getBlob(0);
88 cursor.close();
H A DSQLiteCursorDriver.java46 void cursorRequeried(Cursor cursor); argument
/frameworks/base/core/java/android/provider/
H A DCalendar.java608 public static EntityIterator newEntityIterator(Cursor cursor, ContentResolver resolver) { argument
609 return new EntityIteratorImpl(cursor, resolver);
612 public static EntityIterator newEntityIterator(Cursor cursor, argument
614 return new EntityIteratorImpl(cursor, provider);
651 public EntityIteratorImpl(Cursor cursor, ContentResolver resolver) { argument
652 super(cursor);
657 public EntityIteratorImpl(Cursor cursor, ContentProviderClient provider) { argument
658 super(cursor);
664 public Entity getEntityAndIncrementCursor(Cursor cursor) throws RemoteException { argument
665 // we expect the cursor i
[all...]
H A DContactsContract.java619 * URI parameter and cursor extras that return counts of rows grouped by the
622 * cursor extras bundle.
630 * the address book index as cursor extras. For most languages it is the
632 * content of the cursor.
640 * same order as the data in the cursor.
1028 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/contact";
1034 public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contact";
1078 * Cursor cursor = getContentResolver().query(suggestionsUri,
1110 * Cursor cursor = getContentResolver().query(photoUri,
1112 * if (cursor
1767 newEntityIterator(Cursor cursor) argument
1793 EntityIteratorImpl(Cursor cursor) argument
1798 getEntityAndIncrementCursor(Cursor cursor) argument
5139 newEntityIterator(Cursor cursor) argument
5144 EntityIteratorImpl(Cursor cursor) argument
5149 getEntityAndIncrementCursor(Cursor cursor) argument
[all...]
/frameworks/base/telephony/java/com/android/internal/telephony/
H A DCallerInfo.java119 * @param cursor the first object in the cursor is used to build the CallerInfo object.
123 public static CallerInfo getCallerInfo(Context context, Uri contactRef, Cursor cursor) { argument
133 if (VDBG) Log.v(TAG, "construct callerInfo from cursor");
135 if (cursor != null) {
136 if (cursor.moveToFirst()) {
144 columnIndex = cursor.getColumnIndex(PhoneLookup.DISPLAY_NAME);
146 info.name = cursor.getString(columnIndex);
150 columnIndex = cursor.getColumnIndex(PhoneLookup.NUMBER);
152 info.phoneNumber = cursor
415 getColumnIndexForPersonId(Uri contactRef, Cursor cursor) argument
[all...]
/frameworks/base/core/java/android/text/util/
H A DRfc822Tokenizer.java51 int cursor = text.length();
53 while (i < cursor) {
59 while (i < cursor && text.charAt(i) == ' ') {
81 while (i < cursor) {
88 if (i + 1 < cursor) {
101 while (i < cursor && level > 0) {
116 if (i + 1 < cursor) {
128 while (i < cursor) {
210 public int findTokenStart(CharSequence text, int cursor) { argument
213 * we reach the cursor
241 findTokenEnd(CharSequence text, int cursor) argument
[all...]

Completed in 581 milliseconds

123