Example usage for android.webkit WebViewDatabase clearHttpAuthUsernamePassword

List of usage examples for android.webkit WebViewDatabase clearHttpAuthUsernamePassword

Introduction

In this page you can find the example usage for android.webkit WebViewDatabase clearHttpAuthUsernamePassword.

Prototype

public abstract void clearHttpAuthUsernamePassword();

Source Link

Document

Clears any saved credentials for HTTP authentication.

Usage

From source file:Main.java

public static void clearFormData(Context context) {
    WebViewDatabase db = WebViewDatabase.getInstance(context);
    if (db.hasFormData()) {
        db.clearFormData();//  w  ww  . ja  va 2 s  .  c  om
    }
    if (db.hasHttpAuthUsernamePassword()) {
        db.clearHttpAuthUsernamePassword();
    }
    if (db.hasUsernamePassword()) {
        db.clearUsernamePassword();
    }
}

From source file:com.dish.browser.activity.BrowserActivity.java

@SuppressWarnings("deprecation")
public void clearHistory() {
    this.deleteDatabase(HistoryDatabase.DATABASE_NAME);
    WebViewDatabase m = WebViewDatabase.getInstance(this);
    m.clearFormData();//  ww w. j  a  v  a2  s .  com
    m.clearHttpAuthUsernamePassword();
    if (API < 18) {
        m.clearUsernamePassword();
        WebIconDatabase.getInstance().removeAllIcons();
    }
    if (mSystemBrowser) {
        try {
            Browser.clearHistory(getContentResolver());
        } catch (NullPointerException ignored) {
        }
    }
    Utils.trimCache(this);
}