Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 package org.mozilla.gecko.fxa.sync;
7 import java.io.IOException;
8 import java.net.URISyntaxException;
9 import java.util.Collections;
10 import java.util.HashMap;
12 import org.json.simple.parser.ParseException;
13 import org.mozilla.gecko.sync.GlobalSession;
14 import org.mozilla.gecko.sync.NonObjectJSONException;
15 import org.mozilla.gecko.sync.SyncConfiguration;
16 import org.mozilla.gecko.sync.SyncConfigurationException;
17 import org.mozilla.gecko.sync.delegates.BaseGlobalSessionCallback;
18 import org.mozilla.gecko.sync.delegates.ClientsDataDelegate;
19 import org.mozilla.gecko.sync.stage.CheckPreconditionsStage;
20 import org.mozilla.gecko.sync.stage.GlobalSyncStage;
21 import org.mozilla.gecko.sync.stage.GlobalSyncStage.Stage;
23 import android.content.Context;
25 public class FxAccountGlobalSession extends GlobalSession {
26 public FxAccountGlobalSession(SyncConfiguration config,
27 BaseGlobalSessionCallback callback,
28 Context context,
29 ClientsDataDelegate clientsDelegate)
30 throws SyncConfigurationException, IllegalArgumentException, IOException, ParseException, NonObjectJSONException, URISyntaxException {
31 super(config, callback, context, clientsDelegate, null);
32 }
34 @Override
35 public void prepareStages() {
36 super.prepareStages();
37 HashMap<Stage, GlobalSyncStage> stages = new HashMap<Stage, GlobalSyncStage>();
38 stages.putAll(this.stages);
39 stages.put(Stage.ensureClusterURL, new CheckPreconditionsStage());
40 this.stages = Collections.unmodifiableMap(stages);
41 }
42 }