类android.webkit.WebIconDatabase源码实例Demo

下面列出了怎么用android.webkit.WebIconDatabase的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: browser   文件: BrowserActivity.java
@SuppressWarnings("deprecation")
public void clearHistory() {
	this.deleteDatabase(HistoryDatabase.DATABASE_NAME);
	WebViewDatabase m = WebViewDatabase.getInstance(this);
	m.clearFormData();
	m.clearHttpAuthUsernamePassword();
	if (API < 18) {
		m.clearUsernamePassword();
		WebIconDatabase.getInstance().removeAllIcons();
	}
	if (mSystemBrowser) {
		try {
			//Browser.
			//Browser.clearHistory(getContentResolver());
		} catch (NullPointerException ignored) {
		}
	}
	Utils.trimCache(this);
}
 
源代码2 项目: Xndroid   文件: WebUtils.java
public static void clearHistory(@NonNull Context context, @NonNull HistoryModel historyModel) {
    historyModel.deleteHistory()
            .subscribeOn(Schedulers.io())
            .subscribe();
    WebViewDatabase m = WebViewDatabase.getInstance(context);
    m.clearFormData();
    m.clearHttpAuthUsernamePassword();
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) {
        //noinspection deprecation
        m.clearUsernamePassword();
        //noinspection deprecation
        WebIconDatabase.getInstance().removeAllIcons();
    }
    Utils.trimCache(context);
}
 
源代码3 项目: JumpGo   文件: WebUtils.java
public static void clearHistory(@NonNull Context context, @NonNull HistoryModel historyModel) {
    historyModel.deleteHistory()
            .subscribeOn(Schedulers.io())
            .subscribe();
    WebViewDatabase m = WebViewDatabase.getInstance(context);
    m.clearFormData();
    m.clearHttpAuthUsernamePassword();
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) {
        //noinspection deprecation
        m.clearUsernamePassword();
        //noinspection deprecation
        WebIconDatabase.getInstance().removeAllIcons();
    }
    Utils.trimCache(context);
}
 
源代码4 项目: iBeebo   文件: BrowserWebFragment.java
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setHasOptionsMenu(true);
    setRetainInstance(true);
    /**
     * some devices for example Nexus 7 4.2.2 version will receive website favicon, but some
     * devices may cant, Galaxy Nexus 4.2.2 version
     */
    String path = FileManager.getWebViewFaviconDirPath();
    if (!TextUtils.isEmpty(path)) {
        WebIconDatabase.getInstance().open(FileManager.getWebViewFaviconDirPath());
    }
}
 
源代码5 项目: iBeebo   文件: BrowserWebFragment.java
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setHasOptionsMenu(true);
    setRetainInstance(true);
    /**
     * some devices for example Nexus 7 4.2.2 version will receive website favicon, but some
     * devices may cant, Galaxy Nexus 4.2.2 version
     */
    String path = FileManager.getWebViewFaviconDirPath();
    if (!TextUtils.isEmpty(path)) {
        WebIconDatabase.getInstance().open(FileManager.getWebViewFaviconDirPath());
    }
}
 
源代码6 项目: android_9.0.0_r45   文件: Browser.java
/**
 *  Request all icons from the database.  This call must either be called
 *  in the main thread or have had Looper.prepare() invoked in the calling
 *  thread.
 *
 *  @param  cr The ContentResolver used to access the database.
 *  @param  where Clause to be used to limit the query from the database.
 *          Must be an allowable string to be passed into a database query.
 *  @param  listener IconListener that gets the icons once they are
 *          retrieved.
 *  @removed
 */
public static final void requestAllIcons(ContentResolver cr, String where,
        WebIconDatabase.IconListener listener) {
    // Do nothing: this is no longer used.
}