Methods Summary |
---|
public void | close()Close the shared instance of the icon database.
mEventHandler.postMessage(
Message.obtain(null, EventHandler.CLOSE));
|
void | createHandler()Create the internal handler and transfer all pending messages.
XXX: Called by WebCore thread only!
mEventHandler.createHandler();
|
public static android.webkit.WebIconDatabase | getInstance()Get the global instance of WebIconDatabase.
// XXX: Must be created in the UI thread.
if (sIconDatabase == null) {
sIconDatabase = new WebIconDatabase();
}
return sIconDatabase;
|
private static native void | nativeClose()
|
private static native android.graphics.Bitmap | nativeIconForPageUrl(java.lang.String url)
|
private static native void | nativeOpen(java.lang.String path)
|
private static native void | nativeReleaseIconForPageUrl(java.lang.String url)
|
private static native void | nativeRemoveAllIcons()
|
private static native void | nativeRetainIconForPageUrl(java.lang.String url)
|
public void | open(java.lang.String path)Open a the icon database and store the icons in the given path.
if (path != null) {
mEventHandler.postMessage(
Message.obtain(null, EventHandler.OPEN, path));
}
|
public void | releaseIconForPageUrl(java.lang.String url)Release the icon for the given page url.
if (url != null) {
mEventHandler.postMessage(
Message.obtain(null, EventHandler.RELEASE_ICON, url));
}
|
public void | removeAllIcons()Removes all the icons in the database.
mEventHandler.postMessage(
Message.obtain(null, EventHandler.REMOVE_ALL));
|
public void | requestIconForPageUrl(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.
if (listener == null || url == null) {
return;
}
Message msg = Message.obtain(null, EventHandler.REQUEST_ICON, listener);
msg.getData().putString("url", url);
mEventHandler.postMessage(msg);
|
public void | retainIconForPageUrl(java.lang.String url)Retain the icon for the given page url.
if (url != null) {
mEventHandler.postMessage(
Message.obtain(null, EventHandler.RETAIN_ICON, url));
}
|