Fixing account type meta-data refresh.
Bug: 3313829
Change-Id: I58d7162e7c0160689b451189b299403c1d394c38
diff --git a/src/com/android/contacts/detail/ContactDetailFragment.java b/src/com/android/contacts/detail/ContactDetailFragment.java
index 82658a4..6cf092a 100644
--- a/src/com/android/contacts/detail/ContactDetailFragment.java
+++ b/src/com/android/contacts/detail/ContactDetailFragment.java
@@ -463,7 +463,7 @@
if (status != null) {
final String imMime = Im.CONTENT_ITEM_TYPE;
final DataKind imKind = sources.getKindOrFallback(accountType,
- imMime, mContext, AccountType.LEVEL_MIMETYPES);
+ imMime, mContext, AccountType.LEVEL_CONSTRAINTS);
final ViewEntry imEntry = ViewEntry.fromValues(mContext,
imMime, imKind, dataId, entryValues);
final ImActions imActions = ContactsUtils.buildImActions(entryValues);
diff --git a/src/com/android/contacts/model/EntityModifier.java b/src/com/android/contacts/model/EntityModifier.java
index a990a11..63ae586 100644
--- a/src/com/android/contacts/model/EntityModifier.java
+++ b/src/com/android/contacts/model/EntityModifier.java
@@ -357,7 +357,7 @@
for (EntityDelta state : set) {
final String accountType = state.getValues().getAsString(RawContacts.ACCOUNT_TYPE);
final AccountType source = sources.getInflatedSource(accountType,
- AccountType.LEVEL_MIMETYPES);
+ AccountType.LEVEL_CONSTRAINTS);
trimEmpty(state, source);
}
}
diff --git a/src/com/android/contacts/model/ExchangeAccountType.java b/src/com/android/contacts/model/ExchangeAccountType.java
index 2c03e40..0637bf2 100644
--- a/src/com/android/contacts/model/ExchangeAccountType.java
+++ b/src/com/android/contacts/model/ExchangeAccountType.java
@@ -68,7 +68,7 @@
@Override
protected DataKind inflateStructuredName(Context context, int inflateLevel) {
- final DataKind kind = super.inflateStructuredName(context, AccountType.LEVEL_MIMETYPES);
+ final DataKind kind = super.inflateStructuredName(context, inflateLevel);
if (inflateLevel >= AccountType.LEVEL_CONSTRAINTS) {
boolean displayOrderPrimary =
@@ -112,7 +112,7 @@
@Override
protected DataKind inflateNickname(Context context, int inflateLevel) {
- final DataKind kind = super.inflateNickname(context, AccountType.LEVEL_MIMETYPES);
+ final DataKind kind = super.inflateNickname(context, inflateLevel);
if (inflateLevel >= AccountType.LEVEL_CONSTRAINTS) {
kind.isList = false;
@@ -127,7 +127,7 @@
@Override
protected DataKind inflatePhone(Context context, int inflateLevel) {
- final DataKind kind = super.inflatePhone(context, AccountType.LEVEL_MIMETYPES);
+ final DataKind kind = super.inflatePhone(context, inflateLevel);
if (inflateLevel >= AccountType.LEVEL_CONSTRAINTS) {
kind.typeColumn = Phone.TYPE;
@@ -159,7 +159,7 @@
@Override
protected DataKind inflateEmail(Context context, int inflateLevel) {
- final DataKind kind = super.inflateEmail(context, AccountType.LEVEL_MIMETYPES);
+ final DataKind kind = super.inflateEmail(context, inflateLevel);
if (inflateLevel >= AccountType.LEVEL_CONSTRAINTS) {
kind.typeOverallMax = 3;
@@ -173,7 +173,7 @@
@Override
protected DataKind inflateStructuredPostal(Context context, int inflateLevel) {
- final DataKind kind = super.inflateStructuredPostal(context, AccountType.LEVEL_MIMETYPES);
+ final DataKind kind = super.inflateStructuredPostal(context, inflateLevel);
if (inflateLevel >= AccountType.LEVEL_CONSTRAINTS) {
final boolean useJapaneseOrder =
@@ -215,7 +215,7 @@
@Override
protected DataKind inflateIm(Context context, int inflateLevel) {
- final DataKind kind = super.inflateIm(context, AccountType.LEVEL_MIMETYPES);
+ final DataKind kind = super.inflateIm(context, inflateLevel);
if (inflateLevel >= AccountType.LEVEL_CONSTRAINTS) {
// Types are not supported for IM. There can be 3 IMs, but OWA only shows only the first
@@ -233,7 +233,7 @@
@Override
protected DataKind inflateOrganization(Context context, int inflateLevel) {
- final DataKind kind = super.inflateOrganization(context, AccountType.LEVEL_MIMETYPES);
+ final DataKind kind = super.inflateOrganization(context, inflateLevel);
if (inflateLevel >= AccountType.LEVEL_CONSTRAINTS) {
kind.isList = false;
@@ -250,7 +250,7 @@
@Override
protected DataKind inflatePhoto(Context context, int inflateLevel) {
- final DataKind kind = super.inflatePhoto(context, AccountType.LEVEL_MIMETYPES);
+ final DataKind kind = super.inflatePhoto(context, inflateLevel);
if (inflateLevel >= AccountType.LEVEL_CONSTRAINTS) {
kind.typeOverallMax = 1;
@@ -264,7 +264,7 @@
@Override
protected DataKind inflateNote(Context context, int inflateLevel) {
- final DataKind kind = super.inflateNote(context, AccountType.LEVEL_MIMETYPES);
+ final DataKind kind = super.inflateNote(context, inflateLevel);
if (inflateLevel >= AccountType.LEVEL_CONSTRAINTS) {
kind.fieldList = Lists.newArrayList();
@@ -300,7 +300,7 @@
@Override
protected DataKind inflateWebsite(Context context, int inflateLevel) {
- final DataKind kind = super.inflateWebsite(context, AccountType.LEVEL_MIMETYPES);
+ final DataKind kind = super.inflateWebsite(context, inflateLevel);
if (inflateLevel >= AccountType.LEVEL_CONSTRAINTS) {
kind.isList = false;
diff --git a/src/com/android/contacts/model/GoogleAccountType.java b/src/com/android/contacts/model/GoogleAccountType.java
index c5a379a..e11e012 100644
--- a/src/com/android/contacts/model/GoogleAccountType.java
+++ b/src/com/android/contacts/model/GoogleAccountType.java
@@ -50,7 +50,7 @@
@Override
protected DataKind inflatePhone(Context context, int inflateLevel) {
- final DataKind kind = super.inflatePhone(context, AccountType.LEVEL_MIMETYPES);
+ final DataKind kind = super.inflatePhone(context, inflateLevel);
if (inflateLevel >= AccountType.LEVEL_CONSTRAINTS) {
kind.typeColumn = Phone.TYPE;
@@ -74,7 +74,7 @@
@Override
protected DataKind inflateEmail(Context context, int inflateLevel) {
- final DataKind kind = super.inflateEmail(context, AccountType.LEVEL_MIMETYPES);
+ final DataKind kind = super.inflateEmail(context, inflateLevel);
if (inflateLevel >= AccountType.LEVEL_CONSTRAINTS) {
kind.typeColumn = Email.TYPE;