2013-04-09 17:10:47 -07:00
|
|
|
#filter substitution
|
|
|
|
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
package org.mozilla.gecko;
|
|
|
|
|
2014-04-01 22:00:46 -07:00
|
|
|
import android.app.Activity;
|
|
|
|
|
2013-11-18 21:09:00 -08:00
|
|
|
import org.mozilla.gecko.mozglue.RobocopTarget;
|
2014-04-01 22:00:46 -07:00
|
|
|
|
2013-05-15 20:08:43 -07:00
|
|
|
/**
|
|
|
|
* A collection of constants that pertain to the build and runtime state of the
|
|
|
|
* application. Typically these are sourced from build-time definitions (see
|
|
|
|
* Makefile.in). This is a Java-side substitute for nsIXULAppInfo, amongst
|
|
|
|
* other things.
|
|
|
|
*
|
|
|
|
* See also SysInfo.java, which includes some of the values available from
|
|
|
|
* nsSystemInfo inside Gecko.
|
|
|
|
*/
|
2013-11-18 21:09:00 -08:00
|
|
|
@RobocopTarget
|
2013-04-09 17:10:47 -07:00
|
|
|
public class AppConstants {
|
|
|
|
public static final String ANDROID_PACKAGE_NAME = "@ANDROID_PACKAGE_NAME@";
|
|
|
|
public static final String MANGLED_ANDROID_PACKAGE_NAME = "@MANGLED_ANDROID_PACKAGE_NAME@";
|
2013-05-15 20:08:43 -07:00
|
|
|
|
2014-04-01 22:00:46 -07:00
|
|
|
/**
|
|
|
|
* The name of the Java class that launches the browser.
|
|
|
|
*/
|
2014-04-10 10:09:34 -07:00
|
|
|
public static final String BROWSER_INTENT_CLASS_NAME = ANDROID_PACKAGE_NAME + ".App";
|
2014-04-01 22:00:46 -07:00
|
|
|
|
2013-05-15 20:08:43 -07:00
|
|
|
public static final String GRE_MILESTONE = "@GRE_MILESTONE@";
|
|
|
|
|
2013-04-09 17:10:47 -07:00
|
|
|
public static final String MOZ_APP_ABI = "@MOZ_APP_ABI@";
|
|
|
|
public static final String MOZ_APP_BASENAME = "@MOZ_APP_BASENAME@";
|
2013-05-15 20:08:43 -07:00
|
|
|
|
|
|
|
// For the benefit of future archaeologists: APP_BUILDID and
|
|
|
|
// MOZ_APP_BUILDID are *exactly* the same.
|
|
|
|
// GRE_BUILDID is exactly the same unless you're running on XULRunner,
|
|
|
|
// which is never the case on Android.
|
2013-04-09 17:10:47 -07:00
|
|
|
public static final String MOZ_APP_BUILDID = "@MOZ_APP_BUILDID@";
|
|
|
|
public static final String MOZ_APP_ID = "@MOZ_APP_ID@";
|
|
|
|
public static final String MOZ_APP_NAME = "@MOZ_APP_NAME@";
|
2013-05-15 20:08:43 -07:00
|
|
|
public static final String MOZ_APP_VENDOR = "@MOZ_APP_VENDOR@";
|
2013-04-09 17:10:47 -07:00
|
|
|
public static final String MOZ_APP_VERSION = "@MOZ_APP_VERSION@";
|
2013-05-15 20:08:43 -07:00
|
|
|
|
2013-04-16 11:04:59 -07:00
|
|
|
// MOZILLA_VERSION is already quoted when it gets substituted in. If we
|
|
|
|
// add additional quotes we end up with ""x.y"", which is a syntax error.
|
|
|
|
public static final String MOZILLA_VERSION = @MOZILLA_VERSION@;
|
2013-05-15 20:08:43 -07:00
|
|
|
|
2013-04-09 17:10:47 -07:00
|
|
|
public static final String MOZ_CHILD_PROCESS_NAME = "@MOZ_CHILD_PROCESS_NAME@";
|
|
|
|
public static final String MOZ_UPDATE_CHANNEL = "@MOZ_UPDATE_CHANNEL@";
|
2013-06-12 13:24:14 -07:00
|
|
|
public static final String OMNIJAR_NAME = "@OMNIJAR_NAME@";
|
2013-04-09 17:10:47 -07:00
|
|
|
public static final String OS_TARGET = "@OS_TARGET@";
|
2013-05-15 20:08:43 -07:00
|
|
|
public static final String TARGET_XPCOM_ABI = "@TARGET_XPCOM_ABI@";
|
2013-04-09 17:10:47 -07:00
|
|
|
|
|
|
|
public static final String USER_AGENT_BOT_LIKE = "Redirector/" + AppConstants.MOZ_APP_VERSION +
|
|
|
|
" (Android; rv:" + AppConstants.MOZ_APP_VERSION + ")";
|
|
|
|
|
|
|
|
public static final String USER_AGENT_FENNEC_MOBILE = "Mozilla/5.0 (Android; Mobile; rv:" +
|
|
|
|
AppConstants.MOZ_APP_VERSION + ") Gecko/" +
|
|
|
|
AppConstants.MOZ_APP_VERSION + " Firefox/" +
|
|
|
|
AppConstants.MOZ_APP_VERSION;
|
|
|
|
|
|
|
|
public static final String USER_AGENT_FENNEC_TABLET = "Mozilla/5.0 (Android; Tablet; rv:" +
|
|
|
|
AppConstants.MOZ_APP_VERSION + ") Gecko/" +
|
|
|
|
AppConstants.MOZ_APP_VERSION + " Firefox/" +
|
|
|
|
AppConstants.MOZ_APP_VERSION;
|
|
|
|
|
|
|
|
public static final int MOZ_MIN_CPU_VERSION = @MOZ_MIN_CPU_VERSION@;
|
|
|
|
|
|
|
|
public static final boolean MOZ_ANDROID_ANR_REPORTER =
|
|
|
|
#ifdef MOZ_ANDROID_ANR_REPORTER
|
|
|
|
true;
|
|
|
|
#else
|
|
|
|
false;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
public static final String MOZ_PKG_SPECIAL =
|
|
|
|
#ifdef MOZ_PKG_SPECIAL
|
|
|
|
"@MOZ_PKG_SPECIAL@";
|
|
|
|
#else
|
|
|
|
null;
|
|
|
|
#endif
|
|
|
|
|
2013-05-10 21:28:17 -07:00
|
|
|
public static final boolean MOZ_SERVICES_HEALTHREPORT =
|
|
|
|
#ifdef MOZ_SERVICES_HEALTHREPORT
|
|
|
|
true;
|
|
|
|
#else
|
|
|
|
false;
|
|
|
|
#endif
|
|
|
|
|
2013-04-09 17:10:47 -07:00
|
|
|
public static final boolean MOZ_TELEMETRY_ON_BY_DEFAULT =
|
|
|
|
#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
|
|
|
|
true;
|
|
|
|
#else
|
|
|
|
false;
|
|
|
|
#endif
|
|
|
|
|
2013-05-22 10:23:53 -07:00
|
|
|
public static final String TELEMETRY_PREF_NAME =
|
|
|
|
"toolkit.telemetry.enabled";
|
|
|
|
|
2013-04-09 17:10:47 -07:00
|
|
|
public static final boolean MOZ_TELEMETRY_REPORTING =
|
|
|
|
#ifdef MOZ_TELEMETRY_REPORTING
|
|
|
|
true;
|
|
|
|
#else
|
|
|
|
false;
|
|
|
|
#endif
|
|
|
|
|
2013-05-10 21:28:17 -07:00
|
|
|
public static final boolean MOZ_CRASHREPORTER =
|
|
|
|
#if MOZ_CRASHREPORTER
|
|
|
|
true;
|
|
|
|
#else
|
|
|
|
false;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
public static final boolean MOZ_DATA_REPORTING =
|
|
|
|
#ifdef MOZ_DATA_REPORTING
|
|
|
|
true;
|
|
|
|
#else
|
|
|
|
false;
|
|
|
|
#endif
|
|
|
|
|
2014-06-04 19:21:33 -07:00
|
|
|
public static final boolean MOZ_LOCALE_SWITCHER =
|
|
|
|
#ifdef MOZ_LOCALE_SWITCHER
|
|
|
|
true;
|
|
|
|
#else
|
|
|
|
false;
|
|
|
|
#endif
|
|
|
|
|
2013-04-09 17:10:47 -07:00
|
|
|
public static final boolean MOZ_UPDATER =
|
|
|
|
#ifdef MOZ_UPDATER
|
|
|
|
true;
|
|
|
|
#else
|
|
|
|
false;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
public static final boolean MOZ_WEBSMS_BACKEND =
|
|
|
|
#ifdef MOZ_WEBSMS_BACKEND
|
|
|
|
true;
|
|
|
|
#else
|
|
|
|
false;
|
|
|
|
#endif
|
2013-04-17 13:08:11 -07:00
|
|
|
|
|
|
|
public static final boolean MOZ_ANDROID_BEAM =
|
|
|
|
#ifdef MOZ_ANDROID_BEAM
|
|
|
|
true;
|
|
|
|
#else
|
|
|
|
false;
|
|
|
|
#endif
|
2013-08-08 10:40:26 -07:00
|
|
|
|
|
|
|
// 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
|
2014-04-25 11:45:52 -07:00
|
|
|
|
|
|
|
public static final boolean DEBUG_BUILD =
|
|
|
|
#ifdef MOZ_DEBUG
|
|
|
|
true;
|
|
|
|
#else
|
|
|
|
false;
|
|
|
|
#endif
|
2014-05-05 11:27:55 -07:00
|
|
|
|
|
|
|
// Official corresponds, roughly, to whether this build is performed on
|
|
|
|
// Mozilla's continuous integration infrastructure. You should disable
|
|
|
|
// developer-only functionality when this flag is set.
|
|
|
|
public static final boolean MOZILLA_OFFICIAL =
|
|
|
|
#ifdef MOZILLA_OFFICIAL
|
|
|
|
true;
|
|
|
|
#else
|
|
|
|
false;
|
|
|
|
#endif
|
2013-04-09 17:10:47 -07:00
|
|
|
}
|