diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-01-12 02:48:25 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-01-12 02:48:25 +0000 |
commit | 6bd659e6e90346f58ed08f6c127835a320bbd2e4 (patch) | |
tree | b90e5f582dcab0d3ad6393f4ffbc7a4dd78e81dc /java/com/android/dialer/calllog/ui/menu | |
parent | 58bade2ace277dff4db3bbbfa2e07015f0f7c6ad (diff) | |
parent | 01aac5de58903555a089d16a58b9346d34d54e7b (diff) |
Merge changes I2e091371,I4e0bc1c6,I24063ee4
* changes:
Implement PhoneLookup for CP2 remote contacts
Merge PhoneLookupDataSource results into a proto in annotated call log.
Attempt to place call even call permission is missing
Diffstat (limited to 'java/com/android/dialer/calllog/ui/menu')
-rw-r--r-- | java/com/android/dialer/calllog/ui/menu/Modules.java | 28 | ||||
-rw-r--r-- | java/com/android/dialer/calllog/ui/menu/PrimaryAction.java | 6 |
2 files changed, 19 insertions, 15 deletions
diff --git a/java/com/android/dialer/calllog/ui/menu/Modules.java b/java/com/android/dialer/calllog/ui/menu/Modules.java index 3d667fc79..92dd41163 100644 --- a/java/com/android/dialer/calllog/ui/menu/Modules.java +++ b/java/com/android/dialer/calllog/ui/menu/Modules.java @@ -45,7 +45,11 @@ final class Modules { maybeAddModuleForVideoOrAudioCall(context, modules, row); SharedModules.maybeAddModuleForAddingToContacts( - context, modules, row.number(), row.name(), row.lookupUri()); + context, + modules, + row.number(), + row.numberAttributes().getName(), + row.numberAttributes().getLookupUri()); String originalNumber = row.number().getRawInput().getNumber(); SharedModules.maybeAddModuleForSendingTextMessage(context, modules, originalNumber); @@ -98,8 +102,8 @@ final class Modules { private static void addModuleForAccessingCallDetails( Context context, List<ContactActionModule> modules, CoalescedRow row) { - boolean canReportAsInvalidNumber = row.canReportAsInvalidNumber(); - boolean canSupportAssistedDialing = !TextUtils.isEmpty(row.lookupUri()); + boolean canReportAsInvalidNumber = row.numberAttributes().getCanReportAsInvalidNumber(); + boolean canSupportAssistedDialing = !TextUtils.isEmpty(row.numberAttributes().getLookupUri()); modules.add( new IntentModule( @@ -122,21 +126,21 @@ final class Modules { DialerContact.newBuilder() .setNumber(originalNumber) .setContactType(LetterTileDrawable.TYPE_DEFAULT) // TODO(zachh): Use proper type. - .setPhotoId(row.photoId()); + .setPhotoId(row.numberAttributes().getPhotoId()); - if (!TextUtils.isEmpty(row.name())) { - dialerContactBuilder.setNameOrNumber(row.name()); + if (!TextUtils.isEmpty(row.numberAttributes().getName())) { + dialerContactBuilder.setNameOrNumber(row.numberAttributes().getName()); } else if (!TextUtils.isEmpty(originalNumber)) { dialerContactBuilder.setNameOrNumber(originalNumber); } - if (row.numberTypeLabel() != null) { - dialerContactBuilder.setNumberLabel(row.numberTypeLabel()); + if (row.numberAttributes().hasNumberTypeLabel()) { + dialerContactBuilder.setNumberLabel(row.numberAttributes().getNumberTypeLabel()); } - if (row.photoUri() != null) { - dialerContactBuilder.setPhotoUri(row.photoUri()); + if (row.numberAttributes().hasPhotoUri()) { + dialerContactBuilder.setPhotoUri(row.numberAttributes().getPhotoUri()); } - if (row.lookupUri() != null) { - dialerContactBuilder.setContactUri(row.lookupUri()); + if (row.numberAttributes().hasLookupUri()) { + dialerContactBuilder.setContactUri(row.numberAttributes().getLookupUri()); } if (row.formattedNumber() != null) { dialerContactBuilder.setDisplayNumber(row.formattedNumber()); diff --git a/java/com/android/dialer/calllog/ui/menu/PrimaryAction.java b/java/com/android/dialer/calllog/ui/menu/PrimaryAction.java index faedc8f62..c7126e9dc 100644 --- a/java/com/android/dialer/calllog/ui/menu/PrimaryAction.java +++ b/java/com/android/dialer/calllog/ui/menu/PrimaryAction.java @@ -34,9 +34,9 @@ final class PrimaryAction { .setNumber(row.number()) .setPhotoInfo( PhotoInfo.builder() - .setPhotoId(row.photoId()) - .setPhotoUri(row.photoUri()) - .setLookupUri(row.lookupUri()) + .setPhotoId(row.numberAttributes().getPhotoId()) + .setPhotoUri(row.numberAttributes().getPhotoUri()) + .setLookupUri(row.numberAttributes().getLookupUri()) .setIsVideo((row.features() & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO) .setContactType(CallLogContactTypes.getContactType(row)) .setDisplayName(primaryText.toString()) |