Fixes issues seen when creating new tab

- Fixes issue where the surfaceview
  will be created without blocking.This
  fixes the issue where the new tab creation
  would stall and show white screen.
- Fixes issue seen where the previous
  tab is shown for a split second when
  creating a new tab.

Change-Id: Ibb8d6bbf8fe0c32600610390b30f0a390af7dfc9
diff --git a/src/com/android/browser/NavScreen.java b/src/com/android/browser/NavScreen.java
index 42b35de..d734923 100644
--- a/src/com/android/browser/NavScreen.java
+++ b/src/com/android/browser/NavScreen.java
@@ -173,14 +173,8 @@
         if (tab != null) {
             mUiController.setBlockEvents(true);
             final int tix = mUi.mTabControl.getTabPosition(tab);
-            mScroller.setOnLayoutListener(new OnLayoutListener() {
-
-                @Override
-                public void onLayout(int l, int t, int r, int b) {
-                    mUi.hideNavScreen(tix, true);
-                    switchToTab(tab);
-                }
-            });
+            switchToTab(tab);
+            mUi.hideNavScreen(tix, true);
             mScroller.handleDataChanged(tix);
             mUiController.setBlockEvents(false);
         }