/frameworks/support/v17/leanback/src/android/support/v17/leanback/database/ |
H A D | CursorMapper.java | 31 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 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 200 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/tools/layoutlib/create/src/com/android/tools/layoutlib/java/ |
H A D | IntegralToString.java | 140 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 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/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 | 114 * <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 D | CompositeCursorAdapter.java | 38 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/base/packages/DocumentsUI/src/com/android/documentsui/ |
H A D | FilteringCursorWrapper.java | 38 public FilteringCursorWrapper(Cursor cursor, String[] acceptMimes) { argument 39 this(cursor, acceptMimes, null, Long.MIN_VALUE); 42 public FilteringCursorWrapper(Cursor cursor, String[] acceptMimes, String[] rejectMimes) { argument 43 this(cursor, acceptMimes, rejectMimes, Long.MIN_VALUE); 47 Cursor cursor, String[] acceptMimes, String[] rejectMimes, long rejectBefore) { 48 mCursor = cursor; 50 final int count = cursor.getCount(); 53 cursor.moveToPosition(-1); 54 while (cursor.moveToNext() && mCount < count) { 55 final String mimeType = getCursorString(cursor, Documen 46 FilteringCursorWrapper( Cursor cursor, String[] acceptMimes, String[] rejectMimes, long rejectBefore) argument [all...] |
/frameworks/opt/telephony/src/java/android/telephony/ |
H A D | CellBroadcastMessage.java | 36 * in the database cursor returned by the ContentProvider. 123 * @param cursor an open SQLite cursor pointing to the row to read 127 public static CellBroadcastMessage createFromCursor(Cursor cursor) { argument 128 int geoScope = cursor.getInt( 129 cursor.getColumnIndexOrThrow(Telephony.CellBroadcasts.GEOGRAPHICAL_SCOPE)); 130 int serialNum = cursor.getInt( 131 cursor.getColumnIndexOrThrow(Telephony.CellBroadcasts.SERIAL_NUMBER)); 132 int category = cursor.getInt( 133 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 | 31 * 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 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...] |
/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/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 cursor.registerContentObserver(mObserver); 56 return cursor; 61 public void deliverResult(Cursor cursor) { argument 64 if (cursor != null) { 65 cursor.close(); 70 mCursor = cursor; 135 onCanceled(Cursor cursor) argument [all...] |
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/model/ |
H A D | DocumentInfo.java | 149 public static DocumentInfo fromDirectoryCursor(Cursor cursor) { argument 150 final String authority = getCursorString(cursor, RootCursorWrapper.COLUMN_AUTHORITY); 151 return fromCursor(cursor, authority); 154 public static DocumentInfo fromCursor(Cursor cursor, String authority) { argument 156 info.updateFromCursor(cursor, authority); 160 public void updateFromCursor(Cursor cursor, String authority) { argument 162 this.documentId = getCursorString(cursor, Document.COLUMN_DOCUMENT_ID); 163 this.mimeType = getCursorString(cursor, Document.COLUMN_MIME_TYPE); 164 this.documentId = getCursorString(cursor, Document.COLUMN_DOCUMENT_ID); 165 this.mimeType = getCursorString(cursor, Documen 242 getCursorString(Cursor cursor, String columnName) argument 250 getCursorLong(Cursor cursor, String columnName) argument 265 getCursorInt(Cursor cursor, String columnName) argument [all...] |
/frameworks/rs/cpu_ref/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/opt/photoviewer/src/com/android/ex/photo/adapters/ |
H A D | PhotoPagerAdapter.java | 50 public Fragment getItem(Context context, Cursor cursor, int position) { argument 51 final String photoUri = getPhotoUri(cursor); 52 final String thumbnailUri = getThumbnailUri(cursor); 53 boolean loading = shouldShowLoadingIndicator(cursor); 100 public String getPhotoUri(Cursor cursor) { argument 101 return getString(cursor, PhotoViewColumns.CONTENT_URI); 104 public String getThumbnailUri(Cursor cursor) { argument 105 return getString(cursor, PhotoViewColumns.THUMBNAIL_URI); 108 public String getContentType(Cursor cursor) { argument 109 return getString(cursor, PhotoViewColumn 112 shouldShowLoadingIndicator(Cursor cursor) argument 121 getString(Cursor cursor, String column) argument [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 886 cursorStringToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument 902 cursorLongToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument 918 cursorShortToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument 934 cursorIntToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument 950 cursorFloatToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument 966 cursorDoubleToContentValuesIfPresent(Cursor cursor, ContentValues values, String column) argument [all...] |