Change ActionHandler to take in LogData instead of the VE string
PiperOrigin-RevId: 252913645
Change-Id: I5c904600a6b9997db31242deff10ace6d1aaa9f5
diff --git a/src/main/java/com/google/android/libraries/feed/api/internal/actionparser/ActionParser.java b/src/main/java/com/google/android/libraries/feed/api/internal/actionparser/ActionParser.java
index fe4b43a..3d2e8d1 100644
--- a/src/main/java/com/google/android/libraries/feed/api/internal/actionparser/ActionParser.java
+++ b/src/main/java/com/google/android/libraries/feed/api/internal/actionparser/ActionParser.java
@@ -18,6 +18,7 @@
import com.google.android.libraries.feed.api.host.action.StreamActionApi;
import com.google.search.now.ui.action.FeedActionPayloadProto.FeedActionPayload;
import com.google.search.now.ui.piet.ActionsProto.Action;
+import com.google.search.now.ui.piet.LogDataProto.LogData;
/** Parses actions from Piet and directs the Stream to handle the action. */
public interface ActionParser {
@@ -26,7 +27,7 @@
Action action,
StreamActionApi streamActionApi,
View view,
- /*@Nullable*/ String veLoggingToken,
+ LogData logData,
@ActionSource int actionSource);
void parseFeedActionPayload(
diff --git a/src/main/java/com/google/android/libraries/feed/basicstream/internal/viewholders/PietViewHolder.java b/src/main/java/com/google/android/libraries/feed/basicstream/internal/viewholders/PietViewHolder.java
index 809f123..880fbd5 100644
--- a/src/main/java/com/google/android/libraries/feed/basicstream/internal/viewholders/PietViewHolder.java
+++ b/src/main/java/com/google/android/libraries/feed/basicstream/internal/viewholders/PietViewHolder.java
@@ -85,7 +85,7 @@
this.frameAdapter =
pietManager.createPietFrameAdapter(
() -> cardView,
- (action, actionType, frame, view, veLoggingToken) -> {
+ (action, actionType, frame, view, logData) -> {
if (actionParser == null) {
Logger.wtf(TAG, "Action being performed while unbound.");
return;
@@ -99,7 +99,7 @@
action,
getStreamActionApi(),
view,
- veLoggingToken,
+ logData,
ActionSourceConverter.convertPietAction(actionType));
},
eventLogger::logEvents,
diff --git a/src/main/java/com/google/android/libraries/feed/feedactionparser/FeedActionParser.java b/src/main/java/com/google/android/libraries/feed/feedactionparser/FeedActionParser.java
index 53f09ce..3882925 100644
--- a/src/main/java/com/google/android/libraries/feed/feedactionparser/FeedActionParser.java
+++ b/src/main/java/com/google/android/libraries/feed/feedactionparser/FeedActionParser.java
@@ -43,6 +43,7 @@
import com.google.search.now.ui.action.FeedActionProto.FeedActionMetadata.Type;
import com.google.search.now.ui.action.FeedActionProto.OpenUrlData;
import com.google.search.now.ui.piet.ActionsProto.Action;
+import com.google.search.now.ui.piet.LogDataProto.LogData;
import java.util.List;
/**
@@ -74,7 +75,7 @@
Action action,
StreamActionApi streamActionApi,
View view,
- /*@Nullable*/ String veLoggingToken,
+ LogData logData,
@ActionSource int actionSource) {
FeedActionPayload feedActionPayload =
pietFeedActionPayloadRetriever.getFeedActionPayload(action);
diff --git a/src/main/java/com/google/android/libraries/feed/piet/ChunkedTextElementAdapter.java b/src/main/java/com/google/android/libraries/feed/piet/ChunkedTextElementAdapter.java
index 26c66f0..5156be0 100644
--- a/src/main/java/com/google/android/libraries/feed/piet/ChunkedTextElementAdapter.java
+++ b/src/main/java/com/google/android/libraries/feed/piet/ChunkedTextElementAdapter.java
@@ -53,6 +53,7 @@
import com.google.search.now.ui.piet.ElementsProto.Visibility;
import com.google.search.now.ui.piet.ErrorsProto.ErrorCode;
import com.google.search.now.ui.piet.ImagesProto.Image;
+import com.google.search.now.ui.piet.LogDataProto.LogData;
import com.google.search.now.ui.piet.PietProto.Frame;
import com.google.search.now.ui.piet.StylesProto.Font.FontWeight;
import com.google.search.now.ui.piet.TextProto.Chunk;
@@ -416,7 +417,7 @@
@Override
public void onClick(View widget) {
// TODO: Pass VE information with the action.
- handler.handleAction(action, ActionType.CLICK, frame, widget, /* veLoggingToken= */ null);
+ handler.handleAction(action, ActionType.CLICK, frame, widget, LogData.getDefaultInstance());
}
@Override
diff --git a/src/main/java/com/google/android/libraries/feed/piet/ViewUtils.java b/src/main/java/com/google/android/libraries/feed/piet/ViewUtils.java
index 6cd1800..cb82a80 100644
--- a/src/main/java/com/google/android/libraries/feed/piet/ViewUtils.java
+++ b/src/main/java/com/google/android/libraries/feed/piet/ViewUtils.java
@@ -26,6 +26,7 @@
import com.google.android.libraries.feed.piet.host.ActionHandler.ActionType;
import com.google.search.now.ui.piet.ActionsProto.Actions;
import com.google.search.now.ui.piet.ActionsProto.VisibilityAction;
+import com.google.search.now.ui.piet.LogDataProto.LogData;
import com.google.search.now.ui.piet.PietProto.Frame;
import com.google.search.now.ui.piet.StylesProto.GravityHorizontal;
import com.google.search.now.ui.piet.StylesProto.GravityVertical;
@@ -95,7 +96,7 @@
ActionType.LONG_CLICK,
frameContext.getFrame(),
view,
- null);
+ LogData.getDefaultInstance());
return true;
});
} else {
@@ -105,7 +106,11 @@
view.setOnClickListener(
v -> {
handler.handleAction(
- actions.getOnClickAction(), ActionType.CLICK, frameContext.getFrame(), view, null);
+ actions.getOnClickAction(),
+ ActionType.CLICK,
+ frameContext.getFrame(),
+ view,
+ LogData.getDefaultInstance());
});
} else {
clearOnClickActions(view);
@@ -179,7 +184,11 @@
if (proportionVisible >= visibilityAction.getProportionVisible()) {
if (activeActions.add(visibilityAction)) {
actionHandler.handleAction(
- visibilityAction.getAction(), ActionType.VIEW, frame, view, null);
+ visibilityAction.getAction(),
+ ActionType.VIEW,
+ frame,
+ view,
+ LogData.getDefaultInstance());
}
} else {
activeActions.remove(visibilityAction);
@@ -190,7 +199,11 @@
if (proportionVisible < visibilityAction.getProportionVisible()) {
if (activeActions.add(visibilityAction)) {
actionHandler.handleAction(
- visibilityAction.getAction(), ActionType.VIEW, frame, view, null);
+ visibilityAction.getAction(),
+ ActionType.VIEW,
+ frame,
+ view,
+ LogData.getDefaultInstance());
}
} else {
activeActions.remove(visibilityAction);
@@ -209,7 +222,11 @@
for (VisibilityAction visibilityAction : actions.getOnHideActionsList()) {
if (activeActions.add(visibilityAction)) {
actionHandler.handleAction(
- visibilityAction.getAction(), ActionType.VIEW, frame, view, null);
+ visibilityAction.getAction(),
+ ActionType.VIEW,
+ frame,
+ view,
+ LogData.getDefaultInstance());
}
}
}
diff --git a/src/main/java/com/google/android/libraries/feed/piet/host/ActionHandler.java b/src/main/java/com/google/android/libraries/feed/piet/host/ActionHandler.java
index bdb8bb0..13816e2 100644
--- a/src/main/java/com/google/android/libraries/feed/piet/host/ActionHandler.java
+++ b/src/main/java/com/google/android/libraries/feed/piet/host/ActionHandler.java
@@ -17,6 +17,7 @@
import android.support.annotation.IntDef;
import android.view.View;
import com.google.search.now.ui.piet.ActionsProto.Action;
+import com.google.search.now.ui.piet.LogDataProto.LogData;
import com.google.search.now.ui.piet.PietProto.Frame;
/**
@@ -28,11 +29,7 @@
/** Called on a event, such as a click of a view, on a UI element */
// TODO: Do we need the veLoggingToken, one is defined in the Action
void handleAction(
- Action action,
- @ActionType int actionType,
- Frame frame,
- View view,
- /*@Nullable*/ String veLoggingToken);
+ Action action, @ActionType int actionType, Frame frame, View view, LogData logData);
/** Possible action types. */
@IntDef({ActionType.VIEW, ActionType.CLICK, ActionType.LONG_CLICK})
diff --git a/src/main/java/com/google/android/libraries/feed/piet/testing/FakeFrameAdapter.java b/src/main/java/com/google/android/libraries/feed/piet/testing/FakeFrameAdapter.java
index 08dc669..f9c412c 100644
--- a/src/main/java/com/google/android/libraries/feed/piet/testing/FakeFrameAdapter.java
+++ b/src/main/java/com/google/android/libraries/feed/piet/testing/FakeFrameAdapter.java
@@ -24,6 +24,7 @@
import com.google.android.libraries.feed.piet.host.ActionHandler;
import com.google.android.libraries.feed.piet.host.ActionHandler.ActionType;
import com.google.search.now.ui.piet.ActionsProto.Action;
+import com.google.search.now.ui.piet.LogDataProto.LogData;
import com.google.search.now.ui.piet.PietAndroidSupport;
import com.google.search.now.ui.piet.PietProto.Frame;
import com.google.search.now.ui.piet.PietProto.PietSharedState;
@@ -90,7 +91,11 @@
for (Action action : hideActions) {
actionHandler.handleAction(
- action, ActionType.VIEW, checkNotNull(frame), frameContainer, /* veLoggingToken= */ null);
+ action,
+ ActionType.VIEW,
+ checkNotNull(frame),
+ frameContainer,
+ LogData.getDefaultInstance());
}
viewActionsTriggered = false;
@@ -109,7 +114,11 @@
// Assume all view actions are fired when triggerViewActions is called.
for (Action action : viewActions) {
actionHandler.handleAction(
- action, ActionType.VIEW, checkNotNull(frame), frameContainer, /* veLoggingToken= */ null);
+ action,
+ ActionType.VIEW,
+ checkNotNull(frame),
+ frameContainer,
+ /* logData= */ LogData.getDefaultInstance());
}
viewActionsTriggered = true;
@@ -169,10 +178,6 @@
@Override
public void handleAction(
- Action action,
- @ActionType int actionType,
- Frame frame,
- View view,
- /*@Nullable*/ String veLoggingToken) {}
+ Action action, @ActionType int actionType, Frame frame, View view, LogData logData) {}
}
}
diff --git a/src/test/java/com/google/android/libraries/feed/basicstream/internal/viewholders/PietViewHolderTest.java b/src/test/java/com/google/android/libraries/feed/basicstream/internal/viewholders/PietViewHolderTest.java
index 181f538..383d938 100644
--- a/src/test/java/com/google/android/libraries/feed/basicstream/internal/viewholders/PietViewHolderTest.java
+++ b/src/test/java/com/google/android/libraries/feed/basicstream/internal/viewholders/PietViewHolderTest.java
@@ -55,6 +55,7 @@
import com.google.search.now.ui.action.FeedActionProto.FeedAction;
import com.google.search.now.ui.piet.ActionsProto.Action;
import com.google.search.now.ui.piet.ErrorsProto.ErrorCode;
+import com.google.search.now.ui.piet.LogDataProto.LogData;
import com.google.search.now.ui.piet.PietProto.Frame;
import com.google.search.now.ui.piet.PietProto.PietSharedState;
import java.util.ArrayList;
@@ -78,7 +79,7 @@
FeedActionPayload.newBuilder()
.setExtension(FeedAction.feedActionExtension, FeedAction.getDefaultInstance())
.build();
- private static final String VE_LOGGING_TOKEN = "token";
+ private static final LogData VE_LOGGING_INFO = LogData.getDefaultInstance();
private CardConfiguration cardConfiguration;
@Mock private ActionParser actionParser;
@@ -367,11 +368,11 @@
loggingListener,
actionParser);
- actionHandler.handleAction(ACTION, ActionType.CLICK, FRAME, view, VE_LOGGING_TOKEN);
+ actionHandler.handleAction(ACTION, ActionType.CLICK, FRAME, view, VE_LOGGING_INFO);
verify(loggingListener).onContentClicked();
verify(actionParser)
- .parseAction(ACTION, streamActionApi, view, VE_LOGGING_TOKEN, ActionSource.CLICK);
+ .parseAction(ACTION, streamActionApi, view, VE_LOGGING_INFO, ActionSource.CLICK);
}
@Test
@@ -384,11 +385,11 @@
loggingListener,
actionParser);
- actionHandler.handleAction(ACTION, ActionType.LONG_CLICK, FRAME, view, VE_LOGGING_TOKEN);
+ actionHandler.handleAction(ACTION, ActionType.LONG_CLICK, FRAME, view, VE_LOGGING_INFO);
verify(loggingListener, never()).onContentClicked();
verify(actionParser)
- .parseAction(ACTION, streamActionApi, view, VE_LOGGING_TOKEN, ActionSource.LONG_CLICK);
+ .parseAction(ACTION, streamActionApi, view, VE_LOGGING_INFO, ActionSource.LONG_CLICK);
}
@Test
@@ -401,11 +402,11 @@
loggingListener,
actionParser);
- actionHandler.handleAction(ACTION, ActionType.VIEW, FRAME, view, VE_LOGGING_TOKEN);
+ actionHandler.handleAction(ACTION, ActionType.VIEW, FRAME, view, VE_LOGGING_INFO);
verify(loggingListener, never()).onContentClicked();
verify(actionParser)
- .parseAction(ACTION, streamActionApi, view, VE_LOGGING_TOKEN, ActionSource.VIEW);
+ .parseAction(ACTION, streamActionApi, view, VE_LOGGING_INFO, ActionSource.VIEW);
}
@Test
@@ -433,7 +434,7 @@
Action.getDefaultInstance(),
streamActionApi,
frameAdapter.getFrameContainer(),
- null,
+ LogData.getDefaultInstance(),
ActionSourceConverter.convertPietAction(ActionType.VIEW));
}
diff --git a/src/test/java/com/google/android/libraries/feed/feedactionparser/FeedActionParserTest.java b/src/test/java/com/google/android/libraries/feed/feedactionparser/FeedActionParserTest.java
index 2a5ca88..fe800dd 100644
--- a/src/test/java/com/google/android/libraries/feed/feedactionparser/FeedActionParserTest.java
+++ b/src/test/java/com/google/android/libraries/feed/feedactionparser/FeedActionParserTest.java
@@ -58,6 +58,7 @@
import com.google.search.now.ui.action.FeedActionProto.UndoAction;
import com.google.search.now.ui.action.PietExtensionsProto.PietFeedActionPayload;
import com.google.search.now.ui.piet.ActionsProto.Action;
+import com.google.search.now.ui.piet.LogDataProto.LogData;
import com.google.search.now.wire.feed.ActionPayloadProto.ActionPayload;
import com.google.search.now.wire.feed.ContentIdProto.ContentId;
import com.google.search.now.wire.feed.DataOperationProto.DataOperation;
@@ -434,7 +435,7 @@
OPEN_URL_ACTION,
streamActionApi,
/* view= */ null,
- /* veLoggingToken= */ null,
+ LogData.getDefaultInstance(),
ActionSource.CLICK);
verify(streamActionApi).openUrl(URL);
@@ -448,7 +449,7 @@
OPEN_URL_WITH_PARAM_ACTION,
streamActionApi,
/* view= */ null,
- /* veLoggingToken= */ null,
+ LogData.getDefaultInstance(),
ActionSource.CLICK);
verify(streamActionApi).openUrl(URL, PARAM);
@@ -462,7 +463,7 @@
OPEN_NEW_WINDOW_ACTION,
streamActionApi,
/* view= */ null,
- /* veLoggingToken= */ null,
+ LogData.getDefaultInstance(),
ActionSource.CLICK);
verify(streamActionApi).openUrlInNewWindow(URL);
@@ -476,7 +477,7 @@
OPEN_NEW_WINDOW_WITH_PARAM_ACTION,
streamActionApi,
/* view= */ null,
- /* veLoggingToken= */ null,
+ LogData.getDefaultInstance(),
ActionSource.CLICK);
verify(streamActionApi).openUrlInNewWindow(URL, PARAM);
@@ -490,7 +491,7 @@
OPEN_INCOGNITO_ACTION,
streamActionApi,
/* view= */ null,
- /* veLoggingToken= */ null,
+ LogData.getDefaultInstance(),
ActionSource.CLICK);
verify(streamActionApi).openUrlInIncognitoMode(URL);
@@ -504,7 +505,7 @@
OPEN_INCOGNITO_WITH_PARAM_ACTION,
streamActionApi,
/* view= */ null,
- /* veLoggingToken= */ null,
+ LogData.getDefaultInstance(),
ActionSource.CLICK);
verify(streamActionApi).openUrlInIncognitoMode(URL, PARAM);
@@ -518,7 +519,7 @@
OPEN_NEW_TAB_ACTION,
streamActionApi,
/* view= */ null,
- /* veLoggingToken= */ null,
+ LogData.getDefaultInstance(),
ActionSource.CLICK);
verify(streamActionApi).openUrlInNewTab(URL);
@@ -532,7 +533,7 @@
OPEN_NEW_TAB_WITH_PARAM_ACTION,
streamActionApi,
/* view= */ null,
- /* veLoggingToken= */ null,
+ LogData.getDefaultInstance(),
ActionSource.CLICK);
verify(streamActionApi).openUrlInNewTab(URL, PARAM);
@@ -555,7 +556,7 @@
.build(),
streamActionApi,
/* view= */ view,
- /* veLoggingToken= */ null,
+ LogData.getDefaultInstance(),
ActionSource.CLICK);
verify(streamActionApi)
diff --git a/src/test/java/com/google/android/libraries/feed/piet/ChunkedTextElementAdapterTest.java b/src/test/java/com/google/android/libraries/feed/piet/ChunkedTextElementAdapterTest.java
index 808b0f8..cd6f003 100644
--- a/src/test/java/com/google/android/libraries/feed/piet/ChunkedTextElementAdapterTest.java
+++ b/src/test/java/com/google/android/libraries/feed/piet/ChunkedTextElementAdapterTest.java
@@ -73,6 +73,7 @@
import com.google.search.now.ui.piet.ErrorsProto.ErrorCode;
import com.google.search.now.ui.piet.ImagesProto.Image;
import com.google.search.now.ui.piet.ImagesProto.ImageSource;
+import com.google.search.now.ui.piet.LogDataProto.LogData;
import com.google.search.now.ui.piet.PietProto.Frame;
import com.google.search.now.ui.piet.StylesProto.EdgeWidths;
import com.google.search.now.ui.piet.StylesProto.Font;
@@ -721,7 +722,7 @@
ActionType.CLICK,
Frame.getDefaultInstance(),
adapter.getBaseView(),
- null);
+ LogData.getDefaultInstance());
}
@Test
@@ -753,7 +754,7 @@
ActionType.CLICK,
Frame.getDefaultInstance(),
adapter.getBaseView(),
- null);
+ LogData.getDefaultInstance());
}
@Test
diff --git a/src/test/java/com/google/android/libraries/feed/piet/ElementAdapterTest.java b/src/test/java/com/google/android/libraries/feed/piet/ElementAdapterTest.java
index a04db17..73f1c8e 100644
--- a/src/test/java/com/google/android/libraries/feed/piet/ElementAdapterTest.java
+++ b/src/test/java/com/google/android/libraries/feed/piet/ElementAdapterTest.java
@@ -1184,7 +1184,7 @@
eq(ActionType.VIEW),
eq(frame),
eq(view),
- eq(null));
+ eq(LogData.getDefaultInstance()));
}
@Config(shadows = {ExtendedShadowView.class})
@@ -1250,7 +1250,7 @@
eq(ActionType.VIEW),
eq(frame),
eq(view),
- eq(null));
+ eq(LogData.getDefaultInstance()));
// Actions defined, and fully visible
viewShadow.setHeight(50);
@@ -1265,7 +1265,7 @@
eq(ActionType.VIEW),
eq(frame),
eq(view),
- eq(null));
+ eq(LogData.getDefaultInstance()));
}
@Config(shadows = {ExtendedShadowView.class})
@@ -1320,13 +1320,23 @@
adapter.triggerHideActions(frameContext);
verify(actionHandler)
- .handleAction(same(hideAction), eq(ActionType.VIEW), eq(frame), eq(view), eq(null));
+ .handleAction(
+ same(hideAction),
+ eq(ActionType.VIEW),
+ eq(frame),
+ eq(view),
+ eq(LogData.getDefaultInstance()));
// Ensure actions do not trigger again
adapter.triggerHideActions(frameContext);
verify(actionHandler) // Only once, not twice
- .handleAction(same(hideAction), eq(ActionType.VIEW), eq(frame), eq(view), eq(null));
+ .handleAction(
+ same(hideAction),
+ eq(ActionType.VIEW),
+ eq(frame),
+ eq(view),
+ eq(LogData.getDefaultInstance()));
}
@Test
diff --git a/src/test/java/com/google/android/libraries/feed/piet/FrameAdapterImplTest.java b/src/test/java/com/google/android/libraries/feed/piet/FrameAdapterImplTest.java
index 088f172..3f7d335 100644
--- a/src/test/java/com/google/android/libraries/feed/piet/FrameAdapterImplTest.java
+++ b/src/test/java/com/google/android/libraries/feed/piet/FrameAdapterImplTest.java
@@ -425,8 +425,7 @@
.setGravityHorizontal(GravityHorizontal.GRAVITY_START)
.setGravityVertical(GravityVertical.GRAVITY_BOTTOM)
.setImageElement(
- defaultImage
- .toBuilder()
+ defaultImage.toBuilder()
.setStyleReferences(
StyleIdsStack.newBuilder()
.addStyleIds("style1")))))))
@@ -443,8 +442,7 @@
Element.newBuilder()
.setGravityHorizontal(GravityHorizontal.GRAVITY_END)
.setImageElement(
- defaultImage
- .toBuilder()
+ defaultImage.toBuilder()
.setStyleReferences(
StyleIdsStack.newBuilder()
.addStyleIds("style2")))))))
@@ -858,7 +856,7 @@
eq(ActionType.VIEW),
eq(frameWithActions),
any(View.class),
- eq(null));
+ eq(LogData.getDefaultInstance()));
verify(elementAdapter).triggerHideActions(frameContext);
}
diff --git a/src/test/java/com/google/android/libraries/feed/piet/ViewUtilsTest.java b/src/test/java/com/google/android/libraries/feed/piet/ViewUtilsTest.java
index dc2480b..b9591f4 100644
--- a/src/test/java/com/google/android/libraries/feed/piet/ViewUtilsTest.java
+++ b/src/test/java/com/google/android/libraries/feed/piet/ViewUtilsTest.java
@@ -39,6 +39,7 @@
import com.google.search.now.ui.piet.ActionsProto.Action;
import com.google.search.now.ui.piet.ActionsProto.Actions;
import com.google.search.now.ui.piet.ActionsProto.VisibilityAction;
+import com.google.search.now.ui.piet.LogDataProto.LogData;
import com.google.search.now.ui.piet.PietProto.Frame;
import com.google.search.now.ui.piet.StylesProto.GravityHorizontal;
import com.google.search.now.ui.piet.StylesProto.GravityVertical;
@@ -161,7 +162,8 @@
view.callOnClick();
verify(mockActionHandler)
- .handleAction(DEFAULT_ACTION, ActionType.CLICK, DEFAULT_FRAME, view, null);
+ .handleAction(
+ DEFAULT_ACTION, ActionType.CLICK, DEFAULT_FRAME, view, LogData.getDefaultInstance());
assertThat(view.getForeground()).isInstanceOf(RippleDrawable.class);
}
@@ -171,7 +173,12 @@
view.performLongClick();
verify(mockActionHandler)
- .handleAction(DEFAULT_ACTION, ActionType.LONG_CLICK, DEFAULT_FRAME, view, null);
+ .handleAction(
+ DEFAULT_ACTION,
+ ActionType.LONG_CLICK,
+ DEFAULT_FRAME,
+ view,
+ LogData.getDefaultInstance());
assertThat(view.getForeground()).isInstanceOf(RippleDrawable.class);
}
@@ -274,7 +281,7 @@
eq(ActionType.VIEW),
same(DEFAULT_FRAME),
same(view),
- eq(null));
+ eq(LogData.getDefaultInstance()));
}
@Test
@@ -284,14 +291,18 @@
view, viewport, VIEW_ACTIONS, mockActionHandler, DEFAULT_FRAME, activeActions);
verify(mockActionHandler)
.handleAction(
- same(FULL_VIEW_ACTION), eq(ActionType.VIEW), same(DEFAULT_FRAME), same(view), eq(null));
+ same(FULL_VIEW_ACTION),
+ eq(ActionType.VIEW),
+ same(DEFAULT_FRAME),
+ same(view),
+ eq(LogData.getDefaultInstance()));
verify(mockActionHandler)
.handleAction(
same(PARTIAL_VIEW_ACTION),
eq(ActionType.VIEW),
same(DEFAULT_FRAME),
same(view),
- eq(null));
+ eq(LogData.getDefaultInstance()));
}
@Test
@@ -308,14 +319,18 @@
view, viewport, VIEW_ACTIONS, mockActionHandler, DEFAULT_FRAME, activeActions);
verify(mockActionHandler)
.handleAction(
- same(FULL_VIEW_ACTION), eq(ActionType.VIEW), same(DEFAULT_FRAME), same(view), eq(null));
+ same(FULL_VIEW_ACTION),
+ eq(ActionType.VIEW),
+ same(DEFAULT_FRAME),
+ same(view),
+ eq(LogData.getDefaultInstance()));
verify(mockActionHandler)
.handleAction(
same(PARTIAL_VIEW_ACTION),
eq(ActionType.VIEW),
same(DEFAULT_FRAME),
same(view),
- eq(null));
+ eq(LogData.getDefaultInstance()));
}
@Test
@@ -335,7 +350,11 @@
activeActions);
verify(mockActionHandler)
.handleAction(
- same(FULL_VIEW_ACTION), eq(ActionType.VIEW), same(DEFAULT_FRAME), same(view), eq(null));
+ same(FULL_VIEW_ACTION),
+ eq(ActionType.VIEW),
+ same(DEFAULT_FRAME),
+ same(view),
+ eq(LogData.getDefaultInstance()));
}
@Test
@@ -359,7 +378,7 @@
eq(ActionType.VIEW),
same(DEFAULT_FRAME),
same(view),
- eq(null));
+ eq(LogData.getDefaultInstance()));
}
@Test
@@ -401,7 +420,7 @@
eq(ActionType.VIEW),
same(DEFAULT_FRAME),
same(view),
- eq(null));
+ eq(LogData.getDefaultInstance()));
}
@Test
@@ -466,7 +485,12 @@
view, VIEW_AND_HIDE_ACTIONS, mockActionHandler, DEFAULT_FRAME, activeActions);
assertThat(activeActions).containsExactly(HIDE_ACTION);
verify(mockActionHandler)
- .handleAction(HIDE_ACTION.getAction(), ActionType.VIEW, DEFAULT_FRAME, view, null);
+ .handleAction(
+ HIDE_ACTION.getAction(),
+ ActionType.VIEW,
+ DEFAULT_FRAME,
+ view,
+ LogData.getDefaultInstance());
}
@Test
@@ -474,7 +498,12 @@
ViewUtils.triggerHideActions(
view, VIEW_AND_HIDE_ACTIONS, mockActionHandler, DEFAULT_FRAME, activeActions);
verify(mockActionHandler)
- .handleAction(HIDE_ACTION.getAction(), ActionType.VIEW, DEFAULT_FRAME, view, null);
+ .handleAction(
+ HIDE_ACTION.getAction(),
+ ActionType.VIEW,
+ DEFAULT_FRAME,
+ view,
+ LogData.getDefaultInstance());
assertThat(activeActions).containsExactly(HIDE_ACTION);
@@ -482,7 +511,12 @@
ViewUtils.triggerHideActions(
view, VIEW_AND_HIDE_ACTIONS, mockActionHandler, DEFAULT_FRAME, activeActions);
verify(mockActionHandler, times(1))
- .handleAction(HIDE_ACTION.getAction(), ActionType.VIEW, DEFAULT_FRAME, view, null);
+ .handleAction(
+ HIDE_ACTION.getAction(),
+ ActionType.VIEW,
+ DEFAULT_FRAME,
+ view,
+ LogData.getDefaultInstance());
}
@Test