mobile/android/base/background/common/GlobalConstants.java.in

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/mobile/android/base/background/common/GlobalConstants.java.in	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,55 @@
     1.4 +#filter substitution
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +package org.mozilla.gecko.background.common;
    1.10 +
    1.11 +/**
    1.12 + * Preprocessed class for storing preprocessed values common to all
    1.13 + * Android services.
    1.14 + */
    1.15 +public class GlobalConstants {
    1.16 +  public static final String ANDROID_CPU_ARCH = "@ANDROID_CPU_ARCH@";
    1.17 +
    1.18 +  // One of 'beta', 'aurora', 'nightly', 'default'.
    1.19 +  // If this is an official build, 'default' means 'release'.
    1.20 +  // Otherwise, it means 'dev'.
    1.21 +  public static final String MOZ_UPDATE_CHANNEL = "@MOZ_UPDATE_CHANNEL@";
    1.22 +#ifdef MOZ_OFFICIAL_BRANDING
    1.23 +  public static final boolean MOZ_OFFICIAL_BRANDING = true;
    1.24 +#else
    1.25 +  public static final boolean MOZ_OFFICIAL_BRANDING = false;
    1.26 +#endif
    1.27 +
    1.28 +  public static final long BUILD_TIMESTAMP_SECONDS = @MOZ_BUILD_TIMESTAMP@L;
    1.29 +  public static final long BUILD_TIMESTAMP_MSEC = 1000L * @MOZ_BUILD_TIMESTAMP@L;
    1.30 +
    1.31 +  public static final String MOZ_APP_DISPLAYNAME = "@MOZ_APP_DISPLAYNAME@";
    1.32 +  public static final String MOZ_APP_VERSION = "@MOZ_APP_VERSION@";
    1.33 +  public static final String BROWSER_INTENT_PACKAGE = "@ANDROID_PACKAGE_NAME@";
    1.34 +  public static final String BROWSER_INTENT_CLASS = BROWSER_INTENT_PACKAGE + ".App";
    1.35 +
    1.36 +  /**
    1.37 +   * Bug 800244: this signing-level permission protects broadcast intents that
    1.38 +   * should be received only by the Firefox versions with the given Android
    1.39 +   * package name.
    1.40 +   */
    1.41 +  public static final String PER_ANDROID_PACKAGE_PERMISSION = "@ANDROID_PACKAGE_NAME@.permission.PER_ANDROID_PACKAGE";
    1.42 +
    1.43 +  public static final int SHARED_PREFERENCES_MODE = 0;
    1.44 +
    1.45 +  // These are used to ask Fennec (via reflection) to send
    1.46 +  // us a pref notification. This avoids us having to guess
    1.47 +  // Fennec's prefs branch and pref name.
    1.48 +  // Eventually Fennec might listen to startup notifications and
    1.49 +  // do this automatically, but this will do for now. See Bug 800244.
    1.50 +  public static String GECKO_PREFERENCES_CLASS = "org.mozilla.gecko.preferences.GeckoPreferences";
    1.51 +  public static String GECKO_BROADCAST_ANNOUNCEMENTS_PREF_METHOD  = "broadcastAnnouncementsPref";
    1.52 +  public static String GECKO_BROADCAST_HEALTHREPORT_UPLOAD_PREF_METHOD  = "broadcastHealthReportUploadPref";
    1.53 +  public static String GECKO_BROADCAST_HEALTHREPORT_PRUNE_METHOD = "broadcastHealthReportPrune";
    1.54 +
    1.55 +  // Common time values.
    1.56 +  public static final long MILLISECONDS_PER_DAY = 24 * 60 * 60 * 1000;
    1.57 +  public static final long MILLISECONDS_PER_SIX_MONTHS = 180 * MILLISECONDS_PER_DAY;
    1.58 +}

mercurial