当前位置: 首页>>代码示例>>Java>>正文


Java WebIconDatabase类代码示例

本文整理汇总了Java中android.webkit.WebIconDatabase的典型用法代码示例。如果您正苦于以下问题:Java WebIconDatabase类的具体用法?Java WebIconDatabase怎么用?Java WebIconDatabase使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


WebIconDatabase类属于android.webkit包,在下文中一共展示了WebIconDatabase类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: clearHistory

import android.webkit.WebIconDatabase; //导入依赖的package包/类
@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);
}
 
开发者ID:NewCasino,项目名称:browser,代码行数:20,代码来源:BrowserActivity.java

示例2: onPageFinished

import android.webkit.WebIconDatabase; //导入依赖的package包/类
public void onPageFinished(String url) {
	updateUI();

	if (url.contains("mobile.twitter.com")) {
		mCurrentWebView.loadUrl("http://dabr.co.uk/");
		return;
	}

	if ((Controller.getInstance().getPreferences().getBoolean(
			Constants.PREFERENCES_ADBLOCKER_ENABLE, true))
			&& (!checkInAdBlockWhiteList(mCurrentWebView.getUrl()))) {
		mCurrentWebView.loadAdSweep();
	}

	WebIconDatabase.getInstance().retainIconForPageUrl(mCurrentWebView.getUrl());

	if (mUrlBarVisible) {
		startToolbarsHideRunnable();
	}
}
 
开发者ID:tommy4711,项目名称:gaeproxy,代码行数:21,代码来源:MainActivity.java

示例3: clearHistory

import android.webkit.WebIconDatabase; //导入依赖的package包/类
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);
}
 
开发者ID:XndroidDev,项目名称:Xndroid,代码行数:16,代码来源:WebUtils.java

示例4: clearHistory

import android.webkit.WebIconDatabase; //导入依赖的package包/类
public static void clearHistory(@NonNull Context context) {
    HistoryDatabase.getInstance().deleteHistory();
    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);
}
 
开发者ID:javadtaghia,项目名称:DeeBrowser,代码行数:14,代码来源:WebUtils.java

示例5: onCreate

import android.webkit.WebIconDatabase; //导入依赖的package包/类
@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());
	}
}
 
开发者ID:lookwhatlook,项目名称:WeiboWeiBaTong,代码行数:15,代码来源:BrowserWebFragment.java

示例6: onDestroy

import android.webkit.WebIconDatabase; //导入依赖的package包/类
@Override
protected void onDestroy() {
	WebIconDatabase.getInstance().close();

	if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean(
			Constants.PREFERENCES_PRIVACY_CLEAR_CACHE_ON_EXIT, false)) {
		mCurrentWebView.clearCache(true);
	}

	EventController.getInstance().removeDownloadListener(this);

	super.onDestroy();
}
 
开发者ID:tommy4711,项目名称:gaeproxy,代码行数:14,代码来源:MainActivity.java

示例7: onCreate

import android.webkit.WebIconDatabase; //导入依赖的package包/类
@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());
    }
}
 
开发者ID:andforce,项目名称:iBeebo,代码行数:15,代码来源:BrowserWebFragment.java

示例8: onDestroy

import android.webkit.WebIconDatabase; //导入依赖的package包/类
@Override
protected void onDestroy() {
	WebIconDatabase.getInstance().close();
	
	if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean(Constants.PREFERENCES_PRIVACY_CLEAR_CACHE_ON_EXIT, false)) {
		mCurrentWebView.clearCache(true);
	}
	
	EventController.getInstance().removeDownloadListener(this);
	
	PreferenceManager.getDefaultSharedPreferences(this).unregisterOnSharedPreferenceChangeListener(mPreferenceChangeListener);

	super.onDestroy();
}
 
开发者ID:mashiwoo,项目名称:zirco-browser,代码行数:15,代码来源:MainActivity.java

示例9: onPageFinished

import android.webkit.WebIconDatabase; //导入依赖的package包/类
public void onPageFinished(String url) {
	updateUI();			
	
	if ((Controller.getInstance().getPreferences().getBoolean(Constants.PREFERENCES_ADBLOCKER_ENABLE, true)) &&
			(!checkInAdBlockWhiteList(mCurrentWebView.getUrl()))) {
		mCurrentWebView.loadAdSweep();
	}
	
	WebIconDatabase.getInstance().retainIconForPageUrl(mCurrentWebView.getUrl());
	
	if (mUrlBarVisible) {
		startToolbarsHideRunnable();
	}
}
 
开发者ID:mashiwoo,项目名称:zirco-browser,代码行数:15,代码来源:MainActivity.java

示例10: onCreate

import android.webkit.WebIconDatabase; //导入依赖的package包/类
@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());
    }
}
 
开发者ID:shawnlinboy,项目名称:siciyuan,代码行数:15,代码来源:BrowserWebFragment.java

示例11: initializeWebIconDatabase

import android.webkit.WebIconDatabase; //导入依赖的package包/类
/**
 * Initialize the Web icons database.
 */
private void initializeWebIconDatabase() {

	final WebIconDatabase db = WebIconDatabase.getInstance();
	db.open(getDir("icons", 0).getPath());
}
 
开发者ID:tommy4711,项目名称:gaeproxy,代码行数:9,代码来源:MainActivity.java

示例12: initializeWebIconDatabase

import android.webkit.WebIconDatabase; //导入依赖的package包/类
/**
 * Initialize the Web icons database.
 */
private void initializeWebIconDatabase() {
    
	final WebIconDatabase db = WebIconDatabase.getInstance();
	db.open(getDir("icons", 0).getPath());   
}
 
开发者ID:mashiwoo,项目名称:zirco-browser,代码行数:9,代码来源:MainActivity.java


注:本文中的android.webkit.WebIconDatabase类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。