mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 962644 - Part 1: conditionally open FxA or legacy Sync UI from Fennec. r=nalexander
This commit is contained in:
parent
e13b123e74
commit
a7202fb8d9
@ -15,6 +15,8 @@ import android.preference.Preference;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
class SyncPreference extends Preference {
|
||||
private static final boolean DEFAULT_TO_FXA = false;
|
||||
|
||||
private Context mContext;
|
||||
|
||||
public SyncPreference(Context context, AttributeSet attrs) {
|
||||
@ -40,6 +42,21 @@ class SyncPreference extends Preference {
|
||||
|
||||
@Override
|
||||
protected void onClick() {
|
||||
openSync11Settings();
|
||||
// If we're not defaulting to FxA, just do what we've always done.
|
||||
if (!DEFAULT_TO_FXA) {
|
||||
openSync11Settings();
|
||||
return;
|
||||
}
|
||||
|
||||
// If there's a legacy Sync account (or a pickled one on disk),
|
||||
// open the settings page.
|
||||
if (SyncAccounts.syncAccountsExist(mContext)) {
|
||||
SyncAccounts.openSyncSettings(mContext);
|
||||
return;
|
||||
}
|
||||
|
||||
// Otherwise, launch the FxA "Get started" activity, which will
|
||||
// dispatch to the right location.
|
||||
launchFxASetup();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user