use of com.android.contacts.common.model.dataitem.DataKind in project android_packages_apps_Dialer by LineageOS.
the class ExchangeAccountType method addDataKindIm.
@Override
protected DataKind addDataKindIm(Context context) throws DefinitionException {
final DataKind kind = super.addDataKindIm(context);
// Types are not supported for IM. There can be 3 IMs, but OWA only shows only the first
kind.typeOverallMax = 3;
kind.defaultValues = new ContentValues();
kind.defaultValues.put(Im.TYPE, Im.TYPE_OTHER);
kind.fieldList = new ArrayList<>();
kind.fieldList.add(new EditField(Im.DATA, R.string.imLabelsGroup, FLAGS_EMAIL));
return kind;
}
use of com.android.contacts.common.model.dataitem.DataKind in project android_packages_apps_Dialer by LineageOS.
the class ExchangeAccountType method addDataKindOrganization.
@Override
protected DataKind addDataKindOrganization(Context context) throws DefinitionException {
final DataKind kind = super.addDataKindOrganization(context);
kind.typeOverallMax = 1;
kind.fieldList = new ArrayList<>();
kind.fieldList.add(new EditField(Organization.COMPANY, R.string.ghostData_company, FLAGS_GENERIC_NAME));
kind.fieldList.add(new EditField(Organization.TITLE, R.string.ghostData_title, FLAGS_GENERIC_NAME));
return kind;
}
use of com.android.contacts.common.model.dataitem.DataKind in project android_packages_apps_Dialer by LineageOS.
the class ExchangeAccountType method addDataKindStructuredName.
@Override
protected DataKind addDataKindStructuredName(Context context) throws DefinitionException {
DataKind kind = addKind(new DataKind(StructuredName.CONTENT_ITEM_TYPE, R.string.nameLabelsGroup, 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.PREFIX, R.string.name_prefix, FLAGS_PERSON_NAME).setOptional(true));
kind.fieldList.add(new EditField(StructuredName.FAMILY_NAME, R.string.name_family, FLAGS_PERSON_NAME));
kind.fieldList.add(new EditField(StructuredName.MIDDLE_NAME, R.string.name_middle, FLAGS_PERSON_NAME));
kind.fieldList.add(new EditField(StructuredName.GIVEN_NAME, R.string.name_given, FLAGS_PERSON_NAME));
kind.fieldList.add(new EditField(StructuredName.SUFFIX, R.string.name_suffix, FLAGS_PERSON_NAME));
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;
}
use of com.android.contacts.common.model.dataitem.DataKind in project android_packages_apps_Dialer by LineageOS.
the class ExchangeAccountType method addDataKindEmail.
@Override
protected DataKind addDataKindEmail(Context context) throws DefinitionException {
final DataKind kind = super.addDataKindEmail(context);
kind.typeOverallMax = 3;
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 GoogleAccountType method addDataKindEvent.
private DataKind addDataKindEvent(Context context) throws DefinitionException {
DataKind kind = addKind(new DataKind(Event.CONTENT_ITEM_TYPE, R.string.eventLabelsGroup, Weight.EVENT, true));
kind.actionHeader = new EventActionInflater();
kind.actionBody = new SimpleInflater(Event.START_DATE);
kind.typeColumn = Event.TYPE;
kind.typeList = new ArrayList<>();
kind.dateFormatWithoutYear = CommonDateUtils.NO_YEAR_DATE_FORMAT;
kind.dateFormatWithYear = CommonDateUtils.FULL_DATE_FORMAT;
kind.typeList.add(buildEventType(Event.TYPE_BIRTHDAY, true).setSpecificMax(1));
kind.typeList.add(buildEventType(Event.TYPE_ANNIVERSARY, false));
kind.typeList.add(buildEventType(Event.TYPE_OTHER, false));
kind.typeList.add(buildEventType(Event.TYPE_CUSTOM, false).setSecondary(true).setCustomColumn(Event.LABEL));
kind.defaultValues = new ContentValues();
kind.defaultValues.put(Event.TYPE, Event.TYPE_BIRTHDAY);
kind.fieldList = new ArrayList<>();
kind.fieldList.add(new EditField(Event.DATA, R.string.eventLabelsGroup, FLAGS_EVENT));
return kind;
}
Aggregations