Bug 888982 - Fennec should use channel-specific build defines rather than MOZ_UPDATE_CHANNEL. r=mleibovic

This commit is contained in:
Michael Boon 2013-08-08 13:40:26 -04:00
parent 36c5c5d2e5
commit d3a7b937e5
3 changed files with 11 additions and 4 deletions

View File

@ -136,4 +136,13 @@ public class AppConstants {
#else
false;
#endif
// See this wiki page for more details about channel specific build defines:
// https://wiki.mozilla.org/Platform/Channel-specific_build_defines
public static final boolean RELEASE_BUILD =
#ifdef RELEASE_BUILD
true;
#else
false;
#endif
}

View File

@ -1988,8 +1988,7 @@ abstract public class BrowserApp extends GeckoApp
* @return true if update UI was launched.
*/
protected boolean handleUpdaterLaunch() {
if ("release".equals(AppConstants.MOZ_UPDATE_CHANNEL) ||
"beta".equals(AppConstants.MOZ_UPDATE_CHANNEL)) {
if (AppConstants.RELEASE_BUILD) {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://details?id=" + getPackageName()));
startActivity(intent);

View File

@ -138,8 +138,7 @@ public class UpdateService extends IntentService {
int interval;
if (isRetry) {
interval = INTERVAL_RETRY;
} else if (AppConstants.MOZ_UPDATE_CHANNEL.equals("nightly") ||
AppConstants.MOZ_UPDATE_CHANNEL.equals("aurora")) {
} else if (!AppConstants.RELEASE_BUILD) {
interval = INTERVAL_SHORT;
} else {
interval = INTERVAL_LONG;