|
1 #filter substitution |
|
2 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
5 |
|
6 package org.mozilla.gecko.background.common; |
|
7 |
|
8 /** |
|
9 * Preprocessed class for storing preprocessed values common to all |
|
10 * Android services. |
|
11 */ |
|
12 public class GlobalConstants { |
|
13 public static final String ANDROID_CPU_ARCH = "@ANDROID_CPU_ARCH@"; |
|
14 |
|
15 // One of 'beta', 'aurora', 'nightly', 'default'. |
|
16 // If this is an official build, 'default' means 'release'. |
|
17 // Otherwise, it means 'dev'. |
|
18 public static final String MOZ_UPDATE_CHANNEL = "@MOZ_UPDATE_CHANNEL@"; |
|
19 #ifdef MOZ_OFFICIAL_BRANDING |
|
20 public static final boolean MOZ_OFFICIAL_BRANDING = true; |
|
21 #else |
|
22 public static final boolean MOZ_OFFICIAL_BRANDING = false; |
|
23 #endif |
|
24 |
|
25 public static final long BUILD_TIMESTAMP_SECONDS = @MOZ_BUILD_TIMESTAMP@L; |
|
26 public static final long BUILD_TIMESTAMP_MSEC = 1000L * @MOZ_BUILD_TIMESTAMP@L; |
|
27 |
|
28 public static final String MOZ_APP_DISPLAYNAME = "@MOZ_APP_DISPLAYNAME@"; |
|
29 public static final String MOZ_APP_VERSION = "@MOZ_APP_VERSION@"; |
|
30 public static final String BROWSER_INTENT_PACKAGE = "@ANDROID_PACKAGE_NAME@"; |
|
31 public static final String BROWSER_INTENT_CLASS = BROWSER_INTENT_PACKAGE + ".App"; |
|
32 |
|
33 /** |
|
34 * Bug 800244: this signing-level permission protects broadcast intents that |
|
35 * should be received only by the Firefox versions with the given Android |
|
36 * package name. |
|
37 */ |
|
38 public static final String PER_ANDROID_PACKAGE_PERMISSION = "@ANDROID_PACKAGE_NAME@.permission.PER_ANDROID_PACKAGE"; |
|
39 |
|
40 public static final int SHARED_PREFERENCES_MODE = 0; |
|
41 |
|
42 // These are used to ask Fennec (via reflection) to send |
|
43 // us a pref notification. This avoids us having to guess |
|
44 // Fennec's prefs branch and pref name. |
|
45 // Eventually Fennec might listen to startup notifications and |
|
46 // do this automatically, but this will do for now. See Bug 800244. |
|
47 public static String GECKO_PREFERENCES_CLASS = "org.mozilla.gecko.preferences.GeckoPreferences"; |
|
48 public static String GECKO_BROADCAST_ANNOUNCEMENTS_PREF_METHOD = "broadcastAnnouncementsPref"; |
|
49 public static String GECKO_BROADCAST_HEALTHREPORT_UPLOAD_PREF_METHOD = "broadcastHealthReportUploadPref"; |
|
50 public static String GECKO_BROADCAST_HEALTHREPORT_PRUNE_METHOD = "broadcastHealthReportPrune"; |
|
51 |
|
52 // Common time values. |
|
53 public static final long MILLISECONDS_PER_DAY = 24 * 60 * 60 * 1000; |
|
54 public static final long MILLISECONDS_PER_SIX_MONTHS = 180 * MILLISECONDS_PER_DAY; |
|
55 } |