Merge branch 'froyo' into froyo-release
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 8a70c56..1f969af 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -460,7 +460,10 @@
 
             final String appId = intent
                     .getStringExtra(Browser.EXTRA_APPLICATION_ID);
-            if ((Intent.ACTION_VIEW.equals(action) || activateVoiceSearch)
+            if ((Intent.ACTION_VIEW.equals(action)
+                    // If a voice search has no appId, it means that it came
+                    // from the browser.  In that case, reuse the current tab.
+                    || (activateVoiceSearch && appId != null))
                     && !getPackageName().equals(appId)
                     && (flags & Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT) != 0) {
                 Tab appTab = mTabControl.getTabFromId(appId);
@@ -2380,7 +2383,7 @@
             return null;
         }
         Bitmap bm = Bitmap.createBitmap(getDesiredThumbnailWidth(this),
-                getDesiredThumbnailHeight(this), Bitmap.Config.ARGB_4444);
+                getDesiredThumbnailHeight(this), Bitmap.Config.RGB_565);
         Canvas canvas = new Canvas(bm);
         // May need to tweak these values to determine what is the
         // best scale factor
diff --git a/src/com/android/browser/TabControl.java b/src/com/android/browser/TabControl.java
index de32b03..4be777d 100644
--- a/src/com/android/browser/TabControl.java
+++ b/src/com/android/browser/TabControl.java
@@ -497,12 +497,10 @@
         final String url = urlData.mUrl;
         final WebView w = t.getWebView();
         if (w != null) {
-            if (urlData.mVoiceIntent != null) {
-                // In the case of a voice search, we do not want to destroy the
-                // back forward list, so that we can go back to the prior search
-                return true;
-            }
-            if (url != null && url.equals(t.getOriginalUrl())) {
+            if (url != null && url.equals(t.getOriginalUrl())
+                    // Treat a voice intent as though it is a different URL,
+                    // since it most likely is.
+                    && urlData.mVoiceIntent == null) {
                 // The original url matches the current url. Just go back to the
                 // first history item so we can load it faster than if we
                 // rebuilt the WebView.