Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
michael@0 | 1 | #filter substitution |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | package org.mozilla.gecko.sync; |
michael@0 | 7 | |
michael@0 | 8 | import org.mozilla.gecko.background.common.GlobalConstants; |
michael@0 | 9 | |
michael@0 | 10 | /** |
michael@0 | 11 | * Preprocessed class for storing preprocessed values specific to Android Sync. |
michael@0 | 12 | */ |
michael@0 | 13 | public class SyncConstants { |
michael@0 | 14 | public static final String GLOBAL_LOG_TAG = "FxSync"; |
michael@0 | 15 | public static final String SYNC_MAJOR_VERSION = "1"; |
michael@0 | 16 | public static final String SYNC_MINOR_VERSION = "0"; |
michael@0 | 17 | public static final String SYNC_VERSION_STRING = SYNC_MAJOR_VERSION + "." + |
michael@0 | 18 | GlobalConstants.MOZ_APP_VERSION + "." + |
michael@0 | 19 | SYNC_MINOR_VERSION; |
michael@0 | 20 | |
michael@0 | 21 | public static final String USER_AGENT = "Firefox AndroidSync " + |
michael@0 | 22 | SYNC_VERSION_STRING + " (" + |
michael@0 | 23 | GlobalConstants.MOZ_APP_DISPLAYNAME + ")"; |
michael@0 | 24 | |
michael@0 | 25 | public static final String ACCOUNTTYPE_SYNC = "@MOZ_ANDROID_SHARED_ACCOUNT_TYPE@"; |
michael@0 | 26 | |
michael@0 | 27 | /** |
michael@0 | 28 | * Bug 790931: this action is broadcast when an Android Sync Account is |
michael@0 | 29 | * deleted. This allows each installed Firefox to delete any Sync Account |
michael@0 | 30 | * pickle file and to (try to) wipe its client record from the Sync server. |
michael@0 | 31 | * <p> |
michael@0 | 32 | * It is protected by signing-level permission PER_ACCOUNT_TYPE_PERMISSION and |
michael@0 | 33 | * can be received only by Firefox versions sharing the same Android Sync |
michael@0 | 34 | * Account type. |
michael@0 | 35 | * <p> |
michael@0 | 36 | * See {@link org.mozilla.gecko.sync.setup.SyncAccounts#makeSyncAccountDeletedIntent(android.content.Context, android.accounts.AccountManager, android.accounts.Account)} |
michael@0 | 37 | * for contents of the intent. |
michael@0 | 38 | */ |
michael@0 | 39 | public static final String SYNC_ACCOUNT_DELETED_ACTION = "@MOZ_ANDROID_SHARED_ACCOUNT_TYPE@.accounts.SYNC_ACCOUNT_DELETED_ACTION"; |
michael@0 | 40 | |
michael@0 | 41 | /** |
michael@0 | 42 | * Bug 790931: version number of contents of SYNC_ACCOUNT_DELETED_ACTION |
michael@0 | 43 | * intent. |
michael@0 | 44 | * <p> |
michael@0 | 45 | * See {@link org.mozilla.gecko.sync.setup.SyncAccounts#makeSyncAccountDeletedIntent(android.content.Context, android.accounts.AccountManager, android.accounts.Account)} |
michael@0 | 46 | * for contents of the intent. |
michael@0 | 47 | */ |
michael@0 | 48 | public static final long SYNC_ACCOUNT_DELETED_INTENT_VERSION = 1; |
michael@0 | 49 | |
michael@0 | 50 | /** |
michael@0 | 51 | * Bug 790931: this signing-level permission protects broadcast intents that |
michael@0 | 52 | * should be received only by Firefox versions sharing the same Android Sync |
michael@0 | 53 | * Account type. |
michael@0 | 54 | */ |
michael@0 | 55 | public static final String PER_ACCOUNT_TYPE_PERMISSION = "@MOZ_ANDROID_SHARED_ACCOUNT_TYPE@.permission.PER_ACCOUNT_TYPE"; |
michael@0 | 56 | |
michael@0 | 57 | public static final String DEFAULT_AUTH_SERVER = "https://auth.services.mozilla.com/"; |
michael@0 | 58 | |
michael@0 | 59 | // Used for BackoffHandler storage for Sync 1.1's SyncAdapter. |
michael@0 | 60 | public static final String BACKOFF_PREF_SUFFIX_11 = "sync"; |
michael@0 | 61 | } |