File: AppConstants.java.in

package info (click to toggle)
wine-gecko-2.24 2.24%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 740,092 kB
  • ctags: 688,789
  • sloc: cpp: 3,160,639; ansic: 1,619,153; python: 164,084; java: 128,022; asm: 114,527; xml: 69,863; sh: 55,281; makefile: 49,648; perl: 20,454; objc: 2,344; yacc: 2,066; pascal: 995; lex: 982; exp: 449; php: 244; lisp: 228; awk: 211; sed: 61; csh: 21; ada: 16; ruby: 3
file content (139 lines) | stat: -rw-r--r-- 4,422 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#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;

/**
 * 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.
 */
public class AppConstants {
    public static final String ANDROID_PACKAGE_NAME = "@ANDROID_PACKAGE_NAME@";
    public static final String BROWSER_INTENT_CLASS = ANDROID_PACKAGE_NAME + ".App";
    public static final String MANGLED_ANDROID_PACKAGE_NAME = "@MANGLED_ANDROID_PACKAGE_NAME@";

    public static final String GRE_MILESTONE = "@GRE_MILESTONE@";

    public static final String MOZ_APP_ABI = "@MOZ_APP_ABI@";
    public static final String MOZ_APP_BASENAME = "@MOZ_APP_BASENAME@";

    // 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.
    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@";
    public static final String MOZ_APP_VENDOR = "@MOZ_APP_VENDOR@";
    public static final String MOZ_APP_VERSION = "@MOZ_APP_VERSION@";

    // 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@;

    public static final String MOZ_CHILD_PROCESS_NAME = "@MOZ_CHILD_PROCESS_NAME@";
    public static final String MOZ_UPDATE_CHANNEL = "@MOZ_UPDATE_CHANNEL@";
    public static final String OMNIJAR_NAME = "@OMNIJAR_NAME@";
    public static final String OS_TARGET = "@OS_TARGET@";
    public static final String TARGET_XPCOM_ABI = "@TARGET_XPCOM_ABI@";

    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

    public static final boolean MOZ_SERVICES_HEALTHREPORT =
#ifdef MOZ_SERVICES_HEALTHREPORT
    true;
#else
    false;
#endif

    public static final boolean MOZ_TELEMETRY_ON_BY_DEFAULT =
#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
    true;
#else
    false;
#endif

    public static final String TELEMETRY_PREF_NAME =
#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
          "toolkit.telemetry.enabledPreRelease";
#else
          "toolkit.telemetry.enabled";
#endif

    public static final boolean MOZ_TELEMETRY_REPORTING =
#ifdef MOZ_TELEMETRY_REPORTING
    true;
#else
    false;
#endif

    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

    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

    public static final boolean MOZ_ANDROID_BEAM =
#ifdef MOZ_ANDROID_BEAM
    true;
#else
    false;
#endif
}