summaryrefslogtreecommitdiff
path: root/java/com/android/dialer
diff options
context:
space:
mode:
authorcalderwoodra <calderwoodra@google.com>2017-09-20 11:25:53 -0700
committerEric Erfanian <erfanian@google.com>2017-09-20 13:34:14 -0700
commit7f15106e2f51919306f2cea1f9308ea673d4a701 (patch)
tree35d4a72e9595a7f636dfce770b9f3e8b22065034 /java/com/android/dialer
parent30649c1f614e8e47962391396feeebe3574872ef (diff)
Added some bug fixes in call details.
When a user dials a number with post dial digits, they are now carried to contact details and used when they redial that number. Additionally, when a user clicks on a photo in call details, they will be taken to Bugle now. This behavior already exists with messages in CD. Bug: 62236726,62230491 Test: CDEVHT PiperOrigin-RevId: 169422921 Change-Id: I1507cb64876540cfc9a683a5a1ea01910443f77b
Diffstat (limited to 'java/com/android/dialer')
-rw-r--r--java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java5
-rw-r--r--java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java1
-rw-r--r--java/com/android/dialer/calldetails/CallDetailsHeaderViewHolder.java5
-rw-r--r--java/com/android/dialer/dialercontact/dialer_contact.proto7
4 files changed, 16 insertions, 2 deletions
diff --git a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java
index ef6236bf0..301d89576 100644
--- a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java
+++ b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java
@@ -967,6 +967,11 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder
if (number != null) {
contact.setNumber(number);
}
+
+ if (!TextUtils.isEmpty(postDialDigits)) {
+ contact.setPostDialDigits(postDialDigits);
+ }
+
/* second line of contact view. */
if (!TextUtils.isEmpty(info.name)) {
contact.setDisplayNumber(displayNumber);
diff --git a/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java b/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java
index 084bd667c..4e7b8c612 100644
--- a/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java
+++ b/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java
@@ -130,6 +130,7 @@ public class CallDetailsEntryViewHolder extends ViewHolder {
HistoryResult historyResult = entry.getHistoryResults(0);
multimediaDetailsContainer.setVisibility(View.VISIBLE);
multimediaDetailsContainer.setOnClickListener((v) -> startSmsIntent(context, number));
+ multimediaImageContainer.setOnClickListener((v) -> startSmsIntent(context, number));
multimediaImageContainer.setClipToOutline(true);
if (!TextUtils.isEmpty(historyResult.getImageUri())) {
diff --git a/java/com/android/dialer/calldetails/CallDetailsHeaderViewHolder.java b/java/com/android/dialer/calldetails/CallDetailsHeaderViewHolder.java
index 410a3a012..dcd8e3537 100644
--- a/java/com/android/dialer/calldetails/CallDetailsHeaderViewHolder.java
+++ b/java/com/android/dialer/calldetails/CallDetailsHeaderViewHolder.java
@@ -110,7 +110,10 @@ public class CallDetailsHeaderViewHolder extends RecyclerView.ViewHolder
Logger.get(view.getContext()).logImpression(DialerImpression.Type.CALL_DETAILS_CALL_BACK);
DialerUtils.startActivityWithErrorToast(
view.getContext(),
- new CallIntentBuilder(contact.getNumber(), CallInitiationType.Type.CALL_DETAILS).build());
+ new CallIntentBuilder(
+ contact.getNumber() + contact.getPostDialDigits(),
+ CallInitiationType.Type.CALL_DETAILS)
+ .build());
} else {
throw Assert.createIllegalStateFailException("View OnClickListener not implemented: " + view);
}
diff --git a/java/com/android/dialer/dialercontact/dialer_contact.proto b/java/com/android/dialer/dialercontact/dialer_contact.proto
index d63295bcd..2d1dfbd3c 100644
--- a/java/com/android/dialer/dialercontact/dialer_contact.proto
+++ b/java/com/android/dialer/dialercontact/dialer_contact.proto
@@ -5,18 +5,23 @@ option java_multiple_files = true;
option optimize_for = LITE_RUNTIME;
-package com.android.dialer.callcomposer;
+package com.android.dialer.dialercontact;
message DialerContact {
optional fixed64 photo_id = 1;
optional string photo_uri = 2;
optional string contact_uri = 3;
optional string name_or_number = 4;
+
+ // Contact's phone number. Should not contain post dial digits.
optional string number = 6;
optional string display_number = 7;
optional string number_label = 8;
optional int32 contact_type = 9;
optional SimDetails sim_details = 10;
+
+ // {@link CallLog.Calls#POST_DIAL_DIGITS}.
+ optional string post_dial_digits = 11;
}
message SimDetails {