1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/mobile/android/base/sync/SyncConstants.java.in Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,61 @@ 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.sync; 1.10 + 1.11 +import org.mozilla.gecko.background.common.GlobalConstants; 1.12 + 1.13 +/** 1.14 + * Preprocessed class for storing preprocessed values specific to Android Sync. 1.15 + */ 1.16 +public class SyncConstants { 1.17 + public static final String GLOBAL_LOG_TAG = "FxSync"; 1.18 + public static final String SYNC_MAJOR_VERSION = "1"; 1.19 + public static final String SYNC_MINOR_VERSION = "0"; 1.20 + public static final String SYNC_VERSION_STRING = SYNC_MAJOR_VERSION + "." + 1.21 + GlobalConstants.MOZ_APP_VERSION + "." + 1.22 + SYNC_MINOR_VERSION; 1.23 + 1.24 + public static final String USER_AGENT = "Firefox AndroidSync " + 1.25 + SYNC_VERSION_STRING + " (" + 1.26 + GlobalConstants.MOZ_APP_DISPLAYNAME + ")"; 1.27 + 1.28 + public static final String ACCOUNTTYPE_SYNC = "@MOZ_ANDROID_SHARED_ACCOUNT_TYPE@"; 1.29 + 1.30 + /** 1.31 + * Bug 790931: this action is broadcast when an Android Sync Account is 1.32 + * deleted. This allows each installed Firefox to delete any Sync Account 1.33 + * pickle file and to (try to) wipe its client record from the Sync server. 1.34 + * <p> 1.35 + * It is protected by signing-level permission PER_ACCOUNT_TYPE_PERMISSION and 1.36 + * can be received only by Firefox versions sharing the same Android Sync 1.37 + * Account type. 1.38 + * <p> 1.39 + * See {@link org.mozilla.gecko.sync.setup.SyncAccounts#makeSyncAccountDeletedIntent(android.content.Context, android.accounts.AccountManager, android.accounts.Account)} 1.40 + * for contents of the intent. 1.41 + */ 1.42 + public static final String SYNC_ACCOUNT_DELETED_ACTION = "@MOZ_ANDROID_SHARED_ACCOUNT_TYPE@.accounts.SYNC_ACCOUNT_DELETED_ACTION"; 1.43 + 1.44 + /** 1.45 + * Bug 790931: version number of contents of SYNC_ACCOUNT_DELETED_ACTION 1.46 + * intent. 1.47 + * <p> 1.48 + * See {@link org.mozilla.gecko.sync.setup.SyncAccounts#makeSyncAccountDeletedIntent(android.content.Context, android.accounts.AccountManager, android.accounts.Account)} 1.49 + * for contents of the intent. 1.50 + */ 1.51 + public static final long SYNC_ACCOUNT_DELETED_INTENT_VERSION = 1; 1.52 + 1.53 + /** 1.54 + * Bug 790931: this signing-level permission protects broadcast intents that 1.55 + * should be received only by Firefox versions sharing the same Android Sync 1.56 + * Account type. 1.57 + */ 1.58 + public static final String PER_ACCOUNT_TYPE_PERMISSION = "@MOZ_ANDROID_SHARED_ACCOUNT_TYPE@.permission.PER_ACCOUNT_TYPE"; 1.59 + 1.60 + public static final String DEFAULT_AUTH_SERVER = "https://auth.services.mozilla.com/"; 1.61 + 1.62 + // Used for BackoffHandler storage for Sync 1.1's SyncAdapter. 1.63 + public static final String BACKOFF_PREF_SUFFIX_11 = "sync"; 1.64 +}