Reduce RequestManager to #triggerScheduledRefresh method

PiperOrigin-RevId: 246925881
Change-Id: Ic1bb0f23ee4bd260ea167b5780945fe974f1a6bb
diff --git a/src/main/java/com/google/android/libraries/feed/api/requestmanager/BUILD b/src/main/java/com/google/android/libraries/feed/api/requestmanager/BUILD
index 550548c..bb338f1 100644
--- a/src/main/java/com/google/android/libraries/feed/api/requestmanager/BUILD
+++ b/src/main/java/com/google/android/libraries/feed/api/requestmanager/BUILD
@@ -8,7 +8,6 @@
     deps = [
         "//src/main/java/com/google/android/libraries/feed/common",
         "//src/main/java/com/google/android/libraries/feed/common/functional",
-        "//src/main/java/com/google/android/libraries/feed/host/logging",
         "//src/main/proto/com/google/android/libraries/feed/internalapi/proto:client_feed_java_proto_lite",
         "//src/main/proto/search/now/wire/feed:feed_java_proto_lite",
     ],
diff --git a/src/main/java/com/google/android/libraries/feed/api/requestmanager/RequestManager.java b/src/main/java/com/google/android/libraries/feed/api/requestmanager/RequestManager.java
index eed5265..d622f43 100644
--- a/src/main/java/com/google/android/libraries/feed/api/requestmanager/RequestManager.java
+++ b/src/main/java/com/google/android/libraries/feed/api/requestmanager/RequestManager.java
@@ -14,27 +14,9 @@
 
 package com.google.android.libraries.feed.api.requestmanager;
 
-import com.google.android.libraries.feed.common.Result;
-import com.google.android.libraries.feed.common.functional.Consumer;
-import com.google.android.libraries.feed.host.logging.RequestReason;
-import com.google.search.now.feed.client.StreamDataProto.StreamDataOperation;
-import java.util.List;
-
 /** Creates and issues requests to the server. */
 public interface RequestManager {
-  /**
-   * Issues a request to refresh the entire feed.
-   *
-   * @param reason The reason for this refresh.
-   */
-  void triggerRefresh(@RequestReason int reason);
 
-  /**
-   * Issues a request to refresh the entire feed, with the consumer being called back with the
-   * resulting {@link StreamDataOperation}s.
-   *
-   * @param reason The reason for this refresh.
-   */
-  void triggerRefresh(
-      @RequestReason int reason, Consumer<Result<List<StreamDataOperation>>> consumer);
+  /** Issues a request to refresh the entire feed. */
+  void triggerScheduledRefresh();
 }
diff --git a/src/main/java/com/google/android/libraries/feed/feedrequestmanager/RequestManagerImpl.java b/src/main/java/com/google/android/libraries/feed/feedrequestmanager/RequestManagerImpl.java
index 2615dab..71013b1 100644
--- a/src/main/java/com/google/android/libraries/feed/feedrequestmanager/RequestManagerImpl.java
+++ b/src/main/java/com/google/android/libraries/feed/feedrequestmanager/RequestManagerImpl.java
@@ -17,12 +17,8 @@
 import com.google.android.libraries.feed.api.common.MutationContext;
 import com.google.android.libraries.feed.api.requestmanager.RequestManager;
 import com.google.android.libraries.feed.api.sessionmanager.SessionManager;
-import com.google.android.libraries.feed.common.Result;
-import com.google.android.libraries.feed.common.functional.Consumer;
 import com.google.android.libraries.feed.host.logging.RequestReason;
 import com.google.android.libraries.feed.internalapi.requestmanager.FeedRequestManager;
-import com.google.search.now.feed.client.StreamDataProto.StreamDataOperation;
-import java.util.List;
 
 /** Implementation of Client-visible RequestManagerApi. */
 public final class RequestManagerImpl implements RequestManager {
@@ -37,14 +33,9 @@
   }
 
   @Override
-  public void triggerRefresh(
-      @RequestReason int reason, Consumer<Result<List<StreamDataOperation>>> consumer) {
-    feedRequestManager.triggerRefresh(reason, consumer);
-  }
-
-  @Override
-  public void triggerRefresh(@RequestReason int reason) {
+  public void triggerScheduledRefresh() {
     feedRequestManager.triggerRefresh(
-        reason, sessionManager.getUpdateConsumer(MutationContext.EMPTY_CONTEXT));
+        RequestReason.HOST_REQUESTED,
+        sessionManager.getUpdateConsumer(MutationContext.EMPTY_CONTEXT));
   }
 }
diff --git a/src/test/java/com/google/android/libraries/feed/feedrequestmanager/RequestManagerImplTest.java b/src/test/java/com/google/android/libraries/feed/feedrequestmanager/RequestManagerImplTest.java
index 2800148..51f4e82 100644
--- a/src/test/java/com/google/android/libraries/feed/feedrequestmanager/RequestManagerImplTest.java
+++ b/src/test/java/com/google/android/libraries/feed/feedrequestmanager/RequestManagerImplTest.java
@@ -40,31 +40,20 @@
   @Mock private SessionManager sessionManager;
   @Mock private Consumer<Result<List<StreamDataOperation>>> updateConsumer;
 
-  private RequestManagerImpl clientRequestManager;
+  private RequestManagerImpl requestManager;
 
   @Before
   public void createRequestManager() {
     initMocks(this);
-    clientRequestManager = new RequestManagerImpl(feedRequestManager, sessionManager);
-  }
-
-  @Test
-  public void testTriggerRefresh_requestReason() {
+    requestManager = new RequestManagerImpl(feedRequestManager, sessionManager);
     when(sessionManager.getUpdateConsumer(MutationContext.EMPTY_CONTEXT))
         .thenReturn(updateConsumer);
-    @RequestReason int reason = RequestReason.HOST_REQUESTED;
-
-    clientRequestManager.triggerRefresh(reason);
-
-    verify(feedRequestManager).triggerRefresh(reason, updateConsumer);
   }
 
   @Test
-  public void testTriggerRefresh_requestReasonAndConsumer() {
-    @RequestReason int reason = RequestReason.HOST_REQUESTED;
+  public void testTriggerScheduledRefresh() {
+    requestManager.triggerScheduledRefresh();
 
-    clientRequestManager.triggerRefresh(reason, updateConsumer);
-
-    verify(feedRequestManager).triggerRefresh(reason, updateConsumer);
+    verify(feedRequestManager).triggerRefresh(RequestReason.HOST_REQUESTED, updateConsumer);
   }
 }