summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/calllog
diff options
context:
space:
mode:
authorlinyuh <linyuh@google.com>2018-02-28 16:47:17 -0800
committerCopybara-Service <copybara-piper@google.com>2018-02-28 17:14:09 -0800
commit999b5d5a7152c3b7608fe30630b983512e9e4e43 (patch)
tree3ec0ccc1635692a32d9447b61c51d1b49cbae8fa /java/com/android/dialer/calllog
parentc267ce51a7d5855661fbdb1b79cfd7aec88f9737 (diff)
Log contact source when reporting spam from the new UI.
Bug: 73780748 Test: PhoneLookupInfoConsolidatorTest PiperOrigin-RevId: 187404074 Change-Id: I1db81304909fbf63aba00088c12e18922042c3b1
Diffstat (limited to 'java/com/android/dialer/calllog')
-rw-r--r--java/com/android/dialer/calllog/database/contract/number_attributes.proto7
-rw-r--r--java/com/android/dialer/calllog/ui/menu/Modules.java1
2 files changed, 7 insertions, 1 deletions
diff --git a/java/com/android/dialer/calllog/database/contract/number_attributes.proto b/java/com/android/dialer/calllog/database/contract/number_attributes.proto
index 594e6764c..e24f393f7 100644
--- a/java/com/android/dialer/calllog/database/contract/number_attributes.proto
+++ b/java/com/android/dialer/calllog/database/contract/number_attributes.proto
@@ -21,8 +21,10 @@ option optimize_for = LITE_RUNTIME;
package com.android.dialer;
+import "java/com/android/dialer/logging/contact_source.proto";
+
// Information related to the phone number of the call.
-// Next ID: 12
+// Next ID: 13
message NumberAttributes {
// The name (which may be a person's name or business name, but not a number)
// formatted exactly as it should appear to the user. If the user's locale or
@@ -65,4 +67,7 @@ message NumberAttributes {
// Whether the number is spam.
optional bool is_spam = 11;
+
+ // Source of the contact associated with the number.
+ optional com.android.dialer.logging.ContactSource.Type contact_source = 12;
} \ No newline at end of file
diff --git a/java/com/android/dialer/calllog/ui/menu/Modules.java b/java/com/android/dialer/calllog/ui/menu/Modules.java
index 9df122331..184f7abf0 100644
--- a/java/com/android/dialer/calllog/ui/menu/Modules.java
+++ b/java/com/android/dialer/calllog/ui/menu/Modules.java
@@ -90,6 +90,7 @@ final class Modules {
.setCountryIso(row.number().getCountryIso())
.setCallType(row.callType())
.setReportingLocation(ReportingLocation.Type.CALL_LOG_HISTORY)
+ .setContactSource(row.numberAttributes().getContactSource())
.build();
modules.addAll(
SharedModules.createModulesHandlingBlockedOrSpamNumber(