Code example for CursorAdapter

Methods: getFilterQueryProvider

0
		} 
	} 
 
	@Override 
	public Cursor runQueryOnBackgroundThread(CharSequence constraint) {
		FilterQueryProvider filter = getFilterQueryProvider();
		if (filter != null) {
			return filter.runQuery(constraint);
		} 
		switch (type) {
		case ADRESS:
		default: 
			return ContactService.getContactsWithAdressCursor(contentResolver, constraint.toString());
		case MAIL:
			return ContactService.getContactsWithEmailCursor(contentResolver, constraint.toString());
		case PHONE:
			return ContactService.getContactsWithPhoneNumberCursor(contentResolver, constraint.toString());
 
		case PHONE_MAIL:
			return ContactService.getContactsWithEmailAndPhoneCursor(contentResolver, constraint.toString());
		}