Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 #filter substitution
2 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 package org.mozilla.gecko;
9 import android.app.Activity;
11 import org.mozilla.gecko.mozglue.RobocopTarget;
13 /**
14 * A collection of constants that pertain to the build and runtime state of the
15 * application. Typically these are sourced from build-time definitions (see
16 * Makefile.in). This is a Java-side substitute for nsIXULAppInfo, amongst
17 * other things.
18 *
19 * See also SysInfo.java, which includes some of the values available from
20 * nsSystemInfo inside Gecko.
21 */
22 @RobocopTarget
23 public class AppConstants {
24 public static final String ANDROID_PACKAGE_NAME = "@ANDROID_PACKAGE_NAME@";
25 public static final String MANGLED_ANDROID_PACKAGE_NAME = "@MANGLED_ANDROID_PACKAGE_NAME@";
27 /**
28 * The name of the Java class that launches the browser.
29 */
30 public static final String BROWSER_INTENT_CLASS_NAME = ANDROID_PACKAGE_NAME + ".App";
32 public static final String GRE_MILESTONE = "@GRE_MILESTONE@";
34 public static final String MOZ_APP_ABI = "@MOZ_APP_ABI@";
35 public static final String MOZ_APP_BASENAME = "@MOZ_APP_BASENAME@";
37 // For the benefit of future archaeologists: APP_BUILDID and
38 // MOZ_APP_BUILDID are *exactly* the same.
39 // GRE_BUILDID is exactly the same unless you're running on XULRunner,
40 // which is never the case on Android.
41 public static final String MOZ_APP_BUILDID = "@MOZ_APP_BUILDID@";
42 public static final String MOZ_APP_ID = "@MOZ_APP_ID@";
43 public static final String MOZ_APP_NAME = "@MOZ_APP_NAME@";
44 public static final String MOZ_APP_VENDOR = "@MOZ_APP_VENDOR@";
45 public static final String MOZ_APP_VERSION = "@MOZ_APP_VERSION@";
47 // MOZILLA_VERSION is already quoted when it gets substituted in. If we
48 // add additional quotes we end up with ""x.y"", which is a syntax error.
49 public static final String MOZILLA_VERSION = @MOZILLA_VERSION@;
51 public static final String MOZ_CHILD_PROCESS_NAME = "@MOZ_CHILD_PROCESS_NAME@";
52 public static final String MOZ_UPDATE_CHANNEL = "@MOZ_UPDATE_CHANNEL@";
53 public static final String OMNIJAR_NAME = "@OMNIJAR_NAME@";
54 public static final String OS_TARGET = "@OS_TARGET@";
55 public static final String TARGET_XPCOM_ABI = "@TARGET_XPCOM_ABI@";
57 public static final String USER_AGENT_BOT_LIKE = "Redirector/" + AppConstants.MOZ_APP_VERSION +
58 " (Android; rv:" + AppConstants.MOZ_APP_VERSION + ")";
60 public static final String USER_AGENT_FENNEC_MOBILE = "Mozilla/5.0 (Android; Mobile; rv:" +
61 AppConstants.MOZ_APP_VERSION + ") Gecko/" +
62 AppConstants.MOZ_APP_VERSION + " Firefox/" +
63 AppConstants.MOZ_APP_VERSION;
65 public static final String USER_AGENT_FENNEC_TABLET = "Mozilla/5.0 (Android; Tablet; rv:" +
66 AppConstants.MOZ_APP_VERSION + ") Gecko/" +
67 AppConstants.MOZ_APP_VERSION + " Firefox/" +
68 AppConstants.MOZ_APP_VERSION;
70 public static final int MOZ_MIN_CPU_VERSION = @MOZ_MIN_CPU_VERSION@;
72 public static final boolean MOZ_ANDROID_ANR_REPORTER =
73 #ifdef MOZ_ANDROID_ANR_REPORTER
74 true;
75 #else
76 false;
77 #endif
79 public static final String MOZ_PKG_SPECIAL =
80 #ifdef MOZ_PKG_SPECIAL
81 "@MOZ_PKG_SPECIAL@";
82 #else
83 null;
84 #endif
86 public static final boolean MOZ_SERVICES_HEALTHREPORT =
87 #ifdef MOZ_SERVICES_HEALTHREPORT
88 true;
89 #else
90 false;
91 #endif
93 public static final boolean MOZ_TELEMETRY_ON_BY_DEFAULT =
94 #ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
95 true;
96 #else
97 false;
98 #endif
100 public static final String TELEMETRY_PREF_NAME =
101 "toolkit.telemetry.enabled";
103 public static final boolean MOZ_TELEMETRY_REPORTING =
104 #ifdef MOZ_TELEMETRY_REPORTING
105 true;
106 #else
107 false;
108 #endif
110 public static final boolean MOZ_CRASHREPORTER =
111 #if MOZ_CRASHREPORTER
112 true;
113 #else
114 false;
115 #endif
117 public static final boolean MOZ_DATA_REPORTING =
118 #ifdef MOZ_DATA_REPORTING
119 true;
120 #else
121 false;
122 #endif
124 public static final boolean MOZ_UPDATER =
125 #ifdef MOZ_UPDATER
126 true;
127 #else
128 false;
129 #endif
131 public static final boolean MOZ_WEBSMS_BACKEND =
132 #ifdef MOZ_WEBSMS_BACKEND
133 true;
134 #else
135 false;
136 #endif
138 public static final boolean MOZ_ANDROID_BEAM =
139 #ifdef MOZ_ANDROID_BEAM
140 true;
141 #else
142 false;
143 #endif
145 public static final boolean MOZ_ANDROID_SYNTHAPKS =
146 #ifdef MOZ_ANDROID_SYNTHAPKS
147 true;
148 #else
149 false;
150 #endif
152 // See this wiki page for more details about channel specific build defines:
153 // https://wiki.mozilla.org/Platform/Channel-specific_build_defines
154 public static final boolean RELEASE_BUILD =
155 #ifdef RELEASE_BUILD
156 true;
157 #else
158 false;
159 #endif
161 public static final boolean DEBUG_BUILD =
162 #ifdef MOZ_DEBUG
163 true;
164 #else
165 false;
166 #endif
167 }