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

123456

/frameworks/base/core/java/android/database/sqlite/
H A DSQLiteDirectCursorDriver.java24 * 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
H A DSQLiteCursorDriver.java44 void cursorRequeried(Cursor cursor); argument
/frameworks/base/tests/LocationTracker/src/com/android/locationtracker/data/
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/tests/coretests/src/android/app/
H A DDownloadManagerFunctionalTest.java82 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...]
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.java151 Cursor cursor = dm.query(new Query().setFilterById(id));
153 if (cursor.moveToFirst()) {
154 int status = cursor.getInt(cursor.getColumnIndex(
161 cursor.close();
452 protected void logDBColumnData(Cursor cursor, String column) { argument
453 int index = cursor.getColumnIndex(column);
455 Log.i(LOG_TAG, "columnValue: " + cursor.getString(index));
486 Cursor cursor = mDownloadManager.query(new Query().setFilterById(requestId));
489 assertEquals(1, cursor
970 verifyInt(Cursor cursor, String columnName, int expected) argument
983 verifyString(Cursor cursor, String columnName, String expected) argument
[all...]
H A DDownloadManagerStressTest.java93 Cursor cursor = mDownloadManager.query(new Query());
95 assertEquals(NUM_FILES, cursor.getCount());
97 if (cursor.moveToFirst()) {
99 int status = cursor.getInt(cursor.getColumnIndex(
101 String filename = cursor.getString(cursor.getColumnIndex(
107 } while (cursor.moveToNext());
112 cursor.close();
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/
H A DRootCursorWrapper.java41 public RootCursorWrapper(String authority, String rootId, Cursor cursor, int maxCount) { argument
44 mCursor = cursor;
46 final int count = cursor.getCount();
53 if (cursor.getColumnIndex(COLUMN_AUTHORITY) != -1
54 || cursor.getColumnIndex(COLUMN_ROOT_ID) != -1) {
57 final String[] before = cursor.getColumnNames();
H A DDirectoryLoader.java50 Cursor cursor; field in class:DirectoryResult
58 IoUtils.closeQuietly(cursor);
60 cursor = null;
120 Cursor cursor = null;
124 cursor = resolver.query(stateUri, null, null, null, null);
125 if (cursor.moveToFirst()) {
126 userMode = getCursorInt(cursor, StateColumns.MODE);
129 IoUtils.closeQuietly(cursor);
164 cursor = client.query(
166 cursor
[all...]
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/
H A DCursorObjectAdapter.java51 * Change the underlying cursor to a new cursor. If there is
52 * an existing cursor it will be closed if it is different than the new
53 * cursor.
55 * @param cursor The new cursor to be used.
57 public void changeCursor(Cursor cursor) { argument
58 if (cursor == mCursor) {
64 mCursor = cursor;
73 * @param cursor Th
75 swapCursor(Cursor cursor) argument
[all...]
/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/base/telephony/java/com/android/internal/telephony/
H A DCallerInfo.java162 * @param cursor the first object in the cursor is used to build the CallerInfo object.
166 public static CallerInfo getCallerInfo(Context context, Uri contactRef, Cursor cursor) { argument
176 if (VDBG) Rlog.v(TAG, "getCallerInfo() based on cursor...");
178 if (cursor != null) {
179 if (cursor.moveToFirst()) {
187 columnIndex = cursor.getColumnIndex(PhoneLookup.DISPLAY_NAME);
189 info.name = cursor.getString(columnIndex);
193 columnIndex = cursor.getColumnIndex(PhoneLookup.NUMBER);
195 info.phoneNumber = cursor
479 getColumnIndexForPersonId(Uri contactRef, Cursor cursor) argument
[all...]
/frameworks/base/core/tests/coretests/src/android/database/
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/ml/bordeaux/service/src/android/bordeaux/services/
H A DAggregatorRecordStorage.java95 Cursor cursor = mDatabase.rawQuery("select * from " + mTableName + ";", null);
96 if (cursor.getCount() == 0) {
99 cursor.moveToFirst();
103 int columnIndex = cursor.getColumnIndex(column);
104 if (!cursor.isNull(columnIndex)) {
105 String value = cursor.getString(columnIndex);
110 } while (cursor.moveToNext());
/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...]
/frameworks/support/tests/java/android/support/v4/content/
H A DFileProviderTest.java176 Cursor cursor = mResolver.query(uri, null, null, null, null);
178 assertEquals(1, cursor.getCount());
179 cursor.moveToFirst();
180 assertEquals(TEST_FILE, cursor.getString(cursor.getColumnIndex(DISPLAY_NAME)));
181 assertEquals(TEST_DATA.length, cursor.getLong(cursor.getColumnIndex(SIZE)));
183 cursor.close();
192 Cursor cursor = mResolver.query(uri, new String[] {
195 assertEquals(1, cursor
[all...]
/frameworks/base/core/java/android/widget/
H A DSimpleCursorAdapter.java25 * An easy adapter to map columns from a cursor to TextViews or ImageViews
92 * @param c The database cursor. Can be null if the cursor is not available yet.
94 * if the cursor is not available yet.
98 * parameter. Can be null if the cursor is not available yet.
112 * constructor with their corresponding cursor columns as specified in the
135 public void bindView(View view, Context context, Cursor cursor) { argument
146 bound = binder.setViewValue(v, cursor, from[i]);
150 String text = cursor.getString(from[i]);
206 * @param value the value retrieved from the cursor
308 convertToString(Cursor cursor) argument
397 setViewValue(View view, Cursor cursor, int columnIndex) argument
415 convertToString(Cursor cursor) argument
[all...]
H A DSuggestionsAdapter.java82 // Cached column indexes, updated when the cursor changes.
101 super(context, searchView.getSuggestionRowLayout(), null /* no initial cursor */,
173 * Use the search suggestions provider to obtain a live cursor. This will be called
182 * for in app search we show the progress spinner until the cursor is returned with
185 Cursor cursor = null;
192 cursor = mSearchManager.getSuggestions(mSearchable, query, QUERY_LIMIT);
195 if (cursor != null) {
196 cursor.getCount();
197 return cursor;
202 // If cursor i
232 updateSpinnerState(Cursor cursor) argument
283 newView(Context context, Cursor cursor, ViewGroup parent) argument
315 bindView(View view, Context context, Cursor cursor) argument
401 getIcon1(Cursor cursor) argument
413 getIcon2(Cursor cursor) argument
454 convertToString(Cursor cursor) argument
621 getDefaultIcon1(Cursor cursor) argument
692 getColumnString(Cursor cursor, String columnName) argument
697 getStringOrNull(Cursor cursor, int col) argument
[all...]
/frameworks/support/v4/java/android/support/v4/widget/
H A DSimpleCursorAdapter.java77 * @param c The database cursor. Can be null if the cursor is not available yet.
79 * if the cursor is not available yet.
83 * parameter. Can be null if the cursor is not available yet.
97 * constructor with their corresponding cursor columns as specified in the
120 public void bindView(View view, Context context, Cursor cursor) { argument
131 bound = binder.setViewValue(v, cursor, from[i]);
135 String text = cursor.getString(from[i]);
191 * @param value the value retrieved from the cursor
285 * conversion column is -1, the returned String is empty if the cursor
293 convertToString(Cursor cursor) argument
377 setViewValue(View view, Cursor cursor, int columnIndex) argument
395 convertToString(Cursor cursor) argument
[all...]
/frameworks/base/cmds/uiautomator/library/testrunner-src/com/android/uiautomator/core/
H A DShellUiAutomatorBridge.java58 Cursor cursor = null;
69 cursor = provider.query(null, Settings.Secure.CONTENT_URI,
76 if (cursor.moveToFirst()) {
77 longPressTimeout = cursor.getInt(0);
80 if (cursor != null) {
81 cursor.close();
/frameworks/ex/common/tests/src/com/android/common/widget/
H A DCompositeCursorAdapterTest.java47 protected View newHeaderView(Context context, int partition, Cursor cursor, ViewGroup parent) { argument
52 protected void bindHeaderView(View view, int partition, Cursor cursor) { argument
53 mRequests.append(partition + (cursor == null ? "" : cursor.getColumnNames()[0])
58 protected View newView(Context context, int sectionIndex, Cursor cursor, int position, argument
64 protected void bindView(View v, int partition, Cursor cursor, int position) { argument
65 if (!cursor.moveToPosition(position)) {
66 fail("Invalid position:" + partition + " " + cursor.getColumnNames()[0] + " "
70 mRequests.append(partition + cursor.getColumnNames()[0] + "["
71 + cursor
[all...]
/frameworks/support/v7/appcompat/src/android/support/v7/widget/
H A DSuggestionsAdapter.java82 // Cached column indexes, updated when the cursor changes.
95 super(context, searchView.getSuggestionRowLayout(), null /* no initial cursor */,
139 * Use the search suggestions provider to obtain a live cursor. This will be called
148 * for in app search we show the progress spinner until the cursor is returned with
151 Cursor cursor = null;
157 cursor = getSearchManagerSuggestions(mSearchable, query, QUERY_LIMIT);
160 if (cursor != null) {
161 cursor.getCount();
162 return cursor;
167 // If cursor i
194 updateSpinnerState(Cursor cursor) argument
243 newView(Context context, Cursor cursor, ViewGroup parent) argument
274 bindView(View view, Context context, Cursor cursor) argument
360 getIcon1(Cursor cursor) argument
372 getIcon2(Cursor cursor) argument
413 convertToString(Cursor cursor) argument
580 getDefaultIcon1(Cursor cursor) argument
651 getColumnString(Cursor cursor, String columnName) argument
656 getStringOrNull(Cursor cursor, int col) argument
[all...]
/frameworks/base/core/java/android/database/
H A DCrossProcessCursorWrapper.java27 * If the wrapped cursor implements {@link CrossProcessCursor}, then the wrapper
30 * traverse the contents of the cursor similar to {@link AbstractCursor#fillWindow}.
38 * Creates a cross process cursor wrapper.
39 * @param cursor The underlying cursor to wrap.
41 public CrossProcessCursorWrapper(Cursor cursor) { argument
42 super(cursor);
/frameworks/base/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/downloadmanagertests/
H A DDownloadManagerBaseTest.java377 Cursor cursor = mDownloadManager.query(q);
378 boolean finished = cursor.getCount() == 1;
379 cursor.close();
440 Cursor cursor = getCursor(dlRequest);
442 int columnIndex = cursor.getColumnIndex(DownloadManager.COLUMN_STATUS);
443 int value = cursor.getInt(columnIndex);
452 cursor.requery();
453 assertTrue(cursor.moveToFirst());
454 columnIndex = cursor.getColumnIndex(DownloadManager.COLUMN_STATUS);
455 value = cursor
[all...]

Completed in 809 milliseconds

123456