/frameworks/base/core/tests/coretests/src/android/database/ |
H A D | MatrixCursorTest.java | 28 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 150 checkValues(MatrixCursor cursor) argument [all...] |
/frameworks/ex/common/java/com/android/common/io/ |
H A D | MoreCloseables.java | 26 * 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/core/java/android/widget/ |
H A D | CursorTreeAdapter.java | 44 /** 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 D | ResourceCursorTreeAdapter.java | 41 * @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 D | SimpleCursorTreeAdapter.java | 25 * 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 D | CursorFilter.java | 32 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 D | AlphabetIndexer.java | 28 * 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/ex/common/java/com/android/common/widget/ |
H A D | CompositeCursorAdapter.java | 36 Cursor cursor; field in class:CompositeCursorAdapter.Partition 79 * Registers a partition. The cursor for that partition can be set later. 100 Cursor cursor = mPartitions[partitionIndex].cursor; 101 if (cursor != null && !cursor.isClosed()) { 102 cursor.close(); 117 mPartitions[i].cursor = null; 128 Cursor cursor = mPartitions[i].cursor; 210 changeCursor(int partition, Cursor cursor) argument 358 getHeaderView(int partition, Cursor cursor, View convertView, ViewGroup parent) argument 370 newHeaderView(Context context, int partition, Cursor cursor, ViewGroup parent) argument 378 bindHeaderView(View view, int partition, Cursor cursor) argument 384 getView(int partition, Cursor cursor, int position, View convertView, ViewGroup parent) argument 400 newView(Context context, int partition, Cursor cursor, int position, ViewGroup parent) argument 407 bindView(View v, int partition, Cursor cursor, int position) argument [all...] |
/frameworks/ml/bordeaux/service/src/android/bordeaux/services/ |
H A D | BordeauxSessionStorage.java | 101 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 D | CalendarContract.java | 115 * <data android:mimeType="vnd.android.cursor.item/event" /> 498 * Creates an entity iterator for the given cursor. It assumes the 499 * cursor contains a calendars query. 501 * @param cursor query on {@link #CONTENT_URI} 504 public static EntityIterator newEntityIterator(Cursor cursor) { argument 505 return new EntityIteratorImpl(cursor); 510 public EntityIteratorImpl(Cursor cursor) { argument 511 super(cursor); 515 public Entity getEntityAndIncrementCursor(Cursor cursor) throws RemoteException { argument 516 // we expect the cursor i 1283 newEntityIterator(Cursor cursor, ContentResolver resolver) argument 1295 newEntityIterator(Cursor cursor, ContentProviderClient provider) argument 1339 EntityIteratorImpl(Cursor cursor, ContentResolver resolver) argument 1345 EntityIteratorImpl(Cursor cursor, ContentProviderClient provider) argument 1352 getEntityAndIncrementCursor(Cursor cursor) argument [all...] |
/frameworks/opt/telephony/src/java/android/telephony/ |
H A D | CellBroadcastMessage.java | 44 * in the database cursor returned by the ContentProvider. 102 * @param cursor an open SQLite cursor pointing to the row to read 106 public static CellBroadcastMessage createFromCursor(Cursor cursor) { argument 107 int geoScope = cursor.getInt( 108 cursor.getColumnIndexOrThrow(Telephony.CellBroadcasts.GEOGRAPHICAL_SCOPE)); 109 int serialNum = cursor.getInt( 110 cursor.getColumnIndexOrThrow(Telephony.CellBroadcasts.SERIAL_NUMBER)); 111 int category = cursor.getInt( 112 cursor [all...] |
/frameworks/base/core/java/android/content/ |
H A D | CursorEntityIterator.java | 23 * 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 D | CursorLoader.java | 32 * querying cursors, building on {@link AsyncTaskLoader} to perform the cursor 65 Cursor cursor = getContext().getContentResolver().query(mUri, mProjection, mSelection, 67 if (cursor != null) { 68 // Ensure the cursor window is filled 69 cursor.getCount(); 70 registerContentObserver(cursor, mObserver); 72 return cursor; 93 * when the cursor needs to be refreshed. 95 void registerContentObserver(Cursor cursor, ContentObserver observer) { argument 96 cursor 101 deliverResult(Cursor cursor) argument 175 onCanceled(Cursor cursor) argument [all...] |
H A D | ContentQueryMap.java | 28 * 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 D | TrackerDataHelper.java | 111 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 D | TrackerEntry.java | 208 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 D | TrackerListHelper.java | 50 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/v4/java/android/support/v4/content/ |
H A D | CursorLoader.java | 49 Cursor cursor = getContext().getContentResolver().query(mUri, mProjection, mSelection, 51 if (cursor != null) { 52 // Ensure the cursor window is filled 53 cursor.getCount(); 54 registerContentObserver(cursor, mObserver); 56 return cursor; 61 * when the cursor needs to be refreshed. 63 void registerContentObserver(Cursor cursor, ContentObserver observer) { argument 64 cursor.registerContentObserver(mObserver); 69 public void deliverResult(Cursor cursor) { argument 143 onCanceled(Cursor cursor) argument [all...] |
/frameworks/support/v4/java/android/support/v4/widget/ |
H A D | CursorFilter.java | 33 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/compile/linkloader/utils/ |
H A D | serialize.h | 63 unsigned char const *cursor; member in class:ArchiveReader 71 cursor(buf), cursor_base(NULL), good(buf != NULL) { 76 cursor_base = cursor; 81 rsl_assert(cursor_base + size >= cursor); 82 cursor = cursor_base + size; 88 cursor = buf_begin + off; 90 cursor += off; 95 if (!good || cursor + size > buf_end) { 98 memcpy(array, cursor, size); 138 size_t delta = static_cast<size_t>(cursor [all...] |
/frameworks/base/core/java/android/webkit/ |
H A D | WebViewDatabaseClassic.java | 296 Cursor cursor = null; 299 cursor = sDatabase.query(mTableNames[tableId], ID_PROJECTION, 301 ret = cursor.moveToFirst() == true; 305 if (cursor != null) cursor.close(); 356 Cursor cursor = null; 358 cursor = sDatabase.query(mTableNames[TABLE_PASSWORD_ID], 361 if (cursor.moveToFirst()) { 363 ret[0] = cursor.getString( 364 cursor [all...] |
/frameworks/base/core/java/android/database/ |
H A D | DatabaseUtils.java | 253 * Fills the specified cursor window by iterating over the contents of the cursor. 254 * The window is filled until the cursor is exhausted or the window runs out 257 * The original position of the cursor is left unchanged by this operation. 259 * @param cursor The cursor that contains the data to put in the window. 264 public static void cursorFillWindow(final Cursor cursor, argument 266 if (position < 0 || position >= cursor.getCount()) { 269 final int oldPos = cursor.getPosition(); 270 final int numColumns = cursor 448 dumpCursor(Cursor cursor) argument 459 dumpCursor(Cursor cursor, PrintStream stream) argument 480 dumpCursor(Cursor cursor, StringBuilder sb) argument 501 dumpCursorToString(Cursor cursor) argument 512 dumpCurrentRow(Cursor cursor) argument 522 dumpCurrentRow(Cursor cursor, PrintStream stream) argument 546 dumpCurrentRow(Cursor cursor, StringBuilder sb) argument 570 dumpCurrentRowToString(Cursor cursor) argument 583 cursorStringToContentValues(Cursor cursor, String field, ContentValues values) argument 596 cursorStringToInsertHelper(Cursor cursor, String field, InsertHelper inserter, int index) argument 609 cursorStringToContentValues(Cursor cursor, String field, ContentValues values, String key) argument 621 cursorIntToContentValues(Cursor cursor, String field, ContentValues values) argument 633 cursorIntToContentValues(Cursor cursor, String field, ContentValues values, String key) argument 650 cursorLongToContentValues(Cursor cursor, String field, ContentValues values) argument 663 cursorLongToContentValues(Cursor cursor, String field, ContentValues values, String key) argument 681 cursorDoubleToCursorValues(Cursor cursor, String field, ContentValues values) argument 694 cursorDoubleToContentValues(Cursor cursor, String field, ContentValues values, String key) argument 710 cursorRowToContentValues(Cursor cursor, ContentValues values) argument 874 cursorStringToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument 890 cursorLongToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument 906 cursorShortToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument 922 cursorIntToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument 938 cursorFloatToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument 954 cursorDoubleToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument [all...] |
/frameworks/base/core/java/android/database/sqlite/ |
H A D | SQLiteDirectCursorDriver.java | 24 * A cursor driver that uses the given query directly. 45 final Cursor cursor; 50 cursor = new SQLiteCursor(this, mEditTable, query); 52 cursor = factory.newCursor(mDatabase, this, mEditTable, query); 60 return cursor; 75 public void cursorRequeried(Cursor cursor) { argument
|
/frameworks/ex/photoviewer/src/com/android/ex/photo/adapters/ |
H A D | PhotoPagerAdapter.java | 42 public Fragment getItem(Context context, Cursor cursor, int position) { argument 43 final String photoUri = cursor.getString(mContentUriIndex); 44 final String thumbnailUri = cursor.getString(mThumbnailUriIndex); 71 public String getPhotoUri(Cursor cursor) { argument 72 return cursor.getString(mContentUriIndex);
|
/frameworks/base/core/tests/coretests/src/android/app/ |
H A D | DownloadManagerFunctionalTest.java | 82 Cursor cursor = getCursor(dlRequest); 84 verifyInt(cursor, DownloadManager.COLUMN_REASON, error); 86 cursor.close(); 129 Cursor cursor = mDownloadManager.query(new Query().setFilterById(requestId)); 131 assertEquals(1, cursor.getCount()); 132 assertTrue(cursor.moveToFirst()); 136 int colIndex = cursor.getColumnIndex(DownloadManager.COLUMN_LOCAL_FILENAME); 137 String fileName = cursor.getString(colIndex); 141 cursor.close(); 167 Cursor cursor [all...] |