Example usage for android.provider Browser clearHistory

List of usage examples for android.provider Browser clearHistory

Introduction

In this page you can find the example usage for android.provider Browser clearHistory.

Prototype

public static final void clearHistory(ContentResolver cr) 

Source Link

Document

Delete all entries from the bookmarks/history table which are not bookmarks.

Usage

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();//from ww  w  .  ja  v a 2 s  .  co  m
    m.clearHttpAuthUsernamePassword();
    if (API < 18) {
        m.clearUsernamePassword();
        WebIconDatabase.getInstance().removeAllIcons();
    }
    if (mSystemBrowser) {
        try {
            Browser.clearHistory(getContentResolver());
        } catch (NullPointerException ignored) {
        }
    }
    Utils.trimCache(this);
}