Initializes, whether the action bar's back button should be overridden, or not.

@param sharedPreferences
The shared preferences, which should be used, as an instance of the type {@link
SharedPreferences}
488226
private void initializeOverrideBackButton(final SharedPreferences sharedPreferences) {
        String key = getString(R.string.override_navigation_icon_preference_key);
        boolean defaultValue = Boolean.valueOf(
                getString(R.string.override_navigation_icon_preference_default_value));
        boolean overrideNavigationIcon = sharedPreferences.getBoolean(key, defaultValue);
        overrideNavigationIcon(overrideNavigationIcon);
    }
1042451
public static void setCurrentPreferenceKey(String key) {
		LOCK.lock();
		try {
			currentPreferenceKey = (Strings.isNullOrEmpty(key)) ? DEFAULT_PREFERENCE_KEY : key;
		} finally {
			LOCK.unlock();
		}
	}
841316
private void initializeShowWizardDialogPreference() {
        Preference preference =
                findPreference(getString(R.string.show_wizard_dialog_preference_key));
        preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {

            @Override
            public boolean onPreferenceClick(final Preference preference) {
                WizardDialog.Builder builder = new WizardDialog.Builder(getActivity(),
                        shouldUseFullscreen() ? R.style.DarkFullscreenDialogTheme : 0);
                configureHeaderDialogBuilder(builder);
                builder.enableTabLayout(!shouldHeaderBeShown());

                if (shouldButtonBarDividerBeShown()) {
                    builder.showButtonBarDivider(true);
                }

                addFragment(builder, 1);
                addFragment(builder, 2);
                addFragment(builder, 3);
                WizardDialog wizardDialog = builder.create();

                if (shouldUseAnimations()) {
                    builder.setBackgroundColor(
                            getResources().getIntArray(R.array.wizard_dialog_background_colors)[0]);
                    builder.addOnPageChangeListener(
                            createWizardDialogPageChangeListener(wizardDialog));
                }

                wizardDialog.show(getActivity().getSupportFragmentManager(), null);
                return true;
            }

        });
    }
663812
private OnClickListener createPreferenceInitialFragmentButtonListener() {
        return new OnClickListener() {

            @Override
            public void onClick(final View v) {
                Intent intent = new Intent(MainActivity.this, SettingsActivity.class);
                intent.putExtra(PreferenceActivity.EXTRA_SHOW_FRAGMENT,
                        BehaviorPreferenceFragment.class.getName());

                SharedPreferences sharedPreferences =
                        PreferenceManager.getDefaultSharedPreferences(MainActivity.this);

                boolean useAlternativeTitleDefaultValue =
                        Boolean.valueOf(getString(R.string.use_alternative_title_preference_key));
                String useAlternativeTitleKey =
                        getString(R.string.use_alternative_title_preference_key);

                if (sharedPreferences
                        .getBoolean(useAlternativeTitleKey, useAlternativeTitleDefaultValue)) {
                    String titleDefaultValue =
                            getString(R.string.alternative_title_preference_default_value);
                    String titleKey = getString(R.string.alternative_title_preference_key);
                    String title = sharedPreferences.getString(titleKey, titleDefaultValue);
                    intent.putExtra(PreferenceActivity.EXTRA_SHOW_FRAGMENT_TITLE, title);
                }

                startActivity(intent);
            }

        };
    }
778389
private void initializePreferenceScreenElevation(final SharedPreferences sharedPreferences) {
        String key = getString(R.string.preference_screen_elevation_preference_key);
        String defaultValue =
                getString(R.string.preference_screen_elevation_preference_default_value);
        int elevation = Integer.valueOf(sharedPreferences.getString(key, defaultValue));
        setCardViewElevation(elevation);
    }
1159928
private void initUI() {

        m_enabled.setValue(new Boolean(m_synchronizeSettings.isEnabled()));
        if (m_synchronizeSettings.getDestinationPathInRfs() != null) {
            m_target.setValue(m_synchronizeSettings.getDestinationPathInRfs());
        }
        List<String> resources = m_synchronizeSettings.getSourceListInVfs();
        for (String resource : resources) {
            addResource(resource);
        }
        setOkButtonEnabled(false);
    }
432988
public void setPreferences(OperaPreferences newPreferences) {
    if (!(newPreferences instanceof OperaFilePreferences)) {
      OperaFilePreferences convertedPreferences = new OperaFilePreferences(preferenceFile);
      convertedPreferences.merge(newPreferences);
      preferences = convertedPreferences;
    } else {
      preferences = newPreferences;
    }
  }
347849
private void initialize() {
        selectedIndices = null;
        setNegativeButtonText(android.R.string.cancel);
        setPositiveButtonText(android.R.string.ok);
    }
