Merge change 22090 into donut

* changes:
      docs only.     add new documentation for installing the new winusb driver.     also add a link to the HTC support site for ADP flashing     and remove references to the G1 and generalize to "consumer devices"
diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java
index b75bec2..5844079 100644
--- a/core/java/android/app/SearchDialog.java
+++ b/core/java/android/app/SearchDialog.java
@@ -428,7 +428,7 @@
         mSearchAutoComplete.setAdapter((SuggestionsAdapter)null);
         // close any leftover cursor
         if (mSuggestionsAdapter != null) {
-            mSuggestionsAdapter.changeCursor(null);
+            mSuggestionsAdapter.close();
         }
         mSuggestionsAdapter = null;
     }
diff --git a/core/java/android/app/SuggestionsAdapter.java b/core/java/android/app/SuggestionsAdapter.java
index 52e4a1f..90f8c50 100644
--- a/core/java/android/app/SuggestionsAdapter.java
+++ b/core/java/android/app/SuggestionsAdapter.java
@@ -65,6 +65,7 @@
     private WeakHashMap<String, Drawable.ConstantState> mOutsideDrawablesCache;
     private SparseArray<Drawable.ConstantState> mBackgroundsCache;
     private boolean mGlobalSearchMode;
+    private boolean mClosed = false;
 
     // Cached column indexes, updated when the cursor changes.
     private int mFormatCol;
@@ -199,6 +200,12 @@
         }
     }
 
+    public void close() {
+        if (DBG) Log.d(LOG_TAG, "close()");
+        changeCursor(null);
+        mClosed = true;
+    }
+
     /**
      * Cache columns.
      */
@@ -206,6 +213,12 @@
     public void changeCursor(Cursor c) {
         if (DBG) Log.d(LOG_TAG, "changeCursor(" + c + ")");
 
+        if (mClosed) {
+            Log.w(LOG_TAG, "Tried to change cursor after adapter was closed.");
+            if (c != null) c.close();
+            return;
+        }
+
         try {
             Cursor oldCursor = getCursor();
             super.changeCursor(c);
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaPlayerApiTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaPlayerApiTest.java
index dcb8c43..ea42f53 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaPlayerApiTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaPlayerApiTest.java
@@ -435,13 +435,6 @@
     @LargeTest
     public void testLocalMp3PrepareAsyncCallback() throws Exception {
         boolean onPrepareSuccess = 
-            CodecTest.prepareAsyncCallback(MediaNames.MP3CBR, false);
-        assertTrue("LocalMp3prepareAsyncCallback", onPrepareSuccess);
-    }
-
-    @LargeTest
-    public void testLocalH263AMRPrepareAsyncCallback() throws Exception {
-        boolean onPrepareSuccess =
             CodecTest.prepareAsyncCallback(MediaNames.VIDEO_H263_AMR, false);
         assertTrue("LocalMp3prepareAsyncCallback", onPrepareSuccess);
     }