use of com.android.contacts.common.model.dataitem.DataKind in project android_packages_apps_Dialer by LineageOS.
the class BaseAccountType method addDataKindEmail.
protected DataKind addDataKindEmail(Context context) throws DefinitionException {
DataKind kind = addKind(new DataKind(Email.CONTENT_ITEM_TYPE, R.string.emailLabelsGroup, Weight.EMAIL, true));
kind.actionHeader = new EmailActionInflater();
kind.actionBody = new SimpleInflater(Email.DATA);
kind.typeColumn = Email.TYPE;
kind.typeList = new ArrayList<>();
kind.typeList.add(buildEmailType(Email.TYPE_HOME));
kind.typeList.add(buildEmailType(Email.TYPE_WORK));
kind.typeList.add(buildEmailType(Email.TYPE_OTHER));
kind.typeList.add(buildEmailType(Email.TYPE_MOBILE));
kind.typeList.add(buildEmailType(Email.TYPE_CUSTOM).setSecondary(true).setCustomColumn(Email.LABEL));
kind.fieldList = new ArrayList<>();
kind.fieldList.add(new EditField(Email.DATA, R.string.emailLabelsGroup, FLAGS_EMAIL));
return kind;
}
use of com.android.contacts.common.model.dataitem.DataKind in project android_packages_apps_Dialer by LineageOS.
the class BaseAccountType method addDataKindSipAddress.
protected DataKind addDataKindSipAddress(Context context) throws DefinitionException {
DataKind kind = addKind(new DataKind(SipAddress.CONTENT_ITEM_TYPE, R.string.label_sip_address, Weight.SIP_ADDRESS, true));
kind.actionHeader = new SimpleInflater(R.string.label_sip_address);
kind.actionBody = new SimpleInflater(SipAddress.SIP_ADDRESS);
kind.fieldList = new ArrayList<>();
kind.fieldList.add(new EditField(SipAddress.SIP_ADDRESS, R.string.label_sip_address, FLAGS_SIP_ADDRESS));
kind.typeOverallMax = 1;
return kind;
}
use of com.android.contacts.common.model.dataitem.DataKind in project android_packages_apps_Dialer by LineageOS.
the class BaseAccountType method addDataKindPhone.
protected DataKind addDataKindPhone(Context context) throws DefinitionException {
DataKind kind = addKind(new DataKind(Phone.CONTENT_ITEM_TYPE, R.string.phoneLabelsGroup, Weight.PHONE, true));
kind.iconAltRes = R.drawable.quantum_ic_message_vd_theme_24;
kind.iconAltDescriptionRes = R.string.sms;
kind.actionHeader = new PhoneActionInflater();
kind.actionAltHeader = new PhoneActionAltInflater();
kind.actionBody = new SimpleInflater(Phone.NUMBER);
kind.typeColumn = Phone.TYPE;
kind.typeList = new ArrayList<>();
kind.typeList.add(buildPhoneType(Phone.TYPE_MOBILE));
kind.typeList.add(buildPhoneType(Phone.TYPE_HOME));
kind.typeList.add(buildPhoneType(Phone.TYPE_WORK));
kind.typeList.add(buildPhoneType(Phone.TYPE_FAX_WORK).setSecondary(true));
kind.typeList.add(buildPhoneType(Phone.TYPE_FAX_HOME).setSecondary(true));
kind.typeList.add(buildPhoneType(Phone.TYPE_PAGER).setSecondary(true));
kind.typeList.add(buildPhoneType(Phone.TYPE_OTHER));
kind.typeList.add(buildPhoneType(Phone.TYPE_CUSTOM).setSecondary(true).setCustomColumn(Phone.LABEL));
kind.typeList.add(buildPhoneType(Phone.TYPE_CALLBACK).setSecondary(true));
kind.typeList.add(buildPhoneType(Phone.TYPE_CAR).setSecondary(true));
kind.typeList.add(buildPhoneType(Phone.TYPE_COMPANY_MAIN).setSecondary(true));
kind.typeList.add(buildPhoneType(Phone.TYPE_ISDN).setSecondary(true));
kind.typeList.add(buildPhoneType(Phone.TYPE_MAIN).setSecondary(true));
kind.typeList.add(buildPhoneType(Phone.TYPE_OTHER_FAX).setSecondary(true));
kind.typeList.add(buildPhoneType(Phone.TYPE_RADIO).setSecondary(true));
kind.typeList.add(buildPhoneType(Phone.TYPE_TELEX).setSecondary(true));
kind.typeList.add(buildPhoneType(Phone.TYPE_TTY_TDD).setSecondary(true));
kind.typeList.add(buildPhoneType(Phone.TYPE_WORK_MOBILE).setSecondary(true));
kind.typeList.add(buildPhoneType(Phone.TYPE_WORK_PAGER).setSecondary(true));
kind.typeList.add(buildPhoneType(Phone.TYPE_ASSISTANT).setSecondary(true));
kind.typeList.add(buildPhoneType(Phone.TYPE_MMS).setSecondary(true));
kind.fieldList = new ArrayList<>();
kind.fieldList.add(new EditField(Phone.NUMBER, R.string.phoneLabelsGroup, FLAGS_PHONE));
return kind;
}
use of com.android.contacts.common.model.dataitem.DataKind in project android_packages_apps_Dialer by LineageOS.
the class ExchangeAccountType method addDataKindPhoto.
@Override
protected DataKind addDataKindPhoto(Context context) throws DefinitionException {
final DataKind kind = super.addDataKindPhoto(context);
kind.typeOverallMax = 1;
kind.fieldList = new ArrayList<>();
kind.fieldList.add(new EditField(Photo.PHOTO, -1, -1));
return kind;
}
use of com.android.contacts.common.model.dataitem.DataKind in project android_packages_apps_Dialer by LineageOS.
the class ExchangeAccountType method addDataKindPhoneticName.
@Override
protected DataKind addDataKindPhoneticName(Context context) throws DefinitionException {
DataKind kind = addKind(new DataKind(DataKind.PSEUDO_MIME_TYPE_PHONETIC_NAME, R.string.name_phonetic, Weight.NONE, true));
kind.actionHeader = new SimpleInflater(R.string.nameLabelsGroup);
kind.actionBody = new SimpleInflater(Nickname.NAME);
kind.typeOverallMax = 1;
kind.fieldList = new ArrayList<>();
kind.fieldList.add(new EditField(StructuredName.PHONETIC_FAMILY_NAME, R.string.name_phonetic_family, FLAGS_PHONETIC));
kind.fieldList.add(new EditField(StructuredName.PHONETIC_GIVEN_NAME, R.string.name_phonetic_given, FLAGS_PHONETIC));
return kind;
}
Aggregations