Closed Bug 1038923 Opened 11 years ago Closed 11 years ago

[geolocation-stumbler] Provide MLS API key to stumbler at build time

Categories

(Firefox Build System :: Android Studio and Gradle Integration, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1038843

People

(Reporter: nalexander, Unassigned)

References

Details

Attachments

(1 file)

The process is described at https://bugzilla.mozilla.org/show_bug.cgi?id=1024708#c38: > You want to fish the value of MOZ_MOZILLA_API_KEY and add it to the intent, correct? > So export CONFIG['MOZ_MOZILLA_API_KEY'] to DEFINES in m/a/b/moz.build (lots of examples), and add it to AppConstants.java.in.
This sends the mlx api key to the stumbler service as an extra on the start intent.
Attachment #8456510 - Flags: review?(nalexander)
... and I see I also snuck in another extra on the intent that isn't really part of this bug: if (!AppConstants.MOZILLA_OFFICIAL) { + intent.putExtra("is_debug", true); + }
Comment on attachment 8456510 [details] [diff] [review] mls-api-key-send-to-stumbler.patch Review of attachment 8456510 [details] [diff] [review]: ----------------------------------------------------------------- The build parts are fine after comments; feel free to land those small tweaks and close this bug. The pref stuff is building on a test patch that hasn't landed; that's a separate ticket, so it needs to wait. ::: mobile/android/base/moz.build @@ +657,5 @@ > if CONFIG['MOZ_ANDROID_MLS_STUMBLER']: > main.included_projects += ['../FennecStumbler'] > main.referenced_projects += ['../FennecStumbler'] > + > +DEFINES['MOZ_MOZILLA_API_KEY'] = CONFIG['MOZ_MOZILLA_API_KEY'] Do this in the same place as all the other defines are handled. ::: mobile/android/base/preferences/GeckoPreferences.java @@ +850,5 @@ > * Broadcast the provided value as the value of the > * <code>PREFS_STUMBLER_ENABLED</code> pref. > */ > public static void broadcastStumblerPref(final Context context, final boolean value) { > + Intent intent = new Intent(PREFS_STUMBLER_ENABLED) I haven't landed anything here, so this isn't ready to land yet. Also, this intent should have an ACTION string, like the others. @@ +854,5 @@ > + Intent intent = new Intent(PREFS_STUMBLER_ENABLED) > + .putExtra("pref", PREFS_GEO_REPORTING) > + .putExtra("branch", GeckoSharedPrefs.APP_PREFS_NAME) > + .putExtra("enabled", value); > + intent.putExtra("moz_mozilla_api_key", AppConstants.MOZ_MOZILLA_API_KEY); nit: be consistent with your style here.
Attachment #8456510 - Flags: review?(nalexander) → review+
Blocks: 1032506
Morphing this into bug 1038843. When all of 1038843 has landed, stumbling is a go. Marking this as a duplicate, which it only is because it got lumped in to that bug.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Product: Firefox for Android → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: