Skip to content

Commit

Permalink
Issue mozilla-mobile#1606: Add shouldIncludeClientId()
Browse files Browse the repository at this point in the history
  • Loading branch information
psymoon committed Jan 7, 2019
1 parent 25811e0 commit 07ee21c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Expand Up @@ -32,9 +32,7 @@ public TelemetryPingBuilder(@NonNull TelemetryConfiguration configuration, @NonN

// All pings contain a version and a client id (with exception below)
addMeasurement(new VersionMeasurement(version));

// Fire-tv pocket telemetry ping should not include client-id (see #1606)
if (!type.equals(TelemetryPocketEventPingBuilder.TYPE)) {
if (shouldIncludeClientId()) {
addMeasurement(new ClientIdMeasurement(configuration));
}
}
Expand All @@ -43,6 +41,11 @@ public TelemetryConfiguration getConfiguration() {
return configuration;
}

// Fire-tv pocket telemetry ping should not include client-id (see #1606)
protected boolean shouldIncludeClientId() {
return true;
}

@NonNull
public String getType() {
return type;
Expand Down
Expand Up @@ -41,6 +41,11 @@ public TelemetryPocketEventPingBuilder(TelemetryConfiguration configuration) {
addMeasurement(eventsMeasurement = new EventsMeasurement(configuration));
}

@Override
protected boolean shouldIncludeClientId() {
return false;
}

public EventsMeasurement getEventsMeasurement() {
return eventsMeasurement;
}
Expand Down

0 comments on commit 07ee21c

Please sign in to comment.