/development/samples/browseable/BasicContactables/src/com.example.android.basiccontactables/ |
D | ContactablesLoaderCallbacks.java | 80 public void onLoadFinished(Loader<Cursor> arg0, Cursor cursor) { in onLoadFinished() argument 93 if (cursor.getCount() == 0) { in onLoadFinished() 100 int phoneColumnIndex = cursor.getColumnIndex(CommonDataKinds.Phone.NUMBER); in onLoadFinished() 101 int emailColumnIndex = cursor.getColumnIndex(CommonDataKinds.Email.ADDRESS); in onLoadFinished() 102 int nameColumnIndex = cursor.getColumnIndex(CommonDataKinds.Contactables.DISPLAY_NAME); in onLoadFinished() 103 int lookupColumnIndex = cursor.getColumnIndex(CommonDataKinds.Contactables.LOOKUP_KEY); in onLoadFinished() 104 int typeColumnIndex = cursor.getColumnIndex(CommonDataKinds.Contactables.MIMETYPE); in onLoadFinished() 107 cursor.moveToFirst(); in onLoadFinished() 113 String currentLookupKey = cursor.getString(lookupColumnIndex); in onLoadFinished() 115 String displayName = cursor.getString(nameColumnIndex); in onLoadFinished() [all …]
|
/development/samples/VoicemailProviderDemo/src/com/example/android/voicemail/common/core/ |
D | VoicemailProviderHelpers.java | 161 Cursor cursor = null; in findVoicemailBySourceData() local 163 cursor = mContentResolver.query(mBaseUri, FULL_PROJECTION, in findVoicemailBySourceData() 166 if (cursor.getCount() != 1) { in findVoicemailBySourceData() 168 cursor.getCount()); in findVoicemailBySourceData() 171 cursor.moveToFirst(); in findVoicemailBySourceData() 172 return getVoicemailFromCursor(cursor); in findVoicemailBySourceData() 174 CloseUtils.closeQuietly(cursor); in findVoicemailBySourceData() 180 Cursor cursor = null; in findVoicemailByUri() local 182 cursor = mContentResolver.query(uri, FULL_PROJECTION, null, null, null); in findVoicemailByUri() 183 if (cursor.getCount() != 1) { in findVoicemailByUri() [all …]
|
/development/samples/BusinessCard/src/com/example/android/businesscard/ |
D | ContactAccessorSdk5.java | 63 Cursor cursor = contentResolver.query(contactUri, in loadContact() local 66 if (cursor.moveToFirst()) { in loadContact() 67 contactId = cursor.getLong(0); in loadContact() 68 contactInfo.setDisplayName(cursor.getString(1)); in loadContact() 71 cursor.close(); in loadContact() 75 cursor = contentResolver.query(Phone.CONTENT_URI, in loadContact() 79 if (cursor.moveToFirst()) { in loadContact() 80 contactInfo.setPhoneNumber(cursor.getString(0)); in loadContact() 83 cursor.close(); in loadContact()
|
D | ContactAccessorSdk3_4.java | 57 Cursor cursor = contentResolver.query(contactUri, in loadContact() local 60 if (cursor.moveToFirst()) { in loadContact() 61 contactInfo.setDisplayName(cursor.getString(0)); in loadContact() 64 cursor.close(); in loadContact() 68 cursor = contentResolver.query(phoneUri, in loadContact() 72 if (cursor.moveToFirst()) { in loadContact() 73 contactInfo.setPhoneNumber(cursor.getString(0)); in loadContact() 76 cursor.close(); in loadContact()
|
/development/samples/training/threadsample/src/com/example/android/threadsample/ |
D | RSSPullService.java | 82 Cursor cursor = null; in onHandleIntent() local 115 cursor = getContentResolver().query( in onHandleIntent() 128 if (null != cursor && cursor.moveToFirst()) { in onHandleIntent() 132 cursor.getLong(cursor.getColumnIndex( in onHandleIntent() 233 cursor.getString(cursor.getColumnIndex( in onHandleIntent() 260 if (null != cursor) { in onHandleIntent() 261 cursor.close(); in onHandleIntent()
|
/development/samples/NotePad/tests/src/com/example/android/notepad/ |
D | NotePadProviderTest.java | 446 Cursor cursor = mMockResolver.query( in testQueriesOnNotesUri() local 455 assertEquals(0, cursor.getCount()); in testQueriesOnNotesUri() 464 cursor = mMockResolver.query( in testQueriesOnNotesUri() 474 assertEquals(TEST_NOTES.length, cursor.getCount()); in testQueriesOnNotesUri() 557 Cursor cursor = mMockResolver.query( in testQueriesOnNoteIdUri() local 566 assertEquals(0,cursor.getCount()); in testQueriesOnNoteIdUri() 576 cursor = mMockResolver.query( in testQueriesOnNoteIdUri() 585 assertEquals(1, cursor.getCount()); in testQueriesOnNoteIdUri() 588 assertTrue(cursor.moveToFirst()); in testQueriesOnNoteIdUri() 591 int inputNoteId = cursor.getInt(0); in testQueriesOnNoteIdUri() [all …]
|
/development/samples/ApiDemos/src/com/example/android/apis/view/ |
D | AutoComplete4.java | 44 Cursor cursor = content.query(Contacts.CONTENT_URI, in onCreate() local 47 ContactListAdapter adapter = new ContactListAdapter(this, cursor); in onCreate() 63 public View newView(Context context, Cursor cursor, ViewGroup parent) { in newView() argument 67 view.setText(cursor.getString(COLUMN_DISPLAY_NAME)); in newView() 72 public void bindView(View view, Context context, Cursor cursor) { in bindView() argument 73 ((TextView) view).setText(cursor.getString(COLUMN_DISPLAY_NAME)); in bindView() 77 public String convertToString(Cursor cursor) { in convertToString() argument 78 return cursor.getString(COLUMN_DISPLAY_NAME); in convertToString()
|
D | List3.java | 54 public boolean setViewValue(View view, Cursor cursor, int columnIndex) { in onCreate() 59 int type = cursor.getInt(COLUMN_TYPE); in onCreate() 63 label = cursor.getString(COLUMN_LABEL); in onCreate()
|
D | AutoComplete5.java | 35 Cursor cursor = content.query(Contacts.CONTENT_URI, in onCreate() local 38 new AutoComplete4.ContactListAdapter(this, cursor); in onCreate()
|
/development/samples/browseable/SpeedTracker/Application/src/com.example.android.wearable.speedtracker/db/ |
D | LocationDbHelper.java | 119 Cursor cursor = db.query( in read() local 130 int count = cursor.getCount(); in read() 132 cursor.moveToFirst(); in read() 133 while (!cursor.isAfterLast()) { in read() 135 cal.setTimeInMillis(cursor.getLong(2)); in read() 136 LocationEntry entry = new LocationEntry(cal, cursor.getDouble(1), in read() 137 cursor.getDouble(0)); in read() 139 cursor.moveToNext(); in read() 142 cursor.close(); in read()
|
/development/samples/browseable/AgendaData/Application/src/com.example.android.wearable.agendadata/ |
D | CalendarQueryService.java | 140 Cursor cursor = contentResolver.query(builder.build(), INSTANCE_PROJECTION, in queryEvents() local 143 int idIdx = cursor.getColumnIndex(CalendarContract.Instances._ID); in queryEvents() 144 int eventIdIdx = cursor.getColumnIndex(CalendarContract.Instances.EVENT_ID); in queryEvents() 145 int titleIdx = cursor.getColumnIndex(CalendarContract.Instances.TITLE); in queryEvents() 146 int beginIdx = cursor.getColumnIndex(CalendarContract.Instances.BEGIN); in queryEvents() 147 int endIdx = cursor.getColumnIndex(CalendarContract.Instances.END); in queryEvents() 148 int allDayIdx = cursor.getColumnIndex(CalendarContract.Instances.ALL_DAY); in queryEvents() 149 int descIdx = cursor.getColumnIndex(CalendarContract.Instances.DESCRIPTION); in queryEvents() 150 int ownerEmailIdx = cursor.getColumnIndex(CalendarContract.Instances.ORGANIZER); in queryEvents() 152 List<Event> events = new ArrayList<Event>(cursor.getCount()); in queryEvents() [all …]
|
/development/samples/SearchableDictionary/src/com/example/android/searchabledict/ |
D | WordActivity.java | 49 Cursor cursor = managedQuery(uri, null, null, null, null); in onCreate() local 51 if (cursor == null) { in onCreate() 54 cursor.moveToFirst(); in onCreate() 59 int wIndex = cursor.getColumnIndexOrThrow(DictionaryDatabase.KEY_WORD); in onCreate() 60 int dIndex = cursor.getColumnIndexOrThrow(DictionaryDatabase.KEY_DEFINITION); in onCreate() 62 word.setText(cursor.getString(wIndex)); in onCreate() 63 definition.setText(cursor.getString(dIndex)); in onCreate()
|
D | DictionaryDatabase.java | 144 Cursor cursor = builder.query(mDatabaseOpenHelper.getReadableDatabase(), in query() local 147 if (cursor == null) { in query() 149 } else if (!cursor.moveToFirst()) { in query() 150 cursor.close(); in query() 153 return cursor; in query()
|
/development/samples/browseable/StorageClient/src/com.example.android.storageclient/ |
D | StorageClientFragment.java | 224 Cursor cursor = getActivity().getContentResolver() in dumpImageMetaData() local 230 if (cursor != null && cursor.moveToFirst()) { in dumpImageMetaData() 234 String displayName = cursor.getString( in dumpImageMetaData() 235 cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME)); in dumpImageMetaData() 238 int sizeIndex = cursor.getColumnIndex(OpenableColumns.SIZE); in dumpImageMetaData() 245 if (!cursor.isNull(sizeIndex)) { in dumpImageMetaData() 248 size = cursor.getString(sizeIndex); in dumpImageMetaData() 255 if (cursor != null) { in dumpImageMetaData() 256 cursor.close(); in dumpImageMetaData()
|
/development/samples/VoicemailProviderDemo/src/com/example/android/voicemail/common/utils/ |
D | CloseUtils.java | 45 public static void closeQuietly(Cursor cursor) { in closeQuietly() argument 46 if (cursor != null) { in closeQuietly() 47 cursor.close(); in closeQuietly()
|
/development/samples/ApiDemos/src/com/example/android/apis/content/ |
D | ChangedContacts.java | 261 public DeleteCursorWrapper(Cursor cursor) { in DeleteCursorWrapper() argument 262 super(cursor); in DeleteCursorWrapper() 284 public View newView(Context context, Cursor cursor, ViewGroup parent) { in newView() argument 292 public void bindView(View view, Context context, Cursor cursor) { in bindView() argument 294 String id = cursor.getString(cursor.getColumnIndex( in bindView() 296 String timestamp = cursor.getString(cursor.getColumnIndex( in bindView() 314 public View newView(Context context, Cursor cursor, ViewGroup parent) { in newView() argument 323 public void bindView(View view, Context context, Cursor cursor) { in bindView() argument 326 String id = cursor.getString(cursor.getColumnIndex(ContactsContract.Data.CONTACT_ID)); in bindView() 327 String name = cursor.getString(cursor.getColumnIndex( in bindView() [all …]
|
D | PhotosContentJob.java | 159 Cursor cursor = null; in onStartJob() local 162 cursor = getContentResolver().query( in onStartJob() 165 while (cursor.moveToNext()) { in onStartJob() 167 String dir = cursor.getString(PROJECTION_DATA); in onStartJob() 173 sb.append(cursor.getInt(PROJECTION_ID)); in onStartJob() 182 if (cursor != null) { in onStartJob() 183 cursor.close(); in onStartJob()
|
/development/samples/XmlAdapters/src/com/example/android/xmladapters/ |
D | Adapters.java | 321 public abstract boolean bind(View view, Cursor cursor, int columnIndex); in bind() argument 362 public abstract String transform(Cursor cursor, int columnIndex); in transform() argument 374 public int transformToResource(Cursor cursor, int columnIndex) { in transformToResource() argument 375 return cursor.getInt(columnIndex); in transformToResource() 445 public static CursorAdapter loadCursorAdapter(Context context, int id, Cursor cursor, in loadCursorAdapter() argument 451 if (cursor != null) { in loadCursorAdapter() 452 adapter.changeCursor(cursor); in loadCursorAdapter() 940 public void bindView(View view, Context context, Cursor cursor) { in bindView() argument 949 binders[i].bind(v, cursor, cursor.getColumnIndex(mFrom[i])); in bindView() 986 protected void onPostExecute(Cursor cursor) { in onPostExecute() argument [all …]
|
D | UrlImageBinder.java | 38 public boolean bind(View view, Cursor cursor, int columnIndex) { in bind() argument 40 final String url = mTransformation.transform(cursor, columnIndex); in bind()
|
/development/samples/ApiDemos/src/com/example/android/apis/os/ |
D | SmsMessageReceiver.java | 57 Cursor cursor = context.getContentResolver().query(uri, projection, null, null, null); in onReceive() local 58 if (cursor != null) { in onReceive() 59 if (cursor.moveToFirst()) in onReceive() 60 fromDisplayName = cursor.getString(0); in onReceive() 62 cursor.close(); in onReceive()
|
/development/samples/ApiDemos/src/com/example/android/apis/app/ |
D | QuickContactsDemo.java | 76 public void bindView(View view, Context context, Cursor cursor) { in bindView() argument 79 cursor.copyStringToBuffer(SUMMARY_NAME_COLUMN_INDEX, cache.nameBuffer); in bindView() 82 final long contactId = cursor.getLong(SUMMARY_ID_COLUMN_INDEX); in bindView() 83 final String lookupKey = cursor.getString(SUMMARY_LOOKUP_KEY); in bindView() 88 public View newView(Context context, Cursor cursor, ViewGroup parent) { in newView() argument 89 View view = super.newView(context, cursor, parent); in newView()
|
/development/samples/browseable/LNotifications/src/com.example.android.lnotifications/ |
D | OtherMetadataFragment.java | 229 Cursor cursor = getActivity().getContentResolver().query(contactUri, null, null, null, in loadBitmapFromContactUri() local 231 if (cursor != null && cursor.moveToFirst()) { in loadBitmapFromContactUri() 232 int idx = cursor.getColumnIndex(ContactsContract.Contacts.PHOTO_ID); in loadBitmapFromContactUri() 233 String hasPhoto = cursor.getString(idx); in loadBitmapFromContactUri() 258 Cursor cursor = getActivity().getContentResolver().query(contactUri, null, null, null, in updateContactEntryFromUri() local 260 if (cursor != null && cursor.moveToFirst()) { in updateContactEntryFromUri() 261 int idx = cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME); in updateContactEntryFromUri() 262 String name = cursor.getString(idx); in updateContactEntryFromUri() 263 idx = cursor.getColumnIndex(ContactsContract.Contacts.PHOTO_ID); in updateContactEntryFromUri() 264 String hasPhoto = cursor.getString(idx); in updateContactEntryFromUri()
|
/development/samples/NotePad/src/com/example/android/notepad/ |
D | TitleEditor.java | 90 Cursor cursor = getContentResolver().query( in onCreate() local 98 if (cursor != null) { in onCreate() 102 cursor.moveToFirst(); in onCreate() 105 mText.setText(cursor.getString(COLUMN_INDEX_TITLE)); in onCreate()
|
D | NoteEditor.java | 344 Cursor cursor = getContentResolver().query( in onPrepareOptionsMenu() local 351 cursor.moveToFirst(); in onPrepareOptionsMenu() 352 int colNoteIndex = cursor.getColumnIndex(Notes.COLUMN_NAME_NOTE); in onPrepareOptionsMenu() 353 String savedNote = cursor.getString(colNoteIndex); in onPrepareOptionsMenu() 563 public void onLoadFinished(Loader<Cursor> cursorLoader, Cursor cursor) { in onLoadFinished() argument 566 if (cursor != null && cursor.moveToFirst() && mState == STATE_EDIT) { in onLoadFinished() 568 int colTitleIndex = cursor.getColumnIndex(NotePad.Notes.COLUMN_NAME_TITLE); in onLoadFinished() 569 int colNoteIndex = cursor.getColumnIndex(NotePad.Notes.COLUMN_NAME_NOTE); in onLoadFinished() 572 String title = cursor.getString(colTitleIndex); in onLoadFinished() 580 String note = cursor.getString(colNoteIndex); in onLoadFinished()
|
/development/samples/browseable/RuntimePermissions/src/com.example.android.system.runtimepermissions/contacts/ |
D | ContactsFragment.java | 129 public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) { in onLoadFinished() argument 131 if (cursor != null) { in onLoadFinished() 132 final int totalCount = cursor.getCount(); in onLoadFinished() 134 cursor.moveToFirst(); in onLoadFinished() 135 String name = cursor in onLoadFinished() 136 .getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME)); in onLoadFinished()
|