624408
public void setViewerPreferences(int preferences) {
		this.pageLayoutAndMode |= preferences;
		// for backwards compatibility, it is also possible
		// to set the following viewer preferences with this method:
		if ((preferences & viewerPreferencesMask) != 0) {
			pageLayoutAndMode = ~viewerPreferencesMask & pageLayoutAndMode;
			if ((preferences & PdfWriter.HideToolbar) != 0)
				viewerPreferences.put(PdfName.HIDETOOLBAR, PdfBoolean.PDFTRUE);
			if ((preferences & PdfWriter.HideMenubar) != 0)
				viewerPreferences.put(PdfName.HIDEMENUBAR, PdfBoolean.PDFTRUE);
			if ((preferences & PdfWriter.HideWindowUI) != 0)
				viewerPreferences.put(PdfName.HIDEWINDOWUI, PdfBoolean.PDFTRUE);
			if ((preferences & PdfWriter.FitWindow) != 0)
				viewerPreferences.put(PdfName.FITWINDOW, PdfBoolean.PDFTRUE);
			if ((preferences & PdfWriter.CenterWindow) != 0)
				viewerPreferences.put(PdfName.CENTERWINDOW, PdfBoolean.PDFTRUE);
			if ((preferences & PdfWriter.DisplayDocTitle) != 0)
				viewerPreferences.put(PdfName.DISPLAYDOCTITLE, PdfBoolean.PDFTRUE);
			
			if ((preferences & PdfWriter.NonFullScreenPageModeUseNone) != 0)
				viewerPreferences.put(PdfName.NONFULLSCREENPAGEMODE, PdfName.USENONE);
			else if ((preferences & PdfWriter.NonFullScreenPageModeUseOutlines) != 0)
				viewerPreferences.put(PdfName.NONFULLSCREENPAGEMODE, PdfName.USEOUTLINES);
			else if ((preferences & PdfWriter.NonFullScreenPageModeUseThumbs) != 0)
				viewerPreferences.put(PdfName.NONFULLSCREENPAGEMODE, PdfName.USETHUMBS);
			else if ((preferences & PdfWriter.NonFullScreenPageModeUseOC) != 0)
				viewerPreferences.put(PdfName.NONFULLSCREENPAGEMODE, PdfName.USEOC);

			if ((preferences & PdfWriter.DirectionL2R) != 0)
				viewerPreferences.put(PdfName.DIRECTION, PdfName.L2R);
			else if ((preferences & PdfWriter.DirectionR2L) != 0)
				viewerPreferences.put(PdfName.DIRECTION, PdfName.R2L);

			if ((preferences & PdfWriter.PrintScalingNone) != 0)
				viewerPreferences.put(PdfName.PRINTSCALING, PdfName.NONE);			
		}
	}
98766
@Override
	public void init(ResourceBundlesHandler bundler, Boolean useRandomParam, String media, boolean alternate,
			boolean displayAlternateStyles, String title) {
		init(bundler, useRandomParam);

		this.media = null == media ? "screen" : media;
		this.displayAlternateStyles = displayAlternateStyles;
		this.alternate = alternate;
		this.title = title;
		if (displayAlternateStyles && alternate) {
			throw new IllegalArgumentException(
					"You can't use the displayAlternateStyle and alternate properties together.");
		}
		if (displayAlternateStyles && StringUtils.isNotEmpty(title)) {
			this.title = null;
			LOGGER.warn("As you are using the displayAlternateStyle property, the title value will be overrided.");
		}
	}
604536
@Override
	protected void initializeDefaultPreferences(IPreferenceStore store)
	{
		store.setDefault(IUml2Constants.PREFER_ASSOCIATIONS_PREFERENCE, true);
		store.setDefault(IUml2Constants.DISABLE_NESTED_ARTIFACTS_PREFERENCE, true);
	}
2197
@Override
    protected void createSharedPreferences() {
        super.createSharedPreferences();

        this.sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);

        // problem that the first call to getAll() returns nothing, apparently the
        // following two calls have to be made to read all the values correctly
        // http://stackoverflow.com/questions/9310479/how-to-iterate-through-all-keys-of-shared-preferences
        this.sharedPreferences.edit().clear();
        PreferenceManager.setDefaultValues(this, R.xml.preferences, true);

        this.sharedPreferences.registerOnSharedPreferenceChangeListener(this);
    }
543292
public final void restoreDefaults() {
        SharedPreferences sharedPreferences = getPreferenceManager().getSharedPreferences();

        if (getPreferenceScreen() != null) {
            restoreDefaults(getPreferenceScreen(), sharedPreferences);
        }
    }
1298714
private void initializeShowEditTextDialogPreference() {
        Preference preference =
                findPreference(getString(R.string.show_edit_text_dialog_preference_key));
        preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {

            @Override
            public boolean onPreferenceClick(final Preference preference) {
                initializeEditTextDialog();
                editTextDialog.setShowAnimation(createRectangularRevealAnimation(preference));
                editTextDialog.setDismissAnimation(createRectangularRevealAnimation(preference));
                editTextDialog.setCancelAnimation(createRectangularRevealAnimation(preference));
                editTextDialog.show();
                return true;
            }

        });
    }
923738
public void setBackends(java.util.Collection<Backend> backends) {
        if (backends == null) {
            this.backends = null;
            return;
        }

        this.backends = new java.util.ArrayList<Backend>(backends);
    }
758907
public void savePreferences() {
        FOKLogger.info(Prefs.class.getName(), "Saving preference file as: " + file.getAbsolutePath());
        if (!file.getParentFile().exists() && !file.getParentFile().mkdirs())
            throw new IllegalStateException("Unable to create the folder to save the Prefs in");

        try (FileOutputStream out = new FileOutputStream(file)){
            props.store(out, "This is a preference file of the app " + Common.getInstance().getAppName() + ". If you delete this file, the specified app will be (partly or entirely) reset to its factory settings.");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
1186515
private void initializeShowProgressDialogPreference() {
        Preference preference =
                findPreference(getString(R.string.show_progress_dialog_preference_key));
        preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {

            @Override
            public boolean onPreferenceClick(final Preference preference) {
                initializeProgressDialog();
                progressDialog.setShowAnimation(createRectangularRevealAnimation(preference));
                progressDialog.setDismissAnimation(createRectangularRevealAnimation(preference));
                progressDialog.setCancelAnimation(createRectangularRevealAnimation(preference));
                progressDialog.show();
                return true;
            }

        });
    }