Skip to content

Always send the user agent regardless of the heartbeat value #2012

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@ public void updateMetadata(@NonNull Metadata metadata) {
}

int heartBeatCode = heartBeatInfoProvider.get().getHeartBeatCode(HEART_BEAT_TAG).getCode();
// Non-zero values indicate some kind of heartbeat should be sent
// Non-zero values indicate some kind of heartbeat should be sent.
if (heartBeatCode != 0) {
metadata.put(HEART_BEAT_HEADER, Integer.toString(heartBeatCode));
metadata.put(USER_AGENT_HEADER, userAgentPublisherProvider.get().getUserAgent());
maybeAddGmpAppId(metadata);
}

metadata.put(USER_AGENT_HEADER, userAgentPublisherProvider.get().getUserAgent());
maybeAddGmpAppId(metadata);
}

private void maybeAddGmpAppId(@NonNull Metadata metadata) {
Expand Down