mobile/android/base/AppConstants.java.in

Wed, 31 Dec 2014 07:22:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:22:50 +0100
branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
permissions
-rw-r--r--

Correct previous dual key logic pending first delivery installment.

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

mercurial