本文整理汇总了Java中org.chromium.chrome.browser.sync.ProfileSyncService.isUsingSecondaryPassphrase方法的典型用法代码示例。如果您正苦于以下问题:Java ProfileSyncService.isUsingSecondaryPassphrase方法的具体用法?Java ProfileSyncService.isUsingSecondaryPassphrase怎么用?Java ProfileSyncService.isUsingSecondaryPassphrase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.chromium.chrome.browser.sync.ProfileSyncService
的用法示例。
在下文中一共展示了ProfileSyncService.isUsingSecondaryPassphrase方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updatePreferences
import org.chromium.chrome.browser.sync.ProfileSyncService; //导入方法依赖的package包/类
private void updatePreferences() {
if (getPreferenceScreen() != null) getPreferenceScreen().removeAll();
addPreferencesFromResource(R.xml.main_preferences);
addBlimpPreferences();
if (TemplateUrlService.getInstance().isLoaded()) {
updateSummary();
} else {
TemplateUrlService.getInstance().registerLoadListener(this);
TemplateUrlService.getInstance().load();
ChromeBasePreference searchEnginePref =
(ChromeBasePreference) findPreference(PREF_SEARCH_ENGINE);
searchEnginePref.setEnabled(false);
}
ChromeBasePreference autofillPref =
(ChromeBasePreference) findPreference(PREF_AUTOFILL_SETTINGS);
setOnOffSummary(autofillPref, PersonalDataManager.isAutofillEnabled());
autofillPref.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
ChromeBasePreference passwordsPref =
(ChromeBasePreference) findPreference(PREF_SAVED_PASSWORDS);
ProfileSyncService syncService = ProfileSyncService.get();
if (AndroidSyncSettings.isSyncEnabled(getActivity().getApplicationContext())
&& syncService.isBackendInitialized()
&& !syncService.isUsingSecondaryPassphrase()
&& ChromeFeatureList.isEnabled(VIEW_PASSWORDS)) {
passwordsPref.setKey(PREF_MANAGE_ACCOUNT_LINK);
passwordsPref.setTitle(R.string.redirect_to_passwords_text);
passwordsPref.setSummary(R.string.redirect_to_passwords_link);
passwordsPref.setOnPreferenceClickListener(this);
passwordsPref.setManagedPreferenceDelegate(null);
} else {
if (PasswordUIView.shouldUseSmartLockBranding()) {
passwordsPref.setTitle(getResources().getString(
R.string.prefs_smart_lock_for_passwords));
} else {
passwordsPref.setTitle(getResources().getString(
R.string.prefs_saved_passwords));
}
passwordsPref.setFragment(SavePasswordsPreferences.class.getCanonicalName());
setOnOffSummary(passwordsPref,
PrefServiceBridge.getInstance().isRememberPasswordsEnabled());
passwordsPref.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
}
Preference homepagePref = findPreference(PREF_HOMEPAGE);
if (HomepageManager.shouldShowHomepageSetting()) {
setOnOffSummary(homepagePref,
HomepageManager.getInstance(getActivity()).getPrefHomepageEnabled());
} else {
getPreferenceScreen().removePreference(homepagePref);
}
ChromeBasePreference dataReduction =
(ChromeBasePreference) findPreference(PREF_DATA_REDUCTION);
if (DataReductionProxySettings.getInstance().isDataReductionProxyAllowed()) {
dataReduction.setSummary(
DataReductionPreferences.generateSummary(getResources()));
dataReduction.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
} else {
getPreferenceScreen().removePreference(dataReduction);
}
if (!SigninManager.get(getActivity()).isSigninSupported()) {
getPreferenceScreen().removePreference(findPreference(PREF_SIGN_IN));
}
}
示例2: updatePreferences
import org.chromium.chrome.browser.sync.ProfileSyncService; //导入方法依赖的package包/类
private void updatePreferences() {
if (getPreferenceScreen() != null) getPreferenceScreen().removeAll();
PreferenceUtils.addPreferencesFromResource(this, R.xml.main_preferences);
if (TemplateUrlService.getInstance().isLoaded()) {
updateSummary();
} else {
TemplateUrlService.getInstance().registerLoadListener(this);
TemplateUrlService.getInstance().load();
ChromeBasePreference searchEnginePref =
(ChromeBasePreference) findPreference(PREF_SEARCH_ENGINE);
searchEnginePref.setEnabled(false);
}
ChromeBasePreference autofillPref =
(ChromeBasePreference) findPreference(PREF_AUTOFILL_SETTINGS);
autofillPref.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
ChromeBasePreference passwordsPref =
(ChromeBasePreference) findPreference(PREF_SAVED_PASSWORDS);
ProfileSyncService syncService = ProfileSyncService.get();
if (AndroidSyncSettings.isSyncEnabled(getActivity().getApplicationContext())
&& syncService.isEngineInitialized() && !syncService.isUsingSecondaryPassphrase()
&& ChromeFeatureList.isEnabled(VIEW_PASSWORDS)) {
passwordsPref.setKey(PREF_MANAGE_ACCOUNT_LINK);
passwordsPref.setTitle(R.string.redirect_to_passwords_text);
passwordsPref.setSummary(R.string.redirect_to_passwords_link);
passwordsPref.setOnPreferenceClickListener(this);
passwordsPref.setManagedPreferenceDelegate(null);
} else {
passwordsPref.setTitle(getResources().getString(R.string.prefs_saved_passwords));
passwordsPref.setFragment(SavePasswordsPreferences.class.getCanonicalName());
setOnOffSummary(passwordsPref,
PrefServiceBridge.getInstance().isRememberPasswordsEnabled());
passwordsPref.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
}
Preference homepagePref = findPreference(PREF_HOMEPAGE);
if (HomepageManager.shouldShowHomepageSetting()) {
setOnOffSummary(homepagePref,
HomepageManager.getInstance(getActivity()).getPrefHomepageEnabled());
} else {
getPreferenceScreen().removePreference(homepagePref);
}
ChromeBasePreference dataReduction =
(ChromeBasePreference) findPreference(PREF_DATA_REDUCTION);
dataReduction.setSummary(DataReductionPreferences.generateSummary(getResources()));
dataReduction.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
if (!SigninManager.get(getActivity()).isSigninSupported()) {
getPreferenceScreen().removePreference(findPreference(PREF_SIGN_IN));
}
}