| /cts/apps/CtsVerifier/src/com/android/cts/verifier/ |
| PassFailButtons.java | 29 import android.database.Cursor; 329 Cursor cursor = null; local 331 cursor = resolver.query(TestResultsProvider.getTestNameUri(activity), 333 return cursor.moveToFirst() && cursor.getInt(0) > 0; 335 if (cursor != null) { 336 cursor.close();
|
| /cts/hostsidetests/appsecurity/test-apps/SplitApp/src/com/android/cts/splitapp/ |
| SplitAppTest.java | 31 import android.database.Cursor; 396 final Cursor cursor = db.query("my_table", null, null, null, null, null, "value ASC"); local 398 assertEquals(3, cursor.getCount()); 399 assertTrue(cursor.moveToPosition(0)); 400 assertEquals(101, cursor.getInt(0)); 401 assertTrue(cursor.moveToPosition(1)); 402 assertEquals(102, cursor.getInt(0)); 403 assertTrue(cursor.moveToPosition(2)); 404 assertEquals(103, cursor.getInt(0)) [all...] |
| /cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
| PhoneAccountTest.java | 28 import android.database.Cursor; 219 Cursor cursor = null; local 221 cursor = mContext.getContentResolver() 224 assertEquals(0, cursor.getCount()); 226 if (cursor != null) { 227 cursor.close(); 245 Cursor cursor = null; local 249 cursor = mContext.getContentResolver( [all...] |
| /cts/tests/tests/netsecpolicy/src/android/security/ |
| NetworkSecurityPolicyTestBase.java | 9 import android.database.Cursor; 237 Cursor c = downloadManager.query( 259 Cursor cursor = null; local 262 cursor = downloadManager.query(query); 263 if (cursor.getCount() == 0) { 266 long[] removeIds = new long[cursor.getCount()]; 267 int columnIndex = cursor.getColumnIndex(DownloadManager.COLUMN_ID); 268 for (int i = 0; cursor.moveToNext(); i++) { 269 removeIds[i] = cursor.getLong(columnIndex) [all...] |
| /developers/build/prebuilts/gradle/AgendaData/Application/src/main/java/com/example/android/wearable/agendadata/ |
| CalendarQueryService.java | 39 import android.database.Cursor; 140 Cursor cursor = contentResolver.query(builder.build(), INSTANCE_PROJECTION, local 143 int idIdx = cursor.getColumnIndex(CalendarContract.Instances._ID); 144 int eventIdIdx = cursor.getColumnIndex(CalendarContract.Instances.EVENT_ID); 145 int titleIdx = cursor.getColumnIndex(CalendarContract.Instances.TITLE); 146 int beginIdx = cursor.getColumnIndex(CalendarContract.Instances.BEGIN); 147 int endIdx = cursor.getColumnIndex(CalendarContract.Instances.END); 148 int allDayIdx = cursor.getColumnIndex(CalendarContract.Instances.ALL_DAY); 149 int descIdx = cursor.getColumnIndex(CalendarContract.Instances.DESCRIPTION) [all...] |
| /developers/samples/android/wearable/wear/AgendaData/Application/src/main/java/com/example/android/wearable/agendadata/ |
| CalendarQueryService.java | 39 import android.database.Cursor; 140 Cursor cursor = contentResolver.query(builder.build(), INSTANCE_PROJECTION, local 143 int idIdx = cursor.getColumnIndex(CalendarContract.Instances._ID); 144 int eventIdIdx = cursor.getColumnIndex(CalendarContract.Instances.EVENT_ID); 145 int titleIdx = cursor.getColumnIndex(CalendarContract.Instances.TITLE); 146 int beginIdx = cursor.getColumnIndex(CalendarContract.Instances.BEGIN); 147 int endIdx = cursor.getColumnIndex(CalendarContract.Instances.END); 148 int allDayIdx = cursor.getColumnIndex(CalendarContract.Instances.ALL_DAY); 149 int descIdx = cursor.getColumnIndex(CalendarContract.Instances.DESCRIPTION) [all...] |
| /development/samples/NotePad/tests/src/com/example/android/notepad/ |
| NotePadProviderTest.java | 22 import android.database.Cursor; 340 // A Cursor to contain the retrieved note. 341 Cursor noteIdCursor; 359 // Gets a Cursor for the note. 369 // a) Checks that the cursor is not null 445 // If there are no records in the table, the returned cursor from a query should be empty. 446 Cursor cursor = mMockResolver.query( local 454 // Asserts that the returned cursor contains no records 455 assertEquals(0, cursor.getCount()) 557 Cursor cursor = mMockResolver.query( local 642 Cursor cursor = mMockResolver.query( local 731 Cursor cursor = mMockResolver.query( local [all...] |
| /development/samples/browseable/AgendaData/Application/src/com.example.android.wearable.agendadata/ |
| CalendarQueryService.java | 39 import android.database.Cursor; 140 Cursor cursor = contentResolver.query(builder.build(), INSTANCE_PROJECTION, local 143 int idIdx = cursor.getColumnIndex(CalendarContract.Instances._ID); 144 int eventIdIdx = cursor.getColumnIndex(CalendarContract.Instances.EVENT_ID); 145 int titleIdx = cursor.getColumnIndex(CalendarContract.Instances.TITLE); 146 int beginIdx = cursor.getColumnIndex(CalendarContract.Instances.BEGIN); 147 int endIdx = cursor.getColumnIndex(CalendarContract.Instances.END); 148 int allDayIdx = cursor.getColumnIndex(CalendarContract.Instances.ALL_DAY); 149 int descIdx = cursor.getColumnIndex(CalendarContract.Instances.DESCRIPTION) [all...] |
| /frameworks/base/core/java/android/content/ |
| ContentProviderNative.java | 23 import android.database.Cursor; 102 Cursor cursor = query(callingPkg, url, projection, queryArgs, cancellationSignal); local 103 if (cursor != null) { 107 adaptor = new CursorToBulkCursorAdaptor(cursor, observer, 109 cursor = null; 118 // Close cursor if an exception was thrown while constructing the adaptor. 122 if (cursor != null) { 123 cursor.close(); 392 public Cursor query(String callingPkg, Uri url, @Nullable String[] projection [all...] |
| ContentProviderOperation.java | 20 import android.database.Cursor; 325 final Cursor cursor = provider.query(mUri, projection, mSelection, selectionArgs, null); local 327 numRows = cursor.getCount(); 329 while (cursor.moveToNext()) { 331 final String cursorValue = cursor.getString(i); 344 cursor.close();
|
| /frameworks/base/core/java/android/provider/ |
| BrowserContract.java | 26 import android.database.Cursor; 330 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/bookmark"; 335 public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/bookmark"; 452 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/browser-history"; 457 public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/browser-history"; 475 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/searches"; 480 public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/searches"; 581 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/images"; 586 public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/images"; 654 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/image_mappings" 720 Cursor cursor = null; local [all...] |
| /frameworks/base/core/tests/coretests/src/android/database/ |
| DatabaseCursorTest.java | 21 import android.database.Cursor; 112 // use cursor to access blob 113 Cursor c = mDatabase.query("test", null, null, null, null, null, null); 136 Cursor c = mDatabase.rawQuery("SELECT data FROM test", null); 147 Cursor c = mDatabase.query("test", null, null, null, null, null, null); 151 // The cursor should ignore text before the last period when looking for a column. (This 211 Cursor c = mDatabase.query("test", null, "_id > 1000", null, null, null, null); 251 Cursor c = mDatabase.query("test", null, null, null, null, null, null); 267 public TestObserver(int total_, SQLiteCursor cursor) { 268 c = cursor; 496 Cursor cursor = mDatabase.rawQuery("select * from test", null); local [all...] |
| /frameworks/base/packages/MtpDocumentsProvider/src/com/android/mtp/ |
| DocumentLoader.java | 22 import android.database.Cursor; 70 synchronized Cursor queryChildDocuments(String[] columnNames, Identifier parent) 289 * Returns a cursor that traverses the child document of the parent document handled by the 293 synchronized Cursor createCursor(ContentResolver resolver, String[] columnNames) 303 final Cursor cursor = local 305 cursor.setExtras(extras); 306 cursor.setNotificationUri(resolver, createUri()); 307 return cursor;
|
| /frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/ |
| SettingsProviderTest.java | 27 import android.database.Cursor; 668 Cursor cursor = getContext().getContentResolver().query(uri, NAME_VALUE_COLUMNS, local 671 if (cursor == null || !cursor.moveToFirst()) { 676 final int nameColumnIdx = cursor.getColumnIndex(Settings.NameValueTable.NAME); 678 while (cursor.moveToNext()) { 679 String currentName = cursor.getString(nameColumnIdx); 687 cursor.close();
|
| /frameworks/opt/chips/src/com/android/ex/chips/ |
| RecipientAlternatesAdapter.java | 21 import android.database.Cursor; 124 Cursor c = null; 179 Cursor directoryCursor = null; 198 Cursor directoryContactsCursor = null; 248 private static HashMap<String, RecipientEntry> processContactEntries(Cursor c, 342 private static Cursor doQuery(CharSequence constraint, int limit, Long directoryId, 393 private static Cursor getCursorForConstruction(Context context, long contactId, 436 final Cursor cursor; local 438 cursor = context.getContentResolver().query 589 Cursor cursor = getCursor(); local [all...] |
| /frameworks/opt/telephony/src/java/com/android/internal/telephony/ |
| SmsNumberUtils.java | 20 import android.database.Cursor; 260 Cursor cursor = null; local 262 cursor = context.getContentResolver().query(MccIdd.CONTENT_URI, projection, 264 if (cursor.getCount() > 0) { 265 while (cursor.moveToNext()) { 266 String idd = cursor.getString(0); 275 if (cursor != null) { 276 cursor.close(); 463 Cursor cursor = null local [all...] |
| SubscriptionController.java | 26 import android.database.Cursor; 268 * @param cursor 271 private SubscriptionInfo getSubInfoRecord(Cursor cursor) { 272 int id = cursor.getInt(cursor.getColumnIndexOrThrow( 274 String iccId = cursor.getString(cursor.getColumnIndexOrThrow( 276 int simSlotIndex = cursor.getInt(cursor.getColumnIndexOrThrow 359 Cursor cursor = mContext.getContentResolver().query(SubscriptionManager.CONTENT_URI, local [all...] |
| WapPushOverSms.java | 32 import android.database.Cursor; 537 Cursor cursor = null; local 539 cursor = SqliteWrapper.query( 550 if (cursor != null && cursor.moveToFirst()) { 551 return cursor.getLong(0); 556 if (cursor != null) { 557 cursor.close(); 571 Cursor cursor = null local [all...] |
| /packages/apps/Bluetooth/src/com/android/bluetooth/opp/ |
| BluetoothOppNotification.java | 42 import android.database.Cursor; 246 Cursor cursor = local 249 if (cursor == null) { 255 if (cursor.getCount() > 0) { 265 final int timestampIndex = cursor.getColumnIndexOrThrow(BluetoothShare.TIMESTAMP); 266 final int directionIndex = cursor.getColumnIndexOrThrow(BluetoothShare.DIRECTION); 267 final int idIndex = cursor.getColumnIndexOrThrow(BluetoothShare._ID); 268 final int totalBytesIndex = cursor.getColumnIndexOrThrow(BluetoothShare.TOTAL_BYTES); 269 final int currentBytesIndex = cursor.getColumnIndexOrThrow(BluetoothShare.CURRENT_BYTES) 407 Cursor cursor = local 544 Cursor cursor = local [all...] |
| BluetoothOppUtility.java | 45 import android.database.Cursor; 79 Cursor cursor = context.getContentResolver().query(uri, null, null, null, null); local 80 if (cursor != null) { 81 if (cursor.moveToFirst()) { 82 fillRecord(context, cursor, info); 84 cursor.close(); 94 public static void fillRecord(Context context, Cursor cursor, BluetoothOppTransferInfo info) { 96 info.mID = cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare._ID)) [all...] |
| TestActivity.java | 39 import android.database.Cursor; 122 Cursor cursor = c.getContentResolver().query(stream, null, null, null, null); local 123 cursor.close(); 184 * Cursor queryC = getContentResolver().query(contentUri1, null, null, 199 * Cursor c = managedQuery(contentUri1, new String [] {"_id",
|
| /packages/apps/Calendar/src/com/android/calendar/alerts/ |
| AlertActivity.java | 26 import android.database.Cursor; 91 private Cursor mCursor; 104 Log.e(TAG, "Unable to globally dismiss all notifications because cursor was null."); 108 Log.e(TAG, "Unable to globally dismiss all notifications because cursor was closed."); 112 Log.e(TAG, "Unable to globally dismiss all notifications because cursor was empty."); 154 protected void onQueryComplete(int token, Object cookie, Cursor cursor) { 155 // Only set mCursor if the Activity is not finishing. Otherwise close the cursor. 157 mCursor = cursor; 158 mAdapter.changeCursor(cursor); [all...] |
| /packages/apps/Contacts/src/com/android/contacts/ |
| ShortcutIntentBuilder.java | 26 import android.database.Cursor; 181 Cursor cursor = resolver.query(Data.CONTENT_URI, PHOTO_COLUMNS, PHOTO_SELECTION, local 183 if (cursor != null) { 185 if (cursor.moveToFirst()) { 186 mBitmapData = cursor.getBlob(PHOTO_PHOTO_COLUMN_INDEX); 189 cursor.close(); 203 Cursor cursor = resolver.query(mUri, CONTACT_COLUMNS, null, null, null); local 204 if (cursor != null) 236 Cursor cursor = resolver.query(mUri, PHONE_COLUMNS, null, null, null); local [all...] |
| /packages/apps/Contacts/src/com/android/contacts/database/ |
| SimContactDaoImpl.java | 25 import android.database.Cursor; 204 final Cursor dataCursor = queryRawContactsForSimContacts(contacts); 226 final Cursor accountsCursor = queryAccountsOfRawContacts(rawContactToSimContact.keySet()); 276 final Cursor cursor = mResolver.query(uri, null, null, null, null); local 277 if (cursor == null) { 283 return loadFromCursor(cursor); 285 cursor.close(); 290 private ArrayList<SimContact> loadFromCursor(Cursor cursor) { [all...] |
| /packages/apps/Contacts/src/com/android/contacts/editor/ |
| AggregationSuggestionEngine.java | 22 import android.database.Cursor; 112 private Cursor mDataCursor; 122 AggregationSuggestionEngine.this.deliverNotification((Cursor) msg.obj); 304 Cursor cursor = contentResolver.query(uri, new String[]{Contacts._ID}, null, null, null); local 305 if (cursor == null) { 314 boolean changed = updateSuggestedContactIds(cursor); 329 Cursor dataCursor = contentResolver.query(Data.CONTENT_URI, 336 cursor.close(); 340 private boolean updateSuggestedContactIds(final Cursor cursor) [all...] |