From 5ee0b1e574ed93c7000e355e4a6b03fb9ed8aaba Mon Sep 17 00:00:00 2001 From: zachh Date: Tue, 3 Oct 2017 17:27:01 -0700 Subject: Only show the most recent call type icon in the new call log, instead of the last 3. This is according to the latest PRD: https://docs.google.com/document/d/1FLoQ6kNYL-QKplbniJAIUCHku87S9eYuYPs6IXe-U78 Also cleaned up warnings in CallLogQueryHandler. Screenshot: https://screenshot.googleplex.com/Z7p4BRVpLpE Bug: 34672501 Test: unit PiperOrigin-RevId: 170941445 Change-Id: Ibf79b70eda3837ea46d365729aaed0a87961e42b --- .../database/AnnotatedCallLogDatabaseHelper.java | 2 +- .../calllog/database/annotated_call_log.proto | 15 ------------ .../contract/AnnotatedCallLogContract.java | 27 ++++++++-------------- 3 files changed, 11 insertions(+), 33 deletions(-) delete mode 100644 java/com/android/dialer/calllog/database/annotated_call_log.proto (limited to 'java/com/android/dialer/calllog/database') diff --git a/java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java b/java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java index e1ec0f6b1..40d922f41 100644 --- a/java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java +++ b/java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java @@ -54,7 +54,7 @@ class AnnotatedCallLogDatabaseHelper extends SQLiteOpenHelper { .append(AnnotatedCallLog.IS_VOICEMAIL + " integer, ") // Columns only in AnnotatedCallLog .append(AnnotatedCallLog.NUMBER + " blob, ") - .append(AnnotatedCallLog.TYPE + " integer") + .append(AnnotatedCallLog.CALL_TYPE + " integer") .append(");") .toString(); diff --git a/java/com/android/dialer/calllog/database/annotated_call_log.proto b/java/com/android/dialer/calllog/database/annotated_call_log.proto deleted file mode 100644 index de2bc5f14..000000000 --- a/java/com/android/dialer/calllog/database/annotated_call_log.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto2"; - -option java_package = "com.android.dialer"; -option java_multiple_files = true; -option optimize_for = LITE_RUNTIME; - -// DIALER_SCRUB.UNCOMMENT_IN_OPEN_SOURCE option optimize_for = LITE_RUNTIME; - -package com.android.dialer; - -// A list of android.provider.CallLog.Calls.TYPE values ordered from newest to -// oldest. -message CallTypes { - repeated int32 type = 1; -} diff --git a/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java b/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java index 25950f6b9..d466da9ae 100644 --- a/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java +++ b/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java @@ -148,6 +148,13 @@ public class AnnotatedCallLogContract { */ String IS_VOICEMAIL = "is_voicemail"; + /** + * Copied from {@link android.provider.CallLog.Calls#TYPE}. + * + *

Type: INTEGER (int) + */ + String CALL_TYPE = "call_type"; + String[] ALL_COMMON_COLUMNS = new String[] { _ID, @@ -165,7 +172,8 @@ public class AnnotatedCallLogContract { PHONE_ACCOUNT_COLOR, FEATURES, IS_BUSINESS, - IS_VOICEMAIL + IS_VOICEMAIL, + CALL_TYPE }; } @@ -196,13 +204,6 @@ public class AnnotatedCallLogContract { *

Type: BLOB */ public static final String NUMBER = "number"; - - /** - * Copied from {@link android.provider.CallLog.Calls#TYPE}. - * - *

Type: INTEGER (int) - */ - public static final String TYPE = "type"; } /** @@ -232,19 +233,11 @@ public class AnnotatedCallLogContract { */ public static final String NUMBER_CALLS = "number_calls"; - /** - * The call types of the most recent 3 calls, encoded as a CallTypes proto. - * - *

TYPE: BLOB - */ - 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, CALL_TYPES}; + private static final String[] COLUMNS_ONLY_IN_COALESCED_CALL_LOG = new String[] {NUMBER_CALLS}; /** All columns in the {@link CoalescedAnnotatedCallLog}. */ public static final String[] ALL_COLUMNS = -- cgit v1.2.3