Closed Bug 1275669 Opened 7 years ago Closed 7 years ago

Don't make adjust pings from automation


(Firefox for Android Graveyard :: Testing, defect)

Not set


(firefox49 fixed)

Firefox 49
Tracking Status
firefox49 --- fixed


(Reporter: mcomella, Assigned: mcomella)




(1 file)

tldr; adjust is enabled for local & automation release & beta builds. Investigation:

There are two ways I see that we can disable adjust in automation:

1) PREFS_HEALTH_REPORT_UPLOAD_ENABLED allows the user to opt-out of Adjust [1]. However, it does not appear to be set in anyway in automation either from it's Java constant [2], or the Java constant's value [3].

2) We return a different AdjustHelper instance depending on the flags specified [4] – the stub helper makes the calls have no effect. We return the real helper when MOZ_INSTALL_TRACKING is defined, which occurs when RELEASE_BUILD & MOZ_NATIVE_DEVICES is defined [5].
 - MOZ_NATIVE_DEVICES is defined when we're not resource constrained [6], which is never since we removed Gingerbread (bug 1220184 & I filed bug 1275721 to remove the resource constrained constants).
 - RELEASE_BUILD reads from milestone.txt [7] and is defined when the the version number doesn't include "a". In the beta tree, this is defined as "47.0" [8], meaning both automation & local beta builds have adjust installed.

I also looked when MOZ_INSTALL_TRACKING_ADJUST_SDK_APP_TOKEN is null, but it throws in that case.

To disable adjust in automation, we can look at the approach of bug 1270191. In that bug, I'm hoping to come up with a more comprehensive solution for disabling features during automation so we should probably wait until it lands before trying to fix this.

Additionally, we have to disable Adjust for local builds, which we should be able to do by taking into account the value of the MOZILLA_OFFICIAL constant (like TelemetryConstants [1]).

Depends on: 1270191
Comment on attachment 8759325 [details]
Bug 1275669 - Do not enable adjust if we are in automation.

Looks good to me.
Attachment #8759325 - Flags: review?(gkruglov) → review+
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 49
Summary: Investigate whether we're making adjust pings from automation → Don't make adjust pings from automation
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.