2012-10-17 00:28:29 -07:00
|
|
|
#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.sync;
|
|
|
|
|
2013-02-27 15:44:21 -08:00
|
|
|
import org.mozilla.gecko.background.common.GlobalConstants;
|
|
|
|
|
2012-10-17 00:28:29 -07:00
|
|
|
/**
|
2013-02-27 15:44:21 -08:00
|
|
|
* Preprocessed class for storing preprocessed values specific to Android Sync.
|
2012-10-17 00:28:29 -07:00
|
|
|
*/
|
|
|
|
public class SyncConstants {
|
|
|
|
public static final String GLOBAL_LOG_TAG = "FxSync";
|
|
|
|
public static final String SYNC_MAJOR_VERSION = "1";
|
|
|
|
public static final String SYNC_MINOR_VERSION = "0";
|
|
|
|
public static final String SYNC_VERSION_STRING = SYNC_MAJOR_VERSION + "." +
|
|
|
|
GlobalConstants.MOZ_APP_VERSION + "." +
|
|
|
|
SYNC_MINOR_VERSION;
|
|
|
|
|
2014-03-13 17:13:58 -07:00
|
|
|
public static final String USER_AGENT = "Firefox AndroidSync " +
|
|
|
|
SYNC_VERSION_STRING + " (" +
|
|
|
|
GlobalConstants.MOZ_APP_DISPLAYNAME + ")";
|
2012-10-17 00:28:29 -07:00
|
|
|
|
2013-02-27 15:44:21 -08:00
|
|
|
public static final String ACCOUNTTYPE_SYNC = "@MOZ_ANDROID_SHARED_ACCOUNT_TYPE@";
|
2012-10-17 00:28:29 -07:00
|
|
|
|
|
|
|
/**
|
2013-02-27 15:44:21 -08:00
|
|
|
* Bug 790931: this action is broadcast when an Android Sync Account is
|
|
|
|
* deleted. This allows each installed Firefox to delete any Sync Account
|
|
|
|
* pickle file and to (try to) wipe its client record from the Sync server.
|
2012-10-17 00:28:29 -07:00
|
|
|
* <p>
|
|
|
|
* It is protected by signing-level permission PER_ACCOUNT_TYPE_PERMISSION and
|
2013-02-27 15:44:21 -08:00
|
|
|
* can be received only by Firefox versions sharing the same Android Sync
|
|
|
|
* Account type.
|
2012-10-17 00:28:29 -07:00
|
|
|
* <p>
|
2012-10-23 21:29:08 -07:00
|
|
|
* See {@link org.mozilla.gecko.sync.setup.SyncAccounts#makeSyncAccountDeletedIntent(android.content.Context, android.accounts.AccountManager, android.accounts.Account)}
|
2012-10-17 00:28:29 -07:00
|
|
|
* for contents of the intent.
|
|
|
|
*/
|
|
|
|
public static final String SYNC_ACCOUNT_DELETED_ACTION = "@MOZ_ANDROID_SHARED_ACCOUNT_TYPE@.accounts.SYNC_ACCOUNT_DELETED_ACTION";
|
|
|
|
|
|
|
|
/**
|
2013-02-27 15:44:21 -08:00
|
|
|
* Bug 790931: version number of contents of SYNC_ACCOUNT_DELETED_ACTION
|
|
|
|
* intent.
|
2012-10-17 00:28:29 -07:00
|
|
|
* <p>
|
2012-10-23 21:29:08 -07:00
|
|
|
* See {@link org.mozilla.gecko.sync.setup.SyncAccounts#makeSyncAccountDeletedIntent(android.content.Context, android.accounts.AccountManager, android.accounts.Account)}
|
2012-10-17 00:28:29 -07:00
|
|
|
* for contents of the intent.
|
|
|
|
*/
|
|
|
|
public static final long SYNC_ACCOUNT_DELETED_INTENT_VERSION = 1;
|
2013-02-27 15:44:21 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Bug 790931: this signing-level permission protects broadcast intents that
|
|
|
|
* should be received only by Firefox versions sharing the same Android Sync
|
|
|
|
* Account type.
|
|
|
|
*/
|
|
|
|
public static final String PER_ACCOUNT_TYPE_PERMISSION = "@MOZ_ANDROID_SHARED_ACCOUNT_TYPE@.permission.PER_ACCOUNT_TYPE";
|
2013-12-15 15:53:59 -08:00
|
|
|
|
|
|
|
public static final String DEFAULT_AUTH_SERVER = "https://auth.services.mozilla.com/";
|
2014-02-13 19:46:23 -08:00
|
|
|
|
|
|
|
// Used for BackoffHandler storage for Sync 1.1's SyncAdapter.
|
|
|
|
public static final String BACKOFF_PREF_SUFFIX_11 = "sync";
|
2012-10-17 00:28:29 -07:00
|
|
|
}
|