mobile/android/base/background/common/GlobalConstants.java.in
author Nick Alexander <nalexander@mozilla.com>
Wed, 21 Jan 2015 09:55:12 -0800
changeset 225008 0ebf567bee4bc342a8104b4d6722d055096065b3
parent 209919 b557f2cb4a04b9b28d91b372ce0433e83f72076f
permissions -rw-r--r--
Bug 1124052 - Part 1: Remove BUILD_TIMESTAMP_*. r=rnewman

//#filter substitution
/* 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.background.common;

/**
 * Preprocessed class for storing preprocessed values common to all
 * Android services.
 */
public class GlobalConstants {
  public static final String ANDROID_CPU_ARCH = "@ANDROID_CPU_ARCH@";

  // One of 'beta', 'aurora', 'nightly', 'default'.
  // If this is an official build, 'default' means 'release'.
  // Otherwise, it means 'dev'.
  public static final String MOZ_UPDATE_CHANNEL = "@MOZ_UPDATE_CHANNEL@";
//#ifdef MOZ_OFFICIAL_BRANDING
  public static final boolean MOZ_OFFICIAL_BRANDING = true;
//#else
  public static final boolean MOZ_OFFICIAL_BRANDING = false;
//#endif

  public static final String MOZ_APP_DISPLAYNAME = "@MOZ_APP_DISPLAYNAME@";
  public static final String MOZ_APP_VERSION = "@MOZ_APP_VERSION@";
  public static final String BROWSER_INTENT_PACKAGE = "@ANDROID_PACKAGE_NAME@";
  public static final String BROWSER_INTENT_CLASS = "org.mozilla.gecko.BrowserApp";

  /**
   * Bug 800244: this signing-level permission protects broadcast intents that
   * should be received only by the Firefox versions with the given Android
   * package name.
   */
  public static final String PER_ANDROID_PACKAGE_PERMISSION = "@ANDROID_PACKAGE_NAME@.permission.PER_ANDROID_PACKAGE";

  public static final int SHARED_PREFERENCES_MODE = 0;

  // These are used to ask Fennec (via reflection) to send
  // us a pref notification. This avoids us having to guess
  // Fennec's prefs branch and pref name.
  // Eventually Fennec might listen to startup notifications and
  // do this automatically, but this will do for now. See Bug 800244.
  public static String GECKO_PREFERENCES_CLASS = "org.mozilla.gecko.preferences.GeckoPreferences";
  public static String GECKO_BROADCAST_HEALTHREPORT_UPLOAD_PREF_METHOD  = "broadcastHealthReportUploadPref";
  public static String GECKO_BROADCAST_HEALTHREPORT_PRUNE_METHOD = "broadcastHealthReportPrune";

  // Common time values.
  public static final long MILLISECONDS_PER_DAY = 24 * 60 * 60 * 1000;
  public static final long MILLISECONDS_PER_SIX_MONTHS = 180 * MILLISECONDS_PER_DAY;
}