Merge change I2c6e54e4 into eclair

* changes:
  Throttle proximity sensor values so we do not process more than one change a second.
diff --git a/api/current.xml b/api/current.xml
index e72a88c..dee83e6 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -8842,6 +8842,17 @@
  visibility="public"
 >
 </field>
+<field name="wallpaperAuthor"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843444"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="wallpaperCloseEnterAnimation"
  type="int"
  transient="false"
@@ -8864,6 +8875,17 @@
  visibility="public"
 >
 </field>
+<field name="wallpaperDescription"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843445"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="wallpaperIntraCloseEnterAnimation"
  type="int"
  transient="false"
@@ -79679,6 +79701,17 @@
  deprecated="not deprecated"
  visibility="public"
 >
+<field name="CAMCORDER"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="DEFAULT"
  type="int"
  transient="false"
@@ -79723,6 +79756,17 @@
  visibility="public"
 >
 </field>
+<field name="VOICE_RECOGNITION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="6"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="VOICE_UPLINK"
  type="int"
  transient="false"
diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp
index f8bb3c8..4ffc8e4 100644
--- a/cmds/stagefright/stagefright.cpp
+++ b/cmds/stagefright/stagefright.cpp
@@ -283,7 +283,7 @@
 
         CHECK(service.get() != NULL);
 
