michael@0: #filter substitution michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: package org.mozilla.gecko.background.common; michael@0: michael@0: /** michael@0: * Preprocessed class for storing preprocessed values common to all michael@0: * Android services. michael@0: */ michael@0: public class GlobalConstants { michael@0: public static final String ANDROID_CPU_ARCH = "@ANDROID_CPU_ARCH@"; michael@0: michael@0: // One of 'beta', 'aurora', 'nightly', 'default'. michael@0: // If this is an official build, 'default' means 'release'. michael@0: // Otherwise, it means 'dev'. michael@0: public static final String MOZ_UPDATE_CHANNEL = "@MOZ_UPDATE_CHANNEL@"; michael@0: #ifdef MOZ_OFFICIAL_BRANDING michael@0: public static final boolean MOZ_OFFICIAL_BRANDING = true; michael@0: #else michael@0: public static final boolean MOZ_OFFICIAL_BRANDING = false; michael@0: #endif michael@0: michael@0: public static final long BUILD_TIMESTAMP_SECONDS = @MOZ_BUILD_TIMESTAMP@L; michael@0: public static final long BUILD_TIMESTAMP_MSEC = 1000L * @MOZ_BUILD_TIMESTAMP@L; michael@0: michael@0: public static final String MOZ_APP_DISPLAYNAME = "@MOZ_APP_DISPLAYNAME@"; michael@0: public static final String MOZ_APP_VERSION = "@MOZ_APP_VERSION@"; michael@0: public static final String BROWSER_INTENT_PACKAGE = "@ANDROID_PACKAGE_NAME@"; michael@0: public static final String BROWSER_INTENT_CLASS = BROWSER_INTENT_PACKAGE + ".App"; michael@0: michael@0: /** michael@0: * Bug 800244: this signing-level permission protects broadcast intents that michael@0: * should be received only by the Firefox versions with the given Android michael@0: * package name. michael@0: */ michael@0: public static final String PER_ANDROID_PACKAGE_PERMISSION = "@ANDROID_PACKAGE_NAME@.permission.PER_ANDROID_PACKAGE"; michael@0: michael@0: public static final int SHARED_PREFERENCES_MODE = 0; michael@0: michael@0: // These are used to ask Fennec (via reflection) to send michael@0: // us a pref notification. This avoids us having to guess michael@0: // Fennec's prefs branch and pref name. michael@0: // Eventually Fennec might listen to startup notifications and michael@0: // do this automatically, but this will do for now. See Bug 800244. michael@0: public static String GECKO_PREFERENCES_CLASS = "org.mozilla.gecko.preferences.GeckoPreferences"; michael@0: public static String GECKO_BROADCAST_ANNOUNCEMENTS_PREF_METHOD = "broadcastAnnouncementsPref"; michael@0: public static String GECKO_BROADCAST_HEALTHREPORT_UPLOAD_PREF_METHOD = "broadcastHealthReportUploadPref"; michael@0: public static String GECKO_BROADCAST_HEALTHREPORT_PRUNE_METHOD = "broadcastHealthReportPrune"; michael@0: michael@0: // Common time values. michael@0: public static final long MILLISECONDS_PER_DAY = 24 * 60 * 60 * 1000; michael@0: public static final long MILLISECONDS_PER_SIX_MONTHS = 180 * MILLISECONDS_PER_DAY; michael@0: }