FileDocCategorySizeDatePackage
WebIconDatabase.javaAPI DocAndroid 5.1 API3560Thu Mar 12 22:22:10 GMT 2015android.webkit

WebIconDatabase

public abstract class WebIconDatabase extends Object
Functions for manipulating the icon database used by WebView. These functions require that a WebView be constructed before being invoked and WebView.getIconDatabase() will return a WebIconDatabase object. This WebIconDatabase object is a single instance and all methods operate on that single object. The main use-case for this class is calling {@link #open} to enable favicon functionality on all WebView instances in this process.
deprecated
This class is only required when running on devices up to {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}

Fields Summary
Constructors Summary
Methods Summary
public abstract voidbulkRequestIconForPageUrl(android.content.ContentResolver cr, java.lang.String where, android.webkit.WebIconDatabase$IconListener listener)
{@hide}

public abstract voidclose()
Close the shared instance of the icon database.

public static android.webkit.WebIconDatabasegetInstance()
Get the global instance of WebIconDatabase.

return
A single instance of WebIconDatabase. It will be the same instance for the current process each time this method is called.

        // XXX: Must be created in the UI thread.
        return WebViewFactory.getProvider().getWebIconDatabase();
    
public abstract voidopen(java.lang.String path)
Open a the icon database and store the icons in the given path.

param
path The directory path where the icon database will be stored.

public abstract voidreleaseIconForPageUrl(java.lang.String url)
Release the icon for the given page url.

param
url The page's url.

public abstract voidremoveAllIcons()
Removes all the icons in the database.

public abstract voidrequestIconForPageUrl(java.lang.String url, android.webkit.WebIconDatabase$IconListener listener)
Request the Bitmap representing the icon for the given page url. If the icon exists, the listener will be called with the result.

param
url The page's url.
param
listener An implementation on IconListener to receive the result.

public abstract voidretainIconForPageUrl(java.lang.String url)
Retain the icon for the given page url.

param
url The page's url.