Support for calling oncancel on the SearchBox API while preloading.

See also: I39a5765d2382f9c88c652d156a4917fd07cea3a4
Bug: 5035246
Change-Id: I7de6b8a718e4190480537412a8235892ee7c7aee
diff --git a/src/com/android/browser/Preloader.java b/src/com/android/browser/Preloader.java
index 3d30c96..3273a8c 100644
--- a/src/com/android/browser/Preloader.java
+++ b/src/com/android/browser/Preloader.java
@@ -106,6 +106,15 @@
         }
     }
 
+    public void cancelSearchBoxPreload(String id) {
+        PreloaderSession s = getSession(id);
+        if (s != null) {
+            s.touch(); // reset timer
+            PreloadedTabControl tab = s.getTabControl();
+            tab.searchBoxCancel();
+        }
+    }
+
     public void discardPreload(String id) {
         PreloaderSession s = takeSession(id);
         if (s != null) {