Loading src/com/android/contacts/model/AccountType.java +15 −5 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.provider.ContactsContract.CommonDataKinds.StructuredPostal; import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.Data; import android.provider.ContactsContract.RawContacts; import android.util.Log; import android.view.inputmethod.EditorInfo; import android.widget.EditText; Loading Loading @@ -82,6 +83,14 @@ public abstract class AccountType { */ private HashMap<String, DataKind> mMimeKinds = Maps.newHashMap(); /** * Whether this account type was able to be fully initialized. This may be false if * (for example) the package name associated with the account type could not be found. */ public boolean isInitialized() { return true; } public boolean isExtension() { return false; } Loading Loading @@ -234,10 +243,6 @@ public abstract class AccountType { */ abstract public boolean isGroupMembershipEditable(); abstract public int getHeaderColor(Context context); abstract public int getSideBarColor(Context context); /** * {@link Comparator} to sort by {@link DataKind#weight}. */ Loading Loading @@ -270,6 +275,11 @@ public abstract class AccountType { * Add given {@link DataKind} to list of those provided by this source. */ public DataKind addKind(DataKind kind) { if (mMimeKinds.get(kind.mimeType) != null) { // TODO Make it exception. Log.w(TAG, "mime type '" + kind.mimeType + "' is already registered"); } kind.resPackageName = this.resPackageName; this.mKinds.add(kind); this.mMimeKinds.put(kind.mimeType, kind); Loading Loading @@ -351,7 +361,7 @@ public abstract class AccountType { * {@link Phone#NUMBER}. Includes flags to apply to an {@link EditText}, and * the column where this field is stored. */ public static class EditField { public static final class EditField { public String column; public int titleRes; public int inputType; Loading src/com/android/contacts/model/AccountTypeManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -411,7 +411,7 @@ class AccountTypeManagerImpl extends AccountTypeManager Log.d(TAG, "Registering external account type=" + type + ", packageName=" + auth.packageName); accountType = new ExternalAccountType(mContext, auth.packageName, false); if (!((ExternalAccountType) accountType).isInitialized()) { if (!accountType.isInitialized()) { // Skip external account types that couldn't be initialized. continue; } Loading src/com/android/contacts/model/BaseAccountType.java +910 −24 File changed.Preview size limit exceeded, changes collapsed. Show changes src/com/android/contacts/model/DataKind.java +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ import java.util.List; * {@link Data} rows of this kind, including the possible {@link EditType} * labels and editable {@link EditField}. */ public class DataKind { public final class DataKind { public static final String PSEUDO_MIME_TYPE_DISPLAY_NAME = "#displayName"; public static final String PSEUDO_MIME_TYPE_PHONETIC_NAME = "#phoneticName"; Loading src/com/android/contacts/model/ExchangeAccountType.java +0 −10 Original line number Diff line number Diff line Loading @@ -322,16 +322,6 @@ public class ExchangeAccountType extends BaseAccountType { return kind; } @Override public int getHeaderColor(Context context) { return 0xffd5ba96; } @Override public int getSideBarColor(Context context) { return 0xffb58e59; } @Override public boolean isGroupMembershipEditable() { return true; Loading Loading
src/com/android/contacts/model/AccountType.java +15 −5 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.provider.ContactsContract.CommonDataKinds.StructuredPostal; import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.Data; import android.provider.ContactsContract.RawContacts; import android.util.Log; import android.view.inputmethod.EditorInfo; import android.widget.EditText; Loading Loading @@ -82,6 +83,14 @@ public abstract class AccountType { */ private HashMap<String, DataKind> mMimeKinds = Maps.newHashMap(); /** * Whether this account type was able to be fully initialized. This may be false if * (for example) the package name associated with the account type could not be found. */ public boolean isInitialized() { return true; } public boolean isExtension() { return false; } Loading Loading @@ -234,10 +243,6 @@ public abstract class AccountType { */ abstract public boolean isGroupMembershipEditable(); abstract public int getHeaderColor(Context context); abstract public int getSideBarColor(Context context); /** * {@link Comparator} to sort by {@link DataKind#weight}. */ Loading Loading @@ -270,6 +275,11 @@ public abstract class AccountType { * Add given {@link DataKind} to list of those provided by this source. */ public DataKind addKind(DataKind kind) { if (mMimeKinds.get(kind.mimeType) != null) { // TODO Make it exception. Log.w(TAG, "mime type '" + kind.mimeType + "' is already registered"); } kind.resPackageName = this.resPackageName; this.mKinds.add(kind); this.mMimeKinds.put(kind.mimeType, kind); Loading Loading @@ -351,7 +361,7 @@ public abstract class AccountType { * {@link Phone#NUMBER}. Includes flags to apply to an {@link EditText}, and * the column where this field is stored. */ public static class EditField { public static final class EditField { public String column; public int titleRes; public int inputType; Loading
src/com/android/contacts/model/AccountTypeManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -411,7 +411,7 @@ class AccountTypeManagerImpl extends AccountTypeManager Log.d(TAG, "Registering external account type=" + type + ", packageName=" + auth.packageName); accountType = new ExternalAccountType(mContext, auth.packageName, false); if (!((ExternalAccountType) accountType).isInitialized()) { if (!accountType.isInitialized()) { // Skip external account types that couldn't be initialized. continue; } Loading
src/com/android/contacts/model/BaseAccountType.java +910 −24 File changed.Preview size limit exceeded, changes collapsed. Show changes
src/com/android/contacts/model/DataKind.java +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ import java.util.List; * {@link Data} rows of this kind, including the possible {@link EditType} * labels and editable {@link EditField}. */ public class DataKind { public final class DataKind { public static final String PSEUDO_MIME_TYPE_DISPLAY_NAME = "#displayName"; public static final String PSEUDO_MIME_TYPE_PHONETIC_NAME = "#phoneticName"; Loading
src/com/android/contacts/model/ExchangeAccountType.java +0 −10 Original line number Diff line number Diff line Loading @@ -322,16 +322,6 @@ public class ExchangeAccountType extends BaseAccountType { return kind; } @Override public int getHeaderColor(Context context) { return 0xffd5ba96; } @Override public int getSideBarColor(Context context) { return 0xffb58e59; } @Override public boolean isGroupMembershipEditable() { return true; Loading