summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java
diff options
context:
space:
mode:
authorEric Erfanian <erfanian@google.com>2017-08-31 06:57:16 -0700
committerRoland Levillain <rpl@google.com>2017-09-04 18:05:19 +0100
commitfc0eb8ccebcc7846db5e8b5c5430070055679bfa (patch)
treea8a23c3202e4161ffd57a71095a404db1bcf5735 /java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java
parentea7b4dc89590ffa3332766a531e0eab6ffb9aebd (diff)
Update Dialer source to latest internal Google revision.
Previously, Android's Dialer app was developed in an internal Google source control system and only exported to public during AOSP drops. The Dialer team is now switching to a public development model similar to the telephony team. This CL represents all internal Google changes that were committed to Dialer between the public O release and today's tip of tree on internal master. This CL squashes those changes into a single commit. In subsequent changes, changes will be exported on a per-commit basis. (cherry picked from commit 2ca4318cc1ee57dda907ba2069bd61d162b1baef and amended to match paths of dependencies under prebuilts/maven_repo/bumptech/com/github/bumptech/glide/.) This CL was generated using these commands from a repository at stage-stage-master at revision ea7b4dc89590ffa3332766a531e0eab6ffb9aebd ("Merge "Update Dialer source to latest internal Google revision." am: c39ea3c55f -s ours"): git diff --binary 2ca4318cc1ee57dda907ba2069bd61d162b1baef | git apply -R --index git commit -c 2ca4318cc1ee57dda907ba2069bd61d162b1baef Test: make, flash install, run Change-Id: I529aaeb88535b9533c0ae4ef4e6c1222d4e0f1c8 PiperOrigin-RevId: 167068436
Diffstat (limited to 'java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java')
-rw-r--r--java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java140
1 files changed, 132 insertions, 8 deletions
diff --git a/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java b/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java
index 7f314e37c..25950f6b9 100644
--- a/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java
+++ b/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java
@@ -42,13 +42,131 @@ public class AnnotatedCallLogContract {
String TIMESTAMP = "timestamp";
/**
- * Name to display for the entry.
+ * Copied from {@link android.provider.CallLog.Calls#CACHED_NAME}.
+ *
+ * <p>This is exactly how it should appear to the user. If the user's locale or name display
+ * preferences change, this column should be rewritten.
+ *
+ * <p>Type: TEXT
+ */
+ String NAME = "name";
+
+ /**
+ * Copied from {@link android.provider.CallLog.Calls#CACHED_FORMATTED_NUMBER}.
*
* <p>Type: TEXT
*/
- String CONTACT_NAME = "contact_name";
+ String FORMATTED_NUMBER = "formatted_number";
+
+ /**
+ * Copied from {@link android.provider.CallLog.Calls#CACHED_PHOTO_URI}.
+ *
+ * <p>TYPE: TEXT
+ */
+ String PHOTO_URI = "photo_uri";
+
+ /**
+ * Copied from {@link android.provider.CallLog.Calls#CACHED_PHOTO_ID}.
+ *
+ * <p>Type: INTEGER (long)
+ */
+ String PHOTO_ID = "photo_id";
+
+ /**
+ * Copied from {@link android.provider.CallLog.Calls#CACHED_LOOKUP_URI}.
+ *
+ * <p>TYPE: TEXT
+ */
+ String LOOKUP_URI = "lookup_uri";
+
+ // TODO(zachh): If we need to support photos other than local contacts', add a (blob?) column.
+
+ /**
+ * The number type as a string to be displayed to the user, for example "Home" or "Mobile".
+ *
+ * <p>This column should be updated for the appropriate language when the locale changes.
+ *
+ * <p>TYPE: TEXT
+ */
+ String NUMBER_TYPE_LABEL = "number_type_label";
+
+ /**
+ * See {@link android.provider.CallLog.Calls#IS_READ}.
+ *
+ * <p>TYPE: INTEGER (boolean)
+ */
+ String IS_READ = "is_read";
+
+ /**
+ * See {@link android.provider.CallLog.Calls#NEW}.
+ *
+ * <p>Type: INTEGER (boolean)
+ */
+ String NEW = "new";
+
+ /**
+ * See {@link android.provider.CallLog.Calls#GEOCODED_LOCATION}.
+ *
+ * <p>TYPE: TEXT
+ */
+ String GEOCODED_LOCATION = "geocoded_location";
+
+ /**
+ * String suitable for display which indicates the phone account used to make the call.
+ *
+ * <p>TYPE: TEXT
+ */
+ String PHONE_ACCOUNT_LABEL = "phone_account_label";
+
+ /**
+ * The color int for the phone account.
+ *
+ * <p>TYPE: INTEGER (int)
+ */
+ String PHONE_ACCOUNT_COLOR = "phone_account_color";
- String[] ALL_COMMON_COLUMNS = new String[] {_ID, TIMESTAMP, CONTACT_NAME};
+ /**
+ * See {@link android.provider.CallLog.Calls#FEATURES}.
+ *
+ * <p>TYPE: INTEGER (int)
+ */
+ String FEATURES = "features";
+
+ /**
+ * True if a caller ID data source informed us that this is a business number. This is used to
+ * determine if a generic business avatar should be shown vs. a generic person avatar.
+ *
+ * <p>TYPE: INTEGER (boolean)
+ */
+ String IS_BUSINESS = "is_business";
+
+ /**
+ * True if this was a call to voicemail. This is used to determine if the voicemail avatar
+ * should be displayed.
+ *
+ * <p>TYPE: INTEGER (boolean)
+ */
+ String IS_VOICEMAIL = "is_voicemail";
+
+ String[] ALL_COMMON_COLUMNS =
+ new String[] {
+ _ID,
+ TIMESTAMP,
+ NAME,
+ FORMATTED_NUMBER,
+ PHOTO_URI,
+ PHOTO_ID,
+ LOOKUP_URI,
+ NUMBER_TYPE_LABEL,
+ IS_READ,
+ NEW,
+ GEOCODED_LOCATION,
+ PHONE_ACCOUNT_LABEL,
+ PHONE_ACCOUNT_COLOR,
+ FEATURES,
+ IS_BUSINESS,
+ IS_VOICEMAIL
+ };
}
/**
@@ -78,6 +196,13 @@ public class AnnotatedCallLogContract {
* <p>Type: BLOB
*/
public static final String NUMBER = "number";
+
+ /**
+ * Copied from {@link android.provider.CallLog.Calls#TYPE}.
+ *
+ * <p>Type: INTEGER (int)
+ */
+ public static final String TYPE = "type";
}
/**
@@ -108,19 +233,18 @@ public class AnnotatedCallLogContract {
public static final String NUMBER_CALLS = "number_calls";
/**
- * The phone number formatted in a way suitable for display to the user. This value is generated
- * on the fly when the {@link CoalescedAnnotatedCallLog} is generated.
+ * The call types of the most recent 3 calls, encoded as a CallTypes proto.
*
- * <p>Type: TEXT
+ * <p>TYPE: BLOB
*/
- public static final String FORMATTED_NUMBER = "formatted_number";
+ public static final String CALL_TYPES = "call_types";
/**
* Columns that are only in the {@link CoalescedAnnotatedCallLog} but not the {@link
* AnnotatedCallLog}.
*/
private static final String[] COLUMNS_ONLY_IN_COALESCED_CALL_LOG =
- new String[] {NUMBER_CALLS, FORMATTED_NUMBER};
+ new String[] {NUMBER_CALLS, CALL_TYPES};
/** All columns in the {@link CoalescedAnnotatedCallLog}. */
public static final String[] ALL_COLUMNS =