summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/calllog/datasources
diff options
context:
space:
mode:
authorlinyuh <linyuh@google.com>2017-12-05 13:08:09 -0800
committerCopybara-Service <copybara-piper@google.com>2017-12-07 11:03:40 -0800
commitd524f75074f4b04fee80719ea56d27d56f2bec16 (patch)
tree5dcd6137d3aa1b3d80af91f3e125337b80b2cde5 /java/com/android/dialer/calllog/datasources
parent625cdb00c265205a28e3167aae5976e27cbab5c7 (diff)
Add DATA_USAGE column to the annotated call log.
Data in this column are copied from the DATA_USAGE column in the system call log (android.provider.CallLog.Calls#DATA_USAGE). Bug: 70218437 Test: AnnotatedCallLogDatabaseHelperTest, SystemCallLogDataSourceTest PiperOrigin-RevId: 177999609 Change-Id: I64d70734e8e85767f1e93a4a22ce2aae6c2168a1
Diffstat (limited to 'java/com/android/dialer/calllog/datasources')
-rw-r--r--java/com/android/dialer/calllog/datasources/systemcalllog/SystemCallLogDataSource.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/java/com/android/dialer/calllog/datasources/systemcalllog/SystemCallLogDataSource.java b/java/com/android/dialer/calllog/datasources/systemcalllog/SystemCallLogDataSource.java
index 5ca160778..ef40c308e 100644
--- a/java/com/android/dialer/calllog/datasources/systemcalllog/SystemCallLogDataSource.java
+++ b/java/com/android/dialer/calllog/datasources/systemcalllog/SystemCallLogDataSource.java
@@ -220,6 +220,7 @@ public class SystemCallLogDataSource implements CallLogDataSource {
Calls.CACHED_NUMBER_TYPE,
Calls.CACHED_NUMBER_LABEL,
Calls.DURATION,
+ Calls.DATA_USAGE,
Calls.TRANSCRIPTION,
Calls.VOICEMAIL_URI,
Calls.IS_READ,
@@ -259,6 +260,7 @@ public class SystemCallLogDataSource implements CallLogDataSource {
int cachedNumberTypeColumn = cursor.getColumnIndexOrThrow(Calls.CACHED_NUMBER_TYPE);
int cachedNumberLabelColumn = cursor.getColumnIndexOrThrow(Calls.CACHED_NUMBER_LABEL);
int durationsColumn = cursor.getColumnIndexOrThrow(Calls.DURATION);
+ int dataUsageColumn = cursor.getColumnIndexOrThrow(Calls.DATA_USAGE);
int transcriptionColumn = cursor.getColumnIndexOrThrow(Calls.TRANSCRIPTION);
int voicemailUriColumn = cursor.getColumnIndexOrThrow(Calls.VOICEMAIL_URI);
int isReadColumn = cursor.getColumnIndexOrThrow(Calls.IS_READ);
@@ -286,6 +288,7 @@ public class SystemCallLogDataSource implements CallLogDataSource {
int cachedNumberType = cursor.getInt(cachedNumberTypeColumn);
String cachedNumberLabel = cursor.getString(cachedNumberLabelColumn);
int duration = cursor.getInt(durationsColumn);
+ int dataUsage = cursor.getInt(dataUsageColumn);
String transcription = cursor.getString(transcriptionColumn);
String voicemailUri = cursor.getString(voicemailUriColumn);
int isRead = cursor.getInt(isReadColumn);
@@ -334,6 +337,7 @@ public class SystemCallLogDataSource implements CallLogDataSource {
appContext, contentValues, phoneAccountComponentName, phoneAccountId);
contentValues.put(AnnotatedCallLog.FEATURES, features);
contentValues.put(AnnotatedCallLog.DURATION, duration);
+ contentValues.put(AnnotatedCallLog.DATA_USAGE, dataUsage);
contentValues.put(AnnotatedCallLog.TRANSCRIPTION, transcription);
contentValues.put(AnnotatedCallLog.VOICEMAIL_URI, voicemailUri);