Exemplo n.º 1
0
 public void printBackForwardList() {
   WebBackForwardList currentList = this.copyBackForwardList();
   int currentSize = currentList.getSize();
   for (int i = 0; i < currentSize; ++i) {
     WebHistoryItem item = currentList.getItemAtIndex(i);
     String url = item.getUrl();
     LOG.d(TAG, "The URL at index: " + Integer.toString(i) + " is " + url);
   }
 }
Exemplo n.º 2
0
 // Can Go Back is BROKEN!
 public boolean startOfHistory() {
   WebBackForwardList currentList = this.copyBackForwardList();
   WebHistoryItem item = currentList.getItemAtIndex(0);
   if (item != null) { // Null-fence in case they haven't called loadUrl yet (CB-2458)
     String url = item.getUrl();
     String currentUrl = this.getUrl();
     LOG.d(TAG, "The current URL is: " + currentUrl);
     LOG.d(TAG, "The URL at item 0 is: " + url);
     return currentUrl.equals(url);
   }
   return false;
 }