Merge change Ib3191441 into eclair

* changes:
  Add the checking for mediaplayer stress test.
diff --git a/Android.mk b/Android.mk
index 5034c7e..a33ef38 100644
--- a/Android.mk
+++ b/Android.mk
@@ -439,6 +439,7 @@
 
 LOCAL_DROIDDOC_OPTIONS:=\
 		$(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
+                $(web_docs_sample_code_flags) \
 		-title "Android SDK" \
 		-proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
 		-todo $(OUT_DOCS)/$(LOCAL_MODULE)-docs-todo.html \
diff --git a/api/current.xml b/api/current.xml
index 83f406f..065176b 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -41992,6 +41992,116 @@
  visibility="public"
 >
 </field>
+<field name="FEATURE_CAMERA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.camera&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_CAMERA_AUTOFOCUS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.camera.autofocus&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_CAMERA_FLASH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.camera.flash&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_LIVE_WALLPAPER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.software.live_wallpaper&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_SENSOR_LIGHT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.sensor.light&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_SENSOR_PROXIMITY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.sensor.proximity&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_TELEPHONY"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.telephony&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_TELEPHONY_CDMA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.telephony.cdma&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_TELEPHONY_GSM"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.telephony.gsm&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_TOUCHSCREEN_MULTITOUCH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.touchscreen.multitouch&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="GET_ACTIVITIES"
  type="int"
  transient="false"
diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c
index d77d702..3a23b49 100644
--- a/cmds/dumpstate/dumpstate.c
+++ b/cmds/dumpstate/dumpstate.c
@@ -84,6 +84,8 @@
         EXEC("dmesg");
         PRINT("------ KERNEL WAKELOCKS ------");
         DUMP("/proc/wakelocks");
+        PRINT("------ KERNEL CPUFREQ ------");
+        DUMP("/sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state");
         PRINT("");
         PRINT("------ PROCESSES ------");
         EXEC1("ps", "-P");
diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java
index bd5b07c..bf561ef 100644
--- a/core/java/android/bluetooth/BluetoothAdapter.java
+++ b/core/java/android/bluetooth/BluetoothAdapter.java
@@ -130,13 +130,13 @@
 
     /**
      * Activity Action: Show a system activity that requests discoverable mode.
-     * <p>This activity will also request the user to turn on Bluetooth if it
+     * This activity will also request the user to turn on Bluetooth if it
      * is not currently enabled.
      * <p>Discoverable mode is equivalent to {@link
      * #SCAN_MODE_CONNECTABLE_DISCOVERABLE}. It allows remote devices to see
      * this Bluetooth adapter when they perform a discovery.
-     * <p>For privacy, Android is not by default discoverable.
-     * <p>The sender can optionally use extra field {@link
+     * <p>For privacy, Android is not discoverable by default.
+     * <p>The sender of this Intent can optionally use extra field {@link
      * #EXTRA_DISCOVERABLE_DURATION} to request the duration of
      * discoverability. Currently the default duration is 120 seconds, and
      * maximum duration is capped at 300 seconds for each request.
@@ -147,7 +147,8 @@
      * {@link android.app.Activity#RESULT_CANCELED} if the user rejected
      * discoverability or an error has occurred.
      * <p>Applications can also listen for {@link #ACTION_SCAN_MODE_CHANGED}
-     * for global notification whenever the scan mode changes.
+     * for global notification whenever the scan mode changes. For example, an
+     * application can be notified when the device has ended discoverability.
      * <p>Requires {@link android.Manifest.permission#BLUETOOTH}
      */
     @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
@@ -549,7 +550,10 @@
      * remote Bluetooth devices should not be attempted while discovery is in
      * progress, and existing connections will experience limited bandwidth
      * and high latency. Use {@link #cancelDiscovery()} to cancel an ongoing
-     * discovery.
+     * discovery. Discovery is not managed by the Activity,
+     * but is run as a system service, so an application should always call
+     * {@link BluetoothAdapter#cancelDiscovery()} even if it
+     * did not directly request a discovery, just to be sure.
      * <p>Device discovery will only find remote devices that are currently
      * <i>discoverable</i> (inquiry scan enabled). Many Bluetooth devices are
      * not discoverable by default, and need to be entered into a special mode.
@@ -567,6 +571,13 @@
     /**
      * Cancel the current device discovery process.
      * <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN}.
+     * <p>Because discovery is a heavyweight precedure for the Bluetooth
+     * adapter, this method should always be called before attempting to connect
+     * to a remote device with {@link
+     * android.bluetooth.BluetoothSocket#connect()}. Discovery is not managed by
+     * the  Activity, but is run as a system service, so an application should
+     * always call cancel discovery even if it did not directly request a
+     * discovery, just to be sure.
      *
      * @return true on success, false on error
      */
diff --git a/core/java/android/bluetooth/BluetoothServerSocket.java b/core/java/android/bluetooth/BluetoothServerSocket.java
index 1b23f6c..c9c6c0a 100644
--- a/core/java/android/bluetooth/BluetoothServerSocket.java
+++ b/core/java/android/bluetooth/BluetoothServerSocket.java
@@ -42,7 +42,11 @@
  * BluetoothAdapter.listenUsingRfcommWithServiceRecord()}. Then call
  * {@link #accept()} to listen for incoming connection requests. This call
  * will block until a connection is established, at which point, it will return
- * a {@link BluetoothSocket} to manage the connection.
+ * a {@link BluetoothSocket} to manage the connection. Once the {@link
+ * BluetoothSocket} is acquired, it's a good idea to call {@link #close()} on
+ * the {@link BluetoothServerSocket} when it's no longer needed for accepting
+ * connections. Closing the {@link BluetoothServerSocket} will <em>not</em>
+ * close the returned {@link BluetoothSocket}.
  *
  * <p>{@link BluetoothServerSocket} is thread
  * safe. In particular, {@link #close} will always immediately abort ongoing
@@ -105,6 +109,8 @@
      * Immediately close this socket, and release all associated resources.
      * <p>Causes blocked calls on this socket in other threads to immediately
      * throw an IOException.
+     * <p>Closing the {@link BluetoothServerSocket} will <em>not</em>
+     * close any {@link BluetoothSocket} received from {@link #accept()}.
      */
     public void close() throws IOException {
         synchronized (this) {
diff --git a/core/java/android/bluetooth/BluetoothSocket.java b/core/java/android/bluetooth/BluetoothSocket.java
index dbcc758..ad03399 100644
--- a/core/java/android/bluetooth/BluetoothSocket.java
+++ b/core/java/android/bluetooth/BluetoothSocket.java
@@ -180,6 +180,15 @@
      * <p>This method will block until a connection is made or the connection
      * fails. If this method returns without an exception then this socket
      * is now connected.
+     * <p>Creating new connections to
+     * remote Bluetooth devices should not be attempted while device discovery
+     * is in progress. Device discovery is a heavyweight procedure on the
+     * Bluetooth adapter and will significantly slow a device connection.
+     * Use {@link BluetoothAdapter#cancelDiscovery()} to cancel an ongoing
+     * discovery. Discovery is not managed by the Activity,
+     * but is run as a system service, so an application should always call
+     * {@link BluetoothAdapter#cancelDiscovery()} even if it
+     * did not directly request a discovery, just to be sure.
      * <p>{@link #close} can be used to abort this call from another thread.
      * @throws IOException on error, for example connection failure
      */
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index cd48dcb..e2030be 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -514,6 +514,68 @@
     public static final int DONT_DELETE_DATA = 0x00000001;
 
     /**
+     * Feature for {@link #getSystemAvailableFeatures} and
+     * {@link #hasSystemFeature}: The device has a camera facing away
+     * from the screen.
+     */
+    public static final String FEATURE_CAMERA = "android.hardware.camera";
+    
+    /**
+     * Feature for {@link #getSystemAvailableFeatures} and
+     * {@link #hasSystemFeature}: The device's camera supports auto-focus.
+     */
+    public static final String FEATURE_CAMERA_AUTOFOCUS = "android.hardware.camera.autofocus";
+    
+    /**
+     * Feature for {@link #getSystemAvailableFeatures} and
+     * {@link #hasSystemFeature}: The device's camera supports flash.
+     */
+    public static final String FEATURE_CAMERA_FLASH = "android.hardware.camera.flash";
+    
+    /**
+     * Feature for {@link #getSystemAvailableFeatures} and
+     * {@link #hasSystemFeature}: The device includes a light sensor.
+     */
+    public static final String FEATURE_SENSOR_LIGHT = "android.hardware.sensor.light";
+    
+    /**
+     * Feature for {@link #getSystemAvailableFeatures} and
+     * {@link #hasSystemFeature}: The device includes a proximity sensor.
+     */
+    public static final String FEATURE_SENSOR_PROXIMITY = "android.hardware.sensor.proximity";
+    
+    /**
+     * Feature for {@link #getSystemAvailableFeatures} and
+     * {@link #hasSystemFeature}: The device has a telephony radio with data
+     * communication support.
+     */
+    public static final String FEATURE_TELEPHONY = "android.hardware.telephony";
+    
+    /**
+     * Feature for {@link #getSystemAvailableFeatures} and
+     * {@link #hasSystemFeature}: The device has a CDMA telephony stack.
+     */
+    public static final String FEATURE_TELEPHONY_CDMA = "android.hardware.telephony.cdma";
+    
+    /**
+     * Feature for {@link #getSystemAvailableFeatures} and
+     * {@link #hasSystemFeature}: The device has a GSM telephony stack.
+     */
+    public static final String FEATURE_TELEPHONY_GSM = "android.hardware.telephony.gsm";
+    
+    /**
+     * Feature for {@link #getSystemAvailableFeatures} and
+     * {@link #hasSystemFeature}: The device's touch screen supports multitouch.
+     */
+    public static final String FEATURE_TOUCHSCREEN_MULTITOUCH = "android.hardware.touchscreen.multitouch";
+    
+    /**
+     * Feature for {@link #getSystemAvailableFeatures} and
+     * {@link #hasSystemFeature}: The device supports live wallpapers.
+     */
+    public static final String FEATURE_LIVE_WALLPAPER = "android.software.live_wallpaper";
+    
+    /**
      * Retrieve overall information about an application package that is
      * installed on the system.
      *
diff --git a/include/media/stagefright/MediaPlayerImpl.h b/include/media/stagefright/MediaPlayerImpl.h
index 53a2088..7adf836 100644
--- a/include/media/stagefright/MediaPlayerImpl.h
+++ b/include/media/stagefright/MediaPlayerImpl.h
@@ -112,7 +112,9 @@
 
     MediaSource *makeShoutcastSource(const char *path);
 
-    void displayOrDiscardFrame(MediaBuffer *buffer, int64_t pts_us);
+    void displayOrDiscardFrame(
+            MediaBuffer **lastBuffer, MediaBuffer *buffer, int64_t pts_us);
+
     void populateISurface();
     void depopulateISurface();
     void sendFrameToISurface(MediaBuffer *buffer);
diff --git a/libs/rs/rsObjectBase.cpp b/libs/rs/rsObjectBase.cpp
index 05791cb..89c5b00 100644
--- a/libs/rs/rsObjectBase.cpp
+++ b/libs/rs/rsObjectBase.cpp
@@ -182,23 +182,17 @@
 
     if (rsc->props.mLogObjects) {
         LOGV("Objects remaining.");
-        o = rsc->mObjHead;
-        while (o) {
-            o->dumpLOGV("  ");
-            o = o->mNext;
-        }
+        dumpAll(rsc);
     }
 }
 
 void ObjectBase::dumpAll(Context *rsc)
 {
-    if (rsc->props.mLogObjects) {
-        LOGV("Dumping all objects");
-        const ObjectBase * o = rsc->mObjHead;
-        while (o) {
-            o->dumpLOGV("  ");
-            o = o->mNext;
-        }
+    LOGV("Dumping all objects");
+    const ObjectBase * o = rsc->mObjHead;
+    while (o) {
+        o->dumpLOGV("  ");
+        o = o->mNext;
     }
 }
 
diff --git a/libs/surfaceflinger/LayerBlur.cpp b/libs/surfaceflinger/LayerBlur.cpp
index 5d4a38b..5fd7904 100644
--- a/libs/surfaceflinger/LayerBlur.cpp
+++ b/libs/surfaceflinger/LayerBlur.cpp
@@ -169,7 +169,6 @@
             // This reads the frame-buffer, so a h/w GL would have to
             // finish() its rendering first. we don't want to do that
             // too often. Read data is 4-bytes aligned.
-            glFinish();
             glReadPixels(X, Y, w, h, mReadFormat, mReadType, pixels);
 
             // blur that texture.
diff --git a/libs/surfaceflinger/LayerBuffer.cpp b/libs/surfaceflinger/LayerBuffer.cpp
index 28d7c48..88ef7e4 100644
--- a/libs/surfaceflinger/LayerBuffer.cpp
+++ b/libs/surfaceflinger/LayerBuffer.cpp
@@ -118,7 +118,12 @@
     sp<Source> source(getSource());
     if (source != 0)
         source->onTransaction(flags);
-    return LayerBase::doTransaction(flags);    
+    uint32_t res = LayerBase::doTransaction(flags);
+    // we always want filtering for these surfaces
+    if (!(mFlags & DisplayHardware::SLOW_CONFIG)) {
+        mUseLinearFiltering = true;
+    }
+    return res;
 }
 
 void LayerBuffer::unlockPageFlip(const Transform& planeTransform,
diff --git a/media/libstagefright/MediaPlayerImpl.cpp b/media/libstagefright/MediaPlayerImpl.cpp
index 622ea7e..8300422 100644
--- a/media/libstagefright/MediaPlayerImpl.cpp
+++ b/media/libstagefright/MediaPlayerImpl.cpp
@@ -40,6 +40,13 @@
 
 namespace android {
 
+static void releaseBufferIfNonNULL(MediaBuffer **buffer) {
+    if (*buffer) {
+        (*buffer)->release();
+        *buffer = NULL;
+    }
+}
+
 MediaPlayerImpl::MediaPlayerImpl(const char *uri)
     : mInitCheck(NO_INIT),
       mTimeSource(NULL),
@@ -51,7 +58,7 @@
       mPlaying(false),
       mPaused(false),
       mSeeking(false) {
-    LOGI("MediaPlayerImpl(%s)", uri);
+    LOGV("MediaPlayerImpl(%s)", uri);
     DataSource::RegisterDefaultSniffers();
 
     status_t err = mClient.connect();
@@ -103,7 +110,7 @@
       mPlaying(false),
       mPaused(false),
       mSeeking(false) {
-    LOGI("MediaPlayerImpl(%d, %lld, %lld)", fd, offset, length);
+    LOGV("MediaPlayerImpl(%d, %lld, %lld)", fd, offset, length);
     DataSource::RegisterDefaultSniffers();
 
     status_t err = mClient.connect();
@@ -140,7 +147,7 @@
 }
 
 void MediaPlayerImpl::play() {
-    LOGI("play");
+    LOGV("play");
 
     if (mPlaying) {
         if (mPaused) {
@@ -229,6 +236,8 @@
     bool firstFrame = true;
     bool eof = false;
 
+    MediaBuffer *lastBuffer = NULL;
+
     status_t err = mVideoDecoder->start();
     CHECK_EQ(err, OK);
 
@@ -241,7 +250,9 @@
         {
             Mutex::Autolock autoLock(mLock);
             if (mSeeking) {
-                LOGI("seek-options to %lld", mSeekTimeUs);
+                releaseBufferIfNonNULL(&lastBuffer);
+
+                LOGV("seek-options to %lld", mSeekTimeUs);
                 options.setSeekTo(mSeekTimeUs);
 
                 mSeeking = false;
@@ -301,19 +312,21 @@
             firstFrame = false;
         }
 
-        displayOrDiscardFrame(buffer, pts_us);
+        displayOrDiscardFrame(&lastBuffer, buffer, pts_us);
     }
 
+    releaseBufferIfNonNULL(&lastBuffer);
+
     mVideoDecoder->stop();
 }
 
 void MediaPlayerImpl::displayOrDiscardFrame(
+        MediaBuffer **lastBuffer,
         MediaBuffer *buffer, int64_t pts_us) {
     for (;;) {
         if (!mPlaying || mPaused) {
-            buffer->release();
-            buffer = NULL;
-
+            releaseBufferIfNonNULL(lastBuffer);
+            *lastBuffer = buffer;
             return;
         }
 
@@ -332,15 +345,13 @@
         if (delay_us < -15000) {
             // We're late.
 
-            LOGI("we're late by %lld ms, dropping a frame\n",
+            LOGV("we're late by %lld ms, dropping a frame\n",
                  -delay_us / 1000);
 
-            buffer->release();
-            buffer = NULL;
+            releaseBufferIfNonNULL(lastBuffer);
+            *lastBuffer = buffer;
             return;
         } else if (delay_us > 100000) {
-            LOGI("we're much too early (by %lld ms)\n",
-                 delay_us / 1000);
             usleep(100000);
             continue;
         } else if (delay_us > 0) {
@@ -352,13 +363,14 @@
 
     {
         Mutex::Autolock autoLock(mLock);
+
         if (mVideoRenderer.get() != NULL) {
             sendFrameToISurface(buffer);
         }
     }
 
-    buffer->release();
-    buffer = NULL;
+    releaseBufferIfNonNULL(lastBuffer);
+    *lastBuffer = buffer;
 }
 
 void MediaPlayerImpl::init() {
@@ -410,7 +422,7 @@
 }
 
 void MediaPlayerImpl::setAudioSource(const sp<MediaSource> &source) {
-    LOGI("setAudioSource");
+    LOGV("setAudioSource");
     mAudioSource = source;
 
     sp<MetaData> meta = source->getFormat();
@@ -420,7 +432,7 @@
 }
 
 void MediaPlayerImpl::setVideoSource(const sp<MediaSource> &source) {
-    LOGI("setVideoSource");
+    LOGV("setVideoSource");
     mVideoSource = source;
 
     sp<MetaData> meta = source->getFormat();
@@ -441,7 +453,7 @@
 }
 
 void MediaPlayerImpl::setSurface(const sp<Surface> &surface) {
-    LOGI("setSurface %p", surface.get());
+    LOGV("setSurface %p", surface.get());
     Mutex::Autolock autoLock(mLock);
 
     depopulateISurface();
@@ -455,7 +467,7 @@
 }
 
 void MediaPlayerImpl::setISurface(const sp<ISurface> &isurface) {
-    LOGI("setISurface %p", isurface.get());
+    LOGV("setISurface %p", isurface.get());
     Mutex::Autolock autoLock(mLock);
 
     depopulateISurface();
@@ -499,7 +511,7 @@
         host = string(host, 0, colon - host.c_str());
     }
 
-    LOGI("Connecting to host '%s', port %d, path '%s'",
+    LOGV("Connecting to host '%s', port %d, path '%s'",
          host.c_str(), port, path.c_str());
 
     HTTPStream *http = new HTTPStream;
@@ -533,7 +545,7 @@
 
             http->disconnect();
 
-            LOGI("Redirecting to %s\n", location.c_str());
+            LOGV("Redirecting to %s\n", location.c_str());
 
             host = string(location, 0, slashPos);
 
@@ -588,7 +600,7 @@
 }
 
 status_t MediaPlayerImpl::seekTo(int64_t time) {
-    LOGI("seekTo %lld", time);
+    LOGV("seekTo %lld", time);
 
     if (mPaused) {
         return UNKNOWN_ERROR;
@@ -651,7 +663,7 @@
 
 void MediaPlayerImpl::setAudioSink(
         const sp<MediaPlayerBase::AudioSink> &audioSink) {
-    LOGI("setAudioSink %p", audioSink.get());
+    LOGV("setAudioSink %p", audioSink.get());
     mAudioSink = audioSink;
 }
 
diff --git a/opengl/libagl/array.cpp b/opengl/libagl/array.cpp
index 4878722..71825c5 100644
--- a/opengl/libagl/array.cpp
+++ b/opengl/libagl/array.cpp
@@ -1548,24 +1548,36 @@
         GLuint name = buffers[i];
         if (name) {
             // unbind bound deleted buffers...
-            if (c->arrays.element_array_buffer->name == name) {
-                c->arrays.element_array_buffer = 0;
+            if (c->arrays.element_array_buffer) {
+                if (c->arrays.element_array_buffer->name == name) {
+                    c->arrays.element_array_buffer = 0;
+                }
             }
-            if (c->arrays.array_buffer->name == name) {
-                c->arrays.array_buffer = 0;
+            if (c->arrays.array_buffer) {
+                if (c->arrays.array_buffer->name == name) {
+                    c->arrays.array_buffer = 0;
+                }
             }
-            if (c->arrays.vertex.bo->name == name) {
-                c->arrays.vertex.bo = 0;
+            if (c->arrays.vertex.bo) {
+                if (c->arrays.vertex.bo->name == name) {
+                    c->arrays.vertex.bo = 0;
+                }
             }
-            if (c->arrays.normal.bo->name == name) {
-                c->arrays.normal.bo = 0;
+            if (c->arrays.normal.bo) {
+                if (c->arrays.normal.bo->name == name) {
+                    c->arrays.normal.bo = 0;
+                }
             }
-            if (c->arrays.color.bo->name == name) {
-                c->arrays.color.bo = 0;
+            if (c->arrays.color.bo) {
+                if (c->arrays.color.bo->name == name) {
+                    c->arrays.color.bo = 0;
+                }
             }
             for (int t=0 ; t<GGL_TEXTURE_UNIT_COUNT ; t++) {
-                if (c->arrays.texture[t].bo->name == name) {
-                    c->arrays.texture[t].bo = 0;
+                if (c->arrays.texture[t].bo) {
+                    if (c->arrays.texture[t].bo->name == name) {
+                        c->arrays.texture[t].bo = 0;
+                    }
                 }
             }
         }
diff --git a/tests/LotsOfApps/Android.mk b/tests/LotsOfApps/Android.mk
new file mode 100644
index 0000000..3019f5c
--- /dev/null
+++ b/tests/LotsOfApps/Android.mk
@@ -0,0 +1,11 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+
+LOCAL_SRC_FILES := $(call all-subdir-java-files)
+
+LOCAL_PACKAGE_NAME := LotsOfApps
+LOCAL_CERTIFICATE := platform
+
+include $(BUILD_PACKAGE)
diff --git a/tests/LotsOfApps/AndroidManifest.xml b/tests/LotsOfApps/AndroidManifest.xml
new file mode 100644
index 0000000..1a16570
--- /dev/null
+++ b/tests/LotsOfApps/AndroidManifest.xml
@@ -0,0 +1,711 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+        package="com.android.lotsofapps">
+    <uses-permission android:name="android.permission.DEVICE_POWER" />
+    <uses-permission android:name="android.permission.WAKE_LOCK" />
+    <uses-permission android:name="android.permission.STATUS_BAR" />
+    <uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />
+    <uses-permission android:name="android.permission.VIBRATE" />
+
+    <application>
+        <activity android:name="00" android:icon="@drawable/ic_launcher_add_folder">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="01" android:icon="@drawable/ic_launcher_alarmclock">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="02" android:icon="@drawable/ic_launcher_application">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="03" android:icon="@drawable/ic_launcher_browser">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="04" android:icon="@drawable/ic_launcher_camera">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="05" android:icon="@drawable/ic_launcher_camera_record">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="06" android:icon="@drawable/ic_launcher_contacts">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="07" android:icon="@drawable/ic_launcher_drm_file">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="08" android:icon="@drawable/ic_launcher_folder">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="09" android:icon="@drawable/ic_launcher_folder_bluetooth">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="10" android:icon="@drawable/ic_launcher_folder_live">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="11" android:icon="@drawable/ic_launcher_folder_live_contacts">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="12" android:icon="@drawable/ic_launcher_folder_live_contacts_phone">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="13" android:icon="@drawable/ic_launcher_folder_live_contacts_starred">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="14" android:icon="@drawable/ic_launcher_folder_open">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="15" android:icon="@drawable/ic_launcher_gallery">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="16" android:icon="@drawable/ic_launcher_home">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="17" android:icon="@drawable/ic_launcher_im">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="18" android:icon="@drawable/ic_launcher_musicplayer_2">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="19" android:icon="@drawable/ic_launcher_phone">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="20" android:icon="@drawable/ic_launcher_record_audio">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="21" android:icon="@drawable/ic_launcher_settings">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="22" android:icon="@drawable/ic_launcher_shortcut">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="23" android:icon="@drawable/ic_launcher_shortcut_browser_bookmark">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="24" android:icon="@drawable/ic_launcher_contacts">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="25" android:icon="@drawable/ic_launcher_shortcut_directdial">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="26" android:icon="@drawable/ic_launcher_shortcut_directmessage">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="27" android:icon="@drawable/ic_launcher_browser">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="28" android:icon="@drawable/ic_launcher_sim_toolkit">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="29" android:icon="@drawable/ic_launcher_slideshow_add_sms">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="20" android:icon="@drawable/ic_launcher_slideshow_default_sms">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="31" android:icon="@drawable/ic_launcher_smsmms">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="32" android:icon="@drawable/ic_launcher_soundrecorder">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="33" android:icon="@drawable/ic_launcher_video_camera">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="34" android:icon="@drawable/ic_launcher_video_player">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="35" android:icon="@drawable/ic_launcher_wallpaper">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="36" android:icon="@drawable/ic_launcher_im">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="37" android:icon="@drawable/ic_launcher_musicplayer_2">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="38" android:icon="@drawable/ic_launcher_phone">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="39" android:icon="@drawable/ic_launcher_record_audio">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="40" android:icon="@drawable/ic_launcher_settings">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="41" android:icon="@drawable/ic_launcher_shortcut">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="42" android:icon="@drawable/ic_launcher_sim_toolkit">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="43" android:icon="@drawable/ic_launcher_smsmms">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="44" android:icon="@drawable/ic_launcher_soundrecorder">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="45" android:icon="@drawable/ic_launcher_video_camera">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="46" android:icon="@drawable/ic_launcher_wallpaper">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="47" android:icon="@drawable/ic_launcher_drm_file">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="48" android:icon="@drawable/ic_launcher_contacts">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="49" android:icon="@drawable/ic_launcher_drm_file">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="50" android:icon="@drawable/ic_launcher_add_folder">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="51" android:icon="@drawable/ic_launcher_alarmclock">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="52" android:icon="@drawable/ic_launcher_application">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="53" android:icon="@drawable/ic_launcher_browser">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="54" android:icon="@drawable/ic_launcher_camera">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="55" android:icon="@drawable/ic_launcher_camera_record">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="56" android:icon="@drawable/ic_launcher_contacts">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="57" android:icon="@drawable/ic_launcher_drm_file">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="58" android:icon="@drawable/ic_launcher_folder">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="59" android:icon="@drawable/ic_launcher_folder_bluetooth">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="60" android:icon="@drawable/ic_launcher_folder_live">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="61" android:icon="@drawable/ic_launcher_folder_live_contacts">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="62" android:icon="@drawable/ic_launcher_folder_live_contacts_phone">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="63" android:icon="@drawable/ic_launcher_folder_live_contacts_starred">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="64" android:icon="@drawable/ic_launcher_folder_open">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="65" android:icon="@drawable/ic_launcher_gallery">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="66" android:icon="@drawable/ic_launcher_home">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="67" android:icon="@drawable/ic_launcher_im">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="68" android:icon="@drawable/ic_launcher_musicplayer_2">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="69" android:icon="@drawable/ic_launcher_phone">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="70" android:icon="@drawable/ic_launcher_record_audio">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="71" android:icon="@drawable/ic_launcher_settings">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="72" android:icon="@drawable/ic_launcher_shortcut">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="73" android:icon="@drawable/ic_launcher_shortcut_browser_bookmark">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="74" android:icon="@drawable/ic_launcher_contacts">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="75" android:icon="@drawable/ic_launcher_shortcut_directdial">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="76" android:icon="@drawable/ic_launcher_shortcut_directmessage">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="77" android:icon="@drawable/ic_launcher_browser">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="78" android:icon="@drawable/ic_launcher_sim_toolkit">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="79" android:icon="@drawable/ic_launcher_slideshow_add_sms">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="80" android:icon="@drawable/ic_launcher_slideshow_default_sms">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="81" android:icon="@drawable/ic_launcher_smsmms">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="82" android:icon="@drawable/ic_launcher_soundrecorder">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="83" android:icon="@drawable/ic_launcher_video_camera">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="84" android:icon="@drawable/ic_launcher_video_player">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="85" android:icon="@drawable/ic_launcher_wallpaper">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="86" android:icon="@drawable/ic_launcher_im">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="87" android:icon="@drawable/ic_launcher_musicplayer_2">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="88" android:icon="@drawable/ic_launcher_phone">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="89" android:icon="@drawable/ic_launcher_record_audio">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="90" android:icon="@drawable/ic_launcher_settings">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="91" android:icon="@drawable/ic_launcher_shortcut">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="92" android:icon="@drawable/ic_launcher_sim_toolkit">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="93" android:icon="@drawable/ic_launcher_smsmms">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="94" android:icon="@drawable/ic_launcher_soundrecorder">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="95" android:icon="@drawable/ic_launcher_video_camera">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="96" android:icon="@drawable/ic_launcher_wallpaper">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="97" android:icon="@drawable/ic_launcher_drm_file">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="98" android:icon="@drawable/ic_launcher_contacts">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="99" android:icon="@drawable/ic_launcher_drm_file">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+</manifest>
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_add_folder.png b/tests/LotsOfApps/res/drawable/ic_launcher_add_folder.png
new file mode 100644
index 0000000..2967926
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_add_folder.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_alarmclock.png b/tests/LotsOfApps/res/drawable/ic_launcher_alarmclock.png
new file mode 100644
index 0000000..147d2cc
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_alarmclock.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_application.png b/tests/LotsOfApps/res/drawable/ic_launcher_application.png
new file mode 100644
index 0000000..8074c4c
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_application.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_appwidget.png b/tests/LotsOfApps/res/drawable/ic_launcher_appwidget.png
new file mode 100644
index 0000000..3dc8b20
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_appwidget.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_browser.png b/tests/LotsOfApps/res/drawable/ic_launcher_browser.png
new file mode 100644
index 0000000..cdce53e
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_browser.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_camera.png b/tests/LotsOfApps/res/drawable/ic_launcher_camera.png
new file mode 100644
index 0000000..f18e4d9
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_camera.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_camera_record.png b/tests/LotsOfApps/res/drawable/ic_launcher_camera_record.png
new file mode 100644
index 0000000..d242657
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_camera_record.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_contacts.png b/tests/LotsOfApps/res/drawable/ic_launcher_contacts.png
new file mode 100644
index 0000000..69a72c4
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_contacts.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_drm_file.png b/tests/LotsOfApps/res/drawable/ic_launcher_drm_file.png
new file mode 100644
index 0000000..9df1c55
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_drm_file.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_folder.png b/tests/LotsOfApps/res/drawable/ic_launcher_folder.png
new file mode 100644
index 0000000..dd71327
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_folder.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_folder_bluetooth.png b/tests/LotsOfApps/res/drawable/ic_launcher_folder_bluetooth.png
new file mode 100644
index 0000000..78c56b7
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_folder_bluetooth.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_folder_live.png b/tests/LotsOfApps/res/drawable/ic_launcher_folder_live.png
new file mode 100644
index 0000000..e1b1182
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_folder_live.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_folder_live_contacts.png b/tests/LotsOfApps/res/drawable/ic_launcher_folder_live_contacts.png
new file mode 100644
index 0000000..84babe2
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_folder_live_contacts.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_folder_live_contacts_phone.png b/tests/LotsOfApps/res/drawable/ic_launcher_folder_live_contacts_phone.png
new file mode 100644
index 0000000..004e849
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_folder_live_contacts_phone.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_folder_live_contacts_starred.png b/tests/LotsOfApps/res/drawable/ic_launcher_folder_live_contacts_starred.png
new file mode 100644
index 0000000..73b4fa5
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_folder_live_contacts_starred.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_folder_open.png b/tests/LotsOfApps/res/drawable/ic_launcher_folder_open.png
new file mode 100644
index 0000000..5b3fcec
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_folder_open.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_gallery.png b/tests/LotsOfApps/res/drawable/ic_launcher_gallery.png
new file mode 100644
index 0000000..3e39baa
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_gallery.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_home.png b/tests/LotsOfApps/res/drawable/ic_launcher_home.png
new file mode 100644
index 0000000..74f6bd7
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_home.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_im.png b/tests/LotsOfApps/res/drawable/ic_launcher_im.png
new file mode 100644
index 0000000..3ea3b703
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_im.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_musicplayer_2.png b/tests/LotsOfApps/res/drawable/ic_launcher_musicplayer_2.png
new file mode 100644
index 0000000..545f0e4
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_musicplayer_2.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_phone.png b/tests/LotsOfApps/res/drawable/ic_launcher_phone.png
new file mode 100644
index 0000000..0943ce5
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_phone.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_record_audio.png b/tests/LotsOfApps/res/drawable/ic_launcher_record_audio.png
new file mode 100644
index 0000000..053bd7a
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_record_audio.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_settings.png b/tests/LotsOfApps/res/drawable/ic_launcher_settings.png
new file mode 100644
index 0000000..ff34a7f
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_settings.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_shortcut.png b/tests/LotsOfApps/res/drawable/ic_launcher_shortcut.png
new file mode 100644
index 0000000..93ab2df
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_shortcut.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_shortcut_browser_bookmark.png b/tests/LotsOfApps/res/drawable/ic_launcher_shortcut_browser_bookmark.png
new file mode 100644
index 0000000..f861650
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_shortcut_browser_bookmark.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_shortcut_contact.png b/tests/LotsOfApps/res/drawable/ic_launcher_shortcut_contact.png
new file mode 100644
index 0000000..d86b264
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_shortcut_contact.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_shortcut_directdial.png b/tests/LotsOfApps/res/drawable/ic_launcher_shortcut_directdial.png
new file mode 100644
index 0000000..e7ff8f8
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_shortcut_directdial.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_shortcut_directmessage.png b/tests/LotsOfApps/res/drawable/ic_launcher_shortcut_directmessage.png
new file mode 100644
index 0000000..5170a75
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_shortcut_directmessage.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_shortcut_music_playlist.png b/tests/LotsOfApps/res/drawable/ic_launcher_shortcut_music_playlist.png
new file mode 100644
index 0000000..910c654
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_shortcut_music_playlist.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_sim_toolkit.png b/tests/LotsOfApps/res/drawable/ic_launcher_sim_toolkit.png
new file mode 100644
index 0000000..ce4ac43
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_sim_toolkit.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_slideshow_add_sms.png b/tests/LotsOfApps/res/drawable/ic_launcher_slideshow_add_sms.png
new file mode 100644
index 0000000..e355474
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_slideshow_add_sms.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_slideshow_default_sms.png b/tests/LotsOfApps/res/drawable/ic_launcher_slideshow_default_sms.png
new file mode 100644
index 0000000..e355474
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_slideshow_default_sms.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_smsmms.png b/tests/LotsOfApps/res/drawable/ic_launcher_smsmms.png
new file mode 100644
index 0000000..54bf64d
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_smsmms.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_soundrecorder.png b/tests/LotsOfApps/res/drawable/ic_launcher_soundrecorder.png
new file mode 100644
index 0000000..053bd7a
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_soundrecorder.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_video_camera.png b/tests/LotsOfApps/res/drawable/ic_launcher_video_camera.png
new file mode 100644
index 0000000..d242657
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_video_camera.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_video_player.png b/tests/LotsOfApps/res/drawable/ic_launcher_video_player.png
new file mode 100644
index 0000000..4815c53
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_video_player.png
Binary files differ
diff --git a/tests/LotsOfApps/res/drawable/ic_launcher_wallpaper.png b/tests/LotsOfApps/res/drawable/ic_launcher_wallpaper.png
new file mode 100644
index 0000000..dcd8709
--- /dev/null
+++ b/tests/LotsOfApps/res/drawable/ic_launcher_wallpaper.png
Binary files differ
diff --git a/tests/LotsOfApps/src/com/android/lotsofapps/Nothing.java b/tests/LotsOfApps/src/com/android/lotsofapps/Nothing.java
new file mode 100644
index 0000000..57c15c0
--- /dev/null
+++ b/tests/LotsOfApps/src/com/android/lotsofapps/Nothing.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.lotsofapps;
+
+public class Nothing {
+}
+