From 9c70e4ca34c2f3f0c5d48b549602603eed7a6c2e Mon Sep 17 00:00:00 2001 From: wangqi Date: Wed, 2 May 2018 12:24:03 -0700 Subject: Add column for call mapping id to AnnotatedCallLog database. This will ensure call mapping used by RTT etc. won't break when migrating to new way to generate the call mapping id since they are stored in the database already. Bug: 77717594 Test: unit tests PiperOrigin-RevId: 195132562 Change-Id: Ieb52489b19b37ac2701967eb570a96457ceed4c0 --- java/com/android/dialer/calldetails/CallDetailsCursorLoader.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'java/com/android/dialer/calldetails') diff --git a/java/com/android/dialer/calldetails/CallDetailsCursorLoader.java b/java/com/android/dialer/calldetails/CallDetailsCursorLoader.java index c22ec7318..a7e17717f 100644 --- a/java/com/android/dialer/calldetails/CallDetailsCursorLoader.java +++ b/java/com/android/dialer/calldetails/CallDetailsCursorLoader.java @@ -42,7 +42,8 @@ public final class CallDetailsCursorLoader extends CursorLoader { AnnotatedCallLog.TIMESTAMP, AnnotatedCallLog.DURATION, AnnotatedCallLog.DATA_USAGE, - AnnotatedCallLog.PHONE_ACCOUNT_COMPONENT_NAME + AnnotatedCallLog.PHONE_ACCOUNT_COMPONENT_NAME, + AnnotatedCallLog.CALL_MAPPING_ID }; // Indexes for COLUMNS_FOR_CALL_DETAILS @@ -53,6 +54,7 @@ public final class CallDetailsCursorLoader extends CursorLoader { private static final int DURATION = 4; private static final int DATA_USAGE = 5; private static final int PHONE_ACCOUNT_COMPONENT_NAME = 6; + private static final int CALL_MAPPING_ID = 7; CallDetailsCursorLoader(Context context, CoalescedIds coalescedIds) { super( @@ -140,9 +142,7 @@ public final class CallDetailsCursorLoader extends CursorLoader { .setDate(cursor.getLong(TIMESTAMP)) .setDuration(cursor.getLong(DURATION)) .setDataUsage(cursor.getLong(DATA_USAGE)) - - .setCallMappingId(String.valueOf(cursor.getLong(TIMESTAMP))); - + .setCallMappingId(cursor.getString(CALL_MAPPING_ID)); String phoneAccountComponentName = cursor.getString(PHONE_ACCOUNT_COMPONENT_NAME); entry.setIsDuoCall( -- cgit v1.2.3