summaryrefslogtreecommitdiff
path: root/java/com/android/contacts/common/model/account/BaseAccountType.java
diff options
context:
space:
mode:
authorEric Erfanian <erfanian@google.com>2017-04-06 09:41:50 -0700
committerEric Erfanian <erfanian@google.com>2017-04-06 09:41:50 -0700
commitd8046e520a866b9948ee9ba47cf642b441ca8e23 (patch)
tree8d08d4f2292aa84dc435d455891e7ab633d95a25 /java/com/android/contacts/common/model/account/BaseAccountType.java
parentcdb1edf966a892abebcba425a85b7d4e47758302 (diff)
Update AOSP Dialer source from internal google3 repository at
cl/152373142. Test: make, treehugger This CL updates the AOSP Dialer source with all the changes that have gone into the private google3 repository. This includes all the changes from cl/151342913 (3/27/2017) to cl/152373142 (4/06/2017). This goal of these drops is to keep the AOSP source in sync with the internal google3 repository. Currently these sync are done by hand with very minor modifications to the internal source code. See the Android.mk file for list of modifications. Our current goal is to do frequent drops (daily if possible) and eventually switched to an automated process. Change-Id: I2fbc88cf6867b90ac8b65f75e5e34468988c7217
Diffstat (limited to 'java/com/android/contacts/common/model/account/BaseAccountType.java')
-rw-r--r--java/com/android/contacts/common/model/account/BaseAccountType.java23
1 files changed, 9 insertions, 14 deletions
diff --git a/java/com/android/contacts/common/model/account/BaseAccountType.java b/java/com/android/contacts/common/model/account/BaseAccountType.java
index 21b555917..8e9ba738c 100644
--- a/java/com/android/contacts/common/model/account/BaseAccountType.java
+++ b/java/com/android/contacts/common/model/account/BaseAccountType.java
@@ -36,12 +36,12 @@ import android.provider.ContactsContract.CommonDataKinds.StructuredPostal;
import android.provider.ContactsContract.CommonDataKinds.Website;
import android.util.ArrayMap;
import android.util.AttributeSet;
-import android.util.Log;
import android.view.inputmethod.EditorInfo;
import com.android.contacts.common.R;
import com.android.contacts.common.model.dataitem.DataKind;
import com.android.contacts.common.util.CommonDateUtils;
import com.android.contacts.common.util.ContactDisplayUtils;
+import com.android.dialer.common.LogUtil;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@@ -111,7 +111,6 @@ public abstract class BaseAccountType extends AccountType {
protected static final int MAX_LINES_FOR_POSTAL_ADDRESS = 10;
protected static final int MAX_LINES_FOR_GROUP = 10;
protected static final int MAX_LINES_FOR_NOTE = 100;
- private static final String TAG = "BaseAccountType";
public BaseAccountType() {
this.accountType = null;
@@ -308,7 +307,7 @@ public abstract class BaseAccountType extends AccountType {
DataKind kind =
addKind(
new DataKind(Phone.CONTENT_ITEM_TYPE, R.string.phoneLabelsGroup, Weight.PHONE, true));
- kind.iconAltRes = R.drawable.ic_message_24dp;
+ kind.iconAltRes = R.drawable.quantum_ic_message_white_24;
kind.iconAltDescriptionRes = R.string.sms;
kind.actionHeader = new PhoneActionInflater();
kind.actionAltHeader = new PhoneActionAltInflater();
@@ -546,7 +545,7 @@ public abstract class BaseAccountType extends AccountType {
addKind(kind);
}
} else {
- Log.w(TAG, "Skipping unknown tag " + tag);
+ LogUtil.i("BaseAccountType.parseEditSchema", "Skipping unknown tag " + tag);
}
}
}
@@ -875,9 +874,7 @@ public abstract class BaseAccountType extends AccountType {
StringInflater actionBody)
throws DefinitionException, XmlPullParserException, IOException {
- if (Log.isLoggable(TAG, Log.DEBUG)) {
- Log.d(TAG, "Adding DataKind: " + mimeType);
- }
+ LogUtil.d("BaseAccountType.newDataKind", "Adding DataKind: " + mimeType);
final DataKind kind = new DataKind(mimeType, titleRes, weight, true);
kind.typeColumn = typeColumn;
@@ -896,13 +893,13 @@ public abstract class BaseAccountType extends AccountType {
if (kind.typeColumn != null) {
// Parse and add types.
kind.typeList = new ArrayList<>();
- parseTypes(context, parser, attrs, kind, true);
+ parseTypes(parser, attrs, kind, true);
if (kind.typeList.size() == 0) {
throw new DefinitionException("Kind " + kind.mimeType + " must have at least one type");
}
} else {
// Make sure it has no types.
- parseTypes(context, parser, attrs, kind, false /* can't have types */);
+ parseTypes(parser, attrs, kind, false /* can't have types */);
}
}
@@ -915,7 +912,6 @@ public abstract class BaseAccountType extends AccountType {
* {@link DefinitionException}.
*/
private void parseTypes(
- Context context,
XmlPullParser parser,
AttributeSet attrs,
DataKind kind,
@@ -933,7 +929,7 @@ public abstract class BaseAccountType extends AccountType {
final String tag = parser.getName();
if (Tag.TYPE.equals(tag)) {
if (canHaveTypes) {
- kind.typeList.add(parseTypeTag(parser, attrs, kind));
+ kind.typeList.add(parseTypeTag(attrs, kind));
} else {
throw new DefinitionException("Kind " + kind.mimeType + " can't have types");
}
@@ -947,8 +943,7 @@ public abstract class BaseAccountType extends AccountType {
* Parses a single Type element and returns an {@link EditType} built from it. Uses {@link
* #buildEditTypeForTypeTag} defined in subclasses to actually build an {@link EditType}.
*/
- private EditType parseTypeTag(XmlPullParser parser, AttributeSet attrs, DataKind kind)
- throws DefinitionException {
+ private EditType parseTypeTag(AttributeSet attrs, DataKind kind) throws DefinitionException {
final String typeName = getAttr(attrs, Attr.TYPE);
@@ -1233,7 +1228,7 @@ public abstract class BaseAccountType extends AccountType {
new PhoneActionInflater(),
new SimpleInflater(Phone.NUMBER));
- kind.iconAltRes = R.drawable.ic_message_24dp;
+ kind.iconAltRes = R.drawable.quantum_ic_message_white_24;
kind.iconAltDescriptionRes = R.string.sms;
kind.actionAltHeader = new PhoneActionAltInflater();