diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-12-07 20:25:58 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-12-07 20:25:58 +0000 |
commit | 5412de42cc632bb63c72ddf73867ea3a2c35cc6e (patch) | |
tree | e4758bf76e5f2516fdbdfc62e5966eb9cb82b6e7 /java/com/android/dialer/calllog | |
parent | f39d23184df8a5d7a18efc0c8a8ddb512b791629 (diff) | |
parent | 952fc68f330177b05c29275155b3f473b7ac4dbe (diff) |
Merge changes I6806c5c8,I60afe7c6,I6d103569,I4cd6f76b,I6ddbebc9, ...
* changes:
Hide bubble in (New)ReturnToCallController.tearDown().
Grouping each listener's logic in an inner class in CallDetailsActivity.
Allow VVM activation to be rerun if carrier sent STATUS SMS
Check for null subscription info list in TelecomUtil#getSubscriptionInfo.
Ignore "new" voicemails that are too old for notifications
Display the automatically detected home country in assisted dialing settings.
Add DATA_USAGE column to the annotated call log.
Temporarily disable PhoneHistoryRecorder.
Bubble v2 animation changes.
Refactor Assisted Dialing Settings into standalone activity.
Added PhoneLookupHistoryRecorder.
Added PhoneLookupSelector.
Diffstat (limited to 'java/com/android/dialer/calllog')
4 files changed, 14 insertions, 5 deletions
diff --git a/java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java b/java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java index 0d8e8ceeb..8c6d58634 100644 --- a/java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java +++ b/java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java @@ -45,6 +45,7 @@ class AnnotatedCallLogDatabaseHelper extends SQLiteOpenHelper { + (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, ") diff --git a/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java b/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java index c9b463e74..9efe21487 100644 --- a/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java +++ b/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java @@ -225,6 +225,13 @@ public class AnnotatedCallLogContract { public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/annotated_call_log"; /** + * See {@link android.provider.CallLog.Calls#DATA_USAGE}. + * + * <p>Type: INTEGER (long) + */ + public static final String DATA_USAGE = "data_usage"; + + /** * See {@link android.provider.CallLog.Calls#DURATION}. * * <p>TYPE: INTEGER (long) diff --git a/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java b/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java index 7a7f2070b..010cb8541 100644 --- a/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java +++ b/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java @@ -31,6 +31,7 @@ import com.android.dialer.calllog.datasources.CallLogMutations; import com.android.dialer.common.LogUtil; import com.android.dialer.phonelookup.PhoneLookup; import com.android.dialer.phonelookup.PhoneLookupInfo; +import com.android.dialer.phonelookup.PhoneLookupSelector; import com.android.dialer.phonelookup.database.contract.PhoneLookupHistoryContract.PhoneLookupHistory; import com.android.dialer.phonenumberproto.DialerPhoneNumberUtil; import com.google.common.collect.ImmutableMap; @@ -376,11 +377,7 @@ public final class PhoneLookupDataSource implements CallLogDataSource { } } - // TODO(zachh): Extract this logic into a proper selection class or package. private static String selectName(PhoneLookupInfo phoneLookupInfo) { - if (phoneLookupInfo.getCp2Info().getCp2ContactInfoCount() > 0) { - return phoneLookupInfo.getCp2Info().getCp2ContactInfo(0).getName(); - } - return ""; + return PhoneLookupSelector.selectName(phoneLookupInfo); } } 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); |