-        sp<IOMX> omx = service->createOMX();
+        sp<IOMX> omx = service->getOMX();
         CHECK(omx.get() != NULL);
 
         const char *kMimeTypes[] = {
@@ -329,11 +329,11 @@
 
         CHECK(service.get() != NULL);
 
-        sp<IOMX> omx = service->createOMX();
+        sp<IOMX> omx = service->getOMX();
         CHECK(omx.get() != NULL);
 
         List<String8> list;
-        omx->list_nodes(&list);
+        omx->listNodes(&list);
 
         for (List<String8>::iterator it = list.begin();
              it != list.end(); ++it) {
diff --git a/core/java/android/app/WallpaperInfo.java b/core/java/android/app/WallpaperInfo.java
index 587e8f9..59d58aa 100644
--- a/core/java/android/app/WallpaperInfo.java
+++ b/core/java/android/app/WallpaperInfo.java
@@ -9,6 +9,7 @@
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
 import android.content.pm.ServiceInfo;
+import android.content.res.Resources.NotFoundException;
 import android.content.res.TypedArray;
 import android.content.res.XmlResourceParser;
 import android.graphics.drawable.Drawable;
@@ -45,6 +46,16 @@
     final int mThumbnailResource;
 
     /**
+     * Resource identifier for a string indicating the author of the wallpaper.
+     */
+    final int mAuthorResource;
+
+    /**
+     * Resource identifier for a string containing a short description of the wallpaper.
+     */
+    final int mDescriptionResource;
+
+    /**
      * Constructor.
      * 
      * @param context The Context in which we are parsing the wallpaper.
@@ -59,6 +70,8 @@
         PackageManager pm = context.getPackageManager();
         String settingsActivityComponent = null;
         int thumbnailRes = -1;
+        int authorRes = -1;
+        int descriptionRes = -1;
         
         XmlResourceParser parser = null;
         try {
@@ -89,6 +102,12 @@
             thumbnailRes = sa.getResourceId(
                     com.android.internal.R.styleable.Wallpaper_thumbnail,
                     -1);
+            authorRes = sa.getResourceId(
+                    com.android.internal.R.styleable.Wallpaper_wallpaperAuthor,
+                    -1);
+            descriptionRes = sa.getResourceId(
+                    com.android.internal.R.styleable.Wallpaper_wallpaperDescription,
+                    -1);
 
             sa.recycle();
         } finally {
@@ -97,11 +116,15 @@
         
         mSettingsActivityName = settingsActivityComponent;
         mThumbnailResource = thumbnailRes;
+        mAuthorResource = authorRes;
+        mDescriptionResource = descriptionRes;
     }
 
     WallpaperInfo(Parcel source) {
         mSettingsActivityName = source.readString();
         mThumbnailResource = source.readInt();
+        mAuthorResource = source.readInt();
+        mDescriptionResource = source.readInt();
         mService = ResolveInfo.CREATOR.createFromParcel(source);
     }
     
@@ -169,6 +192,32 @@
                               mThumbnailResource,
                               null);
     }
+
+    /**
+     * Return a string indicating the author(s) of this wallpaper.
+     */
+    public CharSequence loadAuthor(PackageManager pm) throws NotFoundException {
+        if (mAuthorResource <= 0) throw new NotFoundException();
+        return pm.getText(
+            (mService.resolvePackageName != null)
+                ? mService.resolvePackageName
+                : getPackageName(),
+            mAuthorResource,
+            null);
+    }
+
+    /**
+     * Return a brief summary of this wallpaper's behavior.
+     */
+    public CharSequence loadDescription(PackageManager pm) throws NotFoundException {
+        if (mDescriptionResource <= 0) throw new NotFoundException();
+        return pm.getText(
+            (mService.resolvePackageName != null)
+                ? mService.resolvePackageName
+                : getPackageName(),
+            mDescriptionResource,
+            null);
+    }
     
     /**
      * Return the class name of an activity that provides a settings UI for
@@ -206,6 +255,8 @@
     public void writeToParcel(Parcel dest, int flags) {
         dest.writeString(mSettingsActivityName);
         dest.writeInt(mThumbnailResource);
+        dest.writeInt(mAuthorResource);
+        dest.writeInt(mDescriptionResource);
         mService.writeToParcel(dest, flags);
     }
 
diff --git a/core/java/android/appwidget/AppWidgetHostView.java b/core/java/android/appwidget/AppWidgetHostView.java
index bb0cbe9..2f719f3 100644
--- a/core/java/android/appwidget/AppWidgetHostView.java
+++ b/core/java/android/appwidget/AppWidgetHostView.java
@@ -123,8 +123,15 @@
 
     @Override
     protected void dispatchRestoreInstanceState(SparseArray<Parcelable> container) {
-        ParcelableSparseArray jail = (ParcelableSparseArray) container.get(generateId());
+        final Parcelable parcelable = container.get(generateId());
+
+        ParcelableSparseArray jail = null;
+        if (parcelable != null && parcelable instanceof ParcelableSparseArray) {
+            jail = (ParcelableSparseArray) parcelable;
+        }
+
         if (jail == null) jail = new ParcelableSparseArray();
+
         super.dispatchRestoreInstanceState(jail);
     }
 
@@ -140,7 +147,7 @@
 
     /**
      * Process a set of {@link RemoteViews} coming in as an update from the
-     * AppWidget provider. Will animate into these new views as needed.
+     * AppWidget provider. Will animate into these new views as needed
      */
     public void updateAppWidget(RemoteViews remoteViews) {
         if (LOGD) Log.d(TAG, "updateAppWidget called mOld=" + mOld);
diff --git a/core/java/android/server/BluetoothService.java b/core/java/android/server/BluetoothService.java
index 67b30a9..d1dd311 100644
--- a/core/java/android/server/BluetoothService.java
+++ b/core/java/android/server/BluetoothService.java
@@ -489,14 +489,15 @@
         // Parrot, Zhongshan General K-mate Electronics, Great Well
         // Electronics, Flaircomm Electronics, Jatty Electronics, Delphi,
         // Clarion, Novero, Denso (Lexus, Toyota), Johnson Controls (Acura),
-        // Continental Automotive, Harman/Becker, Panasonic/Kyushu Ten
+        // Continental Automotive, Harman/Becker, Panasonic/Kyushu Ten,
+        // BMW (Motorola PCS)
         private final ArrayList<String>  mAutoPairingAddressBlacklist =
                 new ArrayList<String>(Arrays.asList(
                         "00:02:C7", "00:16:FE", "00:19:C1", "00:1B:FB", "00:1E:3D", "00:21:4F",
                         "00:23:06", "00:24:33", "00:A0:79", "00:0E:6D", "00:13:E0", "00:21:E8",
                         "00:60:57", "00:0E:9F", "00:12:1C", "00:18:91", "00:18:96", "00:13:04",
                         "00:16:FD", "00:22:A0", "00:0B:4C", "00:60:6F", "00:23:3D", "00:C0:59",
-                        "00:0A:30", "00:1E:AE", "00:1C:D7", "00:80:F0"
+                        "00:0A:30", "00:1E:AE", "00:1C:D7", "00:80:F0", "00:12:8A"
                         ));
 
         // List of names of Bluetooth devices for which auto pairing should be
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 8aab595..7e6258e 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -3483,6 +3483,12 @@
 
         <!-- Reference to a the wallpaper's thumbnail bitmap. -->
         <attr name="thumbnail" format="reference" />
+
+        <!-- Name of the author of a wallpaper, e.g. Google. -->
+        <attr name="wallpaperAuthor" format="reference" />
+
+        <!-- Short description of the wallpaper's purpose or behavior. -->
+        <attr name="wallpaperDescription" format="reference" />
     </declare-styleable>
 
     <!-- =============================== -->
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index a0b56101..5eb1c8e 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -1201,5 +1201,8 @@
   <public type="attr" name="quickContactBadgeStyleSmallWindowSmall" />
   <public type="attr" name="quickContactBadgeStyleSmallWindowMedium" />
   <public type="attr" name="quickContactBadgeStyleSmallWindowLarge" />
+
+  <public type="attr" name="wallpaperAuthor" />
+  <public type="attr" name="wallpaperDescription" />
   
 </resources>
diff --git a/include/media/IMediaPlayerService.h b/include/media/IMediaPlayerService.h
index 303444c..d5c1594 100644
--- a/include/media/IMediaPlayerService.h
+++ b/include/media/IMediaPlayerService.h
@@ -42,7 +42,7 @@
     virtual sp<IMediaPlayer>    create(pid_t pid, const sp<IMediaPlayerClient>& client, int fd, int64_t offset, int64_t length) = 0;
     virtual sp<IMemory>         decode(const char* url, uint32_t *pSampleRate, int* pNumChannels, int* pFormat) = 0;
     virtual sp<IMemory>         decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, int* pFormat) = 0;
-    virtual sp<IOMX>            createOMX() = 0;
+    virtual sp<IOMX>            getOMX() = 0;
 
     // Take a peek at currently playing audio, for visualization purposes.
     // This returns a buffer of 16 bit mono PCM data, or NULL if no visualization buffer is currently available.
diff --git a/include/media/IOMX.h b/include/media/IOMX.h
index 10e0197..6f3ba1c 100644
--- a/include/media/IOMX.h
+++ b/include/media/IOMX.h
@@ -42,57 +42,57 @@
     typedef void *buffer_id;
     typedef void *node_id;
 
-    virtual status_t list_nodes(List<String8> *list) = 0;
+    virtual status_t listNodes(List<String8> *list) = 0;
 
-    virtual status_t allocate_node(const char *name, node_id *node) = 0;
-    virtual status_t free_node(node_id node) = 0;
+    virtual status_t allocateNode(
+            const char *name, const sp<IOMXObserver> &observer,
+            node_id *node) = 0;
 
-    virtual status_t send_command(
+    virtual status_t freeNode(node_id node) = 0;
+
+    virtual status_t sendCommand(
             node_id node, OMX_COMMANDTYPE cmd, OMX_S32 param) = 0;
 
-    virtual status_t get_parameter(
+    virtual status_t getParameter(
             node_id node, OMX_INDEXTYPE index,
             void *params, size_t size) = 0;
 
-    virtual status_t set_parameter(
+    virtual status_t setParameter(
             node_id node, OMX_INDEXTYPE index,
             const void *params, size_t size) = 0;
 
-    virtual status_t get_config(
+    virtual status_t getConfig(
             node_id node, OMX_INDEXTYPE index,
             void *params, size_t size) = 0;
 
-    virtual status_t set_config(
+    virtual status_t setConfig(
             node_id node, OMX_INDEXTYPE index,
             const void *params, size_t size) = 0;
 
-    virtual status_t use_buffer(
+    virtual status_t useBuffer(
             node_id node, OMX_U32 port_index, const sp<IMemory> &params,
             buffer_id *buffer) = 0;
 
-    virtual status_t allocate_buffer(
+    virtual status_t allocateBuffer(
             node_id node, OMX_U32 port_index, size_t size,
             buffer_id *buffer) = 0;
 
-    virtual status_t allocate_buffer_with_backup(
+    virtual status_t allocateBufferWithBackup(
             node_id node, OMX_U32 port_index, const sp<IMemory> &params,
             buffer_id *buffer) = 0;
 
-    virtual status_t free_buffer(
+    virtual status_t freeBuffer(
             node_id node, OMX_U32 port_index, buffer_id buffer) = 0;
 
-    virtual status_t observe_node(
-            node_id node, const sp<IOMXObserver> &observer) = 0;
+    virtual status_t fillBuffer(node_id node, buffer_id buffer) = 0;
 
-    virtual void fill_buffer(node_id node, buffer_id buffer) = 0;
-
-    virtual void empty_buffer(
+    virtual status_t emptyBuffer(
             node_id node,
             buffer_id buffer,
             OMX_U32 range_offset, OMX_U32 range_length,
             OMX_U32 flags, OMX_TICKS timestamp) = 0;
 
-    virtual status_t get_extension_index(
+    virtual status_t getExtensionIndex(
             node_id node,
             const char *parameter_name,
             OMX_INDEXTYPE *index) = 0;
@@ -162,7 +162,7 @@
 public:
     DECLARE_META_INTERFACE(OMXObserver);
 
-    virtual void on_message(const omx_message &msg) = 0;
+    virtual void onMessage(const omx_message &msg) = 0;
 };
 
 class IOMXRenderer : public IInterface {
diff --git a/include/media/stagefright/HTTPStream.h b/include/media/stagefright/HTTPStream.h
index 3d0d67a..72e796c 100644
--- a/include/media/stagefright/HTTPStream.h
+++ b/include/media/stagefright/HTTPStream.h
@@ -21,7 +21,7 @@
 #include <sys/types.h>
 
 #include <media/stagefright/MediaErrors.h>
-#include <media/stagefright/string.h>
+#include <media/stagefright/stagefright_string.h>
 #include <utils/KeyedVector.h>
 
 namespace android {
diff --git a/include/media/stagefright/string.h b/include/media/stagefright/stagefright_string.h
similarity index 92%
rename from include/media/stagefright/string.h
rename to include/media/stagefright/stagefright_string.h
index 5dc7116..1ed4c86 100644
--- a/include/media/stagefright/string.h
+++ b/include/media/stagefright/stagefright_string.h
@@ -14,9 +14,9 @@
  * limitations under the License.
  */
 
-#ifndef STRING_H_
+#ifndef STAGEFRIGHT_STRING_H_
 
-#define STRING_H_
+#define STAGEFRIGHT_STRING_H_
 
 #include <utils/String8.h>
 
@@ -51,4 +51,4 @@
 
 }  // namespace android
 
-#endif  // STRING_H_
+#endif  // STAGEFRIGHT_STRING_H_
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp
index 38cec64..16029a6 100644
--- a/libs/rs/rsAllocation.cpp
+++ b/libs/rs/rsAllocation.cpp
@@ -104,6 +104,7 @@
         glGenTextures(1, &mTextureID);
     }
     glBindTexture(GL_TEXTURE_2D, mTextureID);
+    glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
 
     Adapter2D adapt(getContext(), this);
     for(uint32_t lod = 0; (lod + lodOffset) < mType->getLODCount(); lod++) {
diff --git a/libs/ui/FramebufferNativeWindow.cpp b/libs/ui/FramebufferNativeWindow.cpp
index c5e22e5..0efba9c 100644
--- a/libs/ui/FramebufferNativeWindow.cpp
+++ b/libs/ui/FramebufferNativeWindow.cpp
@@ -118,6 +118,8 @@
         LOGE_IF(err, "fb buffer 1 allocation failed w=%d, h=%d, err=%s",
                 fbDev->width, fbDev->height, strerror(-err));
 
+        LOGE("xDpi %d", fbDev->xdpi);
+        LOGE("yDpi %d", fbDev->ydpi);
         const_cast<uint32_t&>(android_native_window_t::flags) = fbDev->flags; 
         const_cast<float&>(android_native_window_t::xdpi) = fbDev->xdpi;
         const_cast<float&>(android_native_window_t::ydpi) = fbDev->ydpi;
diff --git a/media/java/android/media/MediaRecorder.java b/media/java/android/media/MediaRecorder.java
index 0b42cf6..4203cba 100644
--- a/media/java/android/media/MediaRecorder.java
+++ b/media/java/android/media/MediaRecorder.java
@@ -136,10 +136,10 @@
         /** Voice call uplink + downlink audio source */
         public static final int VOICE_CALL = 4;
 
-        /** @hide Microphone audio source with same orientation as camera */
+        /** Microphone audio source with same orientation as camera */
         public static final int CAMCORDER = 5;
 
-        /** @hide Microphone audio source tuned for voice recognition */
+        /** Microphone audio source tuned for voice recognition */
         public static final int VOICE_RECOGNITION = 6;
     }
 
diff --git a/media/libmedia/IMediaPlayerService.cpp b/media/libmedia/IMediaPlayerService.cpp
index 98f7ef1..cca3e9b 100644
--- a/media/libmedia/IMediaPlayerService.cpp
+++ b/media/libmedia/IMediaPlayerService.cpp
@@ -35,7 +35,7 @@
     DECODE_FD,
     CREATE_MEDIA_RECORDER,
     CREATE_METADATA_RETRIEVER,
-    CREATE_OMX,
+    GET_OMX,
     SNOOP
 };
 
@@ -123,10 +123,10 @@
         return interface_cast<IMemory>(reply.readStrongBinder());
     }
 
-    virtual sp<IOMX> createOMX() {
+    virtual sp<IOMX> getOMX() {
         Parcel data, reply;
         data.writeInterfaceToken(IMediaPlayerService::getInterfaceDescriptor());
-        remote()->transact(CREATE_OMX, data, &reply);
+        remote()->transact(GET_OMX, data, &reply);
         return interface_cast<IOMX>(reply.readStrongBinder());
     }
 };
@@ -207,9 +207,9 @@
             reply->writeStrongBinder(retriever->asBinder());
             return NO_ERROR;
         } break;
-        case CREATE_OMX: {
+        case GET_OMX: {
             CHECK_INTERFACE(IMediaPlayerService, data, reply);
-            sp<IOMX> omx = createOMX();
+            sp<IOMX> omx = getOMX();
             reply->writeStrongBinder(omx->asBinder());
             return NO_ERROR;
         } break;
diff --git a/media/libmedia/IOMX.cpp b/media/libmedia/IOMX.cpp
index 0cec7bb..88a7064 100644
--- a/media/libmedia/IOMX.cpp
+++ b/media/libmedia/IOMX.cpp
@@ -24,7 +24,6 @@
     ALLOC_BUFFER,
     ALLOC_BUFFER_WITH_BACKUP,
     FREE_BUFFER,
-    OBSERVE_NODE,
     FILL_BUFFER,
     EMPTY_BUFFER,
     GET_EXTENSION_INDEX,
@@ -76,7 +75,7 @@
         : BpInterface<IOMX>(impl) {
     }
 
-    virtual status_t list_nodes(List<String8> *list) {
+    virtual status_t listNodes(List<String8> *list) {
         list->clear();
 
         Parcel data, reply;
@@ -93,10 +92,12 @@
         return OK;
     }
 
-    virtual status_t allocate_node(const char *name, node_id *node) {
+    virtual status_t allocateNode(
+            const char *name, const sp<IOMXObserver> &observer, node_id *node) {
         Parcel data, reply;
         data.writeInterfaceToken(IOMX::getInterfaceDescriptor());
         data.writeCString(name);
+        data.writeStrongBinder(observer->asBinder());
         remote()->transact(ALLOCATE_NODE, data, &reply);
 
         status_t err = reply.readInt32();
@@ -109,7 +110,7 @@
         return err;
     }
 
-    virtual status_t free_node(node_id node) {
+    virtual status_t freeNode(node_id node) {
         Parcel data, reply;
         data.writeInterfaceToken(IOMX::getInterfaceDescriptor());
         data.writeIntPtr((intptr_t)node);
@@ -118,7 +119,7 @@
         return reply.readInt32();
     }
 
-    virtual status_t send_command(
+    virtual status_t sendCommand(
             node_id node, OMX_COMMANDTYPE cmd, OMX_S32 param) {
         Parcel data, reply;
         data.writeInterfaceToken(IOMX::getInterfaceDescriptor());
@@ -130,7 +131,7 @@
         return reply.readInt32();
     }
 
-    virtual status_t get_parameter(
+    virtual status_t getParameter(
             node_id node, OMX_INDEXTYPE index,
             void *params, size_t size) {
         Parcel data, reply;
@@ -151,7 +152,7 @@
         return OK;
     }
 
-    virtual status_t set_parameter(
+    virtual status_t setParameter(
             node_id node, OMX_INDEXTYPE index,
             const void *params, size_t size) {
         Parcel data, reply;
@@ -165,7 +166,7 @@
         return reply.readInt32();
     }
 
-    virtual status_t get_config(
+    virtual status_t getConfig(
             node_id node, OMX_INDEXTYPE index,
             void *params, size_t size) {
         Parcel data, reply;
@@ -186,7 +187,7 @@
         return OK;
     }
 
-    virtual status_t set_config(
+    virtual status_t setConfig(
             node_id node, OMX_INDEXTYPE index,
             const void *params, size_t size) {
         Parcel data, reply;
@@ -200,7 +201,7 @@
         return reply.readInt32();
     }
 
-    virtual status_t use_buffer(
+    virtual status_t useBuffer(
             node_id node, OMX_U32 port_index, const sp<IMemory> &params,
             buffer_id *buffer) {
         Parcel data, reply;
@@ -222,7 +223,7 @@
         return err;
     }
 
-    virtual status_t allocate_buffer(
+    virtual status_t allocateBuffer(
             node_id node, OMX_U32 port_index, size_t size,
             buffer_id *buffer) {
         Parcel data, reply;
@@ -244,7 +245,7 @@
         return err;
     }
 
-    virtual status_t allocate_buffer_with_backup(
+    virtual status_t allocateBufferWithBackup(
             node_id node, OMX_U32 port_index, const sp<IMemory> &params,
             buffer_id *buffer) {
         Parcel data, reply;
@@ -266,7 +267,7 @@
         return err;
     }
 
-    virtual status_t free_buffer(
+    virtual status_t freeBuffer(
             node_id node, OMX_U32 port_index, buffer_id buffer) {
         Parcel data, reply;
         data.writeInterfaceToken(IOMX::getInterfaceDescriptor());
@@ -278,26 +279,17 @@
         return reply.readInt32();
     }
 
-    virtual status_t observe_node(
-            node_id node, const sp<IOMXObserver> &observer) {
-        Parcel data, reply;
-        data.writeInterfaceToken(IOMX::getInterfaceDescriptor());
-        data.writeIntPtr((intptr_t)node);
-        data.writeStrongBinder(observer->asBinder());
-        remote()->transact(OBSERVE_NODE, data, &reply);
-
-        return reply.readInt32();
-    }
-
-    virtual void fill_buffer(node_id node, buffer_id buffer) {
+    virtual status_t fillBuffer(node_id node, buffer_id buffer) {
         Parcel data, reply;
         data.writeInterfaceToken(IOMX::getInterfaceDescriptor());
         data.writeIntPtr((intptr_t)node);
         data.writeIntPtr((intptr_t)buffer);
         remote()->transact(FILL_BUFFER, data, &reply, IBinder::FLAG_ONEWAY);
+
+        return reply.readInt32();
     }
 
-    virtual void empty_buffer(
+    virtual status_t emptyBuffer(
             node_id node,
             buffer_id buffer,
             OMX_U32 range_offset, OMX_U32 range_length,
@@ -311,9 +303,11 @@
         data.writeInt32(flags);
         data.writeInt64(timestamp);
         remote()->transact(EMPTY_BUFFER, data, &reply, IBinder::FLAG_ONEWAY);
+
+        return reply.readInt32();
     }
 
-    virtual status_t get_extension_index(
+    virtual status_t getExtensionIndex(
             node_id node,
             const char *parameter_name,
             OMX_INDEXTYPE *index) {
@@ -375,7 +369,7 @@
             CHECK_INTERFACE(IOMX, data, reply);
 
             List<String8> list;
-            list_nodes(&list);
+            listNodes(&list);
 
             reply->writeInt32(list.size());
             for (List<String8>::iterator it = list.begin();
@@ -390,8 +384,14 @@
         {
             CHECK_INTERFACE(IOMX, data, reply);
 
+            const char *name = data.readCString();
+
+            sp<IOMXObserver> observer =
+                interface_cast<IOMXObserver>(data.readStrongBinder());
+
             node_id node;
-            status_t err = allocate_node(data.readCString(), &node);
+
+            status_t err = allocateNode(name, observer, &node);
             reply->writeInt32(err);
             if (err == OK) {
                 reply->writeIntPtr((intptr_t)node);
@@ -406,7 +406,7 @@
 
             node_id node = (void*)data.readIntPtr();
 
-            reply->writeInt32(free_node(node));
+            reply->writeInt32(freeNode(node));
                 
             return NO_ERROR;
         }
@@ -421,7 +421,7 @@
                 static_cast<OMX_COMMANDTYPE>(data.readInt32());
 
             OMX_S32 param = data.readInt32();
-            reply->writeInt32(send_command(node, cmd, param));
+            reply->writeInt32(sendCommand(node, cmd, param));
 
             return NO_ERROR;
         }
@@ -439,7 +439,7 @@
             void *params = malloc(size);
             data.read(params, size);
 
-            status_t err = get_parameter(node, index, params, size);
+            status_t err = getParameter(node, index, params, size);
 
             reply->writeInt32(err);
 
@@ -463,7 +463,7 @@
             size_t size = data.readInt32();
             void *params = const_cast<void *>(data.readInplace(size));
 
-            reply->writeInt32(set_parameter(node, index, params, size));
+            reply->writeInt32(setParameter(node, index, params, size));
 
             return NO_ERROR;
         }
@@ -481,7 +481,7 @@
             void *params = malloc(size);
             data.read(params, size);
 
-            status_t err = get_config(node, index, params, size);
+            status_t err = getConfig(node, index, params, size);
 
             reply->writeInt32(err);
 
@@ -505,7 +505,7 @@
             size_t size = data.readInt32();
             void *params = const_cast<void *>(data.readInplace(size));
 
-            reply->writeInt32(set_config(node, index, params, size));
+            reply->writeInt32(setConfig(node, index, params, size));
 
             return NO_ERROR;
         }
@@ -520,7 +520,7 @@
                 interface_cast<IMemory>(data.readStrongBinder());
 
             buffer_id buffer;
-            status_t err = use_buffer(node, port_index, params, &buffer);
+            status_t err = useBuffer(node, port_index, params, &buffer);
             reply->writeInt32(err);
 
             if (err == OK) {
@@ -539,7 +539,7 @@
             size_t size = data.readInt32();
 
             buffer_id buffer;
-            status_t err = allocate_buffer(node, port_index, size, &buffer);
+            status_t err = allocateBuffer(node, port_index, size, &buffer);
             reply->writeInt32(err);
 
             if (err == OK) {
@@ -559,7 +559,7 @@
                 interface_cast<IMemory>(data.readStrongBinder());
 
             buffer_id buffer;
-            status_t err = allocate_buffer_with_backup(
+            status_t err = allocateBufferWithBackup(
                     node, port_index, params, &buffer);
 
             reply->writeInt32(err);
@@ -578,19 +578,7 @@
             node_id node = (void*)data.readIntPtr();
             OMX_U32 port_index = data.readInt32();
             buffer_id buffer = (void*)data.readIntPtr();
-            reply->writeInt32(free_buffer(node, port_index, buffer));
-
-            return NO_ERROR;
-        }
-
-        case OBSERVE_NODE:
-        {
-            CHECK_INTERFACE(IOMX, data, reply);
-
-            node_id node = (void*)data.readIntPtr();
-            sp<IOMXObserver> observer =
-                interface_cast<IOMXObserver>(data.readStrongBinder());
-            reply->writeInt32(observe_node(node, observer));
+            reply->writeInt32(freeBuffer(node, port_index, buffer));
 
             return NO_ERROR;
         }
@@ -601,7 +589,7 @@
 
             node_id node = (void*)data.readIntPtr();
             buffer_id buffer = (void*)data.readIntPtr();
-            fill_buffer(node, buffer);
+            reply->writeInt32(fillBuffer(node, buffer));
 
             return NO_ERROR;
         }
@@ -617,9 +605,10 @@
             OMX_U32 flags = data.readInt32();
             OMX_TICKS timestamp = data.readInt64();
 
-            empty_buffer(
-                    node, buffer, range_offset, range_length,
-                    flags, timestamp);
+            reply->writeInt32(
+                    emptyBuffer(
+                        node, buffer, range_offset, range_length,
+                        flags, timestamp));
 
             return NO_ERROR;
         }
@@ -632,7 +621,7 @@
             const char *parameter_name = data.readCString();
             
             OMX_INDEXTYPE index;
-            status_t err = get_extension_index(node, parameter_name, &index);
+            status_t err = getExtensionIndex(node, parameter_name, &index);
 
             reply->writeInt32(err);
 
@@ -683,7 +672,7 @@
         : BpInterface<IOMXObserver>(impl) {
     }
 
-    virtual void on_message(const omx_message &msg) {
+    virtual void onMessage(const omx_message &msg) {
         Parcel data, reply;
         data.writeInterfaceToken(IOMXObserver::getInterfaceDescriptor());
         data.write(&msg, sizeof(msg));
@@ -705,7 +694,7 @@
             data.read(&msg, sizeof(msg));
 
             // XXX Could use readInplace maybe?
-            on_message(msg);
+            onMessage(msg);
 
             return NO_ERROR;
         }
diff --git a/media/libmediaplayerservice/Android.mk b/media/libmediaplayerservice/Android.mk
index f21eb73..fb569da 100644
--- a/media/libmediaplayerservice/Android.mk
+++ b/media/libmediaplayerservice/Android.mk
@@ -50,7 +50,7 @@
 	$(JNI_H_INCLUDE)                                                \
 	$(call include-path-for, graphics corecg)                       \
 	$(TOP)/external/opencore/extern_libs_v2/khronos/openmax/include \
-	$(TOP)/frameworks/base/media/libstagefright/omx
+	$(TOP)/frameworks/base/media/libstagefright/include
 
 LOCAL_MODULE:= libmediaplayerservice
 
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp
index 0b75a2b..0a6c365 100644
--- a/media/libmediaplayerservice/MediaPlayerService.cpp
+++ b/media/libmediaplayerservice/MediaPlayerService.cpp
@@ -284,8 +284,14 @@
     return c;
 }
 
-sp<IOMX> MediaPlayerService::createOMX() {
-    return new OMX;
+sp<IOMX> MediaPlayerService::getOMX() {
+    Mutex::Autolock autoLock(mLock);
+
+    if (mOMX.get() == NULL) {
+        mOMX = new OMX;
+    }
+
+    return mOMX;
 }
 
 status_t MediaPlayerService::AudioCache::dump(int fd, const Vector<String16>& args) const
diff --git a/media/libmediaplayerservice/MediaPlayerService.h b/media/libmediaplayerservice/MediaPlayerService.h
index 43c4915..b00f5b7 100644
--- a/media/libmediaplayerservice/MediaPlayerService.h
+++ b/media/libmediaplayerservice/MediaPlayerService.h
@@ -185,7 +185,7 @@
     virtual sp<IMemory>         decode(const char* url, uint32_t *pSampleRate, int* pNumChannels, int* pFormat);
     virtual sp<IMemory>         decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, int* pFormat);
     virtual sp<IMemory>         snoop();
-    virtual sp<IOMX>            createOMX();
+    virtual sp<IOMX>            getOMX();
 
     virtual status_t            dump(int fd, const Vector<String16>& args);
 
@@ -284,6 +284,7 @@
                 SortedVector< wp<Client> >  mClients;
                 SortedVector< wp<MediaRecorderClient> > mMediaRecorderClients;
                 int32_t                     mNextConnId;
+                sp<IOMX>                    mOMX;
 };
 
 // ----------------------------------------------------------------------------
diff --git a/media/libmediaplayerservice/MetadataRetrieverClient.cpp b/media/libmediaplayerservice/MetadataRetrieverClient.cpp
index 8eabe5d..2cdc351 100644
--- a/media/libmediaplayerservice/MetadataRetrieverClient.cpp
+++ b/media/libmediaplayerservice/MetadataRetrieverClient.cpp
@@ -138,6 +138,12 @@
         return UNKNOWN_ERROR;
     }
     player_type playerType = getPlayerType(url);
+#if !defined(NO_OPENCORE) && defined(BUILD_WITH_FULL_STAGEFRIGHT)
+    if (playerType == STAGEFRIGHT_PLAYER) {
+        // Stagefright doesn't support metadata in this branch yet.
+        playerType = PV_PLAYER;
+    }
+#endif
     LOGV("player type = %d", playerType);
     sp<MediaMetadataRetrieverBase> p = createRetriever(playerType);
     if (p == NULL) return NO_INIT;
@@ -176,6 +182,12 @@
     }
 
     player_type playerType = getPlayerType(fd, offset, length);
+#if !defined(NO_OPENCORE) && defined(BUILD_WITH_FULL_STAGEFRIGHT)
+    if (playerType == STAGEFRIGHT_PLAYER) {
+        // Stagefright doesn't support metadata in this branch yet.
+        playerType = PV_PLAYER;
+    }
+#endif
     LOGV("player type = %d", playerType);
     sp<MediaMetadataRetrieverBase> p = createRetriever(playerType);
     if (p == NULL) {
diff --git a/media/libstagefright/Android.mk b/media/libstagefright/Android.mk
index 3c343a3..9f71dae 100644
--- a/media/libstagefright/Android.mk
+++ b/media/libstagefright/Android.mk
@@ -33,7 +33,7 @@
         TimeSource.cpp            \
         TimedEventQueue.cpp       \
         AudioPlayer.cpp           \
-        string.cpp
+        stagefright_string.cpp
 
 endif
 
diff --git a/media/libstagefright/HTTPDataSource.cpp b/media/libstagefright/HTTPDataSource.cpp
index 698223b..4dedebd 100644
--- a/media/libstagefright/HTTPDataSource.cpp
+++ b/media/libstagefright/HTTPDataSource.cpp
@@ -19,7 +19,7 @@
 #include <media/stagefright/HTTPDataSource.h>
 #include <media/stagefright/HTTPStream.h>
 #include <media/stagefright/MediaDebug.h>
-#include <media/stagefright/string.h>
+#include <media/stagefright/stagefright_string.h>
 
 namespace android {
 
diff --git a/media/libstagefright/OMXClient.cpp b/media/libstagefright/OMXClient.cpp
index dba7a2a..9de873e 100644
--- a/media/libstagefright/OMXClient.cpp
+++ b/media/libstagefright/OMXClient.cpp
@@ -35,7 +35,7 @@
 
     CHECK(service.get() != NULL);
 
-    mOMX = service->createOMX();
+    mOMX = service->getOMX();
     CHECK(mOMX.get() != NULL);
 
     return OK;
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 1a23fb2..ebf1e0c 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -85,12 +85,15 @@
 #define CODEC_LOGV(x, ...) LOGV("[%s] "x, mComponentName, ##__VA_ARGS__)
 
 struct OMXCodecObserver : public BnOMXObserver {
-    OMXCodecObserver(const wp<OMXCodec> &target)
-        : mTarget(target) {
+    OMXCodecObserver() {
+    }
+
+    void setCodec(const sp<OMXCodec> &target) {
+        mTarget = target;
     }
 
     // from IOMXObserver
-    virtual void on_message(const omx_message &msg) {
+    virtual void onMessage(const omx_message &msg) {
         sp<OMXCodec> codec = mTarget.promote();
 
         if (codec.get() != NULL) {
@@ -177,6 +180,7 @@
     CHECK(success);
 
     const char *componentName = NULL;
+    sp<OMXCodecObserver> observer = new OMXCodecObserver;
     IOMX::node_id node = 0;
     for (int index = 0;; ++index) {
         if (createEncoder) {
@@ -200,7 +204,7 @@
 
         LOGV("Attempting to allocate OMX node '%s'", componentName);
 
-        status_t err = omx->allocate_node(componentName, &node);
+        status_t err = omx->allocateNode(componentName, observer, &node);
         if (err == OK) {
             LOGI("Successfully allocated OMX node '%s'", componentName);
             break;
@@ -230,7 +234,6 @@
     }
     if (!strncmp(componentName, "OMX.qcom.video.decoder.", 23)) {
         // XXX Required on P....on only.
-        quirks |= kRequiresAllocateBufferOnInputPorts;
         quirks |= kRequiresAllocateBufferOnOutputPorts;
         quirks |= kOutputDimensionsAre16Aligned;
     }
@@ -249,6 +252,8 @@
             omx, node, quirks, createEncoder, mime, componentName,
             source);
 
+    observer->setCodec(codec);
+
     uint32_t type;
     const void *data;
     size_t size;
@@ -331,7 +336,9 @@
 
         if (!strcmp(componentName, "OMX.TI.Video.Decoder")
             && (profile != kAVCProfileBaseline || level > 39)) {
-            // This stream exceeds the decoder's capabilities.
+            // This stream exceeds the decoder's capabilities. The decoder
+            // does not handle this gracefully and would clobber the heap
+            // and wreak havoc instead...
 
             LOGE("Profile and/or level exceed the decoder's capabilities.");
             return NULL;
@@ -406,7 +413,7 @@
     InitOMXParams(&def);
     def.nPortIndex = portIndex;
 
-    status_t err = mOMX->get_parameter(
+    status_t err = mOMX->getParameter(
             mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
     CHECK_EQ(err, OK);
 
@@ -415,7 +422,7 @@
 
     }
 
-    err = mOMX->set_parameter(
+    err = mOMX->setParameter(
             mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
     CHECK_EQ(err, OK);
 }
@@ -433,7 +440,7 @@
     OMX_U32 index = 0;
     for (;;) {
         format.nIndex = index;
-        status_t err = mOMX->get_parameter(
+        status_t err = mOMX->getParameter(
                 mNode, OMX_IndexParamVideoPortFormat,
                 &format, sizeof(format));
 
@@ -478,8 +485,8 @@
         return UNKNOWN_ERROR;
     }
 
-    CODEC_LOGI("found a match.");
-    status_t err = mOMX->set_parameter(
+    CODEC_LOGV("found a match.");
+    status_t err = mOMX->setParameter(
             mNode, OMX_IndexParamVideoPortFormat,
             &format, sizeof(format));
 
@@ -522,7 +529,7 @@
 
     OMX_VIDEO_PORTDEFINITIONTYPE *video_def = &def.format.video;
 
-    status_t err = mOMX->get_parameter(
+    status_t err = mOMX->getParameter(
             mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
 
     CHECK_EQ(err, OK);
@@ -534,7 +541,7 @@
     video_def->eCompressionFormat = compressionFormat;
     video_def->eColorFormat = OMX_COLOR_FormatUnused;
 
-    err = mOMX->set_parameter(
+    err = mOMX->setParameter(
             mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
     CHECK_EQ(err, OK);
 
@@ -543,7 +550,7 @@
     InitOMXParams(&def);
     def.nPortIndex = kPortIndexInput;
 
-    err = mOMX->get_parameter(
+    err = mOMX->getParameter(
             mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
     CHECK_EQ(err, OK);
 
@@ -557,7 +564,7 @@
     video_def->eCompressionFormat = OMX_VIDEO_CodingUnused;
     video_def->eColorFormat = colorFormat;
 
-    err = mOMX->set_parameter(
+    err = mOMX->setParameter(
             mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
     CHECK_EQ(err, OK);
 }
@@ -588,7 +595,7 @@
         format.nPortIndex = kPortIndexOutput;
         format.nIndex = 0;
 
-        status_t err = mOMX->get_parameter(
+        status_t err = mOMX->getParameter(
                 mNode, OMX_IndexParamVideoPortFormat,
                 &format, sizeof(format));
         CHECK_EQ(err, OK);
@@ -601,7 +608,7 @@
                || format.eColorFormat == OMX_COLOR_FormatCbYCrY
                || format.eColorFormat == OMX_QCOM_COLOR_FormatYVU420SemiPlanar);
 
-        err = mOMX->set_parameter(
+        err = mOMX->setParameter(
                 mNode, OMX_IndexParamVideoPortFormat,
                 &format, sizeof(format));
         CHECK_EQ(err, OK);
@@ -614,7 +621,7 @@
 
     OMX_VIDEO_PORTDEFINITIONTYPE *video_def = &def.format.video;
 
-    status_t err = mOMX->get_parameter(
+    status_t err = mOMX->getParameter(
             mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
 
     CHECK_EQ(err, OK);
@@ -634,7 +641,7 @@
 
     video_def->eColorFormat = OMX_COLOR_FormatUnused;
 
-    err = mOMX->set_parameter(
+    err = mOMX->setParameter(
             mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
     CHECK_EQ(err, OK);
 
@@ -643,7 +650,7 @@
     InitOMXParams(&def);
     def.nPortIndex = kPortIndexOutput;
 
-    err = mOMX->get_parameter(
+    err = mOMX->getParameter(
             mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
     CHECK_EQ(err, OK);
     CHECK_EQ(def.eDomain, OMX_PortDomainVideo);
@@ -656,7 +663,7 @@
     video_def->nFrameWidth = width;
     video_def->nFrameHeight = height;
 
-    err = mOMX->set_parameter(
+    err = mOMX->setParameter(
             mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
     CHECK_EQ(err, OK);
 }
@@ -684,9 +691,6 @@
     mPortStatus[kPortIndexInput] = ENABLED;
     mPortStatus[kPortIndexOutput] = ENABLED;
 
-    mObserver = new OMXCodecObserver(this);
-    mOMX->observe_node(mNode, mObserver);
-
     setComponentRole();
 }
 
@@ -744,7 +748,7 @@
 
         roleParams.cRole[OMX_MAX_STRINGNAME_SIZE - 1] = '\0';
 
-        status_t err = omx->set_parameter(
+        status_t err = omx->setParameter(
                 node, OMX_IndexParamStandardComponentRole,
                 &roleParams, sizeof(roleParams));
 
@@ -761,10 +765,7 @@
 OMXCodec::~OMXCodec() {
     CHECK(mState == LOADED || mState == ERROR);
 
-    status_t err = mOMX->observe_node(mNode, NULL);
-    CHECK_EQ(err, OK);
-
-    err = mOMX->free_node(mNode);
+    status_t err = mOMX->freeNode(mNode);
     CHECK_EQ(err, OK);
 
     mNode = NULL;
@@ -786,7 +787,7 @@
 
     status_t err;
     if (!(mQuirks & kRequiresLoadedToIdleAfterAllocation)) {
-        err = mOMX->send_command(mNode, OMX_CommandStateSet, OMX_StateIdle);
+        err = mOMX->sendCommand(mNode, OMX_CommandStateSet, OMX_StateIdle);
         CHECK_EQ(err, OK);
         setState(LOADED_TO_IDLE);
     }
@@ -795,7 +796,7 @@
     CHECK_EQ(err, OK);
 
     if (mQuirks & kRequiresLoadedToIdleAfterAllocation) {
-        err = mOMX->send_command(mNode, OMX_CommandStateSet, OMX_StateIdle);
+        err = mOMX->sendCommand(mNode, OMX_CommandStateSet, OMX_StateIdle);
         CHECK_EQ(err, OK);
 
         setState(LOADED_TO_IDLE);
@@ -832,7 +833,7 @@
     InitOMXParams(&def);
     def.nPortIndex = portIndex;
 
-    status_t err = mOMX->get_parameter(
+    status_t err = mOMX->getParameter(
             mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
 
     if (err != OK) {
@@ -849,14 +850,14 @@
         IOMX::buffer_id buffer;
         if (portIndex == kPortIndexInput
                 && (mQuirks & kRequiresAllocateBufferOnInputPorts)) {
-            err = mOMX->allocate_buffer_with_backup(
+            err = mOMX->allocateBufferWithBackup(
                     mNode, portIndex, mem, &buffer);
         } else if (portIndex == kPortIndexOutput
                 && (mQuirks & kRequiresAllocateBufferOnOutputPorts)) {
-            err = mOMX->allocate_buffer_with_backup(
+            err = mOMX->allocateBufferWithBackup(
                     mNode, portIndex, mem, &buffer);
         } else {
-            err = mOMX->use_buffer(mNode, portIndex, mem, &buffer);
+            err = mOMX->useBuffer(mNode, portIndex, mem, &buffer);
         }
 
         if (err != OK) {
@@ -923,7 +924,7 @@
                 CODEC_LOGV("Port is disabled, freeing buffer %p", buffer);
 
                 status_t err =
-                    mOMX->free_buffer(mNode, kPortIndexInput, buffer);
+                    mOMX->freeBuffer(mNode, kPortIndexInput, buffer);
                 CHECK_EQ(err, OK);
 
                 buffers->removeAt(i);
@@ -969,7 +970,7 @@
                 CODEC_LOGV("Port is disabled, freeing buffer %p", buffer);
 
                 status_t err =
-                    mOMX->free_buffer(mNode, kPortIndexOutput, buffer);
+                    mOMX->freeBuffer(mNode, kPortIndexOutput, buffer);
                 CHECK_EQ(err, OK);
 
                 buffers->removeAt(i);
@@ -1139,7 +1140,7 @@
                     mPortStatus[kPortIndexOutput] = SHUTTING_DOWN;
 
                     status_t err =
-                        mOMX->send_command(mNode, OMX_CommandStateSet, OMX_StateIdle);
+                        mOMX->sendCommand(mNode, OMX_CommandStateSet, OMX_StateIdle);
                     CHECK_EQ(err, OK);
                 }
             } else {
@@ -1179,7 +1180,7 @@
         {
             CODEC_LOGV("Now Idle.");
             if (mState == LOADED_TO_IDLE) {
-                status_t err = mOMX->send_command(
+                status_t err = mOMX->sendCommand(
                         mNode, OMX_CommandStateSet, OMX_StateExecuting);
 
                 CHECK_EQ(err, OK);
@@ -1196,7 +1197,7 @@
                     countBuffersWeOwn(mPortBuffers[kPortIndexOutput]),
                     mPortBuffers[kPortIndexOutput].size());
 
-                status_t err = mOMX->send_command(
+                status_t err = mOMX->sendCommand(
                         mNode, OMX_CommandStateSet, OMX_StateLoaded);
 
                 CHECK_EQ(err, OK);
@@ -1279,7 +1280,7 @@
         CODEC_LOGV("freeing buffer %p on port %ld", info->mBuffer, portIndex);
 
         status_t err =
-            mOMX->free_buffer(mNode, portIndex, info->mBuffer);
+            mOMX->freeBuffer(mNode, portIndex, info->mBuffer);
 
         if (err != OK) {
             stickyErr = err;
@@ -1339,7 +1340,7 @@
     }
 
     status_t err =
-        mOMX->send_command(mNode, OMX_CommandFlush, portIndex);
+        mOMX->sendCommand(mNode, OMX_CommandFlush, portIndex);
     CHECK_EQ(err, OK);
 
     return true;
@@ -1352,7 +1353,7 @@
     mPortStatus[portIndex] = DISABLING;
 
     status_t err =
-        mOMX->send_command(mNode, OMX_CommandPortDisable, portIndex);
+        mOMX->sendCommand(mNode, OMX_CommandPortDisable, portIndex);
     CHECK_EQ(err, OK);
 
     freeBuffersOnPort(portIndex, true);
@@ -1365,7 +1366,7 @@
     mPortStatus[portIndex] = ENABLING;
 
     status_t err =
-        mOMX->send_command(mNode, OMX_CommandPortEnable, portIndex);
+        mOMX->sendCommand(mNode, OMX_CommandPortEnable, portIndex);
     CHECK_EQ(err, OK);
 }
 
@@ -1417,10 +1418,11 @@
             memcpy(info->mMem->pointer(), specific->mData, specific->mSize);
         }
 
-        mOMX->empty_buffer(
+        status_t err = mOMX->emptyBuffer(
                 mNode, info->mBuffer, 0, size,
                 OMX_BUFFERFLAG_ENDOFFRAME | OMX_BUFFERFLAG_CODECCONFIG,
                 0);
+        CHECK_EQ(err, OK);
 
         info->mOwnedByComponent = true;
 
@@ -1473,16 +1475,21 @@
         }
     }
 
-    mOMX->empty_buffer(
-            mNode, info->mBuffer, 0, srcLength,
-            flags, timestamp);
-
-    info->mOwnedByComponent = true;
-
     if (srcBuffer != NULL) {
         srcBuffer->release();
         srcBuffer = NULL;
     }
+
+    err = mOMX->emptyBuffer(
+            mNode, info->mBuffer, 0, srcLength,
+            flags, timestamp);
+
+    if (err != OK) {
+        setState(ERROR);
+        return;
+    }
+
+    info->mOwnedByComponent = true;
 }
 
 void OMXCodec::fillOutputBuffer(BufferInfo *info) {
@@ -1495,7 +1502,8 @@
     }
 
     CODEC_LOGV("Calling fill_buffer on buffer %p", info->mBuffer);
-    mOMX->fill_buffer(mNode, info->mBuffer);
+    status_t err = mOMX->fillBuffer(mNode, info->mBuffer);
+    CHECK_EQ(err, OK);
 
     info->mOwnedByComponent = true;
 }
@@ -1539,7 +1547,7 @@
     InitOMXParams(&pcmParams);
     pcmParams.nPortIndex = portIndex;
 
-    status_t err = mOMX->get_parameter(
+    status_t err = mOMX->getParameter(
             mNode, OMX_IndexParamAudioPcm, &pcmParams, sizeof(pcmParams));
 
     CHECK_EQ(err, OK);
@@ -1560,7 +1568,7 @@
         pcmParams.eChannelMapping[1] = OMX_AUDIO_ChannelRF;
     }
 
-    err = mOMX->set_parameter(
+    err = mOMX->setParameter(
             mNode, OMX_IndexParamAudioPcm, &pcmParams, sizeof(pcmParams));
 
     CHECK_EQ(err, OK);
@@ -1573,14 +1581,14 @@
         def.nPortIndex = kPortIndexInput;
 
         status_t err =
-            mOMX->get_parameter(mNode, OMX_IndexParamAudioAmr, &def, sizeof(def));
+            mOMX->getParameter(mNode, OMX_IndexParamAudioAmr, &def, sizeof(def));
 
         CHECK_EQ(err, OK);
 
         def.eAMRFrameFormat = OMX_AUDIO_AMRFrameFormatFSF;
         def.eAMRBandMode = OMX_AUDIO_AMRBandModeNB0;
 
-        err = mOMX->set_parameter(mNode, OMX_IndexParamAudioAmr, &def, sizeof(def));
+        err = mOMX->setParameter(mNode, OMX_IndexParamAudioAmr, &def, sizeof(def));
         CHECK_EQ(err, OK);
     }
 
@@ -1604,14 +1612,14 @@
         def.nPortIndex = kPortIndexInput;
 
         status_t err =
-            mOMX->get_parameter(mNode, OMX_IndexParamAudioAmr, &def, sizeof(def));
+            mOMX->getParameter(mNode, OMX_IndexParamAudioAmr, &def, sizeof(def));
 
         CHECK_EQ(err, OK);
 
         def.eAMRFrameFormat = OMX_AUDIO_AMRFrameFormatFSF;
         def.eAMRBandMode = OMX_AUDIO_AMRBandModeWB0;
 
-        err = mOMX->set_parameter(mNode, OMX_IndexParamAudioAmr, &def, sizeof(def));
+        err = mOMX->setParameter(mNode, OMX_IndexParamAudioAmr, &def, sizeof(def));
         CHECK_EQ(err, OK);
     }
 
@@ -1636,7 +1644,7 @@
         InitOMXParams(&profile);
         profile.nPortIndex = kPortIndexInput;
 
-        status_t err = mOMX->get_parameter(
+        status_t err = mOMX->getParameter(
                 mNode, OMX_IndexParamAudioAac, &profile, sizeof(profile));
         CHECK_EQ(err, OK);
 
@@ -1644,7 +1652,7 @@
         profile.nSampleRate = sampleRate;
         profile.eAACStreamFormat = OMX_AUDIO_AACStreamFormatMP4ADTS;
 
-        err = mOMX->set_parameter(
+        err = mOMX->setParameter(
                 mNode, OMX_IndexParamAudioAac, &profile, sizeof(profile));
         CHECK_EQ(err, OK);
     }
@@ -1668,7 +1676,7 @@
     InitOMXParams(&def);
     def.nPortIndex = kPortIndexOutput;
 
-    status_t err = mOMX->get_parameter(
+    status_t err = mOMX->getParameter(
             mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
     CHECK_EQ(err, OK);
 
@@ -1717,7 +1725,7 @@
 
     def.nBufferCountActual = def.nBufferCountMin;
 
-    err = mOMX->set_parameter(
+    err = mOMX->setParameter(
             mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
     CHECK_EQ(err, OK);
 }
@@ -1728,7 +1736,7 @@
     InitOMXParams(&def);
     def.nPortIndex = kPortIndexInput;
 
-    status_t err = mOMX->get_parameter(
+    status_t err = mOMX->getParameter(
             mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
     CHECK_EQ(err, OK);
 
@@ -1742,7 +1750,7 @@
     def.nBufferSize = compressedSize;
     def.nBufferCountActual = def.nBufferCountMin;
 
-    err = mOMX->set_parameter(
+    err = mOMX->setParameter(
             mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
     CHECK_EQ(err, OK);
 }
@@ -1832,7 +1840,7 @@
                 mPortStatus[kPortIndexOutput] = SHUTTING_DOWN;
 
                 status_t err =
-                    mOMX->send_command(mNode, OMX_CommandStateSet, OMX_StateIdle);
+                    mOMX->sendCommand(mNode, OMX_CommandStateSet, OMX_StateIdle);
                 CHECK_EQ(err, OK);
             }
 
@@ -1869,9 +1877,24 @@
         return UNKNOWN_ERROR;
     }
 
+    bool seeking = false;
+    int64_t seekTimeUs;
+    if (options && options->getSeekTo(&seekTimeUs)) {
+        seeking = true;
+    }
+
     if (mInitialBufferSubmit) {
         mInitialBufferSubmit = false;
 
+        if (seeking) {
+            CHECK(seekTimeUs >= 0);
+            mSeekTimeUs = seekTimeUs;
+
+            // There's no reason to trigger the code below, there's
+            // nothing to flush yet.
+            seeking = false;
+        }
+
         drainInputBuffers();
 
         if (mState == EXECUTING) {
@@ -1881,8 +1904,7 @@
         }
     }
 
-    int64_t seekTimeUs;
-    if (options && options->getSeekTo(&seekTimeUs)) {
+    if (seeking) {
         CODEC_LOGV("seeking to %lld us (%.2f secs)", seekTimeUs, seekTimeUs / 1E6);
 
         mSignalledEOS = false;
@@ -2164,7 +2186,7 @@
     InitOMXParams(&def);
     def.nPortIndex = portIndex;
 
-    status_t err = mOMX->get_parameter(
+    status_t err = mOMX->getParameter(
             mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
     CHECK_EQ(err, OK);
 
@@ -2230,7 +2252,7 @@
                 InitOMXParams(&params);
                 params.nPortIndex = portIndex;
 
-                err = mOMX->get_parameter(
+                err = mOMX->getParameter(
                         mNode, OMX_IndexParamAudioPcm, &params, sizeof(params));
                 CHECK_EQ(err, OK);
 
@@ -2249,7 +2271,7 @@
                 InitOMXParams(&amr);
                 amr.nPortIndex = portIndex;
 
-                err = mOMX->get_parameter(
+                err = mOMX->getParameter(
                         mNode, OMX_IndexParamAudioAmr, &amr, sizeof(amr));
                 CHECK_EQ(err, OK);
 
@@ -2281,7 +2303,7 @@
     InitOMXParams(&def);
     def.nPortIndex = kPortIndexOutput;
 
-    status_t err = mOMX->get_parameter(
+    status_t err = mOMX->getParameter(
             mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
     CHECK_EQ(err, OK);
 
@@ -2307,7 +2329,7 @@
                 InitOMXParams(&params);
                 params.nPortIndex = kPortIndexOutput;
 
-                err = mOMX->get_parameter(
+                err = mOMX->getParameter(
                         mNode, OMX_IndexParamAudioPcm, &params, sizeof(params));
                 CHECK_EQ(err, OK);
 
@@ -2339,7 +2361,7 @@
                 InitOMXParams(&amr);
                 amr.nPortIndex = kPortIndexOutput;
 
-                err = mOMX->get_parameter(
+                err = mOMX->getParameter(
                         mNode, OMX_IndexParamAudioAmr, &amr, sizeof(amr));
                 CHECK_EQ(err, OK);
 
@@ -2436,8 +2458,9 @@
             return OK;
         }
 
+        sp<OMXCodecObserver> observer = new OMXCodecObserver;
         IOMX::node_id node;
-        status_t err = omx->allocate_node(componentName, &node);
+        status_t err = omx->allocateNode(componentName, observer, &node);
 
         if (err != OK) {
             continue;
@@ -2455,7 +2478,7 @@
         param.nPortIndex = queryDecoders ? 0 : 1;
 
         for (param.nProfileIndex = 0;; ++param.nProfileIndex) {
-            err = omx->get_parameter(
+            err = omx->getParameter(
                     node, OMX_IndexParamVideoProfileLevelQuerySupported,
                     &param, sizeof(param));
 
@@ -2470,7 +2493,7 @@
             caps->mProfileLevels.push(profileLevel);
         }
 
-        CHECK_EQ(omx->free_node(node), OK);
+        CHECK_EQ(omx->freeNode(node), OK);
     }
 }
 
diff --git a/media/libstagefright/ShoutcastSource.cpp b/media/libstagefright/ShoutcastSource.cpp
index 8e8f4fa..346b5aa 100644
--- a/media/libstagefright/ShoutcastSource.cpp
+++ b/media/libstagefright/ShoutcastSource.cpp
@@ -23,7 +23,7 @@
 #include <media/stagefright/MediaDefs.h>
 #include <media/stagefright/MetaData.h>
 #include <media/stagefright/ShoutcastSource.h>
-#include <media/stagefright/string.h>
+#include <media/stagefright/stagefright_string.h>
 
 namespace android {
 
diff --git a/media/libstagefright/omx/OMX.h b/media/libstagefright/include/OMX.h
similarity index 61%
rename from media/libstagefright/omx/OMX.h
rename to media/libstagefright/include/OMX.h
index 6325f79..d0bd61e 100644
--- a/media/libstagefright/omx/OMX.h
+++ b/media/libstagefright/include/OMX.h
@@ -19,66 +19,67 @@
 
 #include <media/IOMX.h>
 #include <utils/threads.h>
+#include <utils/KeyedVector.h>
 
 namespace android {
 
-class NodeMeta;
+class OMXNodeInstance;
 
-class OMX : public BnOMX {
+class OMX : public BnOMX,
+            public IBinder::DeathRecipient {
 public:
     OMX();
 
-    virtual status_t list_nodes(List<String8> *list);
+    virtual status_t listNodes(List<String8> *list);
 
-    virtual status_t allocate_node(const char *name, node_id *node);
-    virtual status_t free_node(node_id node);
+    virtual status_t allocateNode(
+            const char *name, const sp<IOMXObserver> &observer, node_id *node);
 
-    virtual status_t send_command(
+    virtual status_t freeNode(node_id node);
+
+    virtual status_t sendCommand(
             node_id node, OMX_COMMANDTYPE cmd, OMX_S32 param);
 
-    virtual status_t get_parameter(
+    virtual status_t getParameter(
             node_id node, OMX_INDEXTYPE index,
             void *params, size_t size);
 
-    virtual status_t set_parameter(
+    virtual status_t setParameter(
             node_id node, OMX_INDEXTYPE index,
             const void *params, size_t size);
 
-    virtual status_t get_config(
+    virtual status_t getConfig(
             node_id node, OMX_INDEXTYPE index,
             void *params, size_t size);
 
-    virtual status_t set_config(
+    virtual status_t setConfig(
             node_id node, OMX_INDEXTYPE index,
             const void *params, size_t size);
 
-    virtual status_t use_buffer(
+    virtual status_t useBuffer(
             node_id node, OMX_U32 port_index, const sp<IMemory> &params,
             buffer_id *buffer);
 
-    virtual status_t allocate_buffer(
+    virtual status_t allocateBuffer(
             node_id node, OMX_U32 port_index, size_t size,
             buffer_id *buffer);
 
-    virtual status_t allocate_buffer_with_backup(
+    virtual status_t allocateBufferWithBackup(
             node_id node, OMX_U32 port_index, const sp<IMemory> &params,
             buffer_id *buffer);
 
-    virtual status_t free_buffer(
+    virtual status_t freeBuffer(
             node_id node, OMX_U32 port_index, buffer_id buffer);
 
-    virtual status_t observe_node(
-            node_id node, const sp<IOMXObserver> &observer);
+    virtual status_t fillBuffer(node_id node, buffer_id buffer);
 
-    virtual void fill_buffer(node_id node, buffer_id buffer);
-
-    virtual void empty_buffer(
+    virtual status_t emptyBuffer(
             node_id node,
             buffer_id buffer,
             OMX_U32 range_offset, OMX_U32 range_length,
             OMX_U32 flags, OMX_TICKS timestamp);
 
-    virtual status_t get_extension_index(
+    virtual status_t getExtensionIndex(
             node_id node,
             const char *parameter_name,
             OMX_INDEXTYPE *index);
@@ -90,44 +91,38 @@
             size_t encodedWidth, size_t encodedHeight,
             size_t displayWidth, size_t displayHeight);
 
-private:
-    static OMX_CALLBACKTYPE kCallbacks;
+    virtual void binderDied(const wp<IBinder> &the_late_who);
 
+    OMX_ERRORTYPE OnEvent(
+            node_id node,
+            OMX_IN OMX_EVENTTYPE eEvent,
+            OMX_IN OMX_U32 nData1,
+            OMX_IN OMX_U32 nData2,
+            OMX_IN OMX_PTR pEventData);
+
+    OMX_ERRORTYPE OnEmptyBufferDone(
+            node_id node, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer);
+
+    OMX_ERRORTYPE OnFillBufferDone(
+            node_id node, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer);
+
+    void invalidateNodeID(node_id node);
+
+private:
     Mutex mLock;
 
     struct CallbackDispatcher;
     sp<CallbackDispatcher> mDispatcher;
 
-    static OMX_ERRORTYPE OnEvent(
-            OMX_IN OMX_HANDLETYPE hComponent,
-            OMX_IN OMX_PTR pAppData,
-            OMX_IN OMX_EVENTTYPE eEvent,
-            OMX_IN OMX_U32 nData1,
-            OMX_IN OMX_U32 nData2,
-            OMX_IN OMX_PTR pEventData);
+    int32_t mNodeCounter;
 
-    static OMX_ERRORTYPE OnEmptyBufferDone(
-            OMX_IN OMX_HANDLETYPE hComponent,
-            OMX_IN OMX_PTR pAppData,
-            OMX_IN OMX_BUFFERHEADERTYPE* pBuffer);
+    KeyedVector<wp<IBinder>, OMXNodeInstance *> mLiveNodes;
+    KeyedVector<node_id, OMXNodeInstance *> mNodeIDToInstance;
 
-    static OMX_ERRORTYPE OnFillBufferDone(
-            OMX_IN OMX_HANDLETYPE hComponent,
-            OMX_IN OMX_PTR pAppData,
-            OMX_IN OMX_BUFFERHEADERTYPE* pBuffer);
+    node_id makeNodeID(OMXNodeInstance *instance);
+    OMXNodeInstance *findInstance(node_id node);
 
-    OMX_ERRORTYPE OnEvent(
-            NodeMeta *meta,
-            OMX_IN OMX_EVENTTYPE eEvent,
-            OMX_IN OMX_U32 nData1,
-            OMX_IN OMX_U32 nData2,
-            OMX_IN OMX_PTR pEventData);
-        
-    OMX_ERRORTYPE OnEmptyBufferDone(
-            NodeMeta *meta, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer);
-
-    OMX_ERRORTYPE OnFillBufferDone(
-            NodeMeta *meta, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer);
+    void invalidateNodeID_l(node_id node);
 
     OMX(const OMX &);
     OMX &operator=(const OMX &);
diff --git a/media/libstagefright/include/OMXNodeInstance.h b/media/libstagefright/include/OMXNodeInstance.h
new file mode 100644
index 0000000..09a8816
--- /dev/null
+++ b/media/libstagefright/include/OMXNodeInstance.h
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2009 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.
+ */
+
+#ifndef OMX_NODE_INSTANCE_H_
+
+#define OMX_NODE_INSTANCE_H_
+
+#include "OMX.h"
+
+#include <utils/RefBase.h>
+#include <utils/threads.h>
+
+namespace android {
+
+class IOMXObserver;
+
+struct OMXNodeInstance {
+    OMXNodeInstance(
+            OMX *owner, const sp<IOMXObserver> &observer);
+
+    void setHandle(OMX::node_id node_id, OMX_HANDLETYPE handle);
+
+    OMX *owner();
+    sp<IOMXObserver> observer();
+    OMX::node_id nodeID();
+
+    status_t freeNode();
+
+    status_t sendCommand(OMX_COMMANDTYPE cmd, OMX_S32 param);
+    status_t getParameter(OMX_INDEXTYPE index, void *params, size_t size);
+
+    status_t setParameter(
+            OMX_INDEXTYPE index, const void *params, size_t size);
+
+    status_t getConfig(OMX_INDEXTYPE index, void *params, size_t size);
+    status_t setConfig(OMX_INDEXTYPE index, const void *params, size_t size);
+
+    status_t useBuffer(
+            OMX_U32 portIndex, const sp<IMemory> &params,
+            OMX::buffer_id *buffer);
+
+    status_t allocateBuffer(
+            OMX_U32 portIndex, size_t size, OMX::buffer_id *buffer);
+
+    status_t allocateBufferWithBackup(
+            OMX_U32 portIndex, const sp<IMemory> &params,
+            OMX::buffer_id *buffer);
+
+    status_t freeBuffer(OMX_U32 portIndex, OMX::buffer_id buffer);
+
+    status_t fillBuffer(OMX::buffer_id buffer);
+
+    status_t emptyBuffer(
+            OMX::buffer_id buffer,
+            OMX_U32 rangeOffset, OMX_U32 rangeLength,
+            OMX_U32 flags, OMX_TICKS timestamp);
+
+    status_t getExtensionIndex(
+            const char *parameterName, OMX_INDEXTYPE *index);
+
+    void onMessage(const omx_message &msg);
+    void onObserverDied();
+    void onGetHandleFailed();
+
+    static OMX_CALLBACKTYPE kCallbacks;
+
+private:
+    Mutex mLock;
+
+    OMX *mOwner;
+    OMX::node_id mNodeID;
+    OMX_HANDLETYPE mHandle;
+    sp<IOMXObserver> mObserver;
+
+    struct ActiveBuffer {
+        OMX_U32 mPortIndex;
+        OMX::buffer_id mID;
+    };
+    Vector<ActiveBuffer> mActiveBuffers;
+
+    ~OMXNodeInstance();
+
+    void addActiveBuffer(OMX_U32 portIndex, OMX::buffer_id id);
+    void removeActiveBuffer(OMX_U32 portIndex, OMX::buffer_id id);
+    void freeActiveBuffers();
+
+    static OMX_ERRORTYPE OnEvent(
+            OMX_IN OMX_HANDLETYPE hComponent,
+            OMX_IN OMX_PTR pAppData,
+            OMX_IN OMX_EVENTTYPE eEvent,
+            OMX_IN OMX_U32 nData1,
+            OMX_IN OMX_U32 nData2,
+            OMX_IN OMX_PTR pEventData);
+
+    static OMX_ERRORTYPE OnEmptyBufferDone(
+            OMX_IN OMX_HANDLETYPE hComponent,
+            OMX_IN OMX_PTR pAppData,
+            OMX_IN OMX_BUFFERHEADERTYPE *pBuffer);
+
+    static OMX_ERRORTYPE OnFillBufferDone(
+            OMX_IN OMX_HANDLETYPE hComponent,
+            OMX_IN OMX_PTR pAppData,
+            OMX_IN OMX_BUFFERHEADERTYPE *pBuffer);
+
+    OMXNodeInstance(const OMXNodeInstance &);
+    OMXNodeInstance &operator=(const OMXNodeInstance &);
+};
+
+}  // namespace android
+
+#endif  // OMX_NODE_INSTANCE_H_
+
diff --git a/media/libstagefright/omx/Android.mk b/media/libstagefright/omx/Android.mk
index 4cadccd..20fb4f3 100644
--- a/media/libstagefright/omx/Android.mk
+++ b/media/libstagefright/omx/Android.mk
@@ -11,6 +11,7 @@
 
 LOCAL_SRC_FILES:=                 \
 	OMX.cpp                   \
+        OMXNodeInstance.cpp       \
         QComHardwareRenderer.cpp  \
         SoftwareRenderer.cpp      \
         TIHardwareRenderer.cpp
diff --git a/media/libstagefright/omx/OMX.cpp b/media/libstagefright/omx/OMX.cpp
index 8b83dd6..9ac0d44 100644
--- a/media/libstagefright/omx/OMX.cpp
+++ b/media/libstagefright/omx/OMX.cpp
@@ -18,13 +18,13 @@
 #define LOG_TAG "OMX"
 #include <utils/Log.h>
 
-#include <sys/socket.h>
-
-#include "OMX.h"
+#include "../include/OMX.h"
 #include "OMXRenderer.h"
 
 #include "pv_omxcore.h"
 
+#include "../include/OMXNodeInstance.h"
+
 #include <binder/IMemory.h>
 #include <media/stagefright/MediaDebug.h>
 #include <media/stagefright/QComHardwareRenderer.h>
@@ -36,47 +36,10 @@
 
 namespace android {
 
-class NodeMeta {
-public:
-    NodeMeta(OMX *owner)
-        : mOwner(owner),
-          mHandle(NULL) {
-    }
-
-    OMX *owner() const {
-        return mOwner;
-    }
-
-    void setHandle(OMX_HANDLETYPE handle) {
-        CHECK_EQ(mHandle, NULL);
-        mHandle = handle;
-    }
-
-    OMX_HANDLETYPE handle() const {
-        return mHandle;
-    }
-
-    void setObserver(const sp<IOMXObserver> &observer) {
-        mObserver = observer;
-    }
-
-    sp<IOMXObserver> observer() {
-        return mObserver;
-    }
-
-private:
-    OMX *mOwner;
-    OMX_HANDLETYPE mHandle;
-    sp<IOMXObserver> mObserver;
-
-    NodeMeta(const NodeMeta &);
-    NodeMeta &operator=(const NodeMeta &);
-};
-
 ////////////////////////////////////////////////////////////////////////////////
 
 struct OMX::CallbackDispatcher : public RefBase {
-    CallbackDispatcher();
+    CallbackDispatcher(OMX *owner);
 
     void post(const omx_message &msg);
 
@@ -85,6 +48,8 @@
 
 private:
     Mutex mLock;
+
+    OMX *mOwner;
     bool mDone;
     Condition mQueueChanged;
     List<omx_message> mQueue;
@@ -100,8 +65,9 @@
     CallbackDispatcher &operator=(const CallbackDispatcher &);
 };
 
-OMX::CallbackDispatcher::CallbackDispatcher()
-    : mDone(false) {
+OMX::CallbackDispatcher::CallbackDispatcher(OMX *owner)
+    : mOwner(owner),
+      mDone(false) {
     pthread_attr_t attr;
     pthread_attr_init(&attr);
     pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
@@ -130,12 +96,12 @@
 }
 
 void OMX::CallbackDispatcher::dispatch(const omx_message &msg) {
-    NodeMeta *meta = static_cast<NodeMeta *>(msg.node);
-
-    sp<IOMXObserver> observer = meta->observer();
-    if (observer.get() != NULL) {
-        observer->on_message(msg);
+    OMXNodeInstance *instance = mOwner->findInstance(msg.node);
+    if (instance == NULL) {
+        LOGV("Would have dispatched a message to a node that's already gone.");
+        return;
     }
+    instance->onMessage(msg);
 }
 
 // static
@@ -213,46 +179,30 @@
     BufferMeta &operator=(const BufferMeta &);
 };
 
-// static
-OMX_CALLBACKTYPE OMX::kCallbacks = {
-    &OnEvent, &OnEmptyBufferDone, &OnFillBufferDone
-};
-
-// static
-OMX_ERRORTYPE OMX::OnEvent(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_PTR pAppData,
-        OMX_IN OMX_EVENTTYPE eEvent,
-        OMX_IN OMX_U32 nData1,
-        OMX_IN OMX_U32 nData2,
-        OMX_IN OMX_PTR pEventData) {
-    NodeMeta *meta = static_cast<NodeMeta *>(pAppData);
-    return meta->owner()->OnEvent(meta, eEvent, nData1, nData2, pEventData);
-}
-
-// static
-OMX_ERRORTYPE OMX::OnEmptyBufferDone(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_PTR pAppData,
-        OMX_IN OMX_BUFFERHEADERTYPE* pBuffer) {
-    NodeMeta *meta = static_cast<NodeMeta *>(pAppData);
-    return meta->owner()->OnEmptyBufferDone(meta, pBuffer);
-}
-
-// static
-OMX_ERRORTYPE OMX::OnFillBufferDone(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_PTR pAppData,
-        OMX_IN OMX_BUFFERHEADERTYPE* pBuffer) {
-    NodeMeta *meta = static_cast<NodeMeta *>(pAppData);
-    return meta->owner()->OnFillBufferDone(meta, pBuffer);
-}
-
 OMX::OMX()
-    : mDispatcher(new CallbackDispatcher) {
+    : mDispatcher(new CallbackDispatcher(this)),
+      mNodeCounter(0) {
 }
 
-status_t OMX::list_nodes(List<String8> *list) {
+void OMX::binderDied(const wp<IBinder> &the_late_who) {
+    OMXNodeInstance *instance;
+
+    {
+        Mutex::Autolock autoLock(mLock);
+
+        ssize_t index = mLiveNodes.indexOfKey(the_late_who);
+        CHECK(index >= 0);
+
+        instance = mLiveNodes.editValueAt(index);
+        mLiveNodes.removeItemsAt(index);
+
+        invalidateNodeID_l(instance->nodeID());
+    }
+
+    instance->onObserverDied();
+}
+
+status_t OMX::listNodes(List<String8> *list) {
     OMX_MasterInit();  // XXX Put this somewhere else.
 
     list->clear();
@@ -269,204 +219,132 @@
     return OK;
 }
 
-status_t OMX::allocate_node(const char *name, node_id *node) {
+status_t OMX::allocateNode(
+        const char *name, const sp<IOMXObserver> &observer, node_id *node) {
     Mutex::Autolock autoLock(mLock);
 
     *node = 0;
 
     OMX_MasterInit();  // XXX Put this somewhere else.
 
-    NodeMeta *meta = new NodeMeta(this);
+    OMXNodeInstance *instance = new OMXNodeInstance(this, observer);
 
     OMX_HANDLETYPE handle;
     OMX_ERRORTYPE err = OMX_MasterGetHandle(
-            &handle, const_cast<char *>(name), meta, &kCallbacks);
+            &handle, const_cast<char *>(name), instance,
+            &OMXNodeInstance::kCallbacks);
 
     if (err != OMX_ErrorNone) {
         LOGE("FAILED to allocate omx component '%s'", name);
 
-        delete meta;
-        meta = NULL;
+        instance->onGetHandleFailed();
 
         return UNKNOWN_ERROR;
     }
 
-    meta->setHandle(handle);
+    *node = makeNodeID(instance);
 
-    *node = meta;
+    instance->setHandle(*node, handle);
+
+    mLiveNodes.add(observer->asBinder(), instance);
+    observer->asBinder()->linkToDeath(this);
 
     return OK;
 }
 
-status_t OMX::free_node(node_id node) {
-    Mutex::Autolock autoLock(mLock);
+status_t OMX::freeNode(node_id node) {
+    OMXNodeInstance *instance = findInstance(node);
 
-    NodeMeta *meta = static_cast<NodeMeta *>(node);
+    ssize_t index = mLiveNodes.indexOfKey(instance->observer()->asBinder());
+    CHECK(index >= 0);
+    mLiveNodes.removeItemsAt(index);
+    instance->observer()->asBinder()->unlinkToDeath(this);
 
-    OMX_ERRORTYPE err = OMX_MasterFreeHandle(meta->handle());
-
-    delete meta;
-    meta = NULL;
-
-    return (err != OMX_ErrorNone) ? UNKNOWN_ERROR : OK;
+    return instance->freeNode();
 }
 
-status_t OMX::send_command(
+status_t OMX::sendCommand(
         node_id node, OMX_COMMANDTYPE cmd, OMX_S32 param) {
-    Mutex::Autolock autoLock(mLock);
-
-    NodeMeta *meta = static_cast<NodeMeta *>(node);
-    OMX_ERRORTYPE err = OMX_SendCommand(meta->handle(), cmd, param, NULL);
-
-    return (err != OMX_ErrorNone) ? UNKNOWN_ERROR : OK;
+    return findInstance(node)->sendCommand(cmd, param);
 }
 
-status_t OMX::get_parameter(
+status_t OMX::getParameter(
         node_id node, OMX_INDEXTYPE index,
         void *params, size_t size) {
-    Mutex::Autolock autoLock(mLock);
-
-    NodeMeta *meta = static_cast<NodeMeta *>(node);
-    OMX_ERRORTYPE err = OMX_GetParameter(meta->handle(), index, params);
-
-    return (err != OMX_ErrorNone) ? UNKNOWN_ERROR : OK;
+    return findInstance(node)->getParameter(
+            index, params, size);
 }
 
-status_t OMX::set_parameter(
+status_t OMX::setParameter(
         node_id node, OMX_INDEXTYPE index,
         const void *params, size_t size) {
-    Mutex::Autolock autoLock(mLock);
-
-    NodeMeta *meta = static_cast<NodeMeta *>(node);
-    OMX_ERRORTYPE err =
-        OMX_SetParameter(meta->handle(), index, const_cast<void *>(params));
-
-    return (err != OMX_ErrorNone) ? UNKNOWN_ERROR : OK;
+    return findInstance(node)->setParameter(
+            index, params, size);
 }
 
-status_t OMX::get_config(
+status_t OMX::getConfig(
         node_id node, OMX_INDEXTYPE index,
         void *params, size_t size) {
-    Mutex::Autolock autoLock(mLock);
-
-    NodeMeta *meta = static_cast<NodeMeta *>(node);
-    OMX_ERRORTYPE err = OMX_GetConfig(meta->handle(), index, params);
-
-    return (err != OMX_ErrorNone) ? UNKNOWN_ERROR : OK;
+    return findInstance(node)->getConfig(
+            index, params, size);
 }
 
-status_t OMX::set_config(
+status_t OMX::setConfig(
         node_id node, OMX_INDEXTYPE index,
         const void *params, size_t size) {
-    Mutex::Autolock autoLock(mLock);
-
-    NodeMeta *meta = static_cast<NodeMeta *>(node);
-    OMX_ERRORTYPE err =
-        OMX_SetConfig(meta->handle(), index, const_cast<void *>(params));
-
-    return (err != OMX_ErrorNone) ? UNKNOWN_ERROR : OK;
+    return findInstance(node)->setConfig(
+            index, params, size);
 }
 
-status_t OMX::use_buffer(
+status_t OMX::useBuffer(
         node_id node, OMX_U32 port_index, const sp<IMemory> &params,
         buffer_id *buffer) {
-    Mutex::Autolock autoLock(mLock);
-
-    BufferMeta *buffer_meta = new BufferMeta(this, params);
-
-    OMX_BUFFERHEADERTYPE *header;
-
-    NodeMeta *node_meta = static_cast<NodeMeta *>(node);
-    OMX_ERRORTYPE err =
-        OMX_UseBuffer(node_meta->handle(), &header, port_index, buffer_meta,
-                      params->size(), static_cast<OMX_U8 *>(params->pointer()));
-
-    if (err != OMX_ErrorNone) {
-        LOGE("OMX_UseBuffer failed with error %d (0x%08x)", err, err);
-
-        delete buffer_meta;
-        buffer_meta = NULL;
-
-        *buffer = 0;
-        return UNKNOWN_ERROR;
-    }
-
-    *buffer = header;
-
-    return OK;
+    return findInstance(node)->useBuffer(
+            port_index, params, buffer);
 }
 
-status_t OMX::allocate_buffer(
+status_t OMX::allocateBuffer(
         node_id node, OMX_U32 port_index, size_t size,
         buffer_id *buffer) {
-    Mutex::Autolock autoLock(mLock);
-
-    BufferMeta *buffer_meta = new BufferMeta(this, size);
-
-    OMX_BUFFERHEADERTYPE *header;
-
-    NodeMeta *node_meta = static_cast<NodeMeta *>(node);
-    OMX_ERRORTYPE err =
-        OMX_AllocateBuffer(node_meta->handle(), &header, port_index,
-                           buffer_meta, size);
-
-    if (err != OMX_ErrorNone) {
-        delete buffer_meta;
-        buffer_meta = NULL;
-
-        *buffer = 0;
-        return UNKNOWN_ERROR;
-    }
-
-    *buffer = header;
-
-    return OK;
+    return findInstance(node)->allocateBuffer(
+            port_index, size, buffer);
 }
 
-status_t OMX::allocate_buffer_with_backup(
+status_t OMX::allocateBufferWithBackup(
         node_id node, OMX_U32 port_index, const sp<IMemory> &params,
         buffer_id *buffer) {
-    Mutex::Autolock autoLock(mLock);
-
-    BufferMeta *buffer_meta = new BufferMeta(this, params, true);
-
-    OMX_BUFFERHEADERTYPE *header;
-
-    NodeMeta *node_meta = static_cast<NodeMeta *>(node);
-    OMX_ERRORTYPE err =
-        OMX_AllocateBuffer(
-                node_meta->handle(), &header, port_index, buffer_meta,
-                params->size());
-
-    if (err != OMX_ErrorNone) {
-        delete buffer_meta;
-        buffer_meta = NULL;
-
-        *buffer = 0;
-        return UNKNOWN_ERROR;
-    }
-
-    *buffer = header;
-
-    return OK;
+    return findInstance(node)->allocateBufferWithBackup(
+            port_index, params, buffer);
 }
 
-status_t OMX::free_buffer(node_id node, OMX_U32 port_index, buffer_id buffer) {
-    OMX_BUFFERHEADERTYPE *header = (OMX_BUFFERHEADERTYPE *)buffer;
-    BufferMeta *buffer_meta = static_cast<BufferMeta *>(header->pAppPrivate);
+status_t OMX::freeBuffer(node_id node, OMX_U32 port_index, buffer_id buffer) {
+    return findInstance(node)->freeBuffer(
+            port_index, buffer);
+}
 
-    NodeMeta *node_meta = static_cast<NodeMeta *>(node);
-    OMX_ERRORTYPE err =
-        OMX_FreeBuffer(node_meta->handle(), port_index, header);
+status_t OMX::fillBuffer(node_id node, buffer_id buffer) {
+    return findInstance(node)->fillBuffer(buffer);
+}
 
-    delete buffer_meta;
-    buffer_meta = NULL;
+status_t OMX::emptyBuffer(
+        node_id node,
+        buffer_id buffer,
+        OMX_U32 range_offset, OMX_U32 range_length,
+        OMX_U32 flags, OMX_TICKS timestamp) {
+    return findInstance(node)->emptyBuffer(
+            buffer, range_offset, range_length, flags, timestamp);
+}
 
-    return (err != OMX_ErrorNone) ? UNKNOWN_ERROR : OK;
+status_t OMX::getExtensionIndex(
+        node_id node,
+        const char *parameter_name,
+        OMX_INDEXTYPE *index) {
+    return findInstance(node)->getExtensionIndex(
+            parameter_name, index);
 }
 
 OMX_ERRORTYPE OMX::OnEvent(
-        NodeMeta *meta,
+        node_id node,
         OMX_IN OMX_EVENTTYPE eEvent,
         OMX_IN OMX_U32 nData1,
         OMX_IN OMX_U32 nData2,
@@ -475,7 +353,7 @@
 
     omx_message msg;
     msg.type = omx_message::EVENT;
-    msg.node = meta;
+    msg.node = node;
     msg.u.event_data.event = eEvent;
     msg.u.event_data.data1 = nData1;
     msg.u.event_data.data2 = nData2;
@@ -484,14 +362,14 @@
 
     return OMX_ErrorNone;
 }
-    
+
 OMX_ERRORTYPE OMX::OnEmptyBufferDone(
-        NodeMeta *meta, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer) {
+        node_id node, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer) {
     LOGV("OnEmptyBufferDone buffer=%p", pBuffer);
 
     omx_message msg;
     msg.type = omx_message::EMPTY_BUFFER_DONE;
-    msg.node = meta;
+    msg.node = node;
     msg.u.buffer_data.buffer = pBuffer;
 
     mDispatcher->post(msg);
@@ -500,14 +378,12 @@
 }
 
 OMX_ERRORTYPE OMX::OnFillBufferDone(
-        NodeMeta *meta, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer) {
+        node_id node, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer) {
     LOGV("OnFillBufferDone buffer=%p", pBuffer);
-    BufferMeta *buffer_meta = static_cast<BufferMeta *>(pBuffer->pAppPrivate);
-    buffer_meta->CopyFromOMX(pBuffer);
 
     omx_message msg;
     msg.type = omx_message::FILL_BUFFER_DONE;
-    msg.node = meta;
+    msg.node = node;
     msg.u.extended_buffer_data.buffer = pBuffer;
     msg.u.extended_buffer_data.range_offset = pBuffer->nOffset;
     msg.u.extended_buffer_data.range_length = pBuffer->nFilledLen;
@@ -520,62 +396,31 @@
     return OMX_ErrorNone;
 }
 
-status_t OMX::observe_node(
-        node_id node, const sp<IOMXObserver> &observer) {
-    NodeMeta *node_meta = static_cast<NodeMeta *>(node);
+OMX::node_id OMX::makeNodeID(OMXNodeInstance *instance) {
+    // mLock is already held.
 
-    node_meta->setObserver(observer);
+    node_id node = (node_id)++mNodeCounter;
+    mNodeIDToInstance.add(node, instance);
 
-    return OK;
+    return node;
 }
 
-void OMX::fill_buffer(node_id node, buffer_id buffer) {
-    OMX_BUFFERHEADERTYPE *header = (OMX_BUFFERHEADERTYPE *)buffer;
-    header->nFilledLen = 0;
-    header->nOffset = 0;
-    header->nFlags = 0;
+OMXNodeInstance *OMX::findInstance(node_id node) {
+    Mutex::Autolock autoLock(mLock);
 
-    NodeMeta *node_meta = static_cast<NodeMeta *>(node);
+    ssize_t index = mNodeIDToInstance.indexOfKey(node);
 
-    OMX_ERRORTYPE err =
-        OMX_FillThisBuffer(node_meta->handle(), header);
-    CHECK_EQ(err, OMX_ErrorNone);
+    return index < 0 ? NULL : mNodeIDToInstance.valueAt(index);
 }
 
-void OMX::empty_buffer(
-        node_id node,
-        buffer_id buffer,
-        OMX_U32 range_offset, OMX_U32 range_length,
-        OMX_U32 flags, OMX_TICKS timestamp) {
-    OMX_BUFFERHEADERTYPE *header = (OMX_BUFFERHEADERTYPE *)buffer;
-    header->nFilledLen = range_length;
-    header->nOffset = range_offset;
-    header->nFlags = flags;
-    header->nTimeStamp = timestamp;
-
-    BufferMeta *buffer_meta =
-        static_cast<BufferMeta *>(header->pAppPrivate);
-    buffer_meta->CopyToOMX(header);
-
-    NodeMeta *node_meta = static_cast<NodeMeta *>(node);
-
-    OMX_ERRORTYPE err =
-        OMX_EmptyThisBuffer(node_meta->handle(), header);
-    CHECK_EQ(err, OMX_ErrorNone);
+void OMX::invalidateNodeID(node_id node) {
+    Mutex::Autolock autoLock(mLock);
+    invalidateNodeID_l(node);
 }
 
-status_t OMX::get_extension_index(
-        node_id node,
-        const char *parameter_name,
-        OMX_INDEXTYPE *index) {
-    NodeMeta *node_meta = static_cast<NodeMeta *>(node);
-
-    OMX_ERRORTYPE err =
-        OMX_GetExtensionIndex(
-                node_meta->handle(),
-                const_cast<char *>(parameter_name), index);
-
-    return err == OMX_ErrorNone ? OK : UNKNOWN_ERROR;
+void OMX::invalidateNodeID_l(node_id node) {
+    // mLock is held.
+    mNodeIDToInstance.removeItem(node);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/media/libstagefright/omx/OMXNodeInstance.cpp b/media/libstagefright/omx/OMXNodeInstance.cpp
new file mode 100644
index 0000000..8218918
--- /dev/null
+++ b/media/libstagefright/omx/OMXNodeInstance.cpp
@@ -0,0 +1,461 @@
+/*
+ * Copyright (C) 2009 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.
+ */
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "OMXNodeInstance"
+#include <utils/Log.h>
+
+#include "../include/OMXNodeInstance.h"
+
+#include "pv_omxcore.h"
+
+#include <binder/IMemory.h>
+#include <media/stagefright/MediaDebug.h>
+
+namespace android {
+
+struct BufferMeta {
+    BufferMeta(const sp<IMemory> &mem, bool is_backup = false)
+        : mMem(mem),
+          mIsBackup(is_backup) {
+    }
+
+    BufferMeta(size_t size)
+        : mSize(size),
+          mIsBackup(false) {
+    }
+
+    void CopyFromOMX(const OMX_BUFFERHEADERTYPE *header) {
+        if (!mIsBackup) {
+            return;
+        }
+
+        memcpy((OMX_U8 *)mMem->pointer() + header->nOffset,
+               header->pBuffer + header->nOffset,
+               header->nFilledLen);
+    }
+
+    void CopyToOMX(const OMX_BUFFERHEADERTYPE *header) {
+        if (!mIsBackup) {
+            return;
+        }
+
+        memcpy(header->pBuffer + header->nOffset,
+               (const OMX_U8 *)mMem->pointer() + header->nOffset,
+               header->nFilledLen);
+    }
+
+private:
+    sp<IMemory> mMem;
+    size_t mSize;
+    bool mIsBackup;
+
+    BufferMeta(const BufferMeta &);
+    BufferMeta &operator=(const BufferMeta &);
+};
+
+// static
+OMX_CALLBACKTYPE OMXNodeInstance::kCallbacks = {
+    &OnEvent, &OnEmptyBufferDone, &OnFillBufferDone
+};
+
+OMXNodeInstance::OMXNodeInstance(
+        OMX *owner, const sp<IOMXObserver> &observer)
+    : mOwner(owner),
+      mNodeID(NULL),
+      mHandle(NULL),
+      mObserver(observer) {
+}
+
+OMXNodeInstance::~OMXNodeInstance() {
+    CHECK_EQ(mHandle, NULL);
+}
+
+void OMXNodeInstance::setHandle(OMX::node_id node_id, OMX_HANDLETYPE handle) {
+    CHECK_EQ(mHandle, NULL);
+    mNodeID = node_id;
+    mHandle = handle;
+}
+
+OMX *OMXNodeInstance::owner() {
+    return mOwner;
+}
+
+sp<IOMXObserver> OMXNodeInstance::observer() {
+    return mObserver;
+}
+
+OMX::node_id OMXNodeInstance::nodeID() {
+    return mNodeID;
+}
+
+static status_t StatusFromOMXError(OMX_ERRORTYPE err) {
+    return (err == OMX_ErrorNone) ? OK : UNKNOWN_ERROR;
+}
+
+status_t OMXNodeInstance::freeNode() {
+    // Transition the node from its current state all the way down
+    // to "Loaded".
+    // This ensures that all active buffers are properly freed even
+    // for components that don't do this themselves on a call to
+    // "FreeHandle".
+
+    OMX_STATETYPE state;
+    CHECK_EQ(OMX_GetState(mHandle, &state), OMX_ErrorNone);
+    switch (state) {
+        case OMX_StateExecuting:
+        {
+            LOGV("forcing Executing->Idle");
+            sendCommand(OMX_CommandStateSet, OMX_StateIdle);
+            OMX_ERRORTYPE err;
+            while ((err = OMX_GetState(mHandle, &state)) == OMX_ErrorNone
+                   && state != OMX_StateIdle) {
+                usleep(100000);
+            }
+            CHECK_EQ(err, OMX_ErrorNone);
+
+            // fall through
+        }
+
+        case OMX_StateIdle:
+        {
+            LOGV("forcing Idle->Loaded");
+            sendCommand(OMX_CommandStateSet, OMX_StateLoaded);
+
+            freeActiveBuffers();
+
+            OMX_ERRORTYPE err;
+            while ((err = OMX_GetState(mHandle, &state)) == OMX_ErrorNone
+                   && state != OMX_StateLoaded) {
+                LOGV("waiting for Loaded state...");
+                usleep(100000);
+            }
+            CHECK_EQ(err, OMX_ErrorNone);
+
+            // fall through
+        }
+
+        case OMX_StateLoaded:
+        case OMX_StateInvalid:
+            break;
+
+        default:
+            CHECK(!"should not be here, unknown state.");
+            break;
+    }
+
+    OMX_ERRORTYPE err = OMX_MasterFreeHandle(mHandle);
+    mHandle = NULL;
+
+    if (err != OMX_ErrorNone) {
+        LOGE("FreeHandle FAILED with error 0x%08x.", err);
+    }
+
+    mOwner->invalidateNodeID(mNodeID);
+    mNodeID = NULL;
+
+    LOGV("OMXNodeInstance going away.");
+    delete this;
+
+    return StatusFromOMXError(err);
+}
+
+status_t OMXNodeInstance::sendCommand(
+        OMX_COMMANDTYPE cmd, OMX_S32 param) {
+    Mutex::Autolock autoLock(mLock);
+
+    OMX_ERRORTYPE err = OMX_SendCommand(mHandle, cmd, param, NULL);
+    return StatusFromOMXError(err);
+}
+
+status_t OMXNodeInstance::getParameter(
+        OMX_INDEXTYPE index, void *params, size_t size) {
+    Mutex::Autolock autoLock(mLock);
+
+    OMX_ERRORTYPE err = OMX_GetParameter(mHandle, index, params);
+    return StatusFromOMXError(err);
+}
+
+status_t OMXNodeInstance::setParameter(
+        OMX_INDEXTYPE index, const void *params, size_t size) {
+    Mutex::Autolock autoLock(mLock);
+
+    OMX_ERRORTYPE err = OMX_SetParameter(
+            mHandle, index, const_cast<void *>(params));
+
+    return StatusFromOMXError(err);
+}
+
+status_t OMXNodeInstance::getConfig(
+        OMX_INDEXTYPE index, void *params, size_t size) {
+    Mutex::Autolock autoLock(mLock);
+
+    OMX_ERRORTYPE err = OMX_GetConfig(mHandle, index, params);
+    return StatusFromOMXError(err);
+}
+
+status_t OMXNodeInstance::setConfig(
+        OMX_INDEXTYPE index, const void *params, size_t size) {
+    Mutex::Autolock autoLock(mLock);
+
+    OMX_ERRORTYPE err = OMX_SetConfig(
+            mHandle, index, const_cast<void *>(params));
+
+    return StatusFromOMXError(err);
+}
+
+status_t OMXNodeInstance::useBuffer(
+        OMX_U32 portIndex, const sp<IMemory> &params,
+        OMX::buffer_id *buffer) {
+    Mutex::Autolock autoLock(mLock);
+
+    BufferMeta *buffer_meta = new BufferMeta(params);
+
+    OMX_BUFFERHEADERTYPE *header;
+
+    OMX_ERRORTYPE err = OMX_UseBuffer(
+            mHandle, &header, portIndex, buffer_meta,
+            params->size(), static_cast<OMX_U8 *>(params->pointer()));
+
+    if (err != OMX_ErrorNone) {
+        LOGE("OMX_UseBuffer failed with error %d (0x%08x)", err, err);
+
+        delete buffer_meta;
+        buffer_meta = NULL;
+
+        *buffer = 0;
+
+        return UNKNOWN_ERROR;
+    }
+
+    *buffer = header;
+
+    addActiveBuffer(portIndex, *buffer);
+
+    return OK;
+}
+
+status_t OMXNodeInstance::allocateBuffer(
+        OMX_U32 portIndex, size_t size, OMX::buffer_id *buffer) {
+    Mutex::Autolock autoLock(mLock);
+
+    BufferMeta *buffer_meta = new BufferMeta(size);
+
+    OMX_BUFFERHEADERTYPE *header;
+
+    OMX_ERRORTYPE err = OMX_AllocateBuffer(
+            mHandle, &header, portIndex, buffer_meta, size);
+
+    if (err != OMX_ErrorNone) {
+        LOGE("OMX_AllocateBuffer failed with error %d (0x%08x)", err, err);
+
+        delete buffer_meta;
+        buffer_meta = NULL;
+
+        *buffer = 0;
+
+        return UNKNOWN_ERROR;
+    }
+
+    *buffer = header;
+
+    addActiveBuffer(portIndex, *buffer);
+
+    return OK;
+}
+
+status_t OMXNodeInstance::allocateBufferWithBackup(
+        OMX_U32 portIndex, const sp<IMemory> &params,
+        OMX::buffer_id *buffer) {
+    Mutex::Autolock autoLock(mLock);
+
+    BufferMeta *buffer_meta = new BufferMeta(params, true);
+
+    OMX_BUFFERHEADERTYPE *header;
+
+    OMX_ERRORTYPE err = OMX_AllocateBuffer(
+            mHandle, &header, portIndex, buffer_meta, params->size());
+
+    if (err != OMX_ErrorNone) {
+        LOGE("OMX_AllocateBuffer failed with error %d (0x%08x)", err, err);
+
+        delete buffer_meta;
+        buffer_meta = NULL;
+
+        *buffer = 0;
+
+        return UNKNOWN_ERROR;
+    }
+
+    *buffer = header;
+
+    addActiveBuffer(portIndex, *buffer);
+
+    return OK;
+}
+
+status_t OMXNodeInstance::freeBuffer(
+        OMX_U32 portIndex, OMX::buffer_id buffer) {
+    Mutex::Autolock autoLock(mLock);
+
+    removeActiveBuffer(portIndex, buffer);
+
+    OMX_BUFFERHEADERTYPE *header = (OMX_BUFFERHEADERTYPE *)buffer;
+    BufferMeta *buffer_meta = static_cast<BufferMeta *>(header->pAppPrivate);
+
+    OMX_ERRORTYPE err = OMX_FreeBuffer(mHandle, portIndex, header);
+
+    delete buffer_meta;
+    buffer_meta = NULL;
+
+    return StatusFromOMXError(err);
+}
+
+status_t OMXNodeInstance::fillBuffer(OMX::buffer_id buffer) {
+    Mutex::Autolock autoLock(mLock);
+
+    OMX_BUFFERHEADERTYPE *header = (OMX_BUFFERHEADERTYPE *)buffer;
+    header->nFilledLen = 0;
+    header->nOffset = 0;
+    header->nFlags = 0;
+
+    OMX_ERRORTYPE err = OMX_FillThisBuffer(mHandle, header);
+
+    return StatusFromOMXError(err);
+}
+
+status_t OMXNodeInstance::emptyBuffer(
+        OMX::buffer_id buffer,
+        OMX_U32 rangeOffset, OMX_U32 rangeLength,
+        OMX_U32 flags, OMX_TICKS timestamp) {
+    Mutex::Autolock autoLock(mLock);
+
+    OMX_BUFFERHEADERTYPE *header = (OMX_BUFFERHEADERTYPE *)buffer;
+    header->nFilledLen = rangeLength;
+    header->nOffset = rangeOffset;
+    header->nFlags = flags;
+    header->nTimeStamp = timestamp;
+
+    BufferMeta *buffer_meta =
+        static_cast<BufferMeta *>(header->pAppPrivate);
+    buffer_meta->CopyToOMX(header);
+
+    OMX_ERRORTYPE err = OMX_EmptyThisBuffer(mHandle, header);
+
+    return StatusFromOMXError(err);
+}
+
+status_t OMXNodeInstance::getExtensionIndex(
+        const char *parameterName, OMX_INDEXTYPE *index) {
+    Mutex::Autolock autoLock(mLock);
+
+    OMX_ERRORTYPE err = OMX_GetExtensionIndex(
+            mHandle, const_cast<char *>(parameterName), index);
+
+    return StatusFromOMXError(err);
+}
+
+void OMXNodeInstance::onMessage(const omx_message &msg) {
+    if (msg.type == omx_message::FILL_BUFFER_DONE) {
+        OMX_BUFFERHEADERTYPE *buffer =
+            static_cast<OMX_BUFFERHEADERTYPE *>(
+                    msg.u.extended_buffer_data.buffer);
+
+        BufferMeta *buffer_meta =
+            static_cast<BufferMeta *>(buffer->pAppPrivate);
+
+        buffer_meta->CopyFromOMX(buffer);
+    }
+
+    mObserver->onMessage(msg);
+}
+
+void OMXNodeInstance::onObserverDied() {
+    LOGE("!!! Observer died. Quickly, do something, ... anything...");
+
+    // Try to force shutdown of the node and hope for the best.
+    freeNode();
+}
+
+void OMXNodeInstance::onGetHandleFailed() {
+    delete this;
+}
+
+// static
+OMX_ERRORTYPE OMXNodeInstance::OnEvent(
+        OMX_IN OMX_HANDLETYPE hComponent,
+        OMX_IN OMX_PTR pAppData,
+        OMX_IN OMX_EVENTTYPE eEvent,
+        OMX_IN OMX_U32 nData1,
+        OMX_IN OMX_U32 nData2,
+        OMX_IN OMX_PTR pEventData) {
+    OMXNodeInstance *instance = static_cast<OMXNodeInstance *>(pAppData);
+    return instance->owner()->OnEvent(
+            instance->nodeID(), eEvent, nData1, nData2, pEventData);
+}
+
+// static
+OMX_ERRORTYPE OMXNodeInstance::OnEmptyBufferDone(
+        OMX_IN OMX_HANDLETYPE hComponent,
+        OMX_IN OMX_PTR pAppData,
+        OMX_IN OMX_BUFFERHEADERTYPE* pBuffer) {
+    OMXNodeInstance *instance = static_cast<OMXNodeInstance *>(pAppData);
+    return instance->owner()->OnEmptyBufferDone(instance->nodeID(), pBuffer);
+}
+
+// static
+OMX_ERRORTYPE OMXNodeInstance::OnFillBufferDone(
+        OMX_IN OMX_HANDLETYPE hComponent,
+        OMX_IN OMX_PTR pAppData,
+        OMX_IN OMX_BUFFERHEADERTYPE* pBuffer) {
+    OMXNodeInstance *instance = static_cast<OMXNodeInstance *>(pAppData);
+    return instance->owner()->OnFillBufferDone(instance->nodeID(), pBuffer);
+}
+
+void OMXNodeInstance::addActiveBuffer(OMX_U32 portIndex, OMX::buffer_id id) {
+    ActiveBuffer active;
+    active.mPortIndex = portIndex;
+    active.mID = id;
+    mActiveBuffers.push(active);
+}
+
+void OMXNodeInstance::removeActiveBuffer(
+        OMX_U32 portIndex, OMX::buffer_id id) {
+    bool found = false;
+    for (size_t i = 0; i < mActiveBuffers.size(); ++i) {
+        if (mActiveBuffers[i].mPortIndex == portIndex
+            && mActiveBuffers[i].mID == id) {
+            found = true;
+            mActiveBuffers.removeItemsAt(i);
+            break;
+        }
+    }
+
+    if (!found) {
+        LOGW("Attempt to remove an active buffer we know nothing about...");
+    }
+}
+
+void OMXNodeInstance::freeActiveBuffers() {
+    // Make sure to count down here, as freeBuffer will in turn remove
+    // the active buffer from the vector...
+    for (size_t i = mActiveBuffers.size(); i--;) {
+        freeBuffer(mActiveBuffers[i].mPortIndex, mActiveBuffers[i].mID);
+    }
+}
+
+}  // namespace android
+
diff --git a/media/libstagefright/string.cpp b/media/libstagefright/stagefright_string.cpp
similarity index 97%
rename from media/libstagefright/string.cpp
rename to media/libstagefright/stagefright_string.cpp
index 5b16784..2aedb80 100644
--- a/media/libstagefright/string.cpp
+++ b/media/libstagefright/stagefright_string.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include <media/stagefright/string.h>
+#include <media/stagefright/stagefright_string.h>
 
 namespace android {
 
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaMetadataTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaMetadataTest.java
index 1bf4958..ca60e8c 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaMetadataTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaMetadataTest.java
@@ -23,6 +23,7 @@
 import android.util.Log;
 
 import com.android.mediaframeworktest.MediaNames;
+import com.android.mediaframeworktest.MediaProfileReader;
 /**
  * This metadata test suite test the basic functionality of the 
  * MediaMetadataRetriever
@@ -31,7 +32,7 @@
 public class MediaMetadataTest extends AndroidTestCase {
     
     private static final String TAG = "MediaMetadataTest";
-    
+
     public static enum METADATA_EXPECTEDRESULT{
         FILE_PATH,CD_TRACK, ALBUM,
         ARTIST, AUTHOR, COMPOSER,
@@ -193,12 +194,17 @@
     }
      
     private static void validateMetatData(int fileIndex, String meta_data_file[][]) {
+        Log.v(TAG, "filePath = "+ meta_data_file[fileIndex][0]);
+        if ((meta_data_file[fileIndex][0].endsWith("wma") && !MediaProfileReader.getWMAEnable()) ||
+            (meta_data_file[fileIndex][0].endsWith("wmv") && !MediaProfileReader.getWMVEnable())) {
+            Log.v(TAG, "Skip test since windows media is not supported");
+            return;
+        }
         String value = null;
         MediaMetadataRetriever retriever = new MediaMetadataRetriever();
         retriever.setMode(MediaMetadataRetriever.MODE_GET_METADATA_ONLY);
         try {
             retriever.setDataSource(meta_data_file[fileIndex][0]);
-            Log.v(TAG, "filePath = "+ meta_data_file[fileIndex][0]);
         } catch(Exception e) {
             Log.v(TAG, "Failed: "+meta_data_file[fileIndex][0] + " " + e.toString());
             //Set the test case failure whenever it failed to setDataSource
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 392d1d5..5725c44 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaPlayerApiTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaPlayerApiTest.java
@@ -242,8 +242,10 @@
     
     @LargeTest
     public void testWMA9SetLooping() throws Exception {
-      boolean isLoop = CodecTest.setLooping(MediaNames.WMA9);  
-      assertTrue("WMA9 setLooping", isLoop);  
+      if (isWMAEnable) {
+        boolean isLoop = CodecTest.setLooping(MediaNames.WMA9);
+        assertTrue("WMA9 setLooping", isLoop);
+      }
     }
     
     @LargeTest
diff --git a/packages/SubscribedFeedsProvider/Android.mk b/packages/SubscribedFeedsProvider/Android.mk
deleted file mode 100644
index bed6a168..0000000
--- a/packages/SubscribedFeedsProvider/Android.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := user
-
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
-
-LOCAL_PACKAGE_NAME := SubscribedFeedsProvider
-LOCAL_CERTIFICATE := platform
-
-include $(BUILD_PACKAGE)
diff --git a/packages/SubscribedFeedsProvider/AndroidManifest.xml b/packages/SubscribedFeedsProvider/AndroidManifest.xml
deleted file mode 100644
index a3938bd..0000000
--- a/packages/SubscribedFeedsProvider/AndroidManifest.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-        package="com.android.providers.subscribedfeeds"
-        android:sharedUserId="android.uid.system">
-
-    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
-    <uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
-    <uses-permission android:name="android.permission.SUBSCRIBED_FEEDS_READ" />
-    <uses-permission android:name="android.permission.SUBSCRIBED_FEEDS_WRITE" />
-
-    <application android:process="system"
-                 android:allowClearUserData="false"
-                 android:icon="@drawable/app_icon"
-                 android:label="@string/app_label">
-        <uses-library android:name="com.google.android.gtalkservice" />
-        <provider android:name="SubscribedFeedsProvider"
-                android:authorities="subscribedfeeds"
-                android:label="@string/provider_label"
-                android:multiprocess="false"
-                android:readPermission="android.permission.SUBSCRIBED_FEEDS_READ"
-                android:writePermission="android.permission.SUBSCRIBED_FEEDS_WRITE" />
-        <receiver android:name="SubscribedFeedsBroadcastReceiver">
-            <intent-filter>
-                <action android:name="android.intent.action.REMOTE_INTENT" />
-                <category android:name="GSYNC_TICKLE"/>
-            </intent-filter>
-            <intent-filter>
-                <action android:name="android.intent.action.BOOT_COMPLETED" />
-            </intent-filter>
-            <intent-filter>
-                <action android:name="com.android.subscribedfeeds.action.REFRESH" />
-            </intent-filter>
-        </receiver>
-        <service android:name="SubscribedFeedsIntentService"/>
-    </application>
-</manifest>
diff --git a/packages/SubscribedFeedsProvider/MODULE_LICENSE_APACHE2 b/packages/SubscribedFeedsProvider/MODULE_LICENSE_APACHE2
deleted file mode 100644
index e69de29..0000000
--- a/packages/SubscribedFeedsProvider/MODULE_LICENSE_APACHE2
+++ /dev/null
diff --git a/packages/SubscribedFeedsProvider/NOTICE b/packages/SubscribedFeedsProvider/NOTICE
deleted file mode 100644
index c5b1efa..0000000
--- a/packages/SubscribedFeedsProvider/NOTICE
+++ /dev/null
@@ -1,190 +0,0 @@
-
-   Copyright (c) 2005-2008, 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.
-
-   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.
-
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
diff --git a/packages/SubscribedFeedsProvider/res/drawable/app_icon.png b/packages/SubscribedFeedsProvider/res/drawable/app_icon.png
deleted file mode 100644
index 13d8cdd..0000000
--- a/packages/SubscribedFeedsProvider/res/drawable/app_icon.png
+++ /dev/null
Binary files differ
diff --git a/packages/SubscribedFeedsProvider/res/values-cs/strings.xml b/packages/SubscribedFeedsProvider/res/values-cs/strings.xml
deleted file mode 100644
index 5b06f7b..0000000
--- a/packages/SubscribedFeedsProvider/res/values-cs/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2009 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.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="5400580392303600842">"Synchronizace zdrojů"</string>
-    <string name="provider_label" msgid="3669714991966737047">"Zobrazit odběry"</string>
-</resources>
diff --git a/packages/SubscribedFeedsProvider/res/values-da/strings.xml b/packages/SubscribedFeedsProvider/res/values-da/strings.xml
deleted file mode 100644
index f8867a2..0000000
--- a/packages/SubscribedFeedsProvider/res/values-da/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2009 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.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="5400580392303600842">"Synkroniser feeds"</string>
-    <string name="provider_label" msgid="3669714991966737047">"Push-abonnementer"</string>
-</resources>
diff --git a/packages/SubscribedFeedsProvider/res/values-de/strings.xml b/packages/SubscribedFeedsProvider/res/values-de/strings.xml
deleted file mode 100644
index 8bfd721..0000000
--- a/packages/SubscribedFeedsProvider/res/values-de/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2009 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.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="5400580392303600842">"Feedsynchronisierung"</string>
-    <string name="provider_label" msgid="3669714991966737047">"Push-Abos"</string>
-</resources>
diff --git a/packages/SubscribedFeedsProvider/res/values-el/strings.xml b/packages/SubscribedFeedsProvider/res/values-el/strings.xml
deleted file mode 100644
index 11a3486..0000000
--- a/packages/SubscribedFeedsProvider/res/values-el/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2009 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.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="5400580392303600842">"Συγχρονισμός ροών δεδομένων"</string>
-    <string name="provider_label" msgid="3669714991966737047">"Προώθηση συνδρομών"</string>
-</resources>
diff --git a/packages/SubscribedFeedsProvider/res/values-es-rUS/strings.xml b/packages/SubscribedFeedsProvider/res/values-es-rUS/strings.xml
deleted file mode 100644
index 75f1b9f..0000000
--- a/packages/SubscribedFeedsProvider/res/values-es-rUS/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2009 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.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="5400580392303600842">"Canales de sincronización"</string>
-    <string name="provider_label" msgid="3669714991966737047">"Suscripciones de inserción"</string>
-</resources>
diff --git a/packages/SubscribedFeedsProvider/res/values-es/strings.xml b/packages/SubscribedFeedsProvider/res/values-es/strings.xml
deleted file mode 100644
index 59d1693..0000000
--- a/packages/SubscribedFeedsProvider/res/values-es/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2009 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.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="5400580392303600842">"Sincronización de feeds"</string>
-    <string name="provider_label" msgid="3669714991966737047">"Enviar suscripciones"</string>
-</resources>
diff --git a/packages/SubscribedFeedsProvider/res/values-fr/strings.xml b/packages/SubscribedFeedsProvider/res/values-fr/strings.xml
deleted file mode 100644
index ab1aae9..0000000
--- a/packages/SubscribedFeedsProvider/res/values-fr/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2009 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.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="5400580392303600842">"Synchronisation des flux"</string>
-    <string name="provider_label" msgid="3669714991966737047">"Abonnements Push"</string>
-</resources>
diff --git a/packages/SubscribedFeedsProvider/res/values-it/strings.xml b/packages/SubscribedFeedsProvider/res/values-it/strings.xml
deleted file mode 100644
index 2a6dd54..0000000
--- a/packages/SubscribedFeedsProvider/res/values-it/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2009 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.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="5400580392303600842">"Sincronizzazione feed"</string>
-    <string name="provider_label" msgid="3669714991966737047">"Sottoscrizioni push"</string>
-</resources>
diff --git a/packages/SubscribedFeedsProvider/res/values-ja/strings.xml b/packages/SubscribedFeedsProvider/res/values-ja/strings.xml
deleted file mode 100644
index 6a0812a..0000000
--- a/packages/SubscribedFeedsProvider/res/values-ja/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2009 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.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="5400580392303600842">"フィードの同期"</string>
-    <string name="provider_label" msgid="3669714991966737047">"プッシュ型登録"</string>
-</resources>
diff --git a/packages/SubscribedFeedsProvider/res/values-ko/strings.xml b/packages/SubscribedFeedsProvider/res/values-ko/strings.xml
deleted file mode 100644
index 0912732..0000000
--- a/packages/SubscribedFeedsProvider/res/values-ko/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2009 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.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="5400580392303600842">"피드 동기화"</string>
-    <string name="provider_label" msgid="3669714991966737047">"구독정보 푸시"</string>
-</resources>
diff --git a/packages/SubscribedFeedsProvider/res/values-nb/strings.xml b/packages/SubscribedFeedsProvider/res/values-nb/strings.xml
deleted file mode 100644
index 30a2c5ea..0000000
--- a/packages/SubscribedFeedsProvider/res/values-nb/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2009 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.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="5400580392303600842">"Strømsynkronisering"</string>
-    <string name="provider_label" msgid="3669714991966737047">"Push-abonnementer"</string>
-</resources>
diff --git a/packages/SubscribedFeedsProvider/res/values-nl/strings.xml b/packages/SubscribedFeedsProvider/res/values-nl/strings.xml
deleted file mode 100644
index b74e66b..0000000
--- a/packages/SubscribedFeedsProvider/res/values-nl/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2009 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.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="5400580392303600842">"Feeds synchroniseren"</string>
-    <string name="provider_label" msgid="3669714991966737047">"Abonnementen doorvoeren"</string>
-</resources>
diff --git a/packages/SubscribedFeedsProvider/res/values-pl/strings.xml b/packages/SubscribedFeedsProvider/res/values-pl/strings.xml
deleted file mode 100644
index ed6c1d0..0000000
--- a/packages/SubscribedFeedsProvider/res/values-pl/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2009 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.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="5400580392303600842">"Synchronizowanie kanałów"</string>
-    <string name="provider_label" msgid="3669714991966737047">"Subskrypcje w trybie push"</string>
-</resources>
diff --git a/packages/SubscribedFeedsProvider/res/values-pt-rPT/strings.xml b/packages/SubscribedFeedsProvider/res/values-pt-rPT/strings.xml
deleted file mode 100644
index 29f69ac..0000000
--- a/packages/SubscribedFeedsProvider/res/values-pt-rPT/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2009 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.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="5400580392303600842">"Sincronizar feeds"</string>
-    <string name="provider_label" msgid="3669714991966737047">"Transferir Subscrições"</string>
-</resources>
diff --git a/packages/SubscribedFeedsProvider/res/values-pt/strings.xml b/packages/SubscribedFeedsProvider/res/values-pt/strings.xml
deleted file mode 100644
index 081190d..0000000
--- a/packages/SubscribedFeedsProvider/res/values-pt/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2009 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.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="5400580392303600842">"Sincronizar feeds"</string>
-    <string name="provider_label" msgid="3669714991966737047">"Enviar inscrições"</string>
-</resources>
diff --git a/packages/SubscribedFeedsProvider/res/values-ru/strings.xml b/packages/SubscribedFeedsProvider/res/values-ru/strings.xml
deleted file mode 100644
index 24ead0a..0000000
--- a/packages/SubscribedFeedsProvider/res/values-ru/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2009 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.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="5400580392303600842">"Фиды синхронизации"</string>
-    <string name="provider_label" msgid="3669714991966737047">"Подписки Push"</string>
-</resources>
diff --git a/packages/SubscribedFeedsProvider/res/values-sv/strings.xml b/packages/SubscribedFeedsProvider/res/values-sv/strings.xml
deleted file mode 100644
index 55499c5..0000000
--- a/packages/SubscribedFeedsProvider/res/values-sv/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2009 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.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="5400580392303600842">"Synkroniseringsflöden"</string>
-    <string name="provider_label" msgid="3669714991966737047">"Push-prenumerationer"</string>
-</resources>
diff --git a/packages/SubscribedFeedsProvider/res/values-tr/strings.xml b/packages/SubscribedFeedsProvider/res/values-tr/strings.xml
deleted file mode 100644
index baa33300..0000000
--- a/packages/SubscribedFeedsProvider/res/values-tr/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2009 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.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="5400580392303600842">"Senkronizasyon Yayınları"</string>
-    <string name="provider_label" msgid="3669714991966737047">"Abonelik Şart Koş"</string>
-</resources>
diff --git a/packages/SubscribedFeedsProvider/res/values-zh-rCN/strings.xml b/packages/SubscribedFeedsProvider/res/values-zh-rCN/strings.xml
deleted file mode 100644
index 05edb80..0000000
--- a/packages/SubscribedFeedsProvider/res/values-zh-rCN/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2009 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.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="5400580392303600842">"同步供稿"</string>
-    <string name="provider_label" msgid="3669714991966737047">"推送订阅"</string>
-</resources>
diff --git a/packages/SubscribedFeedsProvider/res/values-zh-rTW/strings.xml b/packages/SubscribedFeedsProvider/res/values-zh-rTW/strings.xml
deleted file mode 100644
index 5e5bcc5..0000000
--- a/packages/SubscribedFeedsProvider/res/values-zh-rTW/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2009 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.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="5400580392303600842">"同步資訊提供"</string>
-    <string name="provider_label" msgid="3669714991966737047">"預先載入訂閱項目"</string>
-</resources>
diff --git a/packages/SubscribedFeedsProvider/res/values/strings.xml b/packages/SubscribedFeedsProvider/res/values/strings.xml
deleted file mode 100644
index c4c2484..0000000
--- a/packages/SubscribedFeedsProvider/res/values/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 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.
--->
-
-<resources>
-    <!-- Title of the feed synchronization activity. -->
-    <string name="app_label">Sync Feeds</string>
-
-    <!-- What to show in messaging that refers to this provider, e.g. AccountSyncSettings -->
-    <string name="provider_label">Push Subscriptions</string>
-
-</resources>
-
diff --git a/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsBroadcastReceiver.java b/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsBroadcastReceiver.java
deleted file mode 100644
index ea14307..0000000
--- a/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsBroadcastReceiver.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-** Copyright 2006, 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.providers.subscribedfeeds;
-
-import android.app.Activity;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.util.Log;
-
-/**
- * Handles the XMPP_CONNECTED_ACTION intent by updating all the
- * subscribed feeds with the new jabber id and initiating a sync
- * for all subscriptions.
- *
- * Handles the TICKLE_ACTION intent by finding the matching
- * subscribed feed and intiating a sync for it.
- */
-public class SubscribedFeedsBroadcastReceiver extends BroadcastReceiver {
-
-    private static final String TAG = "Sync";
-
-    public void onReceive(Context context, Intent intent) {
-        if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "Received intent " + intent);
-        if (intent.getAction().equals(Intent.ACTION_REMOTE_INTENT)) {
-            setResultCode(Activity.RESULT_OK);
-        }
-        intent.setClass(context, SubscribedFeedsIntentService.class);
-        context.startService(intent);
-    }
-}
diff --git a/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsIntentService.java b/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsIntentService.java
deleted file mode 100644
index 2e910b7..0000000
--- a/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsIntentService.java
+++ /dev/null
@@ -1,193 +0,0 @@
-package com.android.providers.subscribedfeeds;
-
-import android.content.Intent;
-import android.content.Context;
-import android.content.ContentResolver;
-import android.content.ContentValues;
-import android.content.SharedPreferences;
-import android.util.Log;
-import android.util.Config;
-import android.util.EventLog;
-import android.app.IntentService;
-import android.provider.SubscribedFeeds;
-import android.provider.SyncConstValue;
-import android.database.Cursor;
-import android.database.sqlite.SQLiteFullException;
-import android.app.AlarmManager;
-import android.app.PendingIntent;
-import android.os.Bundle;
-import android.text.TextUtils;
-import android.accounts.Account;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-
-import com.google.android.collect.Lists;
-
-/**
- * A service to handle various intents asynchronously.
- */
-public class SubscribedFeedsIntentService extends IntentService {
-    private static final String TAG = "Sync";
-
-    private static final String[] sAccountProjection =
-            new String[] {SubscribedFeeds.Accounts._SYNC_ACCOUNT,
-                    SubscribedFeeds.Accounts._SYNC_ACCOUNT_TYPE};
-
-    /** How often to refresh the subscriptions, in milliseconds */
-    private static final long SUBSCRIPTION_REFRESH_INTERVAL = 1000L * 60 * 60 * 24; // one day
-
-    private static final String sRefreshTime = "refreshTime";
-
-    private static final String sSubscribedFeedsPrefs = "subscribedFeeds";
-
-    private static final String REMOTE_INTENT_ACTION = Intent.ACTION_REMOTE_INTENT;
-
-    private static final String SUBSCRIBED_FEEDS_REFRESH_ACTION =
-            "com.android.subscribedfeeds.action.REFRESH";
-
-    private static final int LOG_TICKLE = 2742;
-
-    public SubscribedFeedsIntentService() {
-        super("SubscribedFeedsIntentService");
-    }
-
-    protected void onHandleIntent(Intent intent) {
-        if (REMOTE_INTENT_ACTION.equals(intent.getAction())) {
-            boolean fromTrustedServer = intent.getBooleanExtra(
-                    "android.intent.extra.from_trusted_server", false);
-            if (fromTrustedServer) {
-                String accountName = intent.getStringExtra("account");
-                String token = intent.getStringExtra(Intent.EXTRA_REMOTE_INTENT_TOKEN);
-
-                if (TextUtils.isEmpty(accountName) || TextUtils.isEmpty(token)) {
-                    if (Config.LOGD) {
-                        Log.d(TAG, "Ignoring malformed tickle -- missing account or token.");
-                    }
-                    return;
-                }
-
-                if (Config.LOGD) {
-                    Log.d(TAG, "Received network tickle for "
-                            + accountName + " - " + token);
-                }
-
-                handleTickle(this, accountName, token);
-            } else {
-                if (Log.isLoggable(TAG, Log.VERBOSE)) {
-                    Log.v(TAG, "Ignoring tickle -- not from trusted server.");
-                }
-            }
-
-        } else if (Intent.ACTION_BOOT_COMPLETED.equals(
-                intent.getAction())) {
-            if (Config.LOGD) {
-                Log.d(TAG, "Received boot completed action");
-            }
-            // load the time from the shared preferences and schedule an alarm
-            long refreshTime = getSharedPreferences(
-                    sSubscribedFeedsPrefs,
-                    Context.MODE_WORLD_READABLE).getLong(sRefreshTime, 0);
-            scheduleRefresh(this, refreshTime);
-        } else if (SUBSCRIBED_FEEDS_REFRESH_ACTION.equals(intent.getAction())) {
-            if (Config.LOGD) {
-                Log.d(TAG, "Received sSubscribedFeedsRefreshIntent");
-            }
-            handleRefreshAlarm(this);
-        }
-    }
-    private void scheduleRefresh(Context context, long when) {
-        AlarmManager alarmManager = (AlarmManager) context.getSystemService(
-                Context.ALARM_SERVICE);
-        PendingIntent pendingIntent = PendingIntent.getBroadcast(context,
-                0, new Intent(SUBSCRIBED_FEEDS_REFRESH_ACTION), 0);
-        alarmManager.set(AlarmManager.RTC, when, pendingIntent);
-    }
-
-    private void handleTickle(Context context, String accountName, String feed) {
-        Cursor c = null;
-        final String where = SubscribedFeeds.Feeds._SYNC_ACCOUNT + "= ? "
-                + "and " + SubscribedFeeds.Feeds._SYNC_ACCOUNT_TYPE + "= ? "
-                + "and " + SubscribedFeeds.Feeds.FEED + "= ?";
-        try {
-            // TODO(fredq) fix the hardcoded type
-            final Account account = new Account(accountName, "com.google");
-            c = context.getContentResolver().query(SubscribedFeeds.Feeds.CONTENT_URI,
-                    null, where, new String[]{account.name, account.type, feed}, null);
-            if (c.getCount() == 0) {
-                Log.w(TAG, "received tickle for non-existent feed: "
-                        + "account " + accountName + ", feed " + feed);
-                EventLog.writeEvent(LOG_TICKLE, "unknown");
-            }
-            while (c.moveToNext()) {
-                // initiate a sync
-                String authority = c.getString(c.getColumnIndexOrThrow(
-                        SubscribedFeeds.Feeds.AUTHORITY));
-                EventLog.writeEvent(LOG_TICKLE, authority);
-                if (!ContentResolver.getSyncAutomatically(account, authority)) {
-                    Log.d(TAG, "supressing tickle since provider " + authority
-                            + " is configured to not sync automatically");
-                    continue;
-                }
-                Bundle extras = new Bundle();
-                extras.putString("feed", feed);
-                ContentResolver.requestSync(account, authority, extras);
-            }
-        } finally {
-            if (c != null) c.deactivate();
-        }
-    }
-
-    /**
-     * Cause all the subscribed feeds to be marked dirty and their
-     * authtokens to be refreshed, which will result in new authtokens
-     * being sent to the subscription server. Then reschedules this
-     * event for one week in the future.
-     *
-     * @param context Context we are running within
-     */
-    private void handleRefreshAlarm(Context context) {
-        // retrieve the list of accounts from the subscribed feeds
-        ArrayList<Account> accounts = Lists.newArrayList();
-        ContentResolver contentResolver = context.getContentResolver();
-        Cursor c = contentResolver.query(SubscribedFeeds.Accounts.CONTENT_URI,
-                sAccountProjection, null, null, null);
-        try {
-            while (c.moveToNext()) {
-                String accountName = c.getString(0);
-                String accountType = c.getString(1);
-                accounts.add(new Account(accountName, accountType));
-            }
-        } finally {
-            c.close();
-        }
-
-        // Clear the auth tokens for all these accounts so that we are sure
-        // they will still be valid until the next time we refresh them.
-        // TODO(fredq): add this when the google login service is done
-
-        // mark the feeds dirty, by setting the accounts to the same value,
-        //  which will trigger a sync.
-        try {
-            ContentValues values = new ContentValues();
-            for (Account account : accounts) {
-                values.put(SyncConstValue._SYNC_ACCOUNT, account.name);
-                values.put(SyncConstValue._SYNC_ACCOUNT_TYPE, account.type);
-                contentResolver.update(SubscribedFeeds.Feeds.CONTENT_URI, values,
-                        SubscribedFeeds.Feeds._SYNC_ACCOUNT + "=? AND "
-                                + SubscribedFeeds.Feeds._SYNC_ACCOUNT_TYPE + "=?",
-                        new String[] {account.name, account.type});
-            }
-        } catch (SQLiteFullException e) {
-            Log.w(TAG, "disk full while trying to mark the feeds as dirty, skipping");
-        }
-
-        // Schedule a refresh.
-        long refreshTime = Calendar.getInstance().getTimeInMillis() + SUBSCRIPTION_REFRESH_INTERVAL;
-        scheduleRefresh(context, refreshTime);
-        SharedPreferences.Editor editor = context.getSharedPreferences(sSubscribedFeedsPrefs,
-                Context.MODE_WORLD_READABLE).edit();
-        editor.putLong(sRefreshTime, refreshTime);
-        editor.commit();
-    }
-}
diff --git a/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsProvider.java b/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsProvider.java
deleted file mode 100644
index 8585082..0000000
--- a/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsProvider.java
+++ /dev/null
@@ -1,391 +0,0 @@
-/*
-** Copyright 2006, 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.providers.subscribedfeeds;
-
-import android.accounts.Account;
-import android.content.UriMatcher;
-import android.content.*;
-import android.database.Cursor;
-import android.database.DatabaseUtils;
-import android.database.sqlite.SQLiteDatabase;
-import android.database.sqlite.SQLiteQueryBuilder;
-import android.net.Uri;
-import android.provider.SubscribedFeeds;
-import android.text.TextUtils;
-import android.util.Config;
-import android.util.Log;
-
-import java.util.Collections;
-import java.util.Map;
-import java.util.HashMap;
-
-/**
- * Manages a list of feeds for which this client is interested in receiving
- * change notifications.
- */
-public class SubscribedFeedsProvider extends AbstractSyncableContentProvider {
-    private static final String TAG = "SubscribedFeedsProvider";
-    private static final String DATABASE_NAME = "subscribedfeeds.db";
-    private static final int DATABASE_VERSION = 11;
-
-    private static final int FEEDS = 1;
-    private static final int FEED_ID = 2;
-    private static final int DELETED_FEEDS = 3;
-    private static final int ACCOUNTS = 4;
-
-    private static final Map<String, String> ACCOUNTS_PROJECTION_MAP;
-
-    private static final UriMatcher sURLMatcher =
-            new UriMatcher(UriMatcher.NO_MATCH);
-
-    private static String sFeedsTable = "feeds";
-    private static Uri sFeedsUrl =
-            Uri.parse("content://subscribedfeeds/feeds/");
-    private static String sDeletedFeedsTable = "_deleted_feeds";
-    private static Uri sDeletedFeedsUrl =
-            Uri.parse("content://subscribedfeeds/deleted_feeds/");
-
-    public SubscribedFeedsProvider() {
-        super(DATABASE_NAME, DATABASE_VERSION, sFeedsUrl);
-    }
-
-    static {
-        sURLMatcher.addURI("subscribedfeeds", "feeds", FEEDS);
-        sURLMatcher.addURI("subscribedfeeds", "feeds/#", FEED_ID);
-        sURLMatcher.addURI("subscribedfeeds", "deleted_feeds", DELETED_FEEDS);
-        sURLMatcher.addURI("subscribedfeeds", "accounts", ACCOUNTS);
-    }
-
-    @Override
-    protected boolean upgradeDatabase(SQLiteDatabase db,
-            int oldVersion, int newVersion) {
-        Log.w(TAG, "Upgrading database from version " + oldVersion +
-                " to " + newVersion +
-                ", which will destroy all old data");
-        db.execSQL("DROP TRIGGER IF EXISTS feed_cleanup");
-        db.execSQL("DROP TABLE IF EXISTS _deleted_feeds");
-        db.execSQL("DROP TABLE IF EXISTS feeds");
-        bootstrapDatabase(db);
-        return false; // this was lossy
-    }
-
-    @Override
-    protected void bootstrapDatabase(SQLiteDatabase db) {
-        super.bootstrapDatabase(db);
-        db.execSQL("CREATE TABLE feeds (" +
-                    "_id INTEGER PRIMARY KEY," +
-                    "_sync_account TEXT," + // From the sync source
-                    "_sync_account_type TEXT," + // From the sync source
-                    "_sync_id TEXT," + // From the sync source
-                    "_sync_time TEXT," + // From the sync source
-                    "_sync_version TEXT," + // From the sync source
-                    "_sync_local_id INTEGER," + // Used while syncing,
-                                                // never stored persistently
-                    "_sync_dirty INTEGER," + // if syncable, set if the record
-                                             // has local, unsynced, changes
-                    "_sync_mark INTEGER," + // Used to filter out new rows
-                    "feed TEXT," +
-                    "authority TEXT," +
-                    "service TEXT" +
-                    ");");
-
-        // Trigger to completely remove feeds data when they're deleted
-        db.execSQL("CREATE TRIGGER feed_cleanup DELETE ON feeds " +
-                    "WHEN old._sync_id is not null " +
-                    "BEGIN " +
-                        "INSERT INTO _deleted_feeds " +
-                            "(_sync_id, _sync_account, _sync_account_type, _sync_version) " +
-                            "VALUES (old._sync_id, old._sync_account, old._sync_account_type, " +
-                            "old._sync_version);" +
-                    "END");
-
-        db.execSQL("CREATE TABLE _deleted_feeds (" +
-                    "_sync_version TEXT," + // From the sync source
-                    "_sync_id TEXT," +
-                    (isTemporary() ? "_sync_local_id INTEGER," : "") + // Used while syncing,
-                    "_sync_account TEXT," +
-                    "_sync_account_type TEXT," +
-                    "_sync_mark INTEGER, " + // Used to filter out new rows
-                    "UNIQUE(_sync_id))");
-    }
-
-    @Override
-    protected void onAccountsChanged(Account[] accountsArray) {
-        super.onAccountsChanged(accountsArray);
-        for (Account account : accountsArray) {
-            if (account.type.equals("com.google")) {
-                ContentResolver.setSyncAutomatically(account, "subscribedfeeds", true);
-            }
-        }
-    }
-
-    @Override
-    protected void onDatabaseOpened(SQLiteDatabase db) {
-        db.markTableSyncable("feeds", "_deleted_feeds");
-    }
-
-    @Override
-    protected Iterable<FeedMerger> getMergers() {
-        return Collections.singletonList(new FeedMerger());
-    }
-
-    @Override
-    public String getType(Uri url) {
-        int match = sURLMatcher.match(url);
-        switch (match) {
-            case FEEDS:
-                return SubscribedFeeds.Feeds.CONTENT_TYPE;
-            case FEED_ID:
-                return SubscribedFeeds.Feeds.CONTENT_ITEM_TYPE;
-            default:
-                throw new IllegalArgumentException("Unknown URL");
-        }
-    }
-
-    @Override
-    public Cursor queryInternal(Uri url, String[] projection,
-            String selection, String[] selectionArgs, String sortOrder) {
-        SQLiteQueryBuilder qb = new SQLiteQueryBuilder();
-
-
-        // Generate the body of the query
-        int match = sURLMatcher.match(url);
-
-        if (Config.LOGV) Log.v(TAG, "SubscribedFeedsProvider.query: url=" +
-                url + ", match is " + match);
-
-        switch (match) {
-            case FEEDS:
-                qb.setTables(sFeedsTable);
-                break;
-            case DELETED_FEEDS:
-                if (!isTemporary()) {
-                    throw new UnsupportedOperationException();
-                }
-                qb.setTables(sDeletedFeedsTable);
-                break;
-            case ACCOUNTS:
-                qb.setTables(sFeedsTable);
-                qb.setDistinct(true);
-                qb.setProjectionMap(ACCOUNTS_PROJECTION_MAP);
-                return qb.query(getDatabase(), projection, selection, selectionArgs,
-                        SubscribedFeeds.Feeds._SYNC_ACCOUNT_TYPE + ","
-                                + SubscribedFeeds.Feeds._SYNC_ACCOUNT, null, sortOrder);
-            case FEED_ID:
-                qb.setTables(sFeedsTable);
-                qb.appendWhere(sFeedsTable + "._id=");
-                qb.appendWhere(url.getPathSegments().get(1));
-                break;
-            default:
-                throw new IllegalArgumentException("Unknown URL " + url);
-        }
-
-        // run the query
-        return qb.query(getDatabase(), projection, selection, selectionArgs,
-                null, null, sortOrder);
-    }
-
-    @Override
-    public Uri insertInternal(Uri url, ContentValues initialValues) {
-        final SQLiteDatabase db = getDatabase();
-        Uri resultUri = null;
-        long rowID;
-
-        int match = sURLMatcher.match(url);
-        switch (match) {
-            case FEEDS:
-                ContentValues values = new ContentValues(initialValues);
-                values.put(SubscribedFeeds.Feeds._SYNC_DIRTY, 1);
-                rowID = db.insert(sFeedsTable, "feed", values);
-                if (rowID > 0) {
-                    resultUri = Uri.parse(
-                            "content://subscribedfeeds/feeds/" + rowID);
-                }
-                break;
-
-            case DELETED_FEEDS:
-                if (!isTemporary()) {
-                    throw new UnsupportedOperationException();
-                }
-                rowID = db.insert(sDeletedFeedsTable, "_sync_id",
-                        initialValues);
-                if (rowID > 0) {
-                    resultUri = Uri.parse(
-                            "content://subscribedfeeds/deleted_feeds/" + rowID);
-                }
-                break;
-
-            default:
-                throw new UnsupportedOperationException(
-                        "Cannot insert into URL: " + url);
-        }
-
-        return resultUri;
-    }
-
-    @Override
-    public int deleteInternal(Uri url, String userWhere, String[] whereArgs) {
-        final SQLiteDatabase db = getDatabase();
-        String changedItemId;
-
-        switch (sURLMatcher.match(url)) {
-            case FEEDS:
-                changedItemId = null;
-                break;
-            case FEED_ID:
-                changedItemId = url.getPathSegments().get(1);
-                break;
-            default:
-                throw new UnsupportedOperationException(
-                        "Cannot delete that URL: " + url);
-        }
-
-        String where = addIdToWhereClause(changedItemId, userWhere);
-        return db.delete(sFeedsTable, where, whereArgs);
-    }
-
-    @Override
-    public int updateInternal(Uri url, ContentValues initialValues,
-            String userWhere, String[] whereArgs) {
-        final SQLiteDatabase db = getDatabase();
-        ContentValues values = new ContentValues(initialValues);
-        values.put(SubscribedFeeds.Feeds._SYNC_DIRTY, 1);
-
-        String changedItemId;
-        switch (sURLMatcher.match(url)) {
-            case FEEDS:
-                changedItemId = null;
-                break;
-
-            case FEED_ID:
-                changedItemId = url.getPathSegments().get(1);
-                break;
-
-            default:
-                throw new UnsupportedOperationException(
-                        "Cannot update URL: " + url);
-        }
-
-        String where = addIdToWhereClause(changedItemId, userWhere);
-        return db.update(sFeedsTable, values, where, whereArgs);
-    }
-
-    private static String addIdToWhereClause(String id, String where) {
-        if (id != null) {
-            StringBuilder whereSb = new StringBuilder("_id=");
-            whereSb.append(id);
-            if (!TextUtils.isEmpty(where)) {
-                whereSb.append(" AND (");
-                whereSb.append(where);
-                whereSb.append(')');
-            }
-            return whereSb.toString();
-        } else {
-            return where;
-        }
-    }
-
-    private class FeedMerger extends AbstractTableMerger {
-        private ContentValues mValues = new ContentValues();
-        FeedMerger() {
-            super(getDatabase(), sFeedsTable, sFeedsUrl, sDeletedFeedsTable, sDeletedFeedsUrl);
-        }
-
-        @Override
-        protected void notifyChanges() {
-            getContext().getContentResolver().notifyChange(
-                    sFeedsUrl, null /* data change observer */,
-                    false /* do not sync to network */);
-        }
-
-        @Override
-        public void insertRow(ContentProvider diffs, Cursor diffsCursor) {
-            final SQLiteDatabase db = getDatabase();
-            // We don't ever want to add entries from the server, instead
-            // we want to tell the server to delete any entries we receive
-            // from the server that aren't already known by the client.
-            mValues.clear();
-            DatabaseUtils.cursorStringToContentValues(diffsCursor,
-                    SubscribedFeeds.Feeds._SYNC_ID, mValues);
-            DatabaseUtils.cursorStringToContentValues(diffsCursor,
-                    SubscribedFeeds.Feeds._SYNC_ACCOUNT, mValues);
-            DatabaseUtils.cursorStringToContentValues(diffsCursor,
-                    SubscribedFeeds.Feeds._SYNC_ACCOUNT_TYPE, mValues);
-            DatabaseUtils.cursorStringToContentValues(diffsCursor,
-                    SubscribedFeeds.Feeds._SYNC_VERSION, mValues);
-            db.replace(mDeletedTable, SubscribedFeeds.Feeds._SYNC_ID, mValues);
-        }
-
-        @Override
-        public void updateRow(long localPersonID, ContentProvider diffs,
-                Cursor diffsCursor) {
-            updateOrResolveRow(localPersonID, null, diffs, diffsCursor, false);
-        }
-
-        @Override
-        public void resolveRow(long localPersonID, String syncID,
-                ContentProvider diffs, Cursor diffsCursor) {
-            updateOrResolveRow(localPersonID, syncID, diffs, diffsCursor, true);
-        }
-
-        protected void updateOrResolveRow(long localPersonID, String syncID,
-                ContentProvider diffs, Cursor diffsCursor, boolean conflicts) {
-            mValues.clear();
-            // only copy over the fields that the server owns
-            DatabaseUtils.cursorStringToContentValues(diffsCursor,
-                    SubscribedFeeds.Feeds._SYNC_ID, mValues);
-            DatabaseUtils.cursorStringToContentValues(diffsCursor,
-                    SubscribedFeeds.Feeds._SYNC_TIME, mValues);
-            DatabaseUtils.cursorStringToContentValues(diffsCursor,
-                    SubscribedFeeds.Feeds._SYNC_VERSION, mValues);
-            mValues.put(SubscribedFeeds.Feeds._SYNC_DIRTY, conflicts ? 1 : 0);
-            final SQLiteDatabase db = getDatabase();
-            db.update(mTable, mValues,
-                    SubscribedFeeds.Feeds._ID + '=' + localPersonID, null);
-        }
-
-        @Override
-        public void deleteRow(Cursor localCursor) {
-            // Since the client is the authority we don't actually delete
-            // the row when the server says it has been deleted. Instead
-            // we break the association with the server by clearing out
-            // the id, time, and version, then we mark it dirty so that
-            // it will be synced back to the server.
-            long localPersonId = localCursor.getLong(localCursor.getColumnIndex(
-                    SubscribedFeeds.Feeds._ID));
-            mValues.clear();
-            mValues.put(SubscribedFeeds.Feeds._SYNC_DIRTY, 1);
-            mValues.put(SubscribedFeeds.Feeds._SYNC_ID, (String) null);
-            mValues.put(SubscribedFeeds.Feeds._SYNC_TIME, (Long) null);
-            mValues.put(SubscribedFeeds.Feeds._SYNC_VERSION, (String) null);
-            final SQLiteDatabase db = getDatabase();
-            db.update(mTable, mValues, SubscribedFeeds.Feeds._ID + '=' + localPersonId, null);
-            localCursor.moveToNext();
-        }
-    }
-
-    static {
-        Map<String, String> map;
-
-        map = new HashMap<String, String>();
-        ACCOUNTS_PROJECTION_MAP = map;
-        map.put(SubscribedFeeds.Accounts._COUNT, "COUNT(*) AS _count");
-        map.put(SubscribedFeeds.Accounts._SYNC_ACCOUNT, SubscribedFeeds.Accounts._SYNC_ACCOUNT);
-        map.put(SubscribedFeeds.Accounts._SYNC_ACCOUNT_TYPE,
-                SubscribedFeeds.Accounts._SYNC_ACCOUNT_TYPE);
-    }
-}
diff --git a/services/java/com/android/server/am/BatteryStatsService.java b/services/java/com/android/server/am/BatteryStatsService.java
index 5a1619a..d59aead 100644
--- a/services/java/com/android/server/am/BatteryStatsService.java
+++ b/services/java/com/android/server/am/BatteryStatsService.java
@@ -16,6 +16,7 @@
 
 package com.android.server.am;
 
+import android.bluetooth.BluetoothHeadset;
 import android.content.Context;
 import android.os.Binder;
 import android.os.IBinder;
@@ -23,7 +24,6 @@
 import android.os.Process;
 import android.os.ServiceManager;
 import android.telephony.SignalStrength;
-import android.telephony.TelephonyManager;
 import android.util.Log;
 
 import com.android.internal.app.IBatteryStats;
@@ -263,9 +263,10 @@
 
     public void noteBluetoothOn() {
         enforceCallingPermission();
+        BluetoothHeadset headset = new BluetoothHeadset(mContext, null);
         synchronized (mStats) {
             mStats.noteBluetoothOnLocked();
-            mStats.setBtHeadset(new android.bluetooth.BluetoothHeadset(mContext, null));
+            mStats.setBtHeadset(headset);
         }
     }
     
diff --git a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
index 22fbe8b..3548cad 100755
--- a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
@@ -80,6 +80,10 @@
     static final String LOG_TAG = "CDMA";
     private static final boolean DBG = true;
 
+    // Min values used to by needsActivation
+    private static final String UNACTIVATED_MIN2_VALUE = "000000";
+    private static final String UNACTIVATED_MIN_VALUE = "1111110111";
+
     // Default Emergency Callback Mode exit timer
     private static final int DEFAULT_ECM_EXIT_TIMER_VALUE = 300000;
 
@@ -848,6 +852,26 @@
         mRuimRecords.setVoiceMessageWaiting(1, mwi);
     }
 
+    /**
+     * Returns true if CDMA OTA Service Provisioning needs to be performed.
+     */
+    /* package */ boolean
+    needsOtaServiceProvisioning() {
+        String cdmaMin = getCdmaMin();
+        boolean needsProvisioning;
+        if (cdmaMin == null || (cdmaMin.length() < 6)) {
+            if (DBG) Log.d(LOG_TAG, "needsOtaServiceProvisioning: illegal cdmaMin='"
+                                    + cdmaMin + "' assume provisioning needed.");
+            needsProvisioning = true;
+        } else {
+            needsProvisioning = (cdmaMin.equals(UNACTIVATED_MIN_VALUE)
+                    || cdmaMin.substring(0,6).equals(UNACTIVATED_MIN2_VALUE))
+                    || SystemProperties.getBoolean("test_cdma_setup", false);
+        }
+        if (DBG) Log.d(LOG_TAG, "needsOtaServiceProvisioning: ret=" + needsProvisioning);
+        return needsProvisioning;
+    }
+
     @Override
     public void exitEmergencyCallbackMode() {
         if (mWakeLock.isHeld()) {
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
index a4cf4f5..9bc5e8e 100644
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
@@ -330,7 +330,8 @@
                         phone.getState() == Phone.State.IDLE )
                 && isDataAllowed()
                 && desiredPowerState
-                && !mPendingRestartRadio) {
+                && !mPendingRestartRadio
+                && !mCdmaPhone.needsOtaServiceProvisioning()) {
 
             return setupData(reason);
 
@@ -348,7 +349,8 @@
                     " dataOnRoamingEnable=" + getDataOnRoamingEnabled() +
                     " desiredPowerState=" + desiredPowerState +
                     " PendingRestartRadio=" + mPendingRestartRadio +
-                    " MasterDataEnabled=" + mMasterDataEnabled);
+                    " MasterDataEnabled=" + mMasterDataEnabled +
+                    " needsOtaServiceProvisioning=" + mCdmaPhone.needsOtaServiceProvisioning());
             }
             return false;
         }
diff --git a/tests/DumpRenderTree/assets/results/layout_tests_crashed.txt b/tests/DumpRenderTree/assets/results/layout_tests_crashed.txt
index e69de29..89439d3 100644
--- a/tests/DumpRenderTree/assets/results/layout_tests_crashed.txt
+++ b/tests/DumpRenderTree/assets/results/layout_tests_crashed.txt
@@ -0,0 +1,4 @@
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/basic-auth.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/failed-auth.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/cross-origin-authorization.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/cross-origin-no-authorization.html
diff --git a/tests/DumpRenderTree/assets/results/layout_tests_failed.txt b/tests/DumpRenderTree/assets/results/layout_tests_failed.txt
index af7658b..5b64b9a 100644
--- a/tests/DumpRenderTree/assets/results/layout_tests_failed.txt
+++ b/tests/DumpRenderTree/assets/results/layout_tests_failed.txt
@@ -27,19 +27,12 @@
 /sdcard/android/layout_tests/accessibility/aria-label.html
 /sdcard/android/layout_tests/accessibility/textarea-line-for-index.html
 /sdcard/android/layout_tests/accessibility/nochildren-elements.html
-/sdcard/android/layout_tests/animations/play-state.html
-/sdcard/android/layout_tests/animations/animation-start-event-destroy-renderer.html
-/sdcard/android/layout_tests/animations/import.html
 /sdcard/android/layout_tests/animations/keyframes-to-missing.html
 /sdcard/android/layout_tests/animations/animation-hit-test.html
-/sdcard/android/layout_tests/animations/keyframes-comma-separated.html
 /sdcard/android/layout_tests/animations/animation-hit-test-transform.html
-/sdcard/android/layout_tests/animations/keyframes-rule.html
 /sdcard/android/layout_tests/animations/animation-controller-drt-api.html
 /sdcard/android/layout_tests/animations/keyframes-from-missing.html
-/sdcard/android/layout_tests/animations/animation-end-event-destroy-renderer.html
 /sdcard/android/layout_tests/animations/change-keyframes-name.html
-/sdcard/android/layout_tests/animations/keyframes-out-of-order.html
 /sdcard/android/layout_tests/animations/change-keyframes.html
 /sdcard/android/layout_tests/editing/style/remove-underline-from-stylesheet.html
 /sdcard/android/layout_tests/editing/style/remove-underline-in-bold.html
@@ -168,6 +161,7 @@
 /sdcard/android/layout_tests/fast/encoding/utf-32-little-endian-nobom.xml
 /sdcard/android/layout_tests/fast/encoding/char-encoding-mac.html
 /sdcard/android/layout_tests/fast/encoding/charset-koi8-u.html
+/sdcard/android/layout_tests/fast/workers/worker-location.html
 /sdcard/android/layout_tests/fast/selectors/lang-inheritance.html
 /sdcard/android/layout_tests/fast/selectors/lang-vs-xml-lang.html
 /sdcard/android/layout_tests/fast/selectors/lang-inheritance2.html
@@ -228,6 +222,7 @@
 /sdcard/android/layout_tests/fast/events/arrow-keys-on-body.html
 /sdcard/android/layout_tests/fast/events/ondragenter.html
 /sdcard/android/layout_tests/fast/events/pointer-events.html
+/sdcard/android/layout_tests/fast/events/scroll-to-anchor-in-overflow-hidden.html
 /sdcard/android/layout_tests/fast/events/autoscroll-nonscrollable-iframe-in-scrollable-div.html
 /sdcard/android/layout_tests/fast/events/keypress-focus-change.html
 /sdcard/android/layout_tests/fast/events/key-events-in-input-text.html
@@ -285,7 +280,9 @@
 /sdcard/android/layout_tests/fast/dom/navigator-detached-no-crash.html
 /sdcard/android/layout_tests/fast/dom/object-embed-plugin-scripting.html
 /sdcard/android/layout_tests/fast/dom/node-filter-gc.html
+/sdcard/android/layout_tests/fast/dom/noscript-canvas-in-created-html-document.html
 /sdcard/android/layout_tests/fast/dom/getClientRects.html
+/sdcard/android/layout_tests/fast/dom/null-document-location-href-put-crash.html
 /sdcard/android/layout_tests/fast/dom/prototype-inheritance-2.html
 /sdcard/android/layout_tests/fast/dom/location-new-window-no-crash.html
 /sdcard/android/layout_tests/fast/dom/gc-9.html
@@ -437,15 +434,8 @@
 /sdcard/android/layout_tests/fast/css/resize-single-axis.html
 /sdcard/android/layout_tests/fast/css/percent-character-as-value.html
 /sdcard/android/layout_tests/fast/css/uri-token-parsing.html
-/sdcard/android/layout_tests/fast/css/mask-missing-image-crash.html
-/sdcard/android/layout_tests/fast/css/parse-timing-function-crash.html
-/sdcard/android/layout_tests/fast/css/background-position-inherit.html
-/sdcard/android/layout_tests/fast/css/readonly-pseudoclass-opera-003.html
 /sdcard/android/layout_tests/fast/css/zoom-body-scroll.html
-/sdcard/android/layout_tests/fast/css/font-family-builtins.html
 /sdcard/android/layout_tests/fast/css/invalid-percentage-property.html
-/sdcard/android/layout_tests/fast/css/remove-shorthand.html
-/sdcard/android/layout_tests/fast/css/overflow-property.html
 /sdcard/android/layout_tests/fast/parser/external-entities-in-xslt.xml
 /sdcard/android/layout_tests/fast/parser/xml-declaration-missing-ending-mark.html
 /sdcard/android/layout_tests/fast/parser/tabindex-parsing.html
@@ -458,6 +448,7 @@
 /sdcard/android/layout_tests/fast/loader/local-iFrame-source-from-local.html
 /sdcard/android/layout_tests/fast/loader/null-request-after-willSendRequest.html
 /sdcard/android/layout_tests/fast/loader/stop-provisional-loads.html
+/sdcard/android/layout_tests/fast/loader/location-port.html
 /sdcard/android/layout_tests/fast/loader/user-style-sheet-resource-load-callbacks.html
 /sdcard/android/layout_tests/fast/loader/policy-delegate-action-hit-test-zoomed.html
 /sdcard/android/layout_tests/fast/loader/subframe-navigate-during-main-frame-load.html
@@ -532,11 +523,372 @@
 /sdcard/android/layout_tests/fast/frames/frame-length-fractional.html
 /sdcard/android/layout_tests/fast/frames/iframe-name-and-id.html
 /sdcard/android/layout_tests/fast/loading/subframe-removes-itself.html
+/sdcard/android/layout_tests/http/tests/media/video-seekable-stall.html
+/sdcard/android/layout_tests/http/tests/media/remove-while-loading.html
+/sdcard/android/layout_tests/http/tests/media/video-play-stall.html
+/sdcard/android/layout_tests/http/tests/media/video-play-stall-seek.html
+/sdcard/android/layout_tests/http/tests/plugins/npapi-response-headers.html
+/sdcard/android/layout_tests/http/tests/plugins/get-url.html
+/sdcard/android/layout_tests/http/tests/plugins/interrupted-get-url.html
+/sdcard/android/layout_tests/http/tests/plugins/post-url-file.html
+/sdcard/android/layout_tests/http/tests/plugins/cross-frame-object-access.html
+/sdcard/android/layout_tests/http/tests/plugins/local-geturl-from-remote.html
+/sdcard/android/layout_tests/http/tests/plugins/geturlnotify-from-npp-destroystream.html
+/sdcard/android/layout_tests/http/tests/mime/standard-mode-does-not-load-stylesheet-with-text-plain-and-css-extension.html
+/sdcard/android/layout_tests/http/tests/mime/standard-mode-does-not-load-stylesheet-with-text-plain.html
+/sdcard/android/layout_tests/http/tests/local/drag-over-remote-content.html
+/sdcard/android/layout_tests/http/tests/misc/image-blocked-src-change.html
+/sdcard/android/layout_tests/http/tests/misc/acid3.html
+/sdcard/android/layout_tests/http/tests/misc/dns-prefetch-control.html
+/sdcard/android/layout_tests/http/tests/misc/will-send-request-returns-null-on-redirect.html
+/sdcard/android/layout_tests/http/tests/misc/isindex-formdata.html
+/sdcard/android/layout_tests/http/tests/misc/image-blocked-src-no-change.html
+/sdcard/android/layout_tests/http/tests/misc/policy-delegate-called-twice.html
+/sdcard/android/layout_tests/http/tests/misc/window-dot-stop.html
+/sdcard/android/layout_tests/http/tests/misc/css-reject-any-type-in-strict-mode.html
+/sdcard/android/layout_tests/http/tests/misc/favicon-loads-with-images-disabled.html
+/sdcard/android/layout_tests/http/tests/misc/SVGFont-delayed-load.html
+/sdcard/android/layout_tests/http/tests/misc/location-test-xsl-style-sheet.xml
+/sdcard/android/layout_tests/http/tests/misc/redirect-to-external-url.html
+/sdcard/android/layout_tests/http/tests/misc/submit-get-in-utf7.html
+/sdcard/android/layout_tests/http/tests/cookies/simple-cookies-max-age.html
+/sdcard/android/layout_tests/http/tests/cookies/simple-cookies-expired.html
+/sdcard/android/layout_tests/http/tests/cookies/multiple-cookies.html
+/sdcard/android/layout_tests/http/tests/wml/access-target-path-deny.html
+/sdcard/android/layout_tests/http/tests/wml/post-data-to-server.html
+/sdcard/android/layout_tests/http/tests/wml/go-task-get-method-accept-charset.html
+/sdcard/android/layout_tests/http/tests/wml/access-target.html
+/sdcard/android/layout_tests/http/tests/wml/access-target-domain-deny.html
+/sdcard/android/layout_tests/http/tests/wml/go-task-post-method-accept-charset.html
+/sdcard/android/layout_tests/http/tests/wml/go-task-get-method.html
+/sdcard/android/layout_tests/http/tests/wml/go-task-post-method.html
+/sdcard/android/layout_tests/http/tests/navigation/success200-reload.html
+/sdcard/android/layout_tests/http/tests/navigation/redirect-cycle.html
+/sdcard/android/layout_tests/http/tests/navigation/reload-subframe-frame.html
+/sdcard/android/layout_tests/http/tests/navigation/window-open-adds-history-item.html
+/sdcard/android/layout_tests/http/tests/navigation/success200-goback.html
+/sdcard/android/layout_tests/http/tests/navigation/timerredirect-basic.html
+/sdcard/android/layout_tests/http/tests/navigation/lockedhistory-iframe.html
+/sdcard/android/layout_tests/http/tests/navigation/document-location-click-timeout.html
+/sdcard/android/layout_tests/http/tests/navigation/post-goback2.html
+/sdcard/android/layout_tests/http/tests/navigation/onload-navigation-iframe-timeout.html
+/sdcard/android/layout_tests/http/tests/navigation/location-assign-adds-history-item.html
+/sdcard/android/layout_tests/http/tests/navigation/anchor-goback.html
+/sdcard/android/layout_tests/http/tests/navigation/redirect-load-no-form-restoration.html
+/sdcard/android/layout_tests/http/tests/navigation/metaredirect-subframeload.html
+/sdcard/android/layout_tests/http/tests/navigation/javascriptlink-subframeload.html
+/sdcard/android/layout_tests/http/tests/navigation/metaredirect-basic.html
+/sdcard/android/layout_tests/http/tests/navigation/success200-subframeload.html
+/sdcard/android/layout_tests/http/tests/navigation/post-goback-same-url.html
+/sdcard/android/layout_tests/http/tests/navigation/restore-form-state-https.html
+/sdcard/android/layout_tests/http/tests/navigation/success200-frames.html
+/sdcard/android/layout_tests/http/tests/navigation/redirect302-basic.html
+/sdcard/android/layout_tests/http/tests/navigation/document-location-mouseover.html
+/sdcard/android/layout_tests/http/tests/navigation/redirect302-goback.html
+/sdcard/android/layout_tests/http/tests/navigation/anchor-subframeload.html
+/sdcard/android/layout_tests/http/tests/navigation/target-frame-from-window.html
+/sdcard/android/layout_tests/http/tests/navigation/slowmetaredirect-basic.html
+/sdcard/android/layout_tests/http/tests/navigation/reload-subframe-iframe.html
+/sdcard/android/layout_tests/http/tests/navigation/success200-loadsame.html
+/sdcard/android/layout_tests/http/tests/navigation/relativeanchor-basic.html
+/sdcard/android/layout_tests/http/tests/navigation/redirect302-subframeload.html
+/sdcard/android/layout_tests/http/tests/navigation/relativeanchor-goback.html
+/sdcard/android/layout_tests/http/tests/navigation/metaredirect-goback.html
+/sdcard/android/layout_tests/http/tests/navigation/redirect302-frames.html
+/sdcard/android/layout_tests/http/tests/navigation/multiple-back-forward-entries.html
+/sdcard/android/layout_tests/http/tests/navigation/javascriptlink-goback.html
+/sdcard/android/layout_tests/http/tests/navigation/success200-basic.html
+/sdcard/android/layout_tests/http/tests/navigation/postredirect-goback2.html
+/sdcard/android/layout_tests/http/tests/navigation/timerredirect-goback.html
+/sdcard/android/layout_tests/http/tests/navigation/location-href-set-adds-history-item.html
+/sdcard/android/layout_tests/http/tests/navigation/anchor-basic.html
+/sdcard/android/layout_tests/http/tests/navigation/document-location-click.html
+/sdcard/android/layout_tests/http/tests/navigation/onload-navigation-iframe.html
+/sdcard/android/layout_tests/http/tests/navigation/relativeanchor-frames.html
+/sdcard/android/layout_tests/http/tests/navigation/metaredirect-frames.html
+/sdcard/android/layout_tests/http/tests/navigation/location-replace-adds-history-item.html
+/sdcard/android/layout_tests/http/tests/navigation/success200-frames-loadsame.html
+/sdcard/android/layout_tests/http/tests/navigation/back-to-slow-frame.html
+/sdcard/android/layout_tests/http/tests/navigation/new-window-redirect-history.html
+/sdcard/android/layout_tests/http/tests/navigation/javascriptlink-basic.html
+/sdcard/android/layout_tests/http/tests/navigation/timerredirect-subframeload.html
+/sdcard/android/layout_tests/http/tests/navigation/location-set-adds-history-item.html
+/sdcard/android/layout_tests/http/tests/navigation/onload-navigation-iframe-2.html
+/sdcard/android/layout_tests/http/tests/navigation/reload-subframe-object.html
+/sdcard/android/layout_tests/http/tests/navigation/timerredirect-frames.html
+/sdcard/android/layout_tests/http/tests/navigation/slowtimerredirect-basic.html
+/sdcard/android/layout_tests/http/tests/navigation/window-open-adds-history-item2.html
+/sdcard/android/layout_tests/http/tests/navigation/document-location-onload.html
+/sdcard/android/layout_tests/http/tests/history/redirect-meta-refresh-2-seconds.html
+/sdcard/android/layout_tests/http/tests/history/redirect-js-location-assign-before-load.html
+/sdcard/android/layout_tests/http/tests/history/redirect-js-location-href-0-seconds.html
+/sdcard/android/layout_tests/http/tests/history/redirect-js-location-href-2-seconds.html
+/sdcard/android/layout_tests/http/tests/history/redirect-js-form-submit-0-seconds.html
+/sdcard/android/layout_tests/http/tests/history/redirect-js-form-submit-2-seconds.html
+/sdcard/android/layout_tests/http/tests/history/redirect-js-location-0-seconds.html
+/sdcard/android/layout_tests/http/tests/history/redirect-js-location-2-seconds.html
+/sdcard/android/layout_tests/http/tests/history/redirect-js-location-href-before-load.html
+/sdcard/android/layout_tests/http/tests/history/redirect-js-location-replace-0-seconds.html
+/sdcard/android/layout_tests/http/tests/history/redirect-js-location-replace-2-seconds.html
+/sdcard/android/layout_tests/http/tests/history/redirect-js-document-location-0-seconds.html
+/sdcard/android/layout_tests/http/tests/history/redirect-js-document-location-2-seconds.html
+/sdcard/android/layout_tests/http/tests/history/redirect-js-form-submit-before-load.html
+/sdcard/android/layout_tests/http/tests/history/redirect-js-location-assign-0-seconds.html
+/sdcard/android/layout_tests/http/tests/history/redirect-js-location-assign-2-seconds.html
+/sdcard/android/layout_tests/http/tests/history/redirect-js-location-before-load.html
+/sdcard/android/layout_tests/http/tests/history/redirect-js-location-replace-before-load.html
+/sdcard/android/layout_tests/http/tests/history/redirect-js-document-location-before-load.html
+/sdcard/android/layout_tests/http/tests/history/redirect-meta-refresh-0-seconds.html
+/sdcard/android/layout_tests/http/tests/cache/subresource-expiration.html
+/sdcard/android/layout_tests/http/tests/appcache/local-content.html
+/sdcard/android/layout_tests/http/tests/appcache/max-size.html
+/sdcard/android/layout_tests/http/tests/security/aboutBlank/xss-DENIED-set-opener.html
+/sdcard/android/layout_tests/http/tests/security/aboutBlank/xss-DENIED-navigate-opener-javascript-url.html
+/sdcard/android/layout_tests/http/tests/security/aboutBlank/xss-DENIED-navigate-opener-document-write.html
+/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-from-javascript-url-window-open.html
+/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-2-level.html
+/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-subframe.html
+/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-window-open.html
+/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe-location-change.html
+/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-from-data-url-sub-frame.html
+/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe.html
+/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-window-open.html
+/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-from-data-url-sub-frame-2-level.html
+/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-uppercase.html
+/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-to-data-url-window-open.html
+/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-from-data-url-sub-frame-to-data-url-sub-frame.html
+/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-from-data-url-to-data-url.html
+/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-to-data-url-from-data-url.html
+/sdcard/android/layout_tests/http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame.html
+/sdcard/android/layout_tests/http/tests/security/clipboard/clipboard-file-access.html
+/sdcard/android/layout_tests/http/tests/security/isolatedWorld/image-prototype.html
+/sdcard/android/layout_tests/http/tests/security/isolatedWorld/body-properties.html
+/sdcard/android/layout_tests/http/tests/security/isolatedWorld/number-prototype.html
+/sdcard/android/layout_tests/http/tests/security/isolatedWorld/body-prototype.html
+/sdcard/android/layout_tests/http/tests/security/isolatedWorld/global-variables.html
+/sdcard/android/layout_tests/http/tests/security/isolatedWorld/location-prototype.html
+/sdcard/android/layout_tests/http/tests/security/isolatedWorld/image-properties.html
+/sdcard/android/layout_tests/http/tests/security/isolatedWorld/document-open.html
+/sdcard/android/layout_tests/http/tests/security/isolatedWorld/document-prototype.html
+/sdcard/android/layout_tests/http/tests/security/isolatedWorld/window-properties.html
+/sdcard/android/layout_tests/http/tests/security/isolatedWorld/location-properties.html
+/sdcard/android/layout_tests/http/tests/security/isolatedWorld/all-window-prototypes.html
+/sdcard/android/layout_tests/http/tests/security/isolatedWorld/click-event.html
+/sdcard/android/layout_tests/http/tests/security/isolatedWorld/all-window-properties.html
+/sdcard/android/layout_tests/http/tests/security/isolatedWorld/document-properties.html
+/sdcard/android/layout_tests/http/tests/security/isolatedWorld/string-prototype.html
+/sdcard/android/layout_tests/http/tests/security/isolatedWorld/object-prototype.html
+/sdcard/android/layout_tests/http/tests/security/listener/xss-window-onclick-addEventListener.html
+/sdcard/android/layout_tests/http/tests/security/listener/xss-window-onclick-shortcut.html
+/sdcard/android/layout_tests/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-allow.html
+/sdcard/android/layout_tests/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny.html
+/sdcard/android/layout_tests/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body.html
+/sdcard/android/layout_tests/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html
+/sdcard/android/layout_tests/http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-allow.html
+/sdcard/android/layout_tests/http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html
+/sdcard/android/layout_tests/http/tests/security/XFrameOptions/x-frame-options-deny.html
+/sdcard/android/layout_tests/http/tests/security/frameNavigation/xss-ALLOWED-targeted-subframe-navigation-change.html
+/sdcard/android/layout_tests/http/tests/security/frameNavigation/xss-DENIED-targeted-link-navigation.html
+/sdcard/android/layout_tests/http/tests/security/frameNavigation/xss-DENIED-plugin-navigation.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNode.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNodeNS.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttribute.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNS.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNode.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNodeNS.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-sub-frame-2-level.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-to-javscript-url.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-ALLOWED-to-javascript-url-from-javscript-url.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-getAttribute-value.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-htmldom.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-ALLOWED-to-javascript-url-sub-frame-2-level.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-window-open.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-DENIED-from-javascript-url-in-foreign-domain-window-open.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-location-htmldom.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-getAttribute-value.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-sub-frame.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-sub-frame-to-javascript-url-sub-frame.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-DENIED-to-javascript-url-in-foreign-domain-subframe.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-ALLOWED-to-javascript-url-window-open.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-htmldom.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-DENIED-to-javascript-url-in-foreign-domain-window-open.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-ALLOWED-to-javascript-url-sub-frame.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttribute.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNS.html
+/sdcard/android/layout_tests/http/tests/security/javascriptURL/xss-DENIED-from-javascript-url-in-foreign-domain-subframe.html
+/sdcard/android/layout_tests/http/tests/security/originHeader/origin-header-for-empty.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/base-href-null-char.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/base-href-control-char.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/faux-script1.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/javascript-link-control-char.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-convoluted.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/dom-write-location.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/javascript-link-HTML-entities-control-char.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/object-embed-tag-control-char.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/javascript-link-null-char.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/anchor-url-dom-write-location.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/link-onclick-ampersand.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-with-source-double-quote.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-with-source-no-quote.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/base-href-safe3.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/http-equiv-utf-7-encoded.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/link-onclick-control-char.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/base-href-scheme-relative.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-open-redirect.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/object-embed-tag-null-char.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/faux-script3.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/link-onclick-entities.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-post.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/embed-tag-control-char.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/property-escape.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-post-null-char.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/javascript-link-HTML-entities.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-null-char.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-addslashes-single-quote.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/dom-write-innerHTML.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-with-source-entities.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/dom-write-location-inline-event.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/malformed-HTML.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/javascript-link-ampersand.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/link-onclick.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/anchor-url-dom-write-location-inline-event.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/base-href-safe2.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/anchor-url-dom-write-location-inline-event-null-char.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/dom-write-URL.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-redirect.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/object-tag.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-addslashes-backslash.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/dom-write-location-javascript-URL.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/embed-tag.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/faux-script2.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/anchor-url-dom-write-location-javascript-URL.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-with-source-relative-scheme.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/img-onerror-tricky.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/javascript-link-HTML-entities-named.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/javascript-link-HTML-entities-null-char.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-addslashes-null-char.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/link-opens-new-window.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-utf-7-encoded.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-utf-7.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-with-source.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-addslashes-double-quote.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-safe.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/link-onclick-null-char.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/javascript-link.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-control-char.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-with-source-null-char.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/iframe-javascript-url.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-src-redirect-safe.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-with-source-control-char.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/get-from-iframe.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/inline-event-HTML-entities.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/post-from-iframe.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-post-control-char.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/object-embed-tag.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/base-href.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/script-tag-entities.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/base-href-safe.html
+/sdcard/android/layout_tests/http/tests/security/xssAuditor/embed-tag-null-char.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-location-get-override.html
+/sdcard/android/layout_tests/http/tests/security/protocol-compare-case-insensitive.html
+/sdcard/android/layout_tests/http/tests/security/xss-DENIED-xsl-external-entity.xml
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-history-get-override.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-get-override.html
+/sdcard/android/layout_tests/http/tests/security/cross-origin-xsl-BLOCKED.html
+/sdcard/android/layout_tests/http/tests/security/local-iFrame-from-remote.html
+/sdcard/android/layout_tests/http/tests/security/credentials-in-referer.html
+/sdcard/android/layout_tests/http/tests/security/xss-DENIED-xsl-external-entity-redirect.xml
+/sdcard/android/layout_tests/http/tests/security/local-video-poster-from-remote.html
+/sdcard/android/layout_tests/http/tests/security/local-CSS-from-remote.html
+/sdcard/android/layout_tests/http/tests/security/local-user-CSS-from-remote.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-object-prototype.html
+/sdcard/android/layout_tests/http/tests/security/dataTransfer-set-data-file-url.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-enumeration.html
+/sdcard/android/layout_tests/http/tests/security/host-compare-case-insensitive.html
+/sdcard/android/layout_tests/http/tests/security/xss-DENIED-xsl-document.xml
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-protocol.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-private-browsing.html
+/sdcard/android/layout_tests/http/tests/security/feed-urls-from-remote.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-put.html
+/sdcard/android/layout_tests/http/tests/security/canvas-remote-read-svg-image.html
+/sdcard/android/layout_tests/http/tests/security/window-properties-clear-domain.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-callback-explicit-domain-DENY.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-get.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-port.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-document-direct.html
+/sdcard/android/layout_tests/http/tests/security/window-properties-pass.html
+/sdcard/android/layout_tests/http/tests/security/local-video-src-from-remote.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-history-put.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-child-explicit-domain.html
+/sdcard/android/layout_tests/http/tests/security/local-video-source-from-remote.html
+/sdcard/android/layout_tests/http/tests/security/drag-over-remote-content-iframe.html
+/sdcard/android/layout_tests/http/tests/security/local-JavaScript-from-remote.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-parent-explicit-domain.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-location-put.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-history-get.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-get-custom-property-cached.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-location-get.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-delete.html
+/sdcard/android/layout_tests/http/tests/security/xss-DENIED-xsl-document-redirect.xml
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-protocol-explicit-domain.html
+/sdcard/android/layout_tests/http/tests/security/window-properties-clear-port.html
+/sdcard/android/layout_tests/http/tests/security/frame-loading-via-document-write.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-port-explicit-domain.html
+/sdcard/android/layout_tests/http/tests/security/local-image-from-remote.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/workers/methods-async.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/workers/methods.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/008.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/methods-async.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/methods.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/uri-resolution-opera-open-005.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/upload-onload-event.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/small-chunks-response-text.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-non-simple-allow-async.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/uri-resolution-opera-open-009.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/frame-unload-abort-crash.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-non-simple-deny-cached.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/uri-resolution-opera-open-006.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/upload-onprogress-event.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-allow.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/cache-override.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/xhr-onunload.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/methods-lower-case.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/uri-resolution-opera-open-007.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/svg-created-by-xhr-disallowed-in-dashboard.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/uri-resolution-opera-open-004.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-missing-file-exception.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/cookies.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/uri-resolution-opera-open-010.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/redirect-cross-origin-tripmine.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/origin-header-same-origin-get-sync.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/response-encoding.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/frame-load-cancelled-abort.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/upload-progress-events.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/xml-encoding.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/default-content-type-dashboard.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/abort-should-cancel-load.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-whitelist-request-headers.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/uri-resolution-opera-open-008.html
+/sdcard/android/layout_tests/http/tests/loading/preload-img-test.html
+/sdcard/android/layout_tests/http/tests/loading/gmail-assert-on-load.html
+/sdcard/android/layout_tests/http/tests/loading/text-content-type-with-binary-extension.html
+/sdcard/android/layout_tests/http/tests/loading/basic.html
+/sdcard/android/layout_tests/http/tests/loading/slow-parsing-subframe.html
+/sdcard/android/layout_tests/http/tests/loading/deleted-host-in-resource-load-delegate-callback.html
+/sdcard/android/layout_tests/http/tests/loading/bad-scheme-subframe.html
+/sdcard/android/layout_tests/http/tests/loading/location-hash-reload-cycle.html
+/sdcard/android/layout_tests/http/tests/loading/bad-server-subframe.html
+/sdcard/android/layout_tests/http/tests/loading/empty-subframe.html
+/sdcard/android/layout_tests/http/tests/loading/redirect-methods.html
 /sdcard/android/layout_tests/media/video-error-does-not-exist.html
 /sdcard/android/layout_tests/media/audio-constructor.html
+/sdcard/android/layout_tests/media/video-play-empty-events.html
 /sdcard/android/layout_tests/media/video-append-source.html
 /sdcard/android/layout_tests/media/media-load-event.html
 /sdcard/android/layout_tests/media/unsupported-rtsp.html
+/sdcard/android/layout_tests/media/video-dom-autoplay.html
 /sdcard/android/layout_tests/media/video-currentTime-set2.html
 /sdcard/android/layout_tests/media/video-muted.html
 /sdcard/android/layout_tests/media/progress-event.html
@@ -558,25 +910,33 @@
 /sdcard/android/layout_tests/media/video-controls-zoomed.html
 /sdcard/android/layout_tests/media/video-src-invalid-remove.html
 /sdcard/android/layout_tests/media/video-volume.html
+/sdcard/android/layout_tests/media/video-size.html
 /sdcard/android/layout_tests/media/controls-right-click-on-timebar.html
 /sdcard/android/layout_tests/media/video-currentTime.html
 /sdcard/android/layout_tests/media/audio-constructor-autobuffer.html
 /sdcard/android/layout_tests/media/broken-video.html
 /sdcard/android/layout_tests/media/video-buffered.html
+/sdcard/android/layout_tests/media/video-load-readyState.html
 /sdcard/android/layout_tests/media/video-load-networkState.html
 /sdcard/android/layout_tests/media/unsupported-tracks.html
 /sdcard/android/layout_tests/media/video-source-add-src.html
 /sdcard/android/layout_tests/media/video-seek-past-end-paused.html
+/sdcard/android/layout_tests/media/media-startTime.html
 /sdcard/android/layout_tests/media/video-source-error.html
+/sdcard/android/layout_tests/media/video-autoplay.html
 /sdcard/android/layout_tests/media/video-controls.html
 /sdcard/android/layout_tests/media/video-canvas-source.html
+/sdcard/android/layout_tests/media/video-timeupdate-during-playback.html
 /sdcard/android/layout_tests/media/video-currentTime-set.html
+/sdcard/android/layout_tests/media/controls-css-overload.html
 /sdcard/android/layout_tests/media/video-source-type-params.html
 /sdcard/android/layout_tests/media/event-attributes.html
 /sdcard/android/layout_tests/media/audio-data-url.html
 /sdcard/android/layout_tests/media/video-src-plus-source.html
 /sdcard/android/layout_tests/media/video-no-autoplay.html
+/sdcard/android/layout_tests/media/video-pause-empty-events.html
 /sdcard/android/layout_tests/media/video-document-types.html
+/sdcard/android/layout_tests/media/video-src-remove.html
 /sdcard/android/layout_tests/media/audio-delete-while-slider-thumb-clicked.html
 /sdcard/android/layout_tests/media/video-error-abort.html
 /sdcard/android/layout_tests/media/video-size-intrinsic-scale.html
@@ -625,8 +985,6 @@
 /sdcard/android/layout_tests/transitions/transition-hit-test.html
 /sdcard/android/layout_tests/transitions/opacity-transition-zindex.html
 /sdcard/android/layout_tests/transitions/interrupted-all-transition.html
-/sdcard/android/layout_tests/transitions/mask-transitions.html
-/sdcard/android/layout_tests/transitions/zero-duration-with-non-zero-delay-start.html
 /sdcard/android/layout_tests/transitions/hang-with-bad-transition-list.html
 /sdcard/android/layout_tests/transitions/zero-duration-with-non-zero-delay-end.html
 /sdcard/android/layout_tests/transitions/remove-transition-style.html
diff --git a/tests/DumpRenderTree/assets/results/layout_tests_nontext.txt b/tests/DumpRenderTree/assets/results/layout_tests_nontext.txt
index 121b5a1..665ef07 100644
--- a/tests/DumpRenderTree/assets/results/layout_tests_nontext.txt
+++ b/tests/DumpRenderTree/assets/results/layout_tests_nontext.txt
@@ -3233,6 +3233,34 @@
 /sdcard/android/layout_tests/fonts/fantasy.html
 /sdcard/android/layout_tests/fonts/serif.html
 /sdcard/android/layout_tests/fonts/sans-serif.html
+/sdcard/android/layout_tests/http/tests/webarchive/test-css-url-encoding-shift-jis.html
+/sdcard/android/layout_tests/http/tests/webarchive/test-css-url-encoding.html
+/sdcard/android/layout_tests/http/tests/webarchive/test-css-url-encoding-utf-8.html
+/sdcard/android/layout_tests/http/tests/webarchive/test-preload-resources.html
+/sdcard/android/layout_tests/http/tests/multipart/invalid-image-data.html
+/sdcard/android/layout_tests/http/tests/multipart/invalid-image-data-standalone.html
+/sdcard/android/layout_tests/http/tests/local/file-url-sent-as-referer.html
+/sdcard/android/layout_tests/http/tests/misc/location-replace-crossdomain.html
+/sdcard/android/layout_tests/http/tests/misc/acid2.html
+/sdcard/android/layout_tests/http/tests/misc/acid2-pixel.html
+/sdcard/android/layout_tests/http/tests/misc/favicon-as-image.html
+/sdcard/android/layout_tests/http/tests/misc/generated-content-inside-table.html
+/sdcard/android/layout_tests/http/tests/misc/willCacheResponse-delegate-callback.html
+/sdcard/android/layout_tests/http/tests/misc/iframe404.html
+/sdcard/android/layout_tests/http/tests/misc/frame-access-during-load.html
+/sdcard/android/layout_tests/http/tests/navigation/postredirect-goback1.html
+/sdcard/android/layout_tests/http/tests/navigation/error404-subframeload.html
+/sdcard/android/layout_tests/http/tests/navigation/error404-basic.html
+/sdcard/android/layout_tests/http/tests/navigation/anchor-frames.html
+/sdcard/android/layout_tests/http/tests/navigation/postredirect-basic.html
+/sdcard/android/layout_tests/http/tests/navigation/post-goback1.html
+/sdcard/android/layout_tests/http/tests/navigation/post-basic.html
+/sdcard/android/layout_tests/http/tests/navigation/post-frames.html
+/sdcard/android/layout_tests/http/tests/navigation/error404-goback.html
+/sdcard/android/layout_tests/http/tests/navigation/javascriptlink-frames.html
+/sdcard/android/layout_tests/http/tests/navigation/postredirect-frames.html
+/sdcard/android/layout_tests/http/tests/navigation/error404-frames.html
+/sdcard/android/layout_tests/http/tests/loading/simple-subframe.html
 /sdcard/android/layout_tests/media/video-display-toggle.html
 /sdcard/android/layout_tests/media/video-transformed.html
 /sdcard/android/layout_tests/media/video-empty-source.html
diff --git a/tests/DumpRenderTree/assets/results/layout_tests_passed.txt b/tests/DumpRenderTree/assets/results/layout_tests_passed.txt
index b40a21e..942b6479 100644
--- a/tests/DumpRenderTree/assets/results/layout_tests_passed.txt
+++ b/tests/DumpRenderTree/assets/results/layout_tests_passed.txt
@@ -1,15 +1,20 @@
 /sdcard/android/layout_tests/accessibility/non-native-image-crash.html
 /sdcard/android/layout_tests/animations/animation-css-rule-types.html
 /sdcard/android/layout_tests/animations/animation-events-create.html
+/sdcard/android/layout_tests/animations/play-state.html
+/sdcard/android/layout_tests/animations/animation-start-event-destroy-renderer.html
 /sdcard/android/layout_tests/animations/combo-transform-translate+scale.html
 /sdcard/android/layout_tests/animations/transform-origin-vs-functions.html
 /sdcard/android/layout_tests/animations/simultaneous-start-transform.html
 /sdcard/android/layout_tests/animations/lineheight-animation.html
+/sdcard/android/layout_tests/animations/import.html
 /sdcard/android/layout_tests/animations/simultaneous-start-left.html
 /sdcard/android/layout_tests/animations/fill-unset-properties.html
 /sdcard/android/layout_tests/animations/multiple-keyframes.html
 /sdcard/android/layout_tests/animations/change-one-anim.html
+/sdcard/android/layout_tests/animations/keyframes-comma-separated.html
 /sdcard/android/layout_tests/animations/matrix-anim.html
+/sdcard/android/layout_tests/animations/keyframes-rule.html
 /sdcard/android/layout_tests/animations/generic-from-to.html
 /sdcard/android/layout_tests/animations/big-rotation.html
 /sdcard/android/layout_tests/animations/keyframe-timing-functions.html
@@ -18,11 +23,13 @@
 /sdcard/android/layout_tests/animations/animation-iteration-event-destroy-renderer.html
 /sdcard/android/layout_tests/animations/keyframes.html
 /sdcard/android/layout_tests/animations/multiple-animations.html
+/sdcard/android/layout_tests/animations/animation-end-event-destroy-renderer.html
 /sdcard/android/layout_tests/animations/transition-and-animation-2.html
 /sdcard/android/layout_tests/animations/import-crash.html
 /sdcard/android/layout_tests/animations/empty-keyframes.html
 /sdcard/android/layout_tests/animations/width-using-ems.html
 /sdcard/android/layout_tests/animations/combo-transform-rotate+scale.html
+/sdcard/android/layout_tests/animations/keyframes-out-of-order.html
 /sdcard/android/layout_tests/css1/units/zero-duration-without-units.html
 /sdcard/android/layout_tests/css2.1/atrule_longest_match.html
 /sdcard/android/layout_tests/css3/khtml-background-size-0x0-bmp.html
@@ -1231,6 +1238,23 @@
 /sdcard/android/layout_tests/fast/cookies/local-file-can-set-cookies.html
 /sdcard/android/layout_tests/fast/css-generated-content/empty-content-with-float-crash.html
 /sdcard/android/layout_tests/fast/css-generated-content/reset-content-to-initial.html
+/sdcard/android/layout_tests/fast/workers/worker-close.html
+/sdcard/android/layout_tests/fast/workers/worker-context-gc.html
+/sdcard/android/layout_tests/fast/workers/worker-constructor.html
+/sdcard/android/layout_tests/fast/workers/worker-timeout.html
+/sdcard/android/layout_tests/fast/workers/worker-messageport.html
+/sdcard/android/layout_tests/fast/workers/worker-gc.html
+/sdcard/android/layout_tests/fast/workers/worker-replace-self.html
+/sdcard/android/layout_tests/fast/workers/worker-event-listener.html
+/sdcard/android/layout_tests/fast/workers/worker-cloneport.html
+/sdcard/android/layout_tests/fast/workers/worker-call.html
+/sdcard/android/layout_tests/fast/workers/worker-messageport-gc.html
+/sdcard/android/layout_tests/fast/workers/stress-js-execution.html
+/sdcard/android/layout_tests/fast/workers/worker-terminate.html
+/sdcard/android/layout_tests/fast/workers/use-machine-stack.html
+/sdcard/android/layout_tests/fast/workers/worker-navigator.html
+/sdcard/android/layout_tests/fast/workers/worker-script-error.html
+/sdcard/android/layout_tests/fast/workers/worker-replace-global-constructor.html
 /sdcard/android/layout_tests/fast/transforms/container-transform-crash.html
 /sdcard/android/layout_tests/fast/leaks/001.html
 /sdcard/android/layout_tests/fast/leaks/002.html
@@ -1291,7 +1315,6 @@
 /sdcard/android/layout_tests/fast/events/onerror-bubbling.html
 /sdcard/android/layout_tests/fast/events/keydown-remove-frame.html
 /sdcard/android/layout_tests/fast/events/message-channel-gc-3.html
-/sdcard/android/layout_tests/fast/events/scroll-to-anchor-in-overflow-hidden.html
 /sdcard/android/layout_tests/fast/events/event-targets.html
 /sdcard/android/layout_tests/fast/events/space-scroll-event.html
 /sdcard/android/layout_tests/fast/events/onload-after-document-close-no-subresource.html
@@ -1943,14 +1966,12 @@
 /sdcard/android/layout_tests/fast/dom/image-object.html
 /sdcard/android/layout_tests/fast/dom/gc-5.html
 /sdcard/android/layout_tests/fast/dom/cssTarget-crash.html
-/sdcard/android/layout_tests/fast/dom/noscript-canvas-in-created-html-document.html
 /sdcard/android/layout_tests/fast/dom/DOMParser-assign-variable.html
 /sdcard/android/layout_tests/fast/dom/offset-parent-positioned-and-inline.html
 /sdcard/android/layout_tests/fast/dom/timer-clear-interval-in-handler.html
 /sdcard/android/layout_tests/fast/dom/implementation-createHTMLDocument.html
 /sdcard/android/layout_tests/fast/dom/iframe-document.html
 /sdcard/android/layout_tests/fast/dom/document-all-input.html
-/sdcard/android/layout_tests/fast/dom/null-document-location-href-put-crash.html
 /sdcard/android/layout_tests/fast/dom/getelementsbytagnamens-mixed-namespaces.html
 /sdcard/android/layout_tests/fast/dom/object-plugin-hides-properties.html
 /sdcard/android/layout_tests/fast/dom/gc-2.html
@@ -2344,6 +2365,13 @@
 /sdcard/android/layout_tests/fast/css/webkit-marquee-speed-unit-in-quirksmode.html
 /sdcard/android/layout_tests/fast/css/CSSPrimitiveValue-exceptions.html
 /sdcard/android/layout_tests/fast/css/empty-script.html
+/sdcard/android/layout_tests/fast/css/mask-missing-image-crash.html
+/sdcard/android/layout_tests/fast/css/parse-timing-function-crash.html
+/sdcard/android/layout_tests/fast/css/background-position-inherit.html
+/sdcard/android/layout_tests/fast/css/readonly-pseudoclass-opera-003.html
+/sdcard/android/layout_tests/fast/css/font-family-builtins.html
+/sdcard/android/layout_tests/fast/css/remove-shorthand.html
+/sdcard/android/layout_tests/fast/css/overflow-property.html
 /sdcard/android/layout_tests/fast/css/pseudo-required-optional-005.html
 /sdcard/android/layout_tests/fast/css/min-device-aspect-ratio.html
 /sdcard/android/layout_tests/fast/css/nested-rule-parent-sheet.html
@@ -2417,7 +2445,6 @@
 /sdcard/android/layout_tests/fast/history/subframe-is-visited.html
 /sdcard/android/layout_tests/fast/loader/early-load-cancel.html
 /sdcard/android/layout_tests/fast/loader/iframe-recursive-synchronous-load.html
-/sdcard/android/layout_tests/fast/loader/location-port.html
 /sdcard/android/layout_tests/fast/loader/local-css-allowed-in-strict-mode.html
 /sdcard/android/layout_tests/fast/loader/url-strip-cr-lf-tab.html
 /sdcard/android/layout_tests/fast/loader/hashchange-event.html
@@ -2513,33 +2540,301 @@
 /sdcard/android/layout_tests/fast/reflections/teardown-crash.html
 /sdcard/android/layout_tests/fast/reflections/reflection-computed-style.html
 /sdcard/android/layout_tests/fast/reflections/reflection-overflow-scroll.html
-/sdcard/android/layout_tests/media/video-play-empty-events.html
+/sdcard/android/layout_tests/http/tests/multipart/win-boundary-crash.html
+/sdcard/android/layout_tests/http/tests/multipart/stop-crash.html
+/sdcard/android/layout_tests/http/tests/mime/standard-mode-loads-stylesheet-with-text-css-and-invalid-type.html
+/sdcard/android/layout_tests/http/tests/mime/standard-mode-loads-stylesheet-with-empty-content-type.html
+/sdcard/android/layout_tests/http/tests/mime/standard-mode-loads-stylesheet-with-charset-and-css-extension.html
+/sdcard/android/layout_tests/http/tests/mime/standard-mode-loads-stylesheet-with-charset.html
+/sdcard/android/layout_tests/http/tests/local/style-access-before-stylesheet-loaded.html
+/sdcard/android/layout_tests/http/tests/local/stylesheet-and-script-load-order-http.html
+/sdcard/android/layout_tests/http/tests/local/link-stylesheet-preferred.html
+/sdcard/android/layout_tests/http/tests/local/stylesheet-and-script-load-order.html
+/sdcard/android/layout_tests/http/tests/misc/uncacheable-script-repeated.html
+/sdcard/android/layout_tests/http/tests/misc/embedCrasher.html
+/sdcard/android/layout_tests/http/tests/misc/multiple-submit.html
+/sdcard/android/layout_tests/http/tests/misc/empty-file-formdata.html
+/sdcard/android/layout_tests/http/tests/misc/submit-post-in-utf7.html
+/sdcard/android/layout_tests/http/tests/misc/text-refresh.html
+/sdcard/android/layout_tests/http/tests/misc/window-open-then-write.html
+/sdcard/android/layout_tests/http/tests/misc/submit-post-in-utf16be.html
+/sdcard/android/layout_tests/http/tests/misc/frame-default-enc-same-domain.html
+/sdcard/android/layout_tests/http/tests/misc/submit-post-in-utf32le.html
+/sdcard/android/layout_tests/http/tests/misc/iframe-domain-test.html
+/sdcard/android/layout_tests/http/tests/misc/frame-default-enc-different-domain.html
+/sdcard/android/layout_tests/http/tests/misc/css-accept-any-type.html
+/sdcard/android/layout_tests/http/tests/misc/url-in-utf7.html
+/sdcard/android/layout_tests/http/tests/misc/submit-get-in-utf32be.html
+/sdcard/android/layout_tests/http/tests/misc/meta-refresh-stray-single-quote.html
+/sdcard/android/layout_tests/http/tests/misc/canvas-pattern-from-incremental-image.html
+/sdcard/android/layout_tests/http/tests/misc/submit-get-in-utf16le.html
+/sdcard/android/layout_tests/http/tests/misc/url-in-utf32be.html
+/sdcard/android/layout_tests/http/tests/misc/timer-vs-loading.html
+/sdcard/android/layout_tests/http/tests/misc/font-face-in-multiple-segmented-faces.html
+/sdcard/android/layout_tests/http/tests/misc/url-in-utf16le.html
+/sdcard/android/layout_tests/http/tests/misc/refresh-meta-with-newline.html
+/sdcard/android/layout_tests/http/tests/misc/post-submit-button.html
+/sdcard/android/layout_tests/http/tests/misc/redirect-to-about-blank.html
+/sdcard/android/layout_tests/http/tests/misc/javascript-url-stop-loaders.html
+/sdcard/android/layout_tests/http/tests/misc/iframe-invalid-source-crash.html
+/sdcard/android/layout_tests/http/tests/misc/slow-preload-cancel.html
+/sdcard/android/layout_tests/http/tests/misc/object-image-error-with-onload.html
+/sdcard/android/layout_tests/http/tests/misc/image-error.html
+/sdcard/android/layout_tests/http/tests/misc/referrer.html
+/sdcard/android/layout_tests/http/tests/misc/cached-scripts.html
+/sdcard/android/layout_tests/http/tests/misc/empty-cookie.html
+/sdcard/android/layout_tests/http/tests/misc/submit-post-in-utf32be.html
+/sdcard/android/layout_tests/http/tests/misc/missing-style-sheet.html
+/sdcard/android/layout_tests/http/tests/misc/submit-post-in-utf16le.html
+/sdcard/android/layout_tests/http/tests/misc/submit-get-in-utf16be.html
+/sdcard/android/layout_tests/http/tests/misc/DOMContentLoaded-event.html
+/sdcard/android/layout_tests/http/tests/misc/onload-remove-iframe-crash-2.html
+/sdcard/android/layout_tests/http/tests/misc/submit-get-in-utf32le.html
+/sdcard/android/layout_tests/http/tests/misc/object-image-error.html
+/sdcard/android/layout_tests/http/tests/misc/createElementNamespace3.html
+/sdcard/android/layout_tests/http/tests/misc/url-in-utf16be.html
+/sdcard/android/layout_tests/http/tests/misc/url-in-utf32le.html
+/sdcard/android/layout_tests/http/tests/misc/crash-multiple-family-fontface.html
+/sdcard/android/layout_tests/http/tests/misc/BOM-override-script.html
+/sdcard/android/layout_tests/http/tests/misc/createElementNamespace1.xml
+/sdcard/android/layout_tests/http/tests/workers/text-encoding.html
+/sdcard/android/layout_tests/http/tests/workers/worker-redirect.html
+/sdcard/android/layout_tests/http/tests/workers/worker-importScripts.html
+/sdcard/android/layout_tests/http/tests/cookies/double-quoted-value-with-semi-colon.html
+/sdcard/android/layout_tests/http/tests/uri/resolve-encoding-relative.html
+/sdcard/android/layout_tests/http/tests/uri/escaped-entity.html
+/sdcard/android/layout_tests/http/tests/uri/utf8-path.html
+/sdcard/android/layout_tests/http/tests/navigation/changing-frame-hierarchy-in-onload.html
+/sdcard/android/layout_tests/http/tests/navigation/fallback-anchor-reload.html
+/sdcard/android/layout_tests/http/tests/navigation/back-send-referrer.html
+/sdcard/android/layout_tests/http/tests/incremental/slow-utf8-css.html
+/sdcard/android/layout_tests/http/tests/incremental/frame-focus-before-load.html
+/sdcard/android/layout_tests/http/tests/appcache/crash-when-navigating-away-then-back.html
+/sdcard/android/layout_tests/http/tests/appcache/offline-access.html
+/sdcard/android/layout_tests/http/tests/appcache/update-cache.html
+/sdcard/android/layout_tests/http/tests/appcache/manifest-with-empty-file.html
+/sdcard/android/layout_tests/http/tests/appcache/simple.html
+/sdcard/android/layout_tests/http/tests/appcache/wrong-signature-2.html
+/sdcard/android/layout_tests/http/tests/appcache/top-frame-3.html
+/sdcard/android/layout_tests/http/tests/appcache/online-whitelist.html
+/sdcard/android/layout_tests/http/tests/appcache/fallback.html
+/sdcard/android/layout_tests/http/tests/appcache/different-origin-manifest.html
+/sdcard/android/layout_tests/http/tests/appcache/empty-manifest.html
+/sdcard/android/layout_tests/http/tests/appcache/manifest-redirect.html
+/sdcard/android/layout_tests/http/tests/appcache/navigating-away-while-cache-attempt-in-progress.html
+/sdcard/android/layout_tests/http/tests/appcache/top-frame-4.html
+/sdcard/android/layout_tests/http/tests/appcache/wrong-signature.html
+/sdcard/android/layout_tests/http/tests/appcache/fail-on-update.html
+/sdcard/android/layout_tests/http/tests/appcache/foreign-iframe-main.html
+/sdcard/android/layout_tests/http/tests/appcache/xhr-foreign-resource.html
+/sdcard/android/layout_tests/http/tests/appcache/manifest-containing-itself.html
+/sdcard/android/layout_tests/http/tests/appcache/resource-redirect.html
+/sdcard/android/layout_tests/http/tests/appcache/idempotent-update.html
+/sdcard/android/layout_tests/http/tests/appcache/top-frame-1.html
+/sdcard/android/layout_tests/http/tests/appcache/main-resource-hash.html
+/sdcard/android/layout_tests/http/tests/appcache/manifest-parsing.html
+/sdcard/android/layout_tests/http/tests/appcache/404-manifest.html
+/sdcard/android/layout_tests/http/tests/appcache/wrong-content-type.html
+/sdcard/android/layout_tests/http/tests/appcache/resource-redirect-2.html
+/sdcard/android/layout_tests/http/tests/appcache/top-frame-2.html
+/sdcard/android/layout_tests/http/tests/appcache/404-resource.html
+/sdcard/android/layout_tests/http/tests/appcache/remove-cache.html
+/sdcard/android/layout_tests/http/tests/appcache/manifest-redirect-2.html
+/sdcard/android/layout_tests/http/tests/appcache/reload.html
+/sdcard/android/layout_tests/http/tests/appcache/cyrillic-uri.html
+/sdcard/android/layout_tests/http/tests/security/aboutBlank/security-context-alias.html
+/sdcard/android/layout_tests/http/tests/security/aboutBlank/security-context-write.html
+/sdcard/android/layout_tests/http/tests/security/aboutBlank/security-context-grandchildren-alias.html
+/sdcard/android/layout_tests/http/tests/security/aboutBlank/security-context-with-base-tag.html
+/sdcard/android/layout_tests/http/tests/security/aboutBlank/security-context.html
+/sdcard/android/layout_tests/http/tests/security/aboutBlank/window-open-self-about-blank.html
+/sdcard/android/layout_tests/http/tests/security/aboutBlank/security-context-grandchildren.html
+/sdcard/android/layout_tests/http/tests/security/aboutBlank/security-context-grandchildren-writeln-lexical.html
+/sdcard/android/layout_tests/http/tests/security/aboutBlank/security-context-window-open.html
+/sdcard/android/layout_tests/http/tests/security/aboutBlank/security-context-grandchildren-write-lexical.html
+/sdcard/android/layout_tests/http/tests/security/aboutBlank/security-context-grandchildren-lexical.html
+/sdcard/android/layout_tests/http/tests/security/aboutBlank/security-context-writeln.html
+/sdcard/android/layout_tests/http/tests/security/cookies/document-open.html
+/sdcard/android/layout_tests/http/tests/security/cookies/create-document.html
+/sdcard/android/layout_tests/http/tests/security/cookies/assign-document-url.html
+/sdcard/android/layout_tests/http/tests/security/cookies/basic.html
+/sdcard/android/layout_tests/http/tests/security/cookies/base-tag.html
+/sdcard/android/layout_tests/http/tests/security/cookies/base-about-blank.html
+/sdcard/android/layout_tests/http/tests/security/cookies/xmlhttprequest.html
+/sdcard/android/layout_tests/http/tests/security/listener/xss-JSTargetNode-onclick-shortcut.html
+/sdcard/android/layout_tests/http/tests/security/listener/xss-XMLHttpRequest-shortcut.html
+/sdcard/android/layout_tests/http/tests/security/listener/xss-JSTargetNode-onclick-addEventListener.html
+/sdcard/android/layout_tests/http/tests/security/listener/xss-XMLHttpRequest-addEventListener.html
+/sdcard/android/layout_tests/http/tests/security/MessagePort/event-listener-context.html
+/sdcard/android/layout_tests/http/tests/security/postMessage/delivery-order.html
+/sdcard/android/layout_tests/http/tests/security/postMessage/data-url-sends-null-origin.html
+/sdcard/android/layout_tests/http/tests/security/postMessage/origin-unaffected-by-base-tag.html
+/sdcard/android/layout_tests/http/tests/security/postMessage/origin-unaffected-by-document-domain.html
+/sdcard/android/layout_tests/http/tests/security/postMessage/javascript-page-still-sends-origin.html
+/sdcard/android/layout_tests/http/tests/security/postMessage/invalid-origin-throws-exception.html
+/sdcard/android/layout_tests/http/tests/security/postMessage/target-origin.html
+/sdcard/android/layout_tests/http/tests/security/frameNavigation/context-for-window-open.html
+/sdcard/android/layout_tests/http/tests/security/frameNavigation/context-for-location.html
+/sdcard/android/layout_tests/http/tests/security/frameNavigation/not-opener.html
+/sdcard/android/layout_tests/http/tests/security/frameNavigation/opener.html
+/sdcard/android/layout_tests/http/tests/security/frameNavigation/context-for-location-assign.html
+/sdcard/android/layout_tests/http/tests/security/frameNavigation/context-for-location-href.html
+/sdcard/android/layout_tests/http/tests/security/frameNavigation/xss-ALLOWED-parent-navigation-change.html
+/sdcard/android/layout_tests/http/tests/security/originHeader/origin-header-for-get.html
+/sdcard/android/layout_tests/http/tests/security/originHeader/origin-header-for-https.html
+/sdcard/android/layout_tests/http/tests/security/originHeader/origin-header-for-post.html
+/sdcard/android/layout_tests/http/tests/security/originHeader/origin-header-for-data.html
+/sdcard/android/layout_tests/http/tests/security/xss-DENIED-assign-location-hash.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-history-prototype.html
+/sdcard/android/layout_tests/http/tests/security/xss-DENIED-synchronous-form.html
+/sdcard/android/layout_tests/http/tests/security/canvas-remote-read-redirect-to-remote-image.html
+/sdcard/android/layout_tests/http/tests/security/xss-DENIED-assign-location-nonstandardProperty.html
+/sdcard/android/layout_tests/http/tests/security/xss-DENIED-assign-location-pathname.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-frames.html
+/sdcard/android/layout_tests/http/tests/security/object-literals.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-location-prototype.html
+/sdcard/android/layout_tests/http/tests/security/xss-DENIED-assign-location-search.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-selection.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-name-getter.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-call.html
+/sdcard/android/layout_tests/http/tests/security/xss-DENIED-assign-location-reload.html
+/sdcard/android/layout_tests/http/tests/security/xss-DENIED-invalid-domain-change.html
+/sdcard/android/layout_tests/http/tests/security/canvas-remote-read-remote-image.html
+/sdcard/android/layout_tests/http/tests/security/xss-DENIED-assign-location-protocol.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-first-time.html
+/sdcard/android/layout_tests/http/tests/security/xss-eval.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-DOMImplementation.html
+/sdcard/android/layout_tests/http/tests/security/xss-DENIED-assign-location-hostname.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-custom.html
+/sdcard/android/layout_tests/http/tests/security/xss-DENIED-assign-location-host.html
+/sdcard/android/layout_tests/http/tests/security/cross-frame-access-callback-explicit-domain-ALLOW.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/workers/xmlhttprequest-file-not-found.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/workers/abort-exception-assert.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/workers/close.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/010.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/002.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/012.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/004.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/014.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/018.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/002-simple.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/001.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/011.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/003.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/013.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/005.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/015.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/web-apps/007.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/cross-site-denied-response.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/encode-request-url.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-allow-async.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-non-simple-allow.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/inject-header.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-LSProgressEvent-ProgressEvent-should-match.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/origin-header-same-origin-post-async.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-denied.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/origin-header-cross-origin-post-sync.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-InvalidStateException-getAllRequestHeaders.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-sync.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/binary-x-user-defined.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/onloadstart-event.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-no-content-length-onProgress.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/readystatechange.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-contenttype-empty.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-post-fail-non-simple-content-type.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-forbidden-methods-exception.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache-invalidation-by-method.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/serialize-document.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/onerror-event.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/close-window.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/redirect-cross-origin-post-sync.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/detaching-frame-2.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/encode-request-url-2.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/set-dangerous-headers.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/event-target.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-addEventListener-onProgress.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/send-on-abort.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/document-domain-set.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache-timeout.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-responseXML-exception.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/cross-site-denied-response-sync.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/upload-onloadstart-event.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/supported-xml-content-types.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/simple-cross-origin-denied-events.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/request-encoding.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/zero-length-response.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/connection-error-sync.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-allow-access-control-origin-header-data-url.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache-invalidation-by-header.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/redirect-cross-origin.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-allow-star.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-crlf-getAllResponseHeader.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/event-listener-gc.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/interactive-state.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/state-after-network-error.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/abort-crash.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/get-dangerous-headers.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-image-not-loaded.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/exceptions.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-test-send-flag.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/origin-header-cross-origin-post-async.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/referer.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-invalidHeader-getRequestHeader.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/infoOnProgressEvent.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-allow-access-control-origin-header.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/docLoaderFrame.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/simple-cross-origin-denied-events-sync.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/post-content-type.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-whitelist-response-headers.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/onabort-event.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/origin-header-same-origin-get-async.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/detaching-frame.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/redirect-cross-origin-sync.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-get-fail-non-simple.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/zero-length-response-sync.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/access-control-basic-denied-preflight-cache.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/authorization-header.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-post-crash.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/origin-header-cross-origin-get-sync.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/origin-header-cross-origin-get-async.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/redirect-cross-origin-sync-double.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldDispatchEvent.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-responseText-exception.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/redirect-cross-origin-2.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldNotDispatchEvent.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/status-after-abort.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/XMLHttpRequestException.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-onProgress-open-should-zero-length.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/broken-xml-encoding.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/extra-parameters.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-multiple-open.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/xmlhttprequest-InvalidStateException-getRequestHeader.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/origin-header-same-origin-post-sync.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/cross-site-denied-response-sync-2.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/request-from-popup.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/redirect-cross-origin-post.html
+/sdcard/android/layout_tests/http/tests/xmlhttprequest/simple-cross-origin-progress-events.html
+/sdcard/android/layout_tests/http/tests/messaging/cross-domain-message-event-dispatch.html
+/sdcard/android/layout_tests/http/tests/messaging/cross-domain-message-send.html
 /sdcard/android/layout_tests/media/constructors.html
-/sdcard/android/layout_tests/media/video-dom-autoplay.html
 /sdcard/android/layout_tests/media/video-poster.html
 /sdcard/android/layout_tests/media/video-source-media.html
 /sdcard/android/layout_tests/media/video-controls-with-mutation-event-handler.html
 /sdcard/android/layout_tests/media/video-src-set.html
 /sdcard/android/layout_tests/media/video-display-none-crash.html
-/sdcard/android/layout_tests/media/video-size.html
 /sdcard/android/layout_tests/media/video-width-height.html
 /sdcard/android/layout_tests/media/video-source.html
-/sdcard/android/layout_tests/media/video-load-readyState.html
 /sdcard/android/layout_tests/media/fallback.html
 /sdcard/android/layout_tests/media/remove-from-document-no-load.html
 /sdcard/android/layout_tests/media/before-load-member-access.html
 /sdcard/android/layout_tests/media/video-play-pause-events.html
-/sdcard/android/layout_tests/media/media-startTime.html
-/sdcard/android/layout_tests/media/video-autoplay.html
-/sdcard/android/layout_tests/media/video-timeupdate-during-playback.html
 /sdcard/android/layout_tests/media/media-constants.html
 /sdcard/android/layout_tests/media/video-src-source.html
-/sdcard/android/layout_tests/media/controls-css-overload.html
-/sdcard/android/layout_tests/media/video-pause-empty-events.html
 /sdcard/android/layout_tests/media/video-play-pause-exception.html
 /sdcard/android/layout_tests/media/video-dom-autobuffer.html
 /sdcard/android/layout_tests/media/video-seek-no-src-exception.html
-/sdcard/android/layout_tests/media/video-src-remove.html
 /sdcard/android/layout_tests/media/video-src.html
 /sdcard/android/layout_tests/plugins/createScriptableObject-before-start.html
 /sdcard/android/layout_tests/plugins/return-error-from-new-stream-callback-in-full-frame-plugin.html
@@ -2601,6 +2896,8 @@
 /sdcard/android/layout_tests/transitions/zero-duration-without-units.html
 /sdcard/android/layout_tests/transitions/min-max-width-height-transitions.html
 /sdcard/android/layout_tests/transitions/shorthand-transitions.html
+/sdcard/android/layout_tests/transitions/mask-transitions.html
+/sdcard/android/layout_tests/transitions/zero-duration-with-non-zero-delay-start.html
 /sdcard/android/layout_tests/transitions/zero-duration-in-list.html
 /sdcard/android/layout_tests/transitions/shorthand-border-transitions.html
 /sdcard/android/layout_tests/transitions/inherit-other-props.html
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java
index e00d3ad..283b98c 100755
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java
@@ -65,14 +65,15 @@
             } catch (Exception e) {
             }
         }
-        
+
         String r = (String)icicle.get("rebaseline");
         this.mRebaseline = (r != null && r.toLowerCase().equals("true"));
-        super.onCreate(icicle);
-        
+
         String logtime = (String) icicle.get("logtime");
         this.mLogtime = (logtime != null
                 && logtime.toLowerCase().equals("true"));
+
+        super.onCreate(icicle);
     }
     
     public String mTestPath = null;