diff options
author | roldenburg <roldenburg@google.com> | 2017-07-12 11:38:26 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-07-13 14:00:05 -0700 |
commit | d67712a9fcfb2b8802274ae2a8a10b8e403f661e (patch) | |
tree | 39e3deb7c4fe0716584d13ee200675c00f6bbcba /java/com/android/dialer/app/calllog | |
parent | 905b5862383011727756ab9e2926a0dda12d9ca9 (diff) |
Display correct string for Lightbringer calls in call details
Without this change, all video calls are referred to as just "video call". This
CL uses the Lightbringer interface to allow customizing that text.
Before: https://drive.google.com/open?id=0B7uuA4cyYX0xeVZCTGtMUUtoRVU
After: https://drive.google.com/open?id=0B7uuA4cyYX0xMnFhbTBXMDI2VW8
Bug: 63138393
Test: CallTypeHelperTest
PiperOrigin-RevId: 161692812
Change-Id: I36dc1a1fae96dddee91c5efb8892c4a6c7ef67ca
Diffstat (limited to 'java/com/android/dialer/app/calllog')
-rw-r--r-- | java/com/android/dialer/app/calllog/CallLogAdapter.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/java/com/android/dialer/app/calllog/CallLogAdapter.java b/java/com/android/dialer/app/calllog/CallLogAdapter.java index 4942184a2..41c9d6003 100644 --- a/java/com/android/dialer/app/calllog/CallLogAdapter.java +++ b/java/com/android/dialer/app/calllog/CallLogAdapter.java @@ -967,7 +967,7 @@ public class CallLogAdapter extends GroupingListAdapter } @MainThread - private static CallDetailsEntries createCallDetailsEntries(Cursor cursor, int count) { + private CallDetailsEntries createCallDetailsEntries(Cursor cursor, int count) { Assert.isMainThread(); int position = cursor.getPosition(); CallDetailsEntries.Builder entries = CallDetailsEntries.newBuilder(); @@ -980,6 +980,16 @@ public class CallLogAdapter extends GroupingListAdapter .setDate(cursor.getLong(CallLogQuery.DATE)) .setDuration(cursor.getLong(CallLogQuery.DURATION)) .setFeatures(cursor.getInt(CallLogQuery.FEATURES)); + + String phoneAccountComponentName = cursor.getString(CallLogQuery.ACCOUNT_COMPONENT_NAME); + if (getLightbringer().getPhoneAccountComponentName() != null + && getLightbringer() + .getPhoneAccountComponentName() + .flattenToString() + .equals(phoneAccountComponentName)) { + entry.setIsLightbringerCall(true); + } + entries.addEntries(entry.build()); cursor.moveToNext(); } |