Hey folks,
Just a little information dissemination. Over in Bug 10171091, wesj,
rnewman, and I arrived at a pattern I'd like to see be known more broadly.
When adding a compile time define (usually to AppConstants.java.in), if
the feature depends on an Android version (or feature), it's a nice idea
to fold the Android requirement into the define itself. Then we're less
likely to forget the Android requirement in later code.
As an example:
public static final boolean ANDROID_DOWNLOADS_INTEGRATION =
#ifdef MOZ_ANDROID_DOWNLOADS_INTEGRATION
AppConstants.Versions.feature12Plus;
#else
false;
#endif
Yours,
Nick
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1071091#c5
_______________________________________________
mobile-firefox-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/mobile-firefox-dev