Skip to content

Commit

Permalink
refactor: add final and non-null annotations
Browse files Browse the repository at this point in the history
to video-related events.
  • Loading branch information
wzieba committed Oct 4, 2023
1 parent a30f6d5 commit 8254762
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -351,15 +351,15 @@ public void trackPlay(
videoEngagementManager = null;
}
}
final @NonNull String uuid = generatePixelId();
@NonNull final String uuid = generatePixelId();

// Enqueue the videostart
Map<String, Object> videostartEvent = buildEvent(url, urlRef, "videostart", videoMetadata, extraData);
@NonNull final Map<String, Object> videostartEvent = buildEvent(url, urlRef, "videostart", videoMetadata, extraData);
videostartEvent.put(VIDEO_START_ID_KEY, uuid);
enqueueEvent(videostartEvent);

// Start a new engagement manager for the video.
Map<String, Object> hbEvent = buildEvent(url, urlRef, "vheartbeat", videoMetadata, extraData);
@NonNull final Map<String, Object> hbEvent = buildEvent(url, urlRef, "vheartbeat", videoMetadata, extraData);
hbEvent.put(VIDEO_START_ID_KEY, uuid);
// TODO: Can we remove some metadata fields from this request?
videoEngagementManager = new EngagementManager(timer, DEFAULT_ENGAGEMENT_INTERVAL_MILLIS, hbEvent);
Expand Down Expand Up @@ -412,6 +412,7 @@ public void resetVideo() {
* @param extraData A Map of additional information to send with the event.
* @return A Map object representing the event to be sent to Parse.ly.
*/
@NonNull
private Map<String, Object> buildEvent(
String url,
String urlRef,
Expand Down

0 comments on commit 8254762

Please sign in to comment.