List of usage examples for android.webkit WebHistoryItem getFavicon
@Nullable public abstract Bitmap getFavicon();
From source file:dev.memento.MementoBrowser.java
@Override public boolean onKeyDown(int keyCode, KeyEvent event) { if ((keyCode == KeyEvent.KEYCODE_BACK) && mWebview.canGoBack()) { // Get the previous URL to update our internal copy WebBackForwardList list = mWebview.copyBackForwardList(); int curr = list.getCurrentIndex(); WebHistoryItem item = list.getItemAtIndex(curr - 1); Bitmap favicon = item.getFavicon(); if (favicon == null) Log.d(LOG_TAG, "No favicon in WebHistoryItem - null"); else/* w w w .jav a 2s . co m*/ Log.d(LOG_TAG, "WebHistoryItem favicon W = " + favicon.getWidth()); mOriginalUrl = item.getUrl(); Log.d(LOG_TAG, "GO BACK TO " + mOriginalUrl); mWebview.goBack(); return true; } return super.onKeyDown(keyCode, event); }