Lines Matching refs:entry

234         public void onPrimaryAction(ViewEntry entry);
235 public void onSecondaryAction(ViewEntry entry);
245 public void onPrimaryAction(ViewEntry entry) {
246 Intent intent = entry.intent;
256 public void onSecondaryAction(ViewEntry entry) {
257 Intent intent = entry.secondaryIntent;
274 ViewEntry entry = ViewAdapter.getEntry(mSections, position, SHOW_SEPARATORS);
275 if (entry != null) {
276 mController.onPrimaryAction(entry);
371 final ViewEntry entry = ViewEntry.fromValues(context, mimeType, kind,
374 final boolean hasData = !TextUtils.isEmpty(entry.data);
382 entry.intent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
383 Uri.fromParts(Constants.SCHEME_TEL, entry.data, null));
384 entry.secondaryIntent = new Intent(Intent.ACTION_SENDTO,
385 Uri.fromParts(Constants.SCHEME_SMSTO, entry.data, null));
388 if (isSuperPrimary) mPrimaryPhoneUri = entry.uri;
390 entry.isPrimary = isSuperPrimary;
391 mPhoneEntries.add(entry);
393 if (entry.type == CommonDataKinds.Phone.TYPE_MOBILE
395 // Add an SMS entry
397 entry.secondaryActionIcon = kind.iconAltRes;
402 entry.intent = new Intent(Intent.ACTION_SENDTO,
403 Uri.fromParts(Constants.SCHEME_MAILTO, entry.data, null));
404 entry.isPrimary = isSuperPrimary;
405 mEmailEntries.add(entry);
408 final DataStatus status = mStatuses.get(entry.id);
421 entry.maxLines = 4;
422 entry.intent = new Intent(Intent.ACTION_VIEW, entry.uri);
423 mPostalEntries.add(entry);
426 entry.intent = ContactsUtils.buildImIntent(entryValues);
427 if (TextUtils.isEmpty(entry.label)) {
428 entry.label = context.getString(R.string.chat).toLowerCase();
432 final DataStatus status = mStatuses.get(entry.id);
434 entry.applyStatus(status, false);
436 mImEntries.add(entry);
438 (hasData || !TextUtils.isEmpty(entry.label))) {
445 && (!hasData || TextUtils.isEmpty(entry.label));
448 entry.uri = null;
450 if (TextUtils.isEmpty(entry.label)) {
451 entry.label = entry.data;
452 entry.data = "";
455 mOrganizationEntries.add(entry);
466 entry.uri = null;
467 mNicknameEntries.add(entry);
471 entry.uri = null;
472 entry.maxLines = 100;
473 mOtherEntries.add(entry);
476 entry.uri = null;
477 entry.maxLines = 10;
479 WebAddress webAddress = new WebAddress(entry.data);
480 entry.intent = new Intent(Intent.ACTION_VIEW,
483 Log.e(TAG, "Couldn't parse website: " + entry.data);
485 mOtherEntries.add(entry);
488 entry.intent = new Intent(Intent.ACTION_VIEW, entry.uri);
491 final DataStatus status = mStatuses.get(entry.id);
494 entry.applyStatus(status, true);
498 mOtherEntries.add(entry);
526 * A basic structure with the data for a contact entry in the list.
552 final ViewEntry entry = new ViewEntry();
553 entry.context = context;
554 entry.contactId = rawContactId;
555 entry.id = dataId;
556 entry.uri = ContentUris.withAppendedId(Data.CONTENT_URI, entry.id);
557 entry.mimetype = mimeType;
558 entry.label = buildActionString(kind, values, false, context);
559 entry.data = buildDataString(kind, values, context);
562 entry.type = values.getAsInteger(kind.typeColumn);
565 entry.resPackageName = kind.resPackageName;
566 entry.actionIcon = kind.iconRes;
569 return entry;
589 public boolean collapseWith(ViewEntry entry) {
591 if (!shouldCollapseWith(entry)) {
597 > TypePrecedence.getTypePrecedence(entry.mimetype, entry.type)) {
598 type = entry.type;
599 label = entry.label;
603 maxLines = Math.max(maxLines, entry.maxLines);
604 maxLabelLines = Math.max(maxLabelLines, entry.maxLabelLines);
608 < StatusUpdates.getPresencePrecedence(entry.presence)) {
609 presence = entry.presence;
613 isPrimary = entry.isPrimary ? true : isPrimary;
618 ids.add(entry.id);
623 public boolean shouldCollapseWith(ViewEntry entry) {
624 if (entry == null) {
628 if (!ContactsUtils.areDataEqual(context, mimetype, data, entry.mimetype, entry.data)) {
632 if (!TextUtils.equals(mimetype, entry.mimetype)
633 || !ContactsUtils.areIntentActionEqual(intent, entry.intent)
634 || !ContactsUtils.areIntentActionEqual(secondaryIntent, entry.secondaryIntent)
635 || actionIcon != entry.actionIcon) {
655 ViewEntry entry;
665 ViewEntry entry = getEntry(mSections, position, false);
693 // Update the entry in the view cache
694 views.entry = entry;
697 bindView(v, entry);
708 protected void bindView(View view, ViewEntry entry) {
714 setMaxLines(label, entry.maxLabelLines);
715 label.setText(entry.label);
720 if (entry.mimetype.equals(Phone.CONTENT_ITEM_TYPE)
721 || entry.mimetype.equals(Constants.MIME_SMS_ADDRESS)) {
722 data.setText(PhoneNumberUtils.formatNumber(entry.data));
724 data.setText(entry.data);
726 setMaxLines(data, entry.maxLines);
730 if (!TextUtils.isEmpty(entry.footerLine)) {
731 views.footer.setText(entry.footerLine);
738 views.primaryIcon.setVisibility(entry.isPrimary ? View.VISIBLE : View.GONE);
742 if (entry.actionIcon != -1) {
744 if (entry.resPackageName != null) {
746 actionIcon = mContext.getPackageManager().getDrawable(entry.resPackageName,
747 entry.actionIcon, null);
749 actionIcon = resources.getDrawable(entry.actionIcon);
760 mContext, entry.presence);
772 if (entry.secondaryActionIcon != -1) {
773 secondaryActionIcon = resources.getDrawable(entry.secondaryActionIcon);
775 if (entry.secondaryIntent != null && secondaryActionIcon != null) {
777 secondaryActionView.setTag(entry);