Fix for BlackScreen Bug

Cancel request to go to the NavScreen
and discard callback if tab state changes.

Change-Id: I3b29023c10c2a3821f36a43e465df27d663c0825
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index 6b5e424..dd3d76c 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -2874,9 +2874,14 @@
     public void setActiveTab(Tab tab) {
         // monkey protection against delayed start
         if (tab != null) {
+
+            //Not going to the Nav Screen AnyMore. Unless NavScreen is already showing.
+            mUi.cancelNavScreenRequest();
             mTabControl.setCurrentTab(tab);
             // the tab is guaranteed to have a webview after setCurrentTab
             mUi.setActiveTab(tab);
+
+
             tab.setTimeStamp();
             //Purge active tabs
             MemoryMonitor.purgeActiveTabs(mActivity.getApplicationContext(), this, mSettings);
@@ -2892,6 +2897,8 @@
     }
 
     protected void reuseTab(Tab appTab, UrlData urlData) {
+        //Cancel navscreen request
+        mUi.cancelNavScreenRequest();
         // Dismiss the subwindow if applicable.
         dismissSubWindow(appTab);
         // Since we might kill the WebView, remove it from the