FileDocCategorySizeDatePackage
BrowserYesNoPreference.javaAPI DocAndroid 1.5 API2207Wed May 06 22:42:42 BST 2009com.android.browser

BrowserYesNoPreference

public class BrowserYesNoPreference extends com.android.internal.preference.YesNoPreference

Fields Summary
Constructors Summary
public BrowserYesNoPreference(android.content.Context context, android.util.AttributeSet attrs)

        super(context, attrs);
    
Methods Summary
protected voidonDialogClosed(boolean positiveResult)

        super.onDialogClosed(positiveResult);

        if (positiveResult) {
            setEnabled(false);

            Context context = getContext();
            if (BrowserSettings.PREF_CLEAR_CACHE.equals(getKey())) {
                BrowserSettings.getInstance().clearCache(context);
            } else if (BrowserSettings.PREF_CLEAR_COOKIES.equals(getKey())) {
                BrowserSettings.getInstance().clearCookies(context);
            } else if (BrowserSettings.PREF_CLEAR_HISTORY.equals(getKey())) {
                BrowserSettings.getInstance().clearHistory(context);
            } else if (BrowserSettings.PREF_CLEAR_FORM_DATA.equals(getKey())) {
                BrowserSettings.getInstance().clearFormData(context);
            } else if (BrowserSettings.PREF_CLEAR_PASSWORDS.equals(getKey())) {
                BrowserSettings.getInstance().clearPasswords(context);
            } else if (BrowserSettings.PREF_EXTRAS_RESET_DEFAULTS.equals(
                    getKey())) {
                BrowserSettings.getInstance().resetDefaultPreferences(context);
                setEnabled(true);
            }
        }