diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-01-12 02:48:25 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-01-12 02:48:25 +0000 |
commit | 6bd659e6e90346f58ed08f6c127835a320bbd2e4 (patch) | |
tree | b90e5f582dcab0d3ad6393f4ffbc7a4dd78e81dc /java/com/android/dialer/calllog/database | |
parent | 58bade2ace277dff4db3bbbfa2e07015f0f7c6ad (diff) | |
parent | 01aac5de58903555a089d16a58b9346d34d54e7b (diff) |
Merge changes I2e091371,I4e0bc1c6,I24063ee4
* changes:
Implement PhoneLookup for CP2 remote contacts
Merge PhoneLookupDataSource results into a proto in annotated call log.
Attempt to place call even call permission is missing
Diffstat (limited to 'java/com/android/dialer/calllog/database')
-rw-r--r-- | java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java | 10 | ||||
-rw-r--r-- | java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java | 80 |
2 files changed, 6 insertions, 84 deletions
diff --git a/java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java b/java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java index f90d657b8..da93ff8a3 100644 --- a/java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java +++ b/java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java @@ -38,15 +38,10 @@ class AnnotatedCallLogDatabaseHelper extends SQLiteOpenHelper { + " (" + (AnnotatedCallLog._ID + " integer primary key, ") + (AnnotatedCallLog.TIMESTAMP + " integer, ") - + (AnnotatedCallLog.NAME + " text, ") + (AnnotatedCallLog.NUMBER + " blob, ") + (AnnotatedCallLog.FORMATTED_NUMBER + " text, ") - + (AnnotatedCallLog.PHOTO_URI + " text, ") - + (AnnotatedCallLog.PHOTO_ID + " integer, ") - + (AnnotatedCallLog.LOOKUP_URI + " text, ") + (AnnotatedCallLog.DURATION + " integer, ") + (AnnotatedCallLog.DATA_USAGE + " integer, ") - + (AnnotatedCallLog.NUMBER_TYPE_LABEL + " text, ") + (AnnotatedCallLog.IS_READ + " integer, ") + (AnnotatedCallLog.NEW + " integer, ") + (AnnotatedCallLog.GEOCODED_LOCATION + " text, ") @@ -55,13 +50,10 @@ class AnnotatedCallLogDatabaseHelper extends SQLiteOpenHelper { + (AnnotatedCallLog.PHONE_ACCOUNT_LABEL + " text, ") + (AnnotatedCallLog.PHONE_ACCOUNT_COLOR + " integer, ") + (AnnotatedCallLog.FEATURES + " integer, ") - + (AnnotatedCallLog.IS_BUSINESS + " integer, ") - + (AnnotatedCallLog.IS_VOICEMAIL + " integer, ") + (AnnotatedCallLog.TRANSCRIPTION + " integer, ") + (AnnotatedCallLog.VOICEMAIL_URI + " text, ") + (AnnotatedCallLog.CALL_TYPE + " integer, ") - + (AnnotatedCallLog.CAN_REPORT_AS_INVALID_NUMBER + " integer, ") - + (AnnotatedCallLog.CP2_INFO_INCOMPLETE + " integer") + + (AnnotatedCallLog.NUMBER_ATTRIBUTES + " blob ") + ");"; /** Deletes all but the first maxRows rows (by timestamp) to keep the table a manageable size. */ diff --git a/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java b/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java index 9161d6087..d382517cd 100644 --- a/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java +++ b/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java @@ -42,15 +42,6 @@ public class AnnotatedCallLogContract { String TIMESTAMP = "timestamp"; /** - * The name (which may be a person's name or business name, but not a number) formatted exactly - * as 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"; - - /** * The phone number called or number the call came from, encoded as a {@link * com.android.dialer.DialerPhoneNumber} proto. The number may be empty if it was an incoming * call and the number was unknown. @@ -68,38 +59,6 @@ public class AnnotatedCallLogContract { String FORMATTED_NUMBER = "formatted_number"; /** - * A photo URI for the contact to display in the call log list view. - * - * <p>TYPE: TEXT - */ - String PHOTO_URI = "photo_uri"; - - /** - * A photo ID (from the contacts provider) for the contact to display in the call log list view. - * - * <p>Type: INTEGER (long) - */ - String PHOTO_ID = "photo_id"; - - /** - * The contacts provider lookup URI for the contact associated with the call. - * - * <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) @@ -156,20 +115,13 @@ public class AnnotatedCallLogContract { 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. + * Additional attributes about the number. * - * <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: BLOB * - * <p>TYPE: INTEGER (boolean) + * @see com.android.dialer.calllog.model.NumberAttributes */ - String IS_VOICEMAIL = "is_voicemail"; + String NUMBER_ATTRIBUTES = "number_attributes"; /** * Copied from {@link android.provider.CallLog.Calls#TYPE}. @@ -178,31 +130,12 @@ public class AnnotatedCallLogContract { */ String CALL_TYPE = "call_type"; - /** - * True if the number can be reported as invalid. - * - * <p>TYPE: INTEGER (boolean) - */ - String CAN_REPORT_AS_INVALID_NUMBER = "can_report_as_invalid_number"; - - /** - * True if the CP2 information is incomplete and needs to be queried at display time. - * - * <p>TYPE: INTEGER (boolean) - */ - String CP2_INFO_INCOMPLETE = "cp2_info_incomplete"; - String[] ALL_COMMON_COLUMNS = new String[] { _ID, TIMESTAMP, - NAME, NUMBER, FORMATTED_NUMBER, - PHOTO_URI, - PHOTO_ID, - LOOKUP_URI, - NUMBER_TYPE_LABEL, IS_READ, NEW, GEOCODED_LOCATION, @@ -211,11 +144,8 @@ public class AnnotatedCallLogContract { PHONE_ACCOUNT_LABEL, PHONE_ACCOUNT_COLOR, FEATURES, - IS_BUSINESS, - IS_VOICEMAIL, + NUMBER_ATTRIBUTES, CALL_TYPE, - CAN_REPORT_AS_INVALID_NUMBER, - CP2_INFO_INCOMPLETE }; } |