Include the primary callback action in the new call log's bottom sheet.

Test: ModulesTest
PiperOrigin-RevId: 186006639
Change-Id: I0c37d342d4a6da563b49b3ebe8f8ee2262efde60
diff --git a/java/com/android/dialer/calllog/ui/menu/Modules.java b/java/com/android/dialer/calllog/ui/menu/Modules.java
index c85a9fd..a13f2e3 100644
--- a/java/com/android/dialer/calllog/ui/menu/Modules.java
+++ b/java/com/android/dialer/calllog/ui/menu/Modules.java
@@ -51,7 +51,7 @@
         PhoneNumberHelper.canPlaceCallsTo(normalizedNumber, row.numberPresentation());
 
     if (canPlaceCalls) {
-      addModuleForVideoOrAudioCall(context, modules, row, normalizedNumber);
+      addModuleForCalls(context, modules, row, normalizedNumber);
       SharedModules.maybeAddModuleForSendingTextMessage(
           context, modules, normalizedNumber, row.numberAttributes().getIsBlocked());
     }
@@ -90,12 +90,12 @@
     return modules;
   }
 
-  private static void addModuleForVideoOrAudioCall(
+  private static void addModuleForCalls(
       Context context,
       List<ContactActionModule> modules,
       CoalescedRow row,
       String normalizedNumber) {
-    // If a number is blocked, skip this menu item.
+    // Don't add call options if a number is blocked.
     if (row.numberAttributes().getIsBlocked()) {
       return;
     }
@@ -104,28 +104,21 @@
         TelecomUtil.composePhoneAccountHandle(
             row.phoneAccountComponentName(), row.phoneAccountId());
 
-    // For a spam number, only audio calls are allowed.
-    if (row.numberAttributes().getIsSpam()) {
-      modules.add(
-          IntentModule.newCallModule(
-              context, normalizedNumber, phoneAccountHandle, CallInitiationType.Type.CALL_LOG));
-      return;
-    }
+    // Add an audio call item
+    modules.add(
+        IntentModule.newCallModule(
+            context, normalizedNumber, phoneAccountHandle, CallInitiationType.Type.CALL_LOG));
 
-    if ((row.features() & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO) {
-      // Add an audio call item for video calls. Clicking the top entry on the bottom sheet will
-      // trigger a video call.
-      modules.add(
-          IntentModule.newCallModule(
-              context, normalizedNumber, phoneAccountHandle, CallInitiationType.Type.CALL_LOG));
-    } else {
-      // Add a video call item for audio calls. Click the top entry on the bottom sheet will
-      // trigger an audio call.
-      // TODO(zachh): Only show video option if video capabilities present?
+    // Add a video item if (1) the call log entry is for a video call, and (2) the call is not spam.
+    if ((row.features() & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO
+        && !row.numberAttributes().getIsSpam()) {
       modules.add(
           IntentModule.newVideoCallModule(
               context, normalizedNumber, phoneAccountHandle, CallInitiationType.Type.CALL_LOG));
     }
+
+    // TODO(zachh): Also show video option if the call log entry is for an audio call but video
+    // capabilities are present?
   }
 
   private static void addModuleForAccessingCallDetails(