Merge change Ic1d72f56 into eclair-mr2

* changes:
  Make createThumbnailFromEXIF prefer choosing a thumbnail from the exif to from the full image, if both can generate of a thumbnail of same size.
diff --git a/Android.mk b/Android.mk
index a40d3f9..f538d8e 100644
--- a/Android.mk
+++ b/Android.mk
@@ -209,6 +209,7 @@
 	frameworks/base/core/java/android/accounts/IAccountAuthenticatorResponse.aidl \
 	frameworks/base/core/java/android/app/Notification.aidl \
 	frameworks/base/core/java/android/app/PendingIntent.aidl \
+	frameworks/base/core/java/android/bluetooth/BluetoothDevice.aidl \
 	frameworks/base/core/java/android/content/ComponentName.aidl \
 	frameworks/base/core/java/android/content/Intent.aidl \
 	frameworks/base/core/java/android/content/IntentSender.aidl \
diff --git a/api/5.xml b/api/5.xml
index 6148047..73df0cb 100644
--- a/api/5.xml
+++ b/api/5.xml
@@ -162357,17 +162357,6 @@
  visibility="protected"
 >
 </field>
-<field name="FLAG_USE_CHILD_DRAWING_ORDER"
- type="int"
- transient="false"
- volatile="false"
- value="1024"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="protected"
->
-</field>
 <field name="FOCUS_AFTER_DESCENDANTS"
  type="int"
  transient="false"
diff --git a/api/current.xml b/api/current.xml
index c84f13e..d82dc19 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"
@@ -162753,6 +162797,17 @@
  visibility="public"
 >
 </method>
+<method name="isChildrenDrawingOrderEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+</method>
 <method name="isChildrenDrawnWithCacheEnabled"
  return="boolean"
  abstract="false"
@@ -163136,6 +163191,19 @@
 <parameter name="enabled" type="boolean">
 </parameter>
 </method>
+<method name="setChildrenDrawingOrderEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
 <method name="setChildrenDrawnWithCacheEnabled"
  return="void"
  abstract="false"
@@ -163303,17 +163371,6 @@
  visibility="protected"
 >
 </field>
-<field name="FLAG_USE_CHILD_DRAWING_ORDER"
- type="int"
- transient="false"
- volatile="false"
- value="1024"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="protected"
->
-</field>
 <field name="FOCUS_AFTER_DESCENDANTS"
  type="int"
  transient="false"
diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp
index 3b7cece..d26e558 100644
--- a/cmds/stagefright/stagefright.cpp
+++ b/cmds/stagefright/stagefright.cpp
@@ -55,14 +55,23 @@
     int64_t durationUs;
     CHECK(meta->findInt64(kKeyDuration, &durationUs));
 
-    sp<OMXCodec> decoder = OMXCodec::Create(
+    const char *mime;
+    CHECK(meta->findCString(kKeyMIMEType, &mime));
+
+    sp<MediaSource> rawSource;
+    if (!strcasecmp(MEDIA_MIMETYPE_AUDIO_RAW, mime)) {
+        rawSource = source;
+    } else {
+        rawSource = OMXCodec::Create(
             client->interface(), meta, false /* createEncoder */, source);
 
-    if (decoder == NULL) {
-        return;
+        if (rawSource == NULL) {
+            fprintf(stderr, "Failed to instantiate decoder for '%s'.\n", mime);
+            return;
+        }
     }
 
-    decoder->start();
+    rawSource->start();
 
     if (gReproduceBug >= 3 && gReproduceBug <= 5) {
         status_t err;
@@ -70,7 +79,7 @@
         MediaSource::ReadOptions options;
         int64_t seekTimeUs = -1;
         for (;;) {
-            err = decoder->read(&buffer, &options);
+            err = rawSource->read(&buffer, &options);
             options.clearSeekTo();
 
             bool shouldSeek = false;
@@ -134,7 +143,7 @@
             }
         }
 
-        decoder->stop();
+        rawSource->stop();
 
         return;
     }
@@ -151,7 +160,7 @@
         MediaBuffer *buffer;
 
         for (;;) {
-            status_t err = decoder->read(&buffer, &options);
+            status_t err = rawSource->read(&buffer, &options);
             options.clearSeekTo();
 
             if (err != OK) {
@@ -193,7 +202,7 @@
         options.setSeekTo(0);
     }
 
-    decoder->stop();
+    rawSource->stop();
     printf("\n");
 
     int64_t delay = getNowUs() - startTime;
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/os/IHardwareService.aidl b/core/java/android/os/IHardwareService.aidl
index 594c0e8..34f30a7 100755
--- a/core/java/android/os/IHardwareService.aidl
+++ b/core/java/android/os/IHardwareService.aidl
@@ -1,16 +1,16 @@
 /**
  * Copyright (c) 2007, The Android Open Source Project
  *
- * Licensed under the Apache License, Version 2.0 (the "License"); 
- * you may not use this file except in compliance with the License. 
- * You may obtain a copy of the License at 
+ * 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 
+ *     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 
+ * 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.
  */
 
@@ -23,13 +23,13 @@
     void vibrate(long milliseconds, IBinder token);
     void vibratePattern(in long[] pattern, int repeat, IBinder token);
     void cancelVibrate(IBinder token);
-    
+
     // flashlight support
     boolean getFlashlightEnabled();
     void setFlashlightEnabled(boolean on);
     void enableCameraFlash(int milliseconds);
 
     // for the phone
-    void setAttentionLight(boolean on);
+    void setAttentionLight(boolean on, int color);
 }
 
diff --git a/core/java/android/pim/vcard/ContactStruct.java b/core/java/android/pim/vcard/ContactStruct.java
index cab9dc1..f01659e8 100644
--- a/core/java/android/pim/vcard/ContactStruct.java
+++ b/core/java/android/pim/vcard/ContactStruct.java
@@ -471,20 +471,24 @@
         }
         StringBuilder builder = new StringBuilder();
         String trimed = data.trim();
-        int length = trimed.length();
-        for (int i = 0; i < length; i++) {
-            char ch = trimed.charAt(i);
-            if (('0' <= ch && ch <= '9') || (i == 0 && ch == '+')) {
-                builder.append(ch);
+        final String formattedNumber;
+        if (type == Phone.TYPE_PAGER) {
+            formattedNumber = trimed;
+        } else {
+            final int length = trimed.length();
+            for (int i = 0; i < length; i++) {
+                char ch = trimed.charAt(i);
+                if (('0' <= ch && ch <= '9') || (i == 0 && ch == '+')) {
+                    builder.append(ch);
+                }
             }
-        }
 
-        // Use NANP in default when there's no information about locale.
-        final int formattingType = (VCardConfig.isJapaneseDevice(mVCardType) ?
-                PhoneNumberUtils.FORMAT_JAPAN : PhoneNumberUtils.FORMAT_NANP);
-        final String formattedPhoneNumber =
-                PhoneNumberUtils.formatNumber(builder.toString(), formattingType);
-        PhoneData phoneData = new PhoneData(type, formattedPhoneNumber, label, isPrimary);
+            // Use NANP in default when there's no information about locale.
+            final int formattingType = (VCardConfig.isJapaneseDevice(mVCardType) ?
+                    PhoneNumberUtils.FORMAT_JAPAN : PhoneNumberUtils.FORMAT_NANP);
+            formattedNumber = PhoneNumberUtils.formatNumber(builder.toString(), formattingType);
+        }
+        PhoneData phoneData = new PhoneData(type, formattedNumber, label, isPrimary);
         mPhoneList.add(phoneData);
     }
 
@@ -726,8 +730,8 @@
                 // which is correct behavior from the view of vCard 2.1.
                 // But we want it to be separated, so do the separation here.
                 final List<String> phoneticNameList =
-                    VCardUtils.constructListFromValue(propValue,    
-                            VCardConfig.isV30(mVCardType));
+                        VCardUtils.constructListFromValue(propValue,
+                                VCardConfig.isV30(mVCardType));
                 handlePhoneticNameFromSound(phoneticNameList);
             } else {
                 // Ignore this field since Android cannot understand what it is.
@@ -856,7 +860,8 @@
             }
         } else if (propName.equals(Constants.PROPERTY_TEL)) {
             final Collection<String> typeCollection = paramMap.get(Constants.PARAM_TYPE);
-            final Object typeObject = VCardUtils.getPhoneTypeFromStrings(typeCollection);
+            final Object typeObject =
+                VCardUtils.getPhoneTypeFromStrings(typeCollection, propValue);
             final int type;
             final String label;
             if (typeObject instanceof Integer) {
diff --git a/core/java/android/pim/vcard/VCardComposer.java b/core/java/android/pim/vcard/VCardComposer.java
index aff3831..9d72c5f 100644
--- a/core/java/android/pim/vcard/VCardComposer.java
+++ b/core/java/android/pim/vcard/VCardComposer.java
@@ -53,6 +53,7 @@
 import java.io.OutputStreamWriter;
 import java.io.UnsupportedEncodingException;
 import java.io.Writer;
+import java.nio.charset.UnsupportedCharsetException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -144,6 +145,7 @@
     private static final String VCARD_PARAM_ENCODING_BASE64_V30 = "ENCODING=b";
 
     private static final String SHIFT_JIS = "SHIFT_JIS";
+    private static final String UTF_8 = "UTF-8";
 
     /**
      * Special URI for testing.
@@ -359,12 +361,9 @@
         mIsV30 = VCardConfig.isV30(vcardType);
         mUsesQuotedPrintable = VCardConfig.usesQuotedPrintable(vcardType);
         mIsDoCoMo = VCardConfig.isDoCoMo(vcardType);
-        mIsJapaneseMobilePhone = VCardConfig
-                .needsToConvertPhoneticString(vcardType);
-        mOnlyOneNoteFieldIsAvailable = VCardConfig
-                .onlyOneNoteFieldIsAvailable(vcardType);
-        mUsesAndroidProperty = VCardConfig
-                .usesAndroidSpecificProperty(vcardType);
+        mIsJapaneseMobilePhone = VCardConfig.needsToConvertPhoneticString(vcardType);
+        mOnlyOneNoteFieldIsAvailable = VCardConfig.onlyOneNoteFieldIsAvailable(vcardType);
+        mUsesAndroidProperty = VCardConfig.usesAndroidSpecificProperty(vcardType);
         mUsesDefactProperty = VCardConfig.usesDefactProperty(vcardType);
         mUsesUtf8 = VCardConfig.usesUtf8(vcardType);
         mUsesShiftJis = VCardConfig.usesShiftJis(vcardType);
@@ -374,17 +373,31 @@
         mHandlerList = new ArrayList<OneEntryHandler>();
 
         if (mIsDoCoMo) {
-            mCharsetString = CharsetUtils.charsetForVendor(SHIFT_JIS, "docomo").name();
+            String charset;
+            try {
+                charset = CharsetUtils.charsetForVendor(SHIFT_JIS, "docomo").name();
+            } catch (UnsupportedCharsetException e) {
+                Log.e(LOG_TAG, "DoCoMo-specific SHIFT_JIS was not found. Use SHIFT_JIS as is.");
+                charset = SHIFT_JIS;
+            }
+            mCharsetString = charset;
             // Do not use mCharsetString bellow since it is different from "SHIFT_JIS" but
             // may be "DOCOMO_SHIFT_JIS" or something like that (internal expression used in
             // Android, not shown to the public).
             mVCardCharsetParameter = "CHARSET=" + SHIFT_JIS;
         } else if (mUsesShiftJis) {
-            mCharsetString = CharsetUtils.charsetForVendor(SHIFT_JIS).name();
+            String charset;
+            try {
+                charset = CharsetUtils.charsetForVendor(SHIFT_JIS).name();
+            } catch (UnsupportedCharsetException e) {
+                Log.e(LOG_TAG, "Vendor-specific SHIFT_JIS was not found. Use SHIFT_JIS as is.");
+                charset = SHIFT_JIS;
+            }
+            mCharsetString = charset;
             mVCardCharsetParameter = "CHARSET=" + SHIFT_JIS;
         } else {
-            mCharsetString = "UTF-8";
-            mVCardCharsetParameter = "CHARSET=UTF-8";
+            mCharsetString = UTF_8;
+            mVCardCharsetParameter = "CHARSET=" + UTF_8;
         }
     }
 
@@ -392,7 +405,9 @@
      * Must call before {{@link #init()}.
      */
     public void addHandler(OneEntryHandler handler) {
-        mHandlerList.add(handler);
+        if (handler != null) {
+            mHandlerList.add(handler);
+        }
     }
 
     /**
@@ -700,34 +715,46 @@
             }
         }
 
-        final String familyName = primaryContentValues
-                .getAsString(StructuredName.FAMILY_NAME);
-        final String middleName = primaryContentValues
-                .getAsString(StructuredName.MIDDLE_NAME);
-        final String givenName = primaryContentValues
-                .getAsString(StructuredName.GIVEN_NAME);
-        final String prefix = primaryContentValues
-                .getAsString(StructuredName.PREFIX);
-        final String suffix = primaryContentValues
-                .getAsString(StructuredName.SUFFIX);
-        final String displayName = primaryContentValues
-                .getAsString(StructuredName.DISPLAY_NAME);
+        final String familyName = primaryContentValues.getAsString(StructuredName.FAMILY_NAME);
+        final String middleName = primaryContentValues.getAsString(StructuredName.MIDDLE_NAME);
+        final String givenName = primaryContentValues.getAsString(StructuredName.GIVEN_NAME);
+        final String prefix = primaryContentValues.getAsString(StructuredName.PREFIX);
+        final String suffix = primaryContentValues.getAsString(StructuredName.SUFFIX);
+        final String displayName = primaryContentValues.getAsString(StructuredName.DISPLAY_NAME);
 
         if (!TextUtils.isEmpty(familyName) || !TextUtils.isEmpty(givenName)) {
+            final boolean shouldAppendCharsetParameterToName =
+                !(mIsV30 && UTF_8.equalsIgnoreCase(mCharsetString)) &&
+                shouldAppendCharsetParameters(Arrays.asList(
+                        familyName, givenName, middleName, prefix, suffix));
+            final boolean reallyUseQuotedPrintableToName =
+                    (!mRefrainsQPToPrimaryProperties &&
+                            !(VCardUtils.containsOnlyNonCrLfPrintableAscii(familyName) &&
+                                    VCardUtils.containsOnlyNonCrLfPrintableAscii(givenName) &&
+                                    VCardUtils.containsOnlyNonCrLfPrintableAscii(middleName) &&
+                                    VCardUtils.containsOnlyNonCrLfPrintableAscii(prefix) &&
+                                    VCardUtils.containsOnlyNonCrLfPrintableAscii(suffix)));
+
+            final String formattedName;
+            if (!TextUtils.isEmpty(displayName)) {
+                formattedName = displayName;
+            } else {
+                formattedName = VCardUtils.constructNameFromElements(
+                        VCardConfig.getNameOrderType(mVCardType),
+                        familyName, middleName, givenName, prefix, suffix);
+            }
+            final boolean shouldAppendCharsetParameterToFN =
+                    !(mIsV30 && UTF_8.equalsIgnoreCase(mCharsetString)) &&
+                    shouldAppendCharsetParameter(formattedName);
+            final boolean reallyUseQuotedPrintableToFN =
+                    !mRefrainsQPToPrimaryProperties &&
+                    !VCardUtils.containsOnlyNonCrLfPrintableAscii(formattedName);
+
             final String encodedFamily;
             final String encodedGiven;
             final String encodedMiddle;
             final String encodedPrefix;
             final String encodedSuffix;
-
-            final boolean reallyUseQuotedPrintableToName =
-                (!mRefrainsQPToPrimaryProperties &&
-                    !(VCardUtils.containsOnlyNonCrLfPrintableAscii(familyName) &&
-                            VCardUtils.containsOnlyNonCrLfPrintableAscii(givenName) &&
-                            VCardUtils.containsOnlyNonCrLfPrintableAscii(middleName) &&
-                            VCardUtils.containsOnlyNonCrLfPrintableAscii(prefix) &&
-                            VCardUtils.containsOnlyNonCrLfPrintableAscii(suffix)));
-
             if (reallyUseQuotedPrintableToName) {
                 encodedFamily = encodeQuotedPrintable(familyName);
                 encodedGiven = encodeQuotedPrintable(givenName);
@@ -742,59 +769,61 @@
                 encodedSuffix = escapeCharacters(suffix);
             }
 
+            final String encodedFormattedname =
+                    (reallyUseQuotedPrintableToFN ?
+                            encodeQuotedPrintable(formattedName) : escapeCharacters(formattedName));
+
             builder.append(Constants.PROPERTY_N);
-            if (shouldAppendCharsetParameters(Arrays.asList(
-                    encodedFamily, encodedGiven, encodedMiddle, encodedPrefix, encodedSuffix))) {
-                builder.append(VCARD_PARAM_SEPARATOR);
-                builder.append(mVCardCharsetParameter);
-            }
-            if (reallyUseQuotedPrintableToName) {
-                builder.append(VCARD_PARAM_SEPARATOR);
-                builder.append(VCARD_PARAM_ENCODING_QP);
-            }
-
-            builder.append(VCARD_DATA_SEPARATOR);
-            builder.append(encodedFamily);
-            builder.append(VCARD_ITEM_SEPARATOR);
-            builder.append(encodedGiven);
-            builder.append(VCARD_ITEM_SEPARATOR);
-            builder.append(encodedMiddle);
-            builder.append(VCARD_ITEM_SEPARATOR);
-            builder.append(encodedPrefix);
-            builder.append(VCARD_ITEM_SEPARATOR);
-            builder.append(encodedSuffix);
-            builder.append(VCARD_END_OF_LINE);
-
-            final String formattedName;
-            if (!TextUtils.isEmpty(displayName)) {
-                formattedName = displayName;
+            if (mIsDoCoMo) {
+                if (shouldAppendCharsetParameterToName) {
+                    builder.append(VCARD_PARAM_SEPARATOR);
+                    builder.append(mVCardCharsetParameter);
+                }
+                if (reallyUseQuotedPrintableToName) {
+                    builder.append(VCARD_PARAM_SEPARATOR);
+                    builder.append(VCARD_PARAM_ENCODING_QP);
+                }
+                builder.append(VCARD_DATA_SEPARATOR);
+                // DoCoMo phones require that all the elements in the "family name" field.
+                builder.append(formattedName);
+                builder.append(VCARD_ITEM_SEPARATOR);
+                builder.append(VCARD_ITEM_SEPARATOR);
+                builder.append(VCARD_ITEM_SEPARATOR);
+                builder.append(VCARD_ITEM_SEPARATOR);
             } else {
-                formattedName = VCardUtils.constructNameFromElements(
-                    VCardConfig.getNameOrderType(mVCardType),
-                    encodedFamily, encodedMiddle, encodedGiven, encodedPrefix, encodedSuffix);
+                if (shouldAppendCharsetParameterToName) {
+                    builder.append(VCARD_PARAM_SEPARATOR);
+                    builder.append(mVCardCharsetParameter);
+                }
+                if (reallyUseQuotedPrintableToName) {
+                    builder.append(VCARD_PARAM_SEPARATOR);
+                    builder.append(VCARD_PARAM_ENCODING_QP);
+                }
+                builder.append(VCARD_DATA_SEPARATOR);
+                builder.append(encodedFamily);
+                builder.append(VCARD_ITEM_SEPARATOR);
+                builder.append(encodedGiven);
+                builder.append(VCARD_ITEM_SEPARATOR);
+                builder.append(encodedMiddle);
+                builder.append(VCARD_ITEM_SEPARATOR);
+                builder.append(encodedPrefix);
+                builder.append(VCARD_ITEM_SEPARATOR);
+                builder.append(encodedSuffix);
             }
-
-            final boolean reallyUseQuotedPrintableToFullname =
-                !mRefrainsQPToPrimaryProperties &&
-                !VCardUtils.containsOnlyNonCrLfPrintableAscii(formattedName);
-
-            final String encodedFullname =
-                reallyUseQuotedPrintableToFullname ?
-                        encodeQuotedPrintable(formattedName) :
-                            escapeCharacters(formattedName);
+            builder.append(VCARD_END_OF_LINE);
 
             // FN property
             builder.append(Constants.PROPERTY_FN);
-            if (shouldAppendCharsetParameter(encodedFullname)) {
+            if (shouldAppendCharsetParameterToFN) {
                 builder.append(VCARD_PARAM_SEPARATOR);
                 builder.append(mVCardCharsetParameter);
             }
-            if (reallyUseQuotedPrintableToFullname) {
+            if (reallyUseQuotedPrintableToFN) {
                 builder.append(VCARD_PARAM_SEPARATOR);
                 builder.append(VCARD_PARAM_ENCODING_QP);
             }
             builder.append(VCARD_DATA_SEPARATOR);
-            builder.append(encodedFullname);
+            builder.append(encodedFormattedname);
             builder.append(VCARD_END_OF_LINE);
         } else if (!TextUtils.isEmpty(displayName)) {
             final boolean reallyUseQuotedPrintableToDisplayName =
@@ -806,7 +835,7 @@
                                 escapeCharacters(displayName);
 
             builder.append(Constants.PROPERTY_N);
-            if (shouldAppendCharsetParameter(encodedDisplayName)) {
+            if (shouldAppendCharsetParameter(displayName)) {
                 builder.append(VCARD_PARAM_SEPARATOR);
                 builder.append(mVCardCharsetParameter);
             }
@@ -824,7 +853,7 @@
             if (mIsV30) {
                 builder.append(Constants.PROPERTY_FN);
                 // TODO: Not allowed formally...
-                if (shouldAppendCharsetParameter(encodedDisplayName)) {
+                if (shouldAppendCharsetParameter(displayName)) {
                     builder.append(VCARD_PARAM_SEPARATOR);
                     builder.append(mVCardCharsetParameter);
                 }
@@ -1865,11 +1894,11 @@
         switch (typeAsPrimitive) {
         case Phone.TYPE_HOME:
             parameterList.addAll(
-                    Arrays.asList(Constants.PARAM_TYPE_HOME, Constants.PARAM_TYPE_VOICE));
+                    Arrays.asList(Constants.PARAM_TYPE_HOME));
             break;
         case Phone.TYPE_WORK:
             parameterList.addAll(
-                    Arrays.asList(Constants.PARAM_TYPE_WORK, Constants.PARAM_TYPE_VOICE));
+                    Arrays.asList(Constants.PARAM_TYPE_WORK));
             break;
         case Phone.TYPE_FAX_HOME:
             parameterList.addAll(
diff --git a/core/java/android/pim/vcard/VCardUtils.java b/core/java/android/pim/vcard/VCardUtils.java
index c59e258..05e6730 100644
--- a/core/java/android/pim/vcard/VCardUtils.java
+++ b/core/java/android/pim/vcard/VCardUtils.java
@@ -98,7 +98,11 @@
      * Returns Interger when the given types can be parsed as known type. Returns String object
      * when not, which should be set to label. 
      */
-    public static Object getPhoneTypeFromStrings(Collection<String> types) {
+    public static Object getPhoneTypeFromStrings(Collection<String> types,
+            String number) {
+        if (number == null) {
+            number = "";
+        }
         int type = -1;
         String label = null;
         boolean isFax = false;
@@ -117,7 +121,20 @@
                     }
                     Integer tmp = sKnownPhoneTypeMap_StoI.get(typeString);
                     if (tmp != null) {
-                        type = tmp;
+                        final int typeCandidate = tmp;
+                        // TYPE_PAGER is prefered when the number contains @ surronded by
+                        // a pager number and a domain name.
+                        // e.g.
+                        // o 1111@domain.com
+                        // x @domain.com
+                        // x 1111@
+                        final int indexOfAt = number.indexOf("@");
+                        if ((typeCandidate == Phone.TYPE_PAGER
+                                && 0 < indexOfAt && indexOfAt < number.length() - 1)
+                                || type < 0
+                                || type == Phone.TYPE_CUSTOM) {
+                            type = tmp;
+                        }
                     } else if (type < 0) {
                         type = Phone.TYPE_CUSTOM;
                         label = typeString;
@@ -345,7 +362,7 @@
         if (TextUtils.isEmpty(str)) {
             return true;
         }
-        
+
         final int length = str.length();
         final int asciiFirst = 0x20;
         final int asciiLast = 0x126;
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 456181c..1cf559d 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -43,8 +43,10 @@
 import java.net.URISyntaxException;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Map;
 
 
 /**
@@ -476,7 +478,10 @@
 
     private static class NameValueCache {
         private final String mVersionSystemProperty;
-        private final HashMap<String, String> mValues = Maps.newHashMap();
+        // the following needs synchronization because this structure is accessed from different
+        // threads and they could be performing clear(), get(), put() at the same time.
+        private final Map<String, String> mValues =
+            	Collections.synchronizedMap(new HashMap<String, String>());
         private long mValuesVersion = 0;
         private final Uri mUri;
 
@@ -491,8 +496,29 @@
                 mValues.clear();
                 mValuesVersion = newValuesVersion;
             }
-            if (!mValues.containsKey(name)) {
-                String value = null;
+            /*
+             *  don't look for the key using containsKey() method because (key, object) mapping
+             *  could be removed from mValues before get() is done like so:
+             *
+             *      say, mValues contains mapping for "foo"
+             *      Thread# 1
+             *          performs containsKey("foo")
+             *          receives true
+             *      Thread #2
+             *          triggers mValues.clear()
+             *      Thread#1
+             *          since containsKey("foo") = true, performs get("foo")
+             *          receives null
+             *          thats incorrect!
+             *
+             *    to avoid the above, thread#1 should do get("foo") instead of containsKey("foo")
+             *    since mValues is synchronized, get() will get a consistent value.
+             *
+             *    we don't want to make this method synchronized tho - because
+             *    holding mutex is not desirable while a call could be made to database.
+             */
+            String value = mValues.get(name);
+            if (value == null) {
                 Cursor c = null;
                 try {
                     c = cr.query(mUri, new String[] { Settings.NameValueTable.VALUE },
@@ -505,10 +531,8 @@
                 } finally {
                     if (c != null) c.close();
                 }
-                return value;
-            } else {
-                return mValues.get(name);
             }
+            return value;
         }
     }
 
diff --git a/core/java/android/server/BluetoothService.java b/core/java/android/server/BluetoothService.java
index 0db29a4..b32aacc 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/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index f7b7f02..e2f15c7 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -150,6 +150,8 @@
     /**
      * When set, the drawing method will call {@link #getChildDrawingOrder(int, int)}
      * to get the index of the child to draw for that iteration.
+     * 
+     * @hide
      */
     protected static final int FLAG_USE_CHILD_DRAWING_ORDER = 0x400;
 
@@ -1307,11 +1309,14 @@
      * if you want to change the drawing order of children. By default, it
      * returns i.
      * <p>
-     * NOTE: In order for this method to be called, the
-     * {@link #FLAG_USE_CHILD_DRAWING_ORDER} must be set.
+     * NOTE: In order for this method to be called, you must enable child ordering
+     * first by calling {@link #setChildrenDrawingOrderEnabled(boolean)}.
      *
      * @param i The current iteration.
      * @return The index of the child to draw this iteration.
+     * 
+     * @see #setChildrenDrawingOrderEnabled(boolean)
+     * @see #isChildrenDrawingOrderEnabled()
      */
     protected int getChildDrawingOrder(int childCount, int i) {
         return i;
@@ -2706,6 +2711,35 @@
         setBooleanFlag(FLAG_CHILDREN_DRAWN_WITH_CACHE, enabled);
     }
 
+    /**
+     * Indicates whether the ViewGroup is drawing its children in the order defined by
+     * {@link #getChildDrawingOrder(int, int)}.
+     *
+     * @return true if children drawing order is defined by {@link #getChildDrawingOrder(int, int)},
+     *         false otherwise
+     *
+     * @see #setChildrenDrawingOrderEnabled(boolean)
+     * @see #getChildDrawingOrder(int, int)
+     */
+    @ViewDebug.ExportedProperty
+    protected boolean isChildrenDrawingOrderEnabled() {
+        return (mGroupFlags & FLAG_USE_CHILD_DRAWING_ORDER) == FLAG_USE_CHILD_DRAWING_ORDER;
+    }
+
+    /**
+     * Tells the ViewGroup whether to draw its children in the order defined by the method
+     * {@link #getChildDrawingOrder(int, int)}.
+     *
+     * @param enabled true if the order of the children when drawing is determined by
+     *        {@link #getChildDrawingOrder(int, int)}, false otherwise
+     *
+     * @see #isChildrenDrawingOrderEnabled()
+     * @see #getChildDrawingOrder(int, int)
+     */
+    protected void setChildrenDrawingOrderEnabled(boolean enabled) {
+        setBooleanFlag(FLAG_USE_CHILD_DRAWING_ORDER, enabled);
+    }
+
     private void setBooleanFlag(int flag, boolean value) {
         if (value) {
             mGroupFlags |= flag;
diff --git a/core/java/android/webkit/CallbackProxy.java b/core/java/android/webkit/CallbackProxy.java
index e405cf2..4f8c227 100644
--- a/core/java/android/webkit/CallbackProxy.java
+++ b/core/java/android/webkit/CallbackProxy.java
@@ -1016,10 +1016,10 @@
     public void onProgressChanged(int newProgress) {
         // Synchronize so that mLatestProgress is up-to-date.
         synchronized (this) {
-            mLatestProgress = newProgress;
-            if (mWebChromeClient == null) {
+            if (mWebChromeClient == null || mLatestProgress == newProgress) {
                 return;
             }
+            mLatestProgress = newProgress;
             if (!mProgressUpdatePending) {
                 sendEmptyMessage(PROGRESS);
                 mProgressUpdatePending = true;
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 3ed995bc..f55ca3f 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -3964,8 +3964,7 @@
                     mHighlightPath = new Path();
 
                 if (selStart == selEnd) {
-                    if ((SystemClock.uptimeMillis() - mShowCursor) % (2 * BLINK)
-                        < BLINK) {
+                    if ((SystemClock.uptimeMillis() - mShowCursor) % (2 * BLINK) < BLINK) {
                         if (mHighlightPathBogus) {
                             mHighlightPath.reset();
                             mLayout.getCursorPath(selStart, mHighlightPath, mText);
@@ -5344,21 +5343,24 @@
              * will happen at measure).
              */
             makeNewLayout(want, hintWant, UNKNOWN_BORING, UNKNOWN_BORING,
-                          mRight - mLeft - getCompoundPaddingLeft() - getCompoundPaddingRight(), false);
+                          mRight - mLeft - getCompoundPaddingLeft() - getCompoundPaddingRight(),
+                          false);
 
-            // In a fixed-height view, so use our new text layout.
-            if (mLayoutParams.height != LayoutParams.WRAP_CONTENT &&
-                mLayoutParams.height != LayoutParams.FILL_PARENT) {
-                invalidate();
-                return;
-            }
-
-            // Dynamic height, but height has stayed the same,
-            // so use our new text layout.
-            if (mLayout.getHeight() == oldht &&
-                (mHintLayout == null || mHintLayout.getHeight() == oldht)) {
-                invalidate();
-                return;
+            if (mEllipsize != TextUtils.TruncateAt.MARQUEE) {
+                // In a fixed-height view, so use our new text layout.
+                if (mLayoutParams.height != LayoutParams.WRAP_CONTENT &&
+                    mLayoutParams.height != LayoutParams.FILL_PARENT) {
+                    invalidate();
+                    return;
+                }
+    
+                // Dynamic height, but height has stayed the same,
+                // so use our new text layout.
+                if (mLayout.getHeight() == oldht &&
+                    (mHintLayout == null || mHintLayout.getHeight() == oldht)) {
+                    invalidate();
+                    return;
+                }
             }
 
             // We lose: the height has changed and we have a dynamic height.
diff --git a/core/jni/android_media_ToneGenerator.cpp b/core/jni/android_media_ToneGenerator.cpp
index 07bb1ab..50aa967 100644
--- a/core/jni/android_media_ToneGenerator.cpp
+++ b/core/jni/android_media_ToneGenerator.cpp
@@ -79,7 +79,7 @@
 
 static void android_media_ToneGenerator_native_setup(JNIEnv *env, jobject thiz,
         jint streamType, jint volume) {
-    ToneGenerator *lpToneGen = new ToneGenerator(streamType, AudioSystem::linearToLog(volume));
+    ToneGenerator *lpToneGen = new ToneGenerator(streamType, AudioSystem::linearToLog(volume), true);
 
     env->SetIntField(thiz, fields.context, 0);
 
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index bfb25b8..7e6258e 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -14,6 +14,11 @@
      limitations under the License.
 -->
 
+<!-- Formatting note: terminate all comments with a period, to avoid breaking 
+     the documentation output. To suppress comment lines from the documentation 
+     output, insert an eat-comment element after the comment lines.
+-->
+
 <resources>
     <!-- These are the standard attributes that make up a complete theme. -->
     <declare-styleable name="Theme">
@@ -47,27 +52,27 @@
         <!-- =========== -->
         <eat-comment />
 
-        <!-- Default appearance of text: color, typeface, size, and style -->
+        <!-- Default appearance of text: color, typeface, size, and style. -->
         <attr name="textAppearance" format="reference" />
         <!-- Default appearance of text against an inverted background:
-             color, typeface, size, and style -->
+             color, typeface, size, and style. -->
         <attr name="textAppearanceInverse" format="reference" />
 
-        <!-- The most prominent text color, for the  -->
+        <!-- The most prominent text color.  -->
         <attr name="textColorPrimary" format="reference|color" />
-        <!-- Secondary text color -->
+        <!-- Secondary text color. -->
         <attr name="textColorSecondary" format="reference|color" />
-        <!-- Tertiary text color -->
+        <!-- Tertiary text color. -->
         <attr name="textColorTertiary" format="reference|color" />
 
-        <!-- Primary inverse text color, useful for inverted backgrounds -->
+        <!-- Primary inverse text color, useful for inverted backgrounds. -->
         <attr name="textColorPrimaryInverse" format="reference|color" />
-        <!-- Secondary inverse text color, useful for inverted backgrounds -->
+        <!-- Secondary inverse text color, useful for inverted backgrounds. -->
         <attr name="textColorSecondaryInverse" format="reference|color" />
-        <!-- Tertiary inverse text color, useful for inverted backgrounds -->
+        <!-- Tertiary inverse text color, useful for inverted backgrounds. -->
         <attr name="textColorTertiaryInverse" format="reference|color" />
 
-        <!-- Inverse hint text color -->
+        <!-- Inverse hint text color. -->
         <attr name="textColorHintInverse" format="reference|color" />
 
         <!-- Bright text color. Only differentiates based on the disabled state. -->
@@ -122,14 +127,14 @@
              to the candidate text as it is edited. -->
         <attr name="candidatesTextStyleSpans" format="reference|string" />
 
-        <!-- Drawable to use for check marks -->
+        <!-- Drawable to use for check marks. -->
         <attr name="textCheckMark" format="reference" />
         <attr name="textCheckMarkInverse" format="reference" />
 
-        <!-- Drawable to use for multiple choice indicators-->
+        <!-- Drawable to use for multiple choice indicators. -->
         <attr name="listChoiceIndicatorMultiple" format="reference" />
 
-        <!-- Drawable to use for single choice indicators-->
+        <!-- Drawable to use for single choice indicators. -->
         <attr name="listChoiceIndicatorSingle" format="reference" />
 
         <!-- ============= -->
@@ -163,9 +168,9 @@
         <!-- =========== -->
         <eat-comment />
 
-        <!-- The preferred list item height -->
+        <!-- The preferred list item height. -->
         <attr name="listPreferredItemHeight" format="dimension" />
-        <!-- The drawable for the list divider -->
+        <!-- The drawable for the list divider. -->
         <!-- The list item height for search results. @hide -->
         <attr name="searchResultListItemHeight" format="dimension" />
         <attr name="listDivider" format="reference" />
@@ -341,9 +346,9 @@
         <attr name="gestureOverlayViewStyle" format="reference" />
         <!-- Default GridView style. -->
         <attr name="gridViewStyle" format="reference" />
-        <!-- The style resource to use for an ImageButton -->
+        <!-- The style resource to use for an ImageButton. -->
         <attr name="imageButtonStyle" format="reference" />
-        <!-- The style resource to use for an ImageButton that is an image well -->
+        <!-- The style resource to use for an ImageButton that is an image well. -->
         <attr name="imageWellStyle" format="reference" />
         <!-- Default ListView style. -->
         <attr name="listViewStyle" format="reference" />
@@ -747,21 +752,21 @@
          automatically found and converted to clickable links.  The default
          value is "none", disabling this feature. -->
     <attr name="autoLink">
-        <!-- Match no patterns (default) -->
+        <!-- Match no patterns (default). -->
         <flag name="none" value="0x00" />
-        <!-- Match Web URLs -->
+        <!-- Match Web URLs. -->
         <flag name="web" value="0x01" />
-        <!-- Match email addresses -->
+        <!-- Match email addresses. -->
         <flag name="email" value="0x02" />
-        <!-- Match phone numbers -->
+        <!-- Match phone numbers. -->
         <flag name="phone" value="0x04" />
-        <!-- Match map addresses -->
+        <!-- Match map addresses. -->
         <flag name="map" value="0x08" />
-        <!-- Match all patterns (equivalent to web|email|phone|map) -->
+        <!-- Match all patterns (equivalent to web|email|phone|map). -->
         <flag name="all" value="0x0f" />
     </attr>
 
-    <!-- Reference to an array resource that will populate a list/adapter -->
+    <!-- Reference to an array resource that will populate a list/adapter. -->
     <attr name="entries" format="reference" />
 
     <!-- Standard gravity constant that a child can supply to its parent.
@@ -813,7 +818,7 @@
     <eat-comment />
 
     <!-- This enum provides the same keycode values as can be found in
-        {@link android.view.KeyEvent} -->
+        {@link android.view.KeyEvent}. -->
     <attr name="keycode">
         <enum name="KEYCODE_UNKNOWN" value="0" />
         <enum name="KEYCODE_SOFT_LEFT" value="1" />
@@ -1185,7 +1190,7 @@
         <attr name="scrollbarTrackVertical" format="reference" />
         <!-- Defines whether the horizontal scrollbar track should always be drawn. -->
         <attr name="scrollbarAlwaysDrawHorizontalTrack" format="boolean" />
-        <!-- Defines whether the vertical scrollbar track should always be drawn -->
+        <!-- Defines whether the vertical scrollbar track should always be drawn. -->
         <attr name="scrollbarAlwaysDrawVerticalTrack" format="boolean" />
 
         <!-- Defines which edges should be fadeded on scrolling. -->
@@ -1296,7 +1301,7 @@
              exactly one parameter of type View. For instance, if you specify
              <code>android:onClick="sayHello"</code>, you must declare a
              <code>public void sayHello(View v)</code> method of your context
-             (typically, your Activity.)-->
+             (typically, your Activity). -->
         <attr name="onClick" format="string" />
     </declare-styleable>
 
@@ -1467,7 +1472,7 @@
              value is true. -->
         <attr name="scrollingCache" format="boolean" />
         <!-- When set to true, the list will filter results as the user types. The
-             List's adapter must support the Filterable interface for this to work -->
+             List's adapter must support the Filterable interface for this to work. -->
         <attr name="textFilterEnabled" format="boolean" />
         <!-- Sets the transcript mode for the list. In transcript mode, the list
              scrolls to the bottom to make new items visible when they are added. -->
@@ -1519,15 +1524,15 @@
         <attr name="format" format="string" localization="suggested" />
     </declare-styleable>
     <declare-styleable name="CompoundButton">
-        <!-- Indicates the initial checked state of this button -->
+        <!-- Indicates the initial checked state of this button. -->
         <attr name="checked" format="boolean" />
         <!-- Drawable used for the button graphic (e.g. checkbox, radio button, etc). -->
         <attr name="button" format="reference"/>
     </declare-styleable>
     <declare-styleable name="CheckedTextView">
-        <!-- Indicates the initial checked state of this text -->
+        <!-- Indicates the initial checked state of this text. -->
         <attr name="checked" />
-        <!-- Drawable used for the check mark graphic -->
+        <!-- Drawable used for the check mark graphic. -->
         <attr name="checkMark" format="reference"/>
     </declare-styleable>
     <declare-styleable name="EditText">
@@ -1648,12 +1653,12 @@
         <!-- An optional argument to supply a maximum height for this view.
              See {see android.widget.ImageView#setMaxHeight} for details. -->
         <attr name="maxHeight" format="dimension" />
-        <!-- Set a tinting color for the image -->
+        <!-- Set a tinting color for the image. -->
         <attr name="tint" format="color" />
         <!-- If true, the image view will be baseline aligned with based on its
-             bottom edge -->
+             bottom edge. -->
         <attr name="baselineAlignBottom" format="boolean" />
-         <!-- If true, the image will be cropped to fit within its padding -->
+         <!-- If true, the image will be cropped to fit within its padding. -->
         <attr name="cropToPadding" format="boolean" />
     </declare-styleable>
     <declare-styleable name="ToggleButton">
@@ -1681,7 +1686,7 @@
         <attr name="baselineAligned" format="boolean" />
         <!-- When a linear layout is part of another layout that is baseline
           aligned, it can specify which of its children to baseline align to
-          (i.e which child TextView).-->
+          (that is, which child TextView).-->
         <attr name="baselineAlignedChildIndex" format="integer" min="0"/>
         <!-- Defines the maximum weight sum. If unspecified, the sum is computed
              by adding the layout_weight of all of the children. This can be
@@ -1704,11 +1709,11 @@
              allows up to one item to be in a chosen state. By setting the choiceMode to
              multipleChoice, the list allows any number of items to be chosen. -->
         <attr name="choiceMode">
-            <!-- Normal list that does not indicate choices -->
+            <!-- Normal list that does not indicate choices. -->
             <enum name="none" value="0" />
-            <!-- The list allows up to one choice -->
+            <!-- The list allows up to one choice. -->
             <enum name="singleChoice" value="1" />
-            <!-- The list allows multiple choices -->
+            <!-- The list allows multiple choices. -->
             <enum name="multipleChoice" value="2" />
         </attr>
         <!-- When set to false, the ListView will not draw the divider after each header view.
@@ -1729,7 +1734,7 @@
         <attr name="headerBackground" format="color|reference" />
         <!-- Default background for each menu item. -->
         <attr name="itemBackground" format="color|reference" />
-        <!-- Default animations for the menu -->
+        <!-- Default animations for the menu. -->
         <attr name="windowAnimationStyle" />
         <!-- Default disabled icon alpha for each menu item that shows an icon. -->
         <attr name="itemIconDisabledAlpha" format="float" />
@@ -1743,7 +1748,7 @@
         <attr name="maxItemsPerRow" format="integer" />
         <!-- Defines the maximum number of items to show. -->
         <attr name="maxItems" format="integer" />
-        <!-- 'More' icon -->
+        <!-- 'More' icon. -->
         <attr name="moreIcon" format="reference" />
     </declare-styleable>
 
@@ -1783,7 +1788,7 @@
     </declare-styleable>
 
     <declare-styleable name="SeekBar">
-        <!-- Draws the thumb on a seekbar -->
+        <!-- Draws the thumb on a seekbar. -->
         <attr name="thumb" format="reference" />
         <!-- An offset for the thumb that allows it to extend out of the range of the track. -->
         <attr name="thumbOffset" format="dimension" />
@@ -1810,19 +1815,19 @@
         <attr name="orientation" />
     </declare-styleable>
     <declare-styleable name="TableLayout">
-        <!-- The 0 based index of the columns to stretch. The column indices
+        <!-- The zero-based index of the columns to stretch. The column indices
              must be separated by a comma: 1, 2, 5. Illegal and duplicate
              indices are ignored. You can stretch all columns by using the
              value "*" instead. Note that a column can be marked stretchable
              and shrinkable at the same time. -->
         <attr name="stretchColumns" format="string" />
-       <!-- The 0 based index of the columns to shrink. The column indices
+       <!-- The zero-based index of the columns to shrink. The column indices
              must be separated by a comma: 1, 2, 5. Illegal and duplicate
              indices are ignored. You can shrink all columns by using the
              value "*" instead. Note that a column can be marked stretchable
              and shrinkable at the same time. -->
         <attr name="shrinkColumns" format="string" />
-        <!-- The 0 based index of the columns to collapse. The column indices
+        <!-- The zero-based index of the columns to collapse. The column indices
              must be separated by a comma: 1, 2, 5. Illegal and duplicate
              indices are ignored. -->
         <attr name="collapseColumns" format="string" />
@@ -1884,7 +1889,7 @@
         <attr name="textAppearance" />
         <!-- Size of the text. Recommended dimension type for text is "sp" for scaled-pixels (example: 15sp). -->
         <attr name="textSize" />
-        <!-- Sets the horizontal scaling factor for the text -->
+        <!-- Sets the horizontal scaling factor for the text. -->
         <attr name="textScaleX" format="float" />
         <!-- Typeface (normal, sans, serif, monospace) for the text. -->
         <attr name="typeface" />
@@ -1892,35 +1897,35 @@
         <attr name="textStyle" />
         <!-- Text color for links. -->
         <attr name="textColorLink" />
-        <!-- Makes the cursor visible (the default) or invisible -->
+        <!-- Makes the cursor visible (the default) or invisible. -->
         <attr name="cursorVisible" format="boolean" />
-        <!-- Makes the TextView be at most this many lines tall -->
+        <!-- Makes the TextView be at most this many lines tall. -->
         <attr name="maxLines" format="integer" min="0" />
-        <!-- Makes the TextView be at most this many pixels tall -->
+        <!-- Makes the TextView be at most this many pixels tall. -->
         <attr name="maxHeight" />
-        <!-- Makes the TextView be exactly this many lines tall -->
+        <!-- Makes the TextView be exactly this many lines tall. -->
         <attr name="lines" format="integer" min="0" />
         <!-- Makes the TextView be exactly this many pixels tall.
              You could get the same effect by specifying this number in the
              layout parameters. -->
         <attr name="height" format="dimension" />
-        <!-- Makes the TextView be at least this many lines tall -->
+        <!-- Makes the TextView be at least this many lines tall. -->
         <attr name="minLines" format="integer" min="0" />
-        <!-- Makes the TextView be at least this many pixels tall -->
+        <!-- Makes the TextView be at least this many pixels tall. -->
         <attr name="minHeight" />
-        <!-- Makes the TextView be at most this many ems wide -->
+        <!-- Makes the TextView be at most this many ems wide. -->
         <attr name="maxEms" format="integer" min="0" />
-        <!-- Makes the TextView be at most this many pixels wide -->
+        <!-- Makes the TextView be at most this many pixels wide. -->
         <attr name="maxWidth" />
-        <!-- Makes the TextView be exactly this many ems wide -->
+        <!-- Makes the TextView be exactly this many ems wide. -->
         <attr name="ems" format="integer" min="0" />
         <!-- Makes the TextView be exactly this many pixels wide.
              You could get the same effect by specifying this number in the
              layout parameters. -->
         <attr name="width" format="dimension" />
-        <!-- Makes the TextView be at least this many ems wide -->
+        <!-- Makes the TextView be at least this many ems wide. -->
         <attr name="minEms" format="integer" min="0" />
-        <!-- Makes the TextView be at least this many pixels wide -->
+        <!-- Makes the TextView be at least this many pixels wide. -->
         <attr name="minWidth" />
         <!-- Specifies how to align the text by the view's x- and/or y-axis
              when the text is smaller than the view. -->
@@ -1946,7 +1951,7 @@
              inputType attributes are found,  the inputType flags will override the value of
              singleLine.) } -->
         <attr name="singleLine" format="boolean" />
-        <!-- {@deprecated Use state_enabled instead.} -->
+        <!-- Specifies whether the TextView is enabled or not. {@deprecated Use state_enabled instead}. -->
         <attr name="enabled" format="boolean" />
         <!-- If the text is selectable, select it all when the view takes
              focus instead of moving the cursor to the start or end. -->
@@ -2050,7 +2055,7 @@
         <!-- The number of times to repeat the marquee animation. Only applied if the
              TextView has marquee enabled. -->
         <attr name="marqueeRepeatLimit" format="integer">
-            <!-- Indicates that marquee should repeat indefinitely  -->
+            <!-- Indicates that marquee should repeat indefinitely. -->
             <enum name="marquee_forever" value="-1" />
         </attr>
         <attr name="inputType" />
@@ -2149,9 +2154,9 @@
         <attr name="prompt" format="reference" />
     </declare-styleable>
     <declare-styleable name="DatePicker">
-        <!-- The first year (inclusive) i.e. 1940 -->
+        <!-- The first year (inclusive), for example "1940". -->
         <attr name="startYear" format="integer" />
-        <!-- The last year (inclusive) i.e. 2010 -->
+        <!-- The last year (inclusive), for example "2010". -->
         <attr name="endYear" format="integer" />
     </declare-styleable>
 
@@ -2160,7 +2165,7 @@
             <!-- Always show only the first line. -->
             <enum name="oneLine" value="1" />
             <!-- When selected show both lines, otherwise show only the first line.
-                 This is the default mode-->
+                 This is the default mode. -->
             <enum name="collapsing" value="2" />
             <!-- Always show both lines. -->
             <enum name="twoLine" value="3" />
@@ -2323,7 +2328,7 @@
     <declare-styleable name="Drawable">
         <!-- Provides initial visibility state of the drawable; the default
              value is false.  See
-             {@link android.graphics.drawable.Drawable#setVisible} -->
+             {@link android.graphics.drawable.Drawable#setVisible}. -->
         <attr name="visible" format="boolean" />
     </declare-styleable>
 
@@ -2343,7 +2348,7 @@
         <attr name="constantSize" format="boolean" />
         <!-- Enables or disables dithering of the bitmap if the bitmap does not have the
              same pixel configuration as the screen (for instance: a ARGB 8888 bitmap with
-             an RGB 565 screen.) -->
+             an RGB 565 screen). -->
         <attr name="dither" format="boolean" />
     </declare-styleable>
 
@@ -2490,7 +2495,7 @@
         <attr name="filter" format="boolean" />
         <!-- Enables or disables dithering of the bitmap if the bitmap does not have the
              same pixel configuration as the screen (for instance: a ARGB 8888 bitmap with
-             an RGB 565 screen.) -->
+             an RGB 565 screen). -->
         <attr name="dither" />
         <!-- Defines the gravity for the bitmap. The gravity indicates where to position
              the drawable in its container if the bitmap is smaller than the container. -->
@@ -2516,7 +2521,7 @@
         <attr name="src" />
         <!-- Enables or disables dithering of the bitmap if the bitmap does not have the
              same pixel configuration as the screen (for instance: a ARGB 8888 bitmap with
-             an RGB 565 screen.) -->
+             an RGB 565 screen). -->
         <attr name="dither" />
     </declare-styleable>
 
@@ -3350,7 +3355,7 @@
         <!-- Size of the text for custom keys with some text and no icon. -->
         <attr name="labelTextSize" format="dimension" />
 
-        <!-- Color to use for the label in a key -->
+        <!-- Color to use for the label in a key. -->
         <attr name="keyTextColor" format="color" />
 
         <!-- Layout resource for key press feedback.-->
@@ -3365,7 +3370,7 @@
         <!-- Amount to offset the touch Y coordinate by, for bias correction. -->
         <attr name="verticalCorrection" format="dimension" />
 
-        <!-- Layout resource for popup keyboards -->
+        <!-- Layout resource for popup keyboards. -->
         <attr name="popupLayout" format="reference" />
 
         <attr name="shadowColor" />
@@ -3374,74 +3379,75 @@
 
     <declare-styleable name="KeyboardViewPreviewState">
         <!-- State for {@link android.inputmethodservice.KeyboardView KeyboardView}
-                key preview background -->
+                key preview background. -->
         <attr name="state_long_pressable" format="boolean" />
     </declare-styleable>
 
     <declare-styleable name="Keyboard">
-        <!-- Default width of a key, in pixels or percentage of display width -->
+        <!-- Default width of a key, in pixels or percentage of display width. -->
         <attr name="keyWidth" format="dimension|fraction" />
-        <!-- Default height of a key, in pixels or percentage of display width -->
+        <!-- Default height of a key, in pixels or percentage of display width. -->
         <attr name="keyHeight" format="dimension|fraction" />
-        <!-- Default horizontal gap between keys -->
+        <!-- Default horizontal gap between keys. -->
         <attr name="horizontalGap" format="dimension|fraction" />
-        <!-- Default vertical gap between rows of keys -->
+        <!-- Default vertical gap between rows of keys. -->
         <attr name="verticalGap" format="dimension|fraction" />
     </declare-styleable>
 
     <declare-styleable name="Keyboard_Row">
-        <!-- Row edge flags-->
+        <!-- Row edge flags. -->
         <attr name="rowEdgeFlags">
-            <!-- Row is anchored to the top of the keyboard -->
+            <!-- Row is anchored to the top of the keyboard. -->
             <flag name="top" value="4" />
-            <!-- Row is anchored to the bottom of the keyboard -->
+            <!-- Row is anchored to the bottom of the keyboard. -->
             <flag name="bottom" value="8" />
         </attr>
         <!-- Mode of the keyboard. If the mode doesn't match the
-             requested keyboard mode, the row will be skipped -->
+             requested keyboard mode, the row will be skipped. -->
         <attr name="keyboardMode" format="reference" />
     </declare-styleable>
 
     <declare-styleable name="Keyboard_Key">
-        <!-- The unicode value or comma-separated values that this key outputs -->
+        <!-- The unicode value or comma-separated values that this key outputs. -->
         <attr name="codes" format="integer|string" />
-        <!-- The XML keyboard layout of any popup keyboard -->
+        <!-- The XML keyboard layout of any popup keyboard. -->
         <attr name="popupKeyboard" format="reference" />
-        <!-- The characters to display in the popup keyboard -->
+        <!-- The characters to display in the popup keyboard. -->
         <attr name="popupCharacters" format="string" />
-        <!-- Key edge flags -->
+        <!-- Key edge flags. -->
         <attr name="keyEdgeFlags">
-            <!-- Key is anchored to the left of the keyboard -->
+            <!-- Key is anchored to the left of the keyboard. -->
             <flag name="left" value="1" />
-            <!-- Key is anchored to the right of the keyboard -->
+            <!-- Key is anchored to the right of the keyboard. -->
             <flag name="right" value="2" />
         </attr>
-        <!-- Whether this is a modifier key such as Alt or Shift -->
+        <!-- Whether this is a modifier key such as Alt or Shift. -->
         <attr name="isModifier" format="boolean" />
-        <!-- Whether this is a toggle key -->
+        <!-- Whether this is a toggle key. -->
         <attr name="isSticky" format="boolean" />
-        <!-- Whether long-pressing on this key will make it repeat -->
+        <!-- Whether long-pressing on this key will make it repeat. -->
         <attr name="isRepeatable" format="boolean" />
-        <!-- The icon to show in the popup preview -->
+        <!-- The icon to show in the popup preview. -->
         <attr name="iconPreview" format="reference" />
-        <!-- The string of characters to output when this key is pressed -->
+        <!-- The string of characters to output when this key is pressed. -->
         <attr name="keyOutputText" format="string" />
-        <!-- The label to display on the key -->
+        <!-- The label to display on the key. -->
         <attr name="keyLabel" format="string" />
-        <!-- The icon to display on the key instead of the label -->
+        <!-- The icon to display on the key instead of the label. -->
         <attr name="keyIcon" format="reference" />
         <!-- Mode of the keyboard. If the mode doesn't match the
-             requested keyboard mode, the key will be skipped -->
+             requested keyboard mode, the key will be skipped. -->
         <attr name="keyboardMode" />
     </declare-styleable>
 
     <!-- =============================== -->
     <!-- AppWidget package class attributes -->
     <!-- =============================== -->
-
+    <eat-comment />
+    
     <!-- Use <code>appwidget-provider</code> as the root tag of the XML resource that
-         describes an AppWidget provider.  See TODO android.appwidget package
-         for more info.
+         describes an AppWidget provider.  See {@link android.appwidget android.appwidget}
+         package for more info.
      -->
     <declare-styleable name="AppWidgetProviderInfo">
         <!-- Minimum width of the AppWidget. -->
@@ -3460,7 +3466,8 @@
     <!-- =============================== -->
     <!-- App package class attributes -->
     <!-- =============================== -->
-
+    <eat-comment />
+    
     <!-- Use <code>wallpaper</code> as the root tag of the XML resource that
          describes an
          {@link android.service.wallpaper.WallpaperService}, which is
@@ -3476,32 +3483,40 @@
 
         <!-- 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>
 
     <!-- =============================== -->
     <!-- Accounts package class attributes -->
     <!-- =============================== -->
-
+    <eat-comment />
+    
     <!-- Use <code>account-authenticator</code> as the root tag of the XML resource that
          describes an account authenticator.
      -->
     <declare-styleable name="AccountAuthenticator">
-        <!-- the account type this authenticator handles. -->
+        <!-- The account type this authenticator handles. -->
         <attr name="accountType" format="string"/>
-        <!-- the user-visible name of the authenticator. -->
+        <!-- The user-visible name of the authenticator. -->
         <attr name="label"/>
-        <!-- the icon of the authenticator. -->
+        <!-- The icon of the authenticator. -->
         <attr name="icon"/>
-        <!-- smaller icon of the authenticator -->
+        <!-- Smaller icon of the authenticator. -->
         <attr name="smallIcon" format="reference"/>
-        <!-- a preferences.xml file for authenticator-specific settings -->
+        <!-- A preferences.xml file for authenticator-specific settings. -->
         <attr name="accountPreferences" format="reference"/>
     </declare-styleable>
 
     <!-- =============================== -->
     <!-- Accounts package class attributes -->
     <!-- =============================== -->
-
+    <eat-comment />
+    
     <!-- Use <code>account-authenticator</code> as the root tag of the XML resource that
          describes an account authenticator.
      -->
@@ -3516,29 +3531,32 @@
     <!-- =============================== -->
     <!-- Contacts meta-data attributes -->
     <!-- =============================== -->
-
-    <!-- TODO: remove this deprecated styleable -->
+    <eat-comment />
+    
+    <!-- TODO: remove this deprecated styleable. -->
+    <eat-comment />
     <declare-styleable name="Icon">
         <attr name="icon" />
         <attr name="mimeType" />
     </declare-styleable>
 
     <!-- TODO: remove this deprecated styleable -->
+    <eat-comment />
     <declare-styleable name="IconDefault">
         <attr name="icon" />
     </declare-styleable>
 
-    <!-- Maps a specific contact data MIME-type to styling information -->
+    <!-- Maps a specific contact data MIME-type to styling information. -->
     <declare-styleable name="ContactsDataKind">
-        <!-- Mime-type handled by this mapping -->
+        <!-- Mime-type handled by this mapping. -->
         <attr name="mimeType" />
-        <!-- Icon used to represent data of this kind -->
+        <!-- Icon used to represent data of this kind. -->
         <attr name="icon" />
-        <!-- Column in data table that summarizes this data -->
+        <!-- Column in data table that summarizes this data. -->
         <attr name="summaryColumn" format="string" />
-        <!-- Column in data table that contains details for this data -->
+        <!-- Column in data table that contains details for this data. -->
         <attr name="detailColumn" format="string" />
-        <!-- Flag indicating that detail should be built from SocialProvider -->
+        <!-- Flag indicating that detail should be built from SocialProvider. -->
         <attr name="detailSocialSummary" format="boolean" />
     </declare-styleable>
 
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index 85f5ce3..4a3da11 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -661,7 +661,7 @@
              for normal behavior. -->
         <attr name="hasCode" format="boolean" />
         <attr name="persistent" />
-        <!-- Specify whether the components in this application are enabled or not (i.e. can be
+        <!-- Specify whether the components in this application are enabled or not (that is, can be
              instantiated by the system).
              If "false", it overrides any component specific values (a value of "true" will not
              override the component specific values). -->
@@ -929,7 +929,7 @@
     <declare-styleable name="AndroidManifestProvider" parent="AndroidManifestApplication">
         <!-- Required name of the class implementing the provider, deriving from
             {@link android.content.ContentProvider}.  This is a fully
-            qualified class name (i.e., com.mycompany.myapp.MyProvider); as a
+            qualified class name (for example, com.mycompany.myapp.MyProvider); as a
             short-hand if the first character of the class
             is a period then it is appended to your package name. -->
         <attr name="name" />
@@ -944,7 +944,7 @@
         <attr name="permission" />
         <attr name="multiprocess" />
         <attr name="initOrder" />
-        <!-- Specify whether this provider is enabled or not (i.e. can be instantiated by the system).
+        <!-- Specify whether this provider is enabled or not (that is, can be instantiated by the system).
              It can also be specified for an application as a whole, in which case a value of "false"
              will override any component specific values (a value of "true" will not override the
              component specific values). -->
@@ -1007,7 +1007,7 @@
     <declare-styleable name="AndroidManifestService" parent="AndroidManifestApplication">
         <!-- Required name of the class implementing the service, deriving from
             {@link android.app.Service}.  This is a fully
-            qualified class name (i.e., com.mycompany.myapp.MyService); as a
+            qualified class name (for example, com.mycompany.myapp.MyService); as a
             short-hand if the first character of the class
             is a period then it is appended to your package name. -->
         <attr name="name" />
@@ -1015,7 +1015,7 @@
         <attr name="icon" />
         <attr name="permission" />
         <attr name="process" />
-        <!-- Specify whether the service is enabled or not (i.e. can be instantiated by the system).
+        <!-- Specify whether the service is enabled or not (that is, can be instantiated by the system).
              It can also be specified for an application as a whole, in which case a value of "false"
              will override any component specific values (a value of "true" will not override the
              component specific values). -->
@@ -1038,7 +1038,7 @@
     <declare-styleable name="AndroidManifestReceiver" parent="AndroidManifestApplication">
         <!-- Required name of the class implementing the receiver, deriving from
             {@link android.content.BroadcastReceiver}.  This is a fully
-            qualified class name (i.e., com.mycompany.myapp.MyReceiver); as a
+            qualified class name (for example, com.mycompany.myapp.MyReceiver); as a
             short-hand if the first character of the class
             is a period then it is appended to your package name. -->
         <attr name="name" />
@@ -1046,7 +1046,7 @@
         <attr name="icon" />
         <attr name="permission" />
         <attr name="process" />
-        <!-- Specify whether the receiver is enabled or not (i.e. can be instantiated by the system).
+        <!-- Specify whether the receiver is enabled or not (that is, can be instantiated by the system).
              It can also be specified for an application as a whole, in which case a value of "false"
              will override any component specific values (a value of "true" will not override the
              component specific values). -->
@@ -1068,7 +1068,7 @@
     <declare-styleable name="AndroidManifestActivity" parent="AndroidManifestApplication">
         <!-- Required name of the class implementing the activity, deriving from
             {@link android.app.Activity}.  This is a fully
-            qualified class name (i.e., com.mycompany.myapp.MyActivity); as a
+            qualified class name (for example, com.mycompany.myapp.MyActivity); as a
             short-hand if the first character of the class
             is a period then it is appended to your package name. -->
         <attr name="name" />
@@ -1090,7 +1090,7 @@
         <attr name="alwaysRetainTaskState" />
         <attr name="stateNotNeeded" />
         <attr name="excludeFromRecents" />
-        <!-- Specify whether the activity is enabled or not (i.e. can be instantiated by the system).
+        <!-- Specify whether the activity is enabled or not (that is, can be instantiated by the system).
              It can also be specified for an application as a whole, in which case a value of "false"
              will override any component specific values (a value of "true" will not override the
              component specific values). -->
@@ -1115,7 +1115,7 @@
     <declare-styleable name="AndroidManifestActivityAlias" parent="AndroidManifestApplication">
         <!-- Required name of the class implementing the activity, deriving from
             {@link android.app.Activity}.  This is a fully
-            qualified class name (i.e., com.mycompany.myapp.MyActivity); as a
+            qualified class name (for example, com.mycompany.myapp.MyActivity); as a
             short-hand if the first character of the class
             is a period then it is appended to your package name. -->
         <attr name="name" />
@@ -1128,7 +1128,7 @@
         <attr name="label" />
         <attr name="icon" />
         <attr name="permission" />
-        <!-- Specify whether the activity-alias is enabled or not (i.e. can be instantiated by the system).
+        <!-- Specify whether the activity-alias is enabled or not (that is, can be instantiated by the system).
              It can also be specified for an application as a whole, in which case a value of "false"
              will override any component specific values (a value of "true" will not override the
              component specific values). -->
@@ -1295,7 +1295,7 @@
     <declare-styleable name="AndroidManifestInstrumentation" parent="AndroidManifest">
         <!-- Required name of the class implementing the instrumentation, deriving from
             {@link android.app.Instrumentation}.  This is a fully
-            qualified class name (i.e., com.mycompany.myapp.MyActivity); as a
+            qualified class name (for example, com.mycompany.myapp.MyActivity); as a
             short-hand if the first character of the class
             is a period then it is appended to your package name. -->
         <attr name="name" />
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/AudioRecord.h b/include/media/AudioRecord.h
index 503cb31..008468c 100644
--- a/include/media/AudioRecord.h
+++ b/include/media/AudioRecord.h
@@ -314,6 +314,11 @@
     };
 
             bool processAudioBuffer(const sp<ClientRecordThread>& thread);
+            status_t openRecord(uint32_t sampleRate,
+                                int format,
+                                int channelCount,
+                                int frameCount,
+                                uint32_t flags);
 
     sp<IAudioRecord>        mAudioRecord;
     sp<IMemory>             mCblkMemory;
@@ -341,6 +346,7 @@
     uint32_t                mNewPosition;
     uint32_t                mUpdatePeriod;
     audio_io_handle_t       mInput;
+    uint32_t                mFlags;
 };
 
 }; // namespace android
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h
index 981c2f6..14b30ae 100644
--- a/include/media/AudioTrack.h
+++ b/include/media/AudioTrack.h
@@ -391,6 +391,14 @@
     };
 
             bool processAudioBuffer(const sp<AudioTrackThread>& thread);
+            status_t createTrack(int streamType,
+                                 uint32_t sampleRate,
+                                 int format,
+                                 int channelCount,
+                                 int frameCount,
+                                 uint32_t flags,
+                                 const sp<IMemory>& sharedBuffer,
+                                 audio_io_handle_t output);
 
     sp<IAudioTrack>         mAudioTrack;
     sp<IMemory>             mCblkMemory;
diff --git a/include/media/ToneGenerator.h b/include/media/ToneGenerator.h
index c884c2c..1ad1f26 100644
--- a/include/media/ToneGenerator.h
+++ b/include/media/ToneGenerator.h
@@ -151,7 +151,7 @@
         NUM_SUP_TONES = LAST_SUP_TONE-FIRST_SUP_TONE+1
     };
 
-    ToneGenerator(int streamType, float volume);
+    ToneGenerator(int streamType, float volume, bool threadCanCallJava = false);
     ~ToneGenerator();
 
     bool startTone(int toneType, int durationMs = -1);
@@ -242,6 +242,7 @@
 
     static const ToneDescriptor sToneDescriptors[];
 
+    bool mThreadCanCallJava;
     unsigned int mTotalSmp;  // Total number of audio samples played (gives current time)
     unsigned int mNextSegSmp;  // Position of next segment transition expressed in samples
     // NOTE: because mTotalSmp, mNextSegSmp are stored on 32 bit, current design will operate properly
diff --git a/include/media/mediarecorder.h b/include/media/mediarecorder.h
index d8ab63d..8c7392b 100644
--- a/include/media/mediarecorder.h
+++ b/include/media/mediarecorder.h
@@ -42,7 +42,8 @@
     AUDIO_SOURCE_VOICE_DOWNLINK = 3,
     AUDIO_SOURCE_VOICE_CALL = 4,
     AUDIO_SOURCE_CAMCORDER = 5,
-    AUDIO_SOURCE_MAX = AUDIO_SOURCE_CAMCORDER,
+    AUDIO_SOURCE_VOICE_RECOGNITION = 6,
+    AUDIO_SOURCE_MAX = AUDIO_SOURCE_VOICE_RECOGNITION,
 
     AUDIO_SOURCE_LIST_END  // must be last - used to validate audio source type
 };
diff --git a/include/media/stagefright/MediaDefs.h b/include/media/stagefright/MediaDefs.h
index feb66e3..1efeb92 100644
--- a/include/media/stagefright/MediaDefs.h
+++ b/include/media/stagefright/MediaDefs.h
@@ -34,6 +34,7 @@
 extern const char *MEDIA_MIMETYPE_AUDIO_RAW;
 
 extern const char *MEDIA_MIMETYPE_CONTAINER_MPEG4;
+extern const char *MEDIA_MIMETYPE_CONTAINER_WAV;
 
 }  // namespace android
 
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp
index 86c3df6..d474571 100644
--- a/libs/binder/IPCThreadState.cpp
+++ b/libs/binder/IPCThreadState.cpp
@@ -422,31 +422,13 @@
                     << getReturnString(cmd) << endl;
             }
 
-            bool isTainted = false;
-
-            {
-                SchedPolicy policy;
-                get_sched_policy(getpid(), &policy);
-
-                if (policy == SP_BACKGROUND) {
-                    isTainted = true;
-                }
-            }
 
             result = executeCommand(cmd);
 
-            // Make sure that after executing the commands that we put the thread back into the
-            // default cgroup.
-            {
-                int pid = getpid();
-                SchedPolicy policy;
-                get_sched_policy(pid, &policy);
-
-                if (!isTainted && policy == SP_BACKGROUND) {
-                    LOGW("*** THREAD %p (PID %p) was left in SP_BACKGROUND with a priority of %d\n",
-                        (void*)pthread_self(), pid, getpriority(PRIO_PROCESS, pid));
-                }
-            }
+            // Make sure that after executing the command that we put the thread back into the
+            // default cgroup. This is just a failsafe incase the thread's priority or cgroup was 
+            // not properly restored.
+            set_sched_policy(getpid(), SP_FOREGROUND);
         }
         
         // Let this thread exit the thread pool if it is no longer
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 9bb00c6..4203cba 100644
--- a/media/java/android/media/MediaRecorder.java
+++ b/media/java/android/media/MediaRecorder.java
@@ -135,6 +135,12 @@
 
         /** Voice call uplink + downlink audio source */
         public static final int VOICE_CALL = 4;
+
+        /** Microphone audio source with same orientation as camera */
+        public static final int CAMCORDER = 5;
+
+        /** Microphone audio source tuned for voice recognition */
+        public static final int VOICE_RECOGNITION = 6;
     }
 
     /**
@@ -274,7 +280,7 @@
      * Gets the maximum value for audio sources.
      * @see android.media.MediaRecorder.AudioSource
      */
-    public static final int getAudioSourceMax() { return AudioSource.VOICE_CALL; }
+    public static final int getAudioSourceMax() { return AudioSource.VOICE_RECOGNITION; }
 
     /**
      * Sets the video source to be used for recording. If this method is not
diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp
index 5e35564..e63c0d2 100644
--- a/media/libmedia/AudioRecord.cpp
+++ b/media/libmedia/AudioRecord.cpp
@@ -101,11 +101,6 @@
         return INVALID_OPERATION;
     }
 
-    const sp<IAudioFlinger>& audioFlinger = AudioSystem::get_audio_flinger();
-    if (audioFlinger == 0) {
-        return NO_INIT;
-    }
-
     if (inputSource == AUDIO_SOURCE_DEFAULT) {
         inputSource = AUDIO_SOURCE_MIC;
     }
@@ -171,22 +166,14 @@
         notificationFrames = frameCount/2;
     }
 
-    // open record channel
-    status_t status;
-    sp<IAudioRecord> record = audioFlinger->openRecord(getpid(), mInput,
-                                                       sampleRate, format,
-                                                       channelCount,
-                                                       frameCount,
-                                                       ((uint16_t)flags) << 16,
-                                                       &status);
-    if (record == 0) {
-        LOGE("AudioFlinger could not create record track, status: %d", status);
+    // create the IAudioRecord
+    status_t status = openRecord(sampleRate, format, channelCount,
+                                 frameCount, flags);
+
+    if (status != NO_ERROR) {
         return status;
     }
-    sp<IMemory> cblk = record->getCblk();
-    if (cblk == 0) {
-        return NO_INIT;
-    }
+
     if (cbf != 0) {
         mClientRecordThread = new ClientRecordThread(*this, threadCanCallJava);
         if (mClientRecordThread == 0) {
@@ -196,11 +183,6 @@
 
     mStatus = NO_ERROR;
 
-    mAudioRecord = record;
-    mCblkMemory = cblk;
-    mCblk = static_cast<audio_track_cblk_t*>(cblk->pointer());
-    mCblk->buffers = (char*)mCblk + sizeof(audio_track_cblk_t);
-    mCblk->out = 0;
     mFormat = format;
     // Update buffer size in case it has been limited by AudioFlinger during track creation
     mFrameCount = mCblk->frameCount;
@@ -217,6 +199,7 @@
     mNewPosition = 0;
     mUpdatePeriod = 0;
     mInputSource = (uint8_t)inputSource;
+    mFlags = flags;
 
     return NO_ERROR;
 }
@@ -284,15 +267,26 @@
     if (android_atomic_or(1, &mActive) == 0) {
         ret = AudioSystem::startInput(mInput);
         if (ret == NO_ERROR) {
-            mNewPosition = mCblk->user + mUpdatePeriod;
-            mCblk->bufferTimeoutMs = MAX_RUN_TIMEOUT_MS;
-            mCblk->waitTimeMs = 0;
-            if (t != 0) {
-               t->run("ClientRecordThread", THREAD_PRIORITY_AUDIO_CLIENT);
-            } else {
-                setpriority(PRIO_PROCESS, 0, THREAD_PRIORITY_AUDIO_CLIENT);
-            }
             ret = mAudioRecord->start();
+            if (ret == DEAD_OBJECT) {
+                LOGV("start() dead IAudioRecord: creating a new one");
+                ret = openRecord(mCblk->sampleRate, mFormat, mChannelCount,
+                        mFrameCount, mFlags);
+            }
+            if (ret == NO_ERROR) {
+                mNewPosition = mCblk->user + mUpdatePeriod;
+                mCblk->bufferTimeoutMs = MAX_RUN_TIMEOUT_MS;
+                mCblk->waitTimeMs = 0;
+                if (t != 0) {
+                   t->run("ClientRecordThread", THREAD_PRIORITY_AUDIO_CLIENT);
+                } else {
+                    setpriority(PRIO_PROCESS, 0, THREAD_PRIORITY_AUDIO_CLIENT);
+                }
+            } else {
+                LOGV("start() failed");
+                AudioSystem::stopInput(mInput);
+                android_atomic_and(~1, &mActive);
+            }
         }
     }
 
@@ -396,10 +390,48 @@
 
 // -------------------------------------------------------------------------
 
+status_t AudioRecord::openRecord(
+        uint32_t sampleRate,
+        int format,
+        int channelCount,
+        int frameCount,
+        uint32_t flags)
+{
+    status_t status;
+    const sp<IAudioFlinger>& audioFlinger = AudioSystem::get_audio_flinger();
+    if (audioFlinger == 0) {
+        return NO_INIT;
+    }
+
+    sp<IAudioRecord> record = audioFlinger->openRecord(getpid(), mInput,
+                                                       sampleRate, format,
+                                                       channelCount,
+                                                       frameCount,
+                                                       ((uint16_t)flags) << 16,
+                                                       &status);
+    if (record == 0) {
+        LOGE("AudioFlinger could not create record track, status: %d", status);
+        return status;
+    }
+    sp<IMemory> cblk = record->getCblk();
+    if (cblk == 0) {
+        LOGE("Could not get control block");
+        return NO_INIT;
+    }
+    mAudioRecord.clear();
+    mAudioRecord = record;
+    mCblkMemory.clear();
+    mCblkMemory = cblk;
+    mCblk = static_cast<audio_track_cblk_t*>(cblk->pointer());
+    mCblk->buffers = (char*)mCblk + sizeof(audio_track_cblk_t);
+    mCblk->out = 0;
+
+    return NO_ERROR;
+}
+
 status_t AudioRecord::obtainBuffer(Buffer* audioBuffer, int32_t waitCount)
 {
     int active;
-    int timeout = 0;
     status_t result;
     audio_track_cblk_t* cblk = mCblk;
     uint32_t framesReq = audioBuffer->frameCount;
@@ -411,25 +443,40 @@
     uint32_t framesReady = cblk->framesReady();
 
     if (framesReady == 0) {
-        Mutex::Autolock _l(cblk->lock);
+        cblk->lock.lock();
         goto start_loop_here;
         while (framesReady == 0) {
             active = mActive;
-            if (UNLIKELY(!active))
+            if (UNLIKELY(!active)) {
+                cblk->lock.unlock();
                 return NO_MORE_BUFFERS;
-            if (UNLIKELY(!waitCount))
+            }
+            if (UNLIKELY(!waitCount)) {
+                cblk->lock.unlock();
                 return WOULD_BLOCK;
-            timeout = 0;
+            }
             result = cblk->cv.waitRelative(cblk->lock, milliseconds(waitTimeMs));
             if (__builtin_expect(result!=NO_ERROR, false)) {
                 cblk->waitTimeMs += waitTimeMs;
                 if (cblk->waitTimeMs >= cblk->bufferTimeoutMs) {
                     LOGW(   "obtainBuffer timed out (is the CPU pegged?) "
                             "user=%08x, server=%08x", cblk->user, cblk->server);
-                    timeout = 1;
+                    cblk->lock.unlock();
+                    result = mAudioRecord->start();
+                    if (result == DEAD_OBJECT) {
+                        LOGW("obtainBuffer() dead IAudioRecord: creating a new one");
+                        result = openRecord(cblk->sampleRate, mFormat, mChannelCount,
+                                            mFrameCount, mFlags);
+                        if (result == NO_ERROR) {
+                            cblk = mCblk;
+                            cblk->bufferTimeoutMs = MAX_RUN_TIMEOUT_MS;
+                        }
+                    }
+                    cblk->lock.lock();
                     cblk->waitTimeMs = 0;
                 }
                 if (--waitCount == 0) {
+                    cblk->lock.unlock();
                     return TIMED_OUT;
                 }
             }
@@ -437,13 +484,9 @@
         start_loop_here:
             framesReady = cblk->framesReady();
         }
+        cblk->lock.unlock();
     }
 
-    LOGW_IF(timeout,
-        "*** SERIOUS WARNING *** obtainBuffer() timed out "
-        "but didn't need to be locked. We recovered, but "
-        "this shouldn't happen (user=%08x, server=%08x)", cblk->user, cblk->server);
-
     cblk->waitTimeMs = 0;
 
     if (framesReq > framesReady) {
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index 4b9d272..8529a8e 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -122,11 +122,6 @@
         return INVALID_OPERATION;
     }
 
-    const sp<IAudioFlinger>& audioFlinger = AudioSystem::get_audio_flinger();
-    if (audioFlinger == 0) {
-       LOGE("Could not get audioflinger");
-       return NO_INIT;
-    }
     int afSampleRate;
     if (AudioSystem::getOutputSamplingRate(&afSampleRate, streamType) != NO_ERROR) {
         return NO_INIT;
@@ -217,28 +212,16 @@
         }
     }
 
-    // create the track
-    status_t status;
-    sp<IAudioTrack> track = audioFlinger->createTrack(getpid(),
-                                                      streamType,
-                                                      sampleRate,
-                                                      format,
-                                                      channelCount,
-                                                      frameCount,
-                                                      ((uint16_t)flags) << 16,
-                                                      sharedBuffer,
-                                                      output,
-                                                      &status);
+    mVolume[LEFT] = 1.0f;
+    mVolume[RIGHT] = 1.0f;
+    // create the IAudioTrack
+    status_t status = createTrack(streamType, sampleRate, format, channelCount,
+                                  frameCount, flags, sharedBuffer, output);
 
-    if (track == 0) {
-        LOGE("AudioFlinger could not create track, status: %d", status);
+    if (status != NO_ERROR) {
         return status;
     }
-    sp<IMemory> cblk = track->getCblk();
-    if (cblk == 0) {
-        LOGE("Could not get control block");
-        return NO_INIT;
-    }
+
     if (cbf != 0) {
         mAudioTrackThread = new AudioTrackThread(*this, threadCanCallJava);
         if (mAudioTrackThread == 0) {
@@ -249,22 +232,6 @@
 
     mStatus = NO_ERROR;
 
-    mAudioTrack = track;
-    mCblkMemory = cblk;
-    mCblk = static_cast<audio_track_cblk_t*>(cblk->pointer());
-    mCblk->out = 1;
-    // Update buffer size in case it has been limited by AudioFlinger during track creation
-    mFrameCount = mCblk->frameCount;
-    if (sharedBuffer == 0) {
-        mCblk->buffers = (char*)mCblk + sizeof(audio_track_cblk_t);
-    } else {
-        mCblk->buffers = sharedBuffer->pointer();
-         // Force buffer full condition as data is already present in shared memory
-        mCblk->stepUser(mFrameCount);
-    }
-    mCblk->volume[0] = mCblk->volume[1] = 0x1000;
-    mVolume[LEFT] = 1.0f;
-    mVolume[RIGHT] = 1.0f;
     mStreamType = streamType;
     mFormat = format;
     mChannels = channels;
@@ -351,16 +318,27 @@
      }
 
     if (android_atomic_or(1, &mActive) == 0) {
-        AudioSystem::startOutput(getOutput(), (AudioSystem::stream_type)mStreamType);
-        mNewPosition = mCblk->server + mUpdatePeriod;
-        mCblk->bufferTimeoutMs = MAX_STARTUP_TIMEOUT_MS;
-        mCblk->waitTimeMs = 0;
-        if (t != 0) {
-           t->run("AudioTrackThread", THREAD_PRIORITY_AUDIO_CLIENT);
-        } else {
-            setpriority(PRIO_PROCESS, 0, THREAD_PRIORITY_AUDIO_CLIENT);
+        audio_io_handle_t output = AudioTrack::getOutput();
+        status_t status = mAudioTrack->start();
+        if (status == DEAD_OBJECT) {
+            LOGV("start() dead IAudioTrack: creating a new one");
+            status = createTrack(mStreamType, mCblk->sampleRate, mFormat, mChannelCount,
+                                 mFrameCount, mFlags, mSharedBuffer, output);
         }
-        mAudioTrack->start();
+        if (status == NO_ERROR) {
+            AudioSystem::startOutput(output, (AudioSystem::stream_type)mStreamType);
+            mNewPosition = mCblk->server + mUpdatePeriod;
+            mCblk->bufferTimeoutMs = MAX_STARTUP_TIMEOUT_MS;
+            mCblk->waitTimeMs = 0;
+            if (t != 0) {
+               t->run("AudioTrackThread", THREAD_PRIORITY_AUDIO_CLIENT);
+            } else {
+                setpriority(PRIO_PROCESS, 0, THREAD_PRIORITY_AUDIO_CLIENT);
+            }
+        } else {
+            LOGV("start() failed");
+            android_atomic_and(~1, &mActive);
+        }
     }
 
     if (t != 0) {
@@ -617,10 +595,67 @@
 
 // -------------------------------------------------------------------------
 
+status_t AudioTrack::createTrack(
+        int streamType,
+        uint32_t sampleRate,
+        int format,
+        int channelCount,
+        int frameCount,
+        uint32_t flags,
+        const sp<IMemory>& sharedBuffer,
+        audio_io_handle_t output)
+{
+    status_t status;
+    const sp<IAudioFlinger>& audioFlinger = AudioSystem::get_audio_flinger();
+    if (audioFlinger == 0) {
+       LOGE("Could not get audioflinger");
+       return NO_INIT;
+    }
+
+    sp<IAudioTrack> track = audioFlinger->createTrack(getpid(),
+                                                      streamType,
+                                                      sampleRate,
+                                                      format,
+                                                      channelCount,
+                                                      frameCount,
+                                                      ((uint16_t)flags) << 16,
+                                                      sharedBuffer,
+                                                      output,
+                                                      &status);
+
+    if (track == 0) {
+        LOGE("AudioFlinger could not create track, status: %d", status);
+        return status;
+    }
+    sp<IMemory> cblk = track->getCblk();
+    if (cblk == 0) {
+        LOGE("Could not get control block");
+        return NO_INIT;
+    }
+    mAudioTrack.clear();
+    mAudioTrack = track;
+    mCblkMemory.clear();
+    mCblkMemory = cblk;
+    mCblk = static_cast<audio_track_cblk_t*>(cblk->pointer());
+    mCblk->out = 1;
+    // Update buffer size in case it has been limited by AudioFlinger during track creation
+    mFrameCount = mCblk->frameCount;
+    if (sharedBuffer == 0) {
+        mCblk->buffers = (char*)mCblk + sizeof(audio_track_cblk_t);
+    } else {
+        mCblk->buffers = sharedBuffer->pointer();
+         // Force buffer full condition as data is already present in shared memory
+        mCblk->stepUser(mFrameCount);
+    }
+
+    mCblk->volumeLR = (int32_t(int16_t(mVolume[LEFT] * 0x1000)) << 16) | int16_t(mVolume[RIGHT] * 0x1000);
+
+    return NO_ERROR;
+}
+
 status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, int32_t waitCount)
 {
     int active;
-    int timeout = 0;
     status_t result;
     audio_track_cblk_t* cblk = mCblk;
     uint32_t framesReq = audioBuffer->frameCount;
@@ -632,17 +667,20 @@
     uint32_t framesAvail = cblk->framesAvailable();
 
     if (framesAvail == 0) {
-        Mutex::Autolock _l(cblk->lock);
+        cblk->lock.lock();
         goto start_loop_here;
         while (framesAvail == 0) {
             active = mActive;
             if (UNLIKELY(!active)) {
                 LOGV("Not active and NO_MORE_BUFFERS");
+                cblk->lock.unlock();
                 return NO_MORE_BUFFERS;
             }
-            if (UNLIKELY(!waitCount))
+            if (UNLIKELY(!waitCount)) {
+                cblk->lock.unlock();
                 return WOULD_BLOCK;
-            timeout = 0;
+            }
+
             result = cblk->cv.waitRelative(cblk->lock, milliseconds(waitTimeMs));
             if (__builtin_expect(result!=NO_ERROR, false)) {
                 cblk->waitTimeMs += waitTimeMs;
@@ -654,14 +692,23 @@
                                 "user=%08x, server=%08x", this, cblk->user, cblk->server);
                         //unlock cblk mutex before calling mAudioTrack->start() (see issue #1617140)
                         cblk->lock.unlock();
-                        mAudioTrack->start();
+                        result = mAudioTrack->start();
+                        if (result == DEAD_OBJECT) {
+                            LOGW("obtainBuffer() dead IAudioTrack: creating a new one");
+                            result = createTrack(mStreamType, cblk->sampleRate, mFormat, mChannelCount,
+                                                 mFrameCount, mFlags, mSharedBuffer, getOutput());
+                            if (result == NO_ERROR) {
+                                cblk = mCblk;
+                                cblk->bufferTimeoutMs = MAX_RUN_TIMEOUT_MS;
+                            }
+                        }
                         cblk->lock.lock();
-                        timeout = 1;
                     }
                     cblk->waitTimeMs = 0;
                 }
 
                 if (--waitCount == 0) {
+                    cblk->lock.unlock();
                     return TIMED_OUT;
                 }
             }
@@ -669,6 +716,7 @@
         start_loop_here:
             framesAvail = cblk->framesAvailable_l();
         }
+        cblk->lock.unlock();
     }
 
     cblk->waitTimeMs = 0;
@@ -684,11 +732,6 @@
         framesReq = bufferEnd - u;
     }
 
-    LOGW_IF(timeout,
-        "*** SERIOUS WARNING *** obtainBuffer() timed out "
-        "but didn't need to be locked. We recovered, but "
-        "this shouldn't happen (user=%08x, server=%08x)", cblk->user, cblk->server);
-
     audioBuffer->flags = mMuted ? Buffer::MUTE : 0;
     audioBuffer->channelCount = mChannelCount;
     audioBuffer->frameCount = framesReq;
@@ -991,7 +1034,7 @@
         // Mark that we have read the first buffer so that next time stepUser() is called
         // we switch to normal obtainBuffer() timeout period
         if (bufferTimeoutMs == MAX_STARTUP_TIMEOUT_MS) {
-            bufferTimeoutMs = MAX_RUN_TIMEOUT_MS - 1;
+            bufferTimeoutMs = MAX_STARTUP_TIMEOUT_MS - 1;
         }
         // It is possible that we receive a flush()
         // while the mixer is processing a block: in this case,
diff --git a/media/libmedia/IAudioRecord.cpp b/media/libmedia/IAudioRecord.cpp
index dacf75a..ba0d55b 100644
--- a/media/libmedia/IAudioRecord.cpp
+++ b/media/libmedia/IAudioRecord.cpp
@@ -15,6 +15,10 @@
 ** limitations under the License.
 */
 
+#define LOG_TAG "IAudioRecord"
+//#define LOG_NDEBUG 0
+#include <utils/Log.h>
+
 #include <stdint.h>
 #include <sys/types.h>
 
@@ -42,8 +46,13 @@
     {
         Parcel data, reply;
         data.writeInterfaceToken(IAudioRecord::getInterfaceDescriptor());
-        remote()->transact(START, data, &reply);
-        return reply.readInt32();
+        status_t status = remote()->transact(START, data, &reply);
+        if (status == NO_ERROR) {
+            status = reply.readInt32();
+        } else {
+            LOGW("start() error: %s", strerror(-status));
+        }
+        return status;
     }
     
     virtual void stop()
diff --git a/media/libmedia/IAudioTrack.cpp b/media/libmedia/IAudioTrack.cpp
index 7f43347..01ffd75 100644
--- a/media/libmedia/IAudioTrack.cpp
+++ b/media/libmedia/IAudioTrack.cpp
@@ -15,6 +15,10 @@
 ** limitations under the License.
 */
 
+#define LOG_TAG "IAudioTrack"
+//#define LOG_NDEBUG 0
+#include <utils/Log.h>
+
 #include <stdint.h>
 #include <sys/types.h>
 
@@ -45,8 +49,13 @@
     {
         Parcel data, reply;
         data.writeInterfaceToken(IAudioTrack::getInterfaceDescriptor());
-        remote()->transact(START, data, &reply);
-        return reply.readInt32();
+        status_t status = remote()->transact(START, data, &reply);
+        if (status == NO_ERROR) {
+            status = reply.readInt32();
+        } else {
+            LOGW("start() error: %s", strerror(-status));
+        }
+        return status;
     }
     
     virtual void stop()
diff --git a/media/libmedia/ToneGenerator.cpp b/media/libmedia/ToneGenerator.cpp
index 91d0d00..60e3d71 100644
--- a/media/libmedia/ToneGenerator.cpp
+++ b/media/libmedia/ToneGenerator.cpp
@@ -798,7 +798,7 @@
 //        none
 //
 ////////////////////////////////////////////////////////////////////////////////
-ToneGenerator::ToneGenerator(int streamType, float volume) {
+ToneGenerator::ToneGenerator(int streamType, float volume, bool threadCanCallJava) {
 
     LOGV("ToneGenerator constructor: streamType=%d, volume=%f\n", streamType, volume);
 
@@ -808,6 +808,7 @@
         LOGE("Unable to marshal AudioFlinger");
         return;
     }
+    mThreadCanCallJava = threadCanCallJava;
     mStreamType = streamType;
     mVolume = volume;
     mpAudioTrack = 0;
@@ -1015,15 +1016,25 @@
     }
 
    // Open audio track in mono, PCM 16bit, default sampling rate, default buffer size
-    mpAudioTrack
-            = new AudioTrack(mStreamType, 0, AudioSystem::PCM_16_BIT, AudioSystem::CHANNEL_OUT_MONO, 0, 0, audioCallback, this, 0);
-
+    mpAudioTrack = new AudioTrack();
     if (mpAudioTrack == 0) {
         LOGE("AudioTrack allocation failed");
         goto initAudioTrack_exit;
     }
     LOGV("Create Track: %p\n", mpAudioTrack);
 
+    mpAudioTrack->set(mStreamType,
+                      0,
+                      AudioSystem::PCM_16_BIT,
+                      AudioSystem::CHANNEL_OUT_MONO,
+                      0,
+                      0,
+                      audioCallback,
+                      this,
+                      0,
+                      0,
+                      mThreadCanCallJava);
+
     if (mpAudioTrack->initCheck() != NO_ERROR) {
         LOGE("AudioTrack->initCheck failed");
         goto initAudioTrack_exit;
diff --git a/media/libstagefright/Android.mk b/media/libstagefright/Android.mk
index b774609..c36e769 100644
--- a/media/libstagefright/Android.mk
+++ b/media/libstagefright/Android.mk
@@ -16,6 +16,7 @@
 
 LOCAL_SRC_FILES +=                \
         AMRExtractor.cpp          \
+        AudioPlayer.cpp           \
         CachingDataSource.cpp     \
         CameraSource.cpp          \
         DataSource.cpp            \
@@ -23,17 +24,17 @@
         HTTPDataSource.cpp        \
         HTTPStream.cpp            \
         JPEGSource.cpp            \
-        MediaExtractor.cpp        \
         MP3Extractor.cpp          \
         MPEG4Extractor.cpp        \
         MPEG4Writer.cpp           \
+        MediaExtractor.cpp        \
         MediaPlayerImpl.cpp       \
         MmapSource.cpp            \
         SampleTable.cpp           \
         ShoutcastSource.cpp       \
         TimeSource.cpp            \
         TimedEventQueue.cpp       \
-        AudioPlayer.cpp           \
+        WAVExtractor.cpp          \
         string.cpp
 
 endif
diff --git a/media/libstagefright/DataSource.cpp b/media/libstagefright/DataSource.cpp
index 210b2f6..2a6dbc4 100644
--- a/media/libstagefright/DataSource.cpp
+++ b/media/libstagefright/DataSource.cpp
@@ -17,6 +17,7 @@
 #include "include/AMRExtractor.h"
 #include "include/MP3Extractor.h"
 #include "include/MPEG4Extractor.h"
+#include "include/WAVExtractor.h"
 
 #include <media/stagefright/DataSource.h>
 #include <media/stagefright/MediaErrors.h>
@@ -87,6 +88,7 @@
     RegisterSniffer(SniffMP3);
     RegisterSniffer(SniffMPEG4);
     RegisterSniffer(SniffAMR);
+    RegisterSniffer(SniffWAV);
 }
 
 }  // namespace android
diff --git a/media/libstagefright/MP3Extractor.cpp b/media/libstagefright/MP3Extractor.cpp
index 736f1a9d6..8dd8ea9 100644
--- a/media/libstagefright/MP3Extractor.cpp
+++ b/media/libstagefright/MP3Extractor.cpp
@@ -373,7 +373,7 @@
         if (mDataSource->getSize(&fileSize) == OK) {
             mMeta->setInt64(
                     kKeyDuration,
-                    8000 * (fileSize - mFirstFramePos) / bitrate);
+                    8000LL * (fileSize - mFirstFramePos) / bitrate);
         }
     }
 }
diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp
index 5c3720e..9d17064 100644
--- a/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/MPEG4Extractor.cpp
@@ -1001,7 +1001,8 @@
     }
 
     if (!memcmp(header, "ftyp3gp", 7) || !memcmp(header, "ftypmp42", 8)
-        || !memcmp(header, "ftypisom", 8) || !memcmp(header, "ftypM4V ", 8)) {
+        || !memcmp(header, "ftypisom", 8) || !memcmp(header, "ftypM4V ", 8)
+        || !memcmp(header, "ftypM4A ", 8)) {
         *mimeType = MEDIA_MIMETYPE_CONTAINER_MPEG4;
         *confidence = 0.1;
 
diff --git a/media/libstagefright/MediaDefs.cpp b/media/libstagefright/MediaDefs.cpp
index 87b5b24..04b1454 100644
--- a/media/libstagefright/MediaDefs.cpp
+++ b/media/libstagefright/MediaDefs.cpp
@@ -32,5 +32,6 @@
 const char *MEDIA_MIMETYPE_AUDIO_RAW = "audio/raw";
 
 const char *MEDIA_MIMETYPE_CONTAINER_MPEG4 = "video/mpeg4";
+const char *MEDIA_MIMETYPE_CONTAINER_WAV = "audio/wav";
 
 }  // namespace android
diff --git a/media/libstagefright/MediaExtractor.cpp b/media/libstagefright/MediaExtractor.cpp
index d51802c..19a1f85 100644
--- a/media/libstagefright/MediaExtractor.cpp
+++ b/media/libstagefright/MediaExtractor.cpp
@@ -21,6 +21,7 @@
 #include "include/AMRExtractor.h"
 #include "include/MP3Extractor.h"
 #include "include/MPEG4Extractor.h"
+#include "include/WAVExtractor.h"
 
 #include <media/stagefright/CachingDataSource.h>
 #include <media/stagefright/DataSource.h>
@@ -57,6 +58,8 @@
     } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AMR_NB)
             || !strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AMR_WB)) {
         return new AMRExtractor(source);
+    } else if (!strcasecmp(mime, MEDIA_MIMETYPE_CONTAINER_WAV)) {
+        return new WAVExtractor(source);
     }
 
     return NULL;
diff --git a/media/libstagefright/MediaPlayerImpl.cpp b/media/libstagefright/MediaPlayerImpl.cpp
index 76f4182..4d14e4c 100644
--- a/media/libstagefright/MediaPlayerImpl.cpp
+++ b/media/libstagefright/MediaPlayerImpl.cpp
@@ -28,6 +28,7 @@
 #include <media/stagefright/AudioPlayer.h>
 // #include <media/stagefright/CameraSource.h>
 #include <media/stagefright/MediaDebug.h>
+#include <media/stagefright/MediaDefs.h>
 #include <media/stagefright/MediaExtractor.h>
 #include <media/stagefright/MediaPlayerImpl.h>
 #include <media/stagefright/MetaData.h>
@@ -391,8 +392,15 @@
 
     sp<MetaData> meta = source->getFormat();
 
-    mAudioDecoder = OMXCodec::Create(
-            mClient.interface(), meta, false /* createEncoder */, source);
+    const char *mime;
+    CHECK(meta->findCString(kKeyMIMEType, &mime));
+
+    if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_RAW)) {
+        mAudioDecoder = source;
+    } else {
+        mAudioDecoder = OMXCodec::Create(
+                mClient.interface(), meta, false /* createEncoder */, source);
+    }
 }
 
 void MediaPlayerImpl::setVideoSource(const sp<MediaSource> &source) {
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 41a9fe9..6c0367a 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -218,7 +218,6 @@
     }
     if (!strncmp(componentName, "OMX.qcom.video.decoder.", 23)) {
         // XXX Required on P....on only.
-        quirks |= kRequiresAllocateBufferOnInputPorts;
         quirks |= kRequiresAllocateBufferOnOutputPorts;
     }
 
diff --git a/media/libstagefright/WAVExtractor.cpp b/media/libstagefright/WAVExtractor.cpp
new file mode 100644
index 0000000..542c764
--- /dev/null
+++ b/media/libstagefright/WAVExtractor.cpp
@@ -0,0 +1,317 @@
+/*
+ * 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 "WAVExtractor"
+#include <utils/Log.h>
+
+#include "include/WAVExtractor.h"
+
+#include <media/stagefright/DataSource.h>
+#include <media/stagefright/MediaBufferGroup.h>
+#include <media/stagefright/MediaDebug.h>
+#include <media/stagefright/MediaDefs.h>
+#include <media/stagefright/MediaErrors.h>
+#include <media/stagefright/MediaSource.h>
+#include <media/stagefright/MetaData.h>
+#include <utils/String8.h>
+
+namespace android {
+
+static uint16_t WAVE_FORMAT_PCM = 1;
+
+static uint32_t U32_LE_AT(const uint8_t *ptr) {
+    return ptr[3] << 24 | ptr[2] << 16 | ptr[1] << 8 | ptr[0];
+}
+
+static uint16_t U16_LE_AT(const uint8_t *ptr) {
+    return ptr[1] << 8 | ptr[0];
+}
+
+struct WAVSource : public MediaSource {
+    WAVSource(
+            const sp<DataSource> &dataSource,
+            int32_t sampleRate, int32_t numChannels,
+            off_t offset, size_t size);
+
+    virtual status_t start(MetaData *params = NULL);
+    virtual status_t stop();
+    virtual sp<MetaData> getFormat();
+
+    virtual status_t read(
+            MediaBuffer **buffer, const ReadOptions *options = NULL);
+
+protected:
+    virtual ~WAVSource();
+
+private:
+    static const size_t kMaxFrameSize;
+
+    sp<DataSource> mDataSource;
+    int32_t mSampleRate;
+    int32_t mNumChannels;
+    off_t mOffset;
+    size_t mSize;
+    bool mStarted;
+    MediaBufferGroup *mGroup;
+    off_t mCurrentPos;
+
+    WAVSource(const WAVSource &);
+    WAVSource &operator=(const WAVSource &);
+};
+
+WAVExtractor::WAVExtractor(const sp<DataSource> &source)
+    : mDataSource(source),
+      mValidFormat(false) {
+    mInitCheck = init();
+}
+
+WAVExtractor::~WAVExtractor() {
+}
+
+size_t WAVExtractor::countTracks() {
+    return mInitCheck == OK ? 1 : 0;
+}
+
+sp<MediaSource> WAVExtractor::getTrack(size_t index) {
+    if (mInitCheck != OK || index > 0) {
+        return NULL;
+    }
+
+    return new WAVSource(
+            mDataSource, mSampleRate, mNumChannels, mDataOffset, mDataSize);
+}
+
+sp<MetaData> WAVExtractor::getTrackMetaData(
+        size_t index, uint32_t flags) {
+    if (mInitCheck != OK || index > 0) {
+        return NULL;
+    }
+
+    sp<MetaData> meta = new MetaData;
+    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_RAW);
+    meta->setInt32(kKeyChannelCount, mNumChannels);
+    meta->setInt32(kKeySampleRate, mSampleRate);
+
+    int64_t durationUs =
+        1000000LL * (mDataSize / (mNumChannels * 2)) / mSampleRate;
+
+    meta->setInt64(kKeyDuration, durationUs);
+
+    return meta;
+}
+
+status_t WAVExtractor::init() {
+    uint8_t header[12];
+    if (mDataSource->readAt(
+                0, header, sizeof(header)) < (ssize_t)sizeof(header)) {
+        return NO_INIT;
+    }
+
+    if (memcmp(header, "RIFF", 4) || memcmp(&header[8], "WAVE", 4)) {
+        return NO_INIT;
+    }
+
+    size_t totalSize = U32_LE_AT(&header[4]);
+
+    off_t offset = 12;
+    size_t remainingSize = totalSize;
+    while (remainingSize >= 8) {
+        uint8_t chunkHeader[8];
+        if (mDataSource->readAt(offset, chunkHeader, 8) < 8) {
+            return NO_INIT;
+        }
+
+        remainingSize -= 8;
+        offset += 8;
+        
+        uint32_t chunkSize = U32_LE_AT(&chunkHeader[4]);
+
+        if (chunkSize > remainingSize) {
+            return NO_INIT;
+        }
+
+        if (!memcmp(chunkHeader, "fmt ", 4)) {
+            if (chunkSize < 16) {
+                return NO_INIT;
+            }
+
+            uint8_t formatSpec[16];
+            if (mDataSource->readAt(offset, formatSpec, 16) < 16) {
+                return NO_INIT;
+            }
+
+            uint16_t format = U16_LE_AT(formatSpec);
+            if (format != WAVE_FORMAT_PCM) {
+                return ERROR_UNSUPPORTED;
+            }
+
+            mNumChannels = U16_LE_AT(&formatSpec[2]);
+            if (mNumChannels != 1 && mNumChannels != 2) {
+                return ERROR_UNSUPPORTED;
+            }
+
+            mSampleRate = U32_LE_AT(&formatSpec[4]);
+
+            if (U16_LE_AT(&formatSpec[14]) != 16) {
+                return ERROR_UNSUPPORTED;
+            }
+
+            mValidFormat = true;
+        } else if (!memcmp(chunkHeader, "data", 4)) {
+            if (mValidFormat) {
+                mDataOffset = offset;
+                mDataSize = chunkSize;
+
+                return OK;
+            }
+        }
+
+        offset += chunkSize;
+    }
+
+    return NO_INIT;
+}
+
+const size_t WAVSource::kMaxFrameSize = 32768;
+
+WAVSource::WAVSource(
+        const sp<DataSource> &dataSource,
+        int32_t sampleRate, int32_t numChannels,
+        off_t offset, size_t size)
+    : mDataSource(dataSource),
+      mSampleRate(sampleRate),
+      mNumChannels(numChannels),
+      mOffset(offset),
+      mSize(size),
+      mStarted(false),
+      mGroup(NULL) {
+}
+
+WAVSource::~WAVSource() {
+    if (mStarted) {
+        stop();
+    }
+}
+
+status_t WAVSource::start(MetaData *params) {
+    LOGV("WAVSource::start");
+
+    CHECK(!mStarted);
+
+    mGroup = new MediaBufferGroup;
+    mGroup->add_buffer(new MediaBuffer(kMaxFrameSize));
+
+    mCurrentPos = mOffset;
+
+    mStarted = true;
+
+    return OK;
+}
+
+status_t WAVSource::stop() {
+    LOGV("WAVSource::stop");
+
+    CHECK(mStarted);
+
+    delete mGroup;
+    mGroup = NULL;
+
+    mStarted = false;
+
+    return OK;
+}
+
+sp<MetaData> WAVSource::getFormat() {
+    LOGV("WAVSource::getFormat");
+
+    sp<MetaData> meta = new MetaData;
+    meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_RAW);
+    meta->setInt32(kKeyChannelCount, mNumChannels);
+    meta->setInt32(kKeySampleRate, mSampleRate);
+
+    int64_t durationUs =
+        1000000LL * (mSize / (mNumChannels * 2)) / mSampleRate;
+
+    meta->setInt64(kKeyDuration, durationUs);
+
+    return meta;
+}
+
+status_t WAVSource::read(
+        MediaBuffer **out, const ReadOptions *options) {
+    *out = NULL;
+
+    int64_t seekTimeUs;
+    if (options != NULL && options->getSeekTo(&seekTimeUs)) {
+        int64_t pos = (seekTimeUs * mSampleRate) / 1000000 * mNumChannels * 2;
+        if (pos > mSize) {
+            pos = mSize;
+        }
+        mCurrentPos = pos + mOffset;
+    }
+
+    MediaBuffer *buffer;
+    status_t err = mGroup->acquire_buffer(&buffer);
+    if (err != OK) {
+        return err;
+    }
+
+    ssize_t n = mDataSource->readAt(
+            mCurrentPos, buffer->data(), kMaxFrameSize);
+
+    if (n <= 0) {
+        buffer->release();
+        buffer = NULL;
+
+        return ERROR_END_OF_STREAM;
+    }
+
+    mCurrentPos += n;
+
+    buffer->set_range(0, n);
+    buffer->meta_data()->setInt64(
+            kKeyTime,
+            1000000LL * (mCurrentPos - mOffset)
+                / (mNumChannels * 2) / mSampleRate);
+
+
+    *out = buffer;
+
+    return OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+bool SniffWAV(
+        const sp<DataSource> &source, String8 *mimeType, float *confidence) {
+    char header[12];
+    if (source->readAt(0, header, sizeof(header)) < (ssize_t)sizeof(header)) {
+        return false;
+    }
+
+    if (memcmp(header, "RIFF", 4) || memcmp(&header[8], "WAVE", 4)) {
+        return false;
+    }
+
+    *mimeType = MEDIA_MIMETYPE_CONTAINER_WAV;
+    *confidence = 0.3f;
+
+    return true;
+}
+
+}  // namespace android
+
diff --git a/media/libstagefright/include/WAVExtractor.h b/media/libstagefright/include/WAVExtractor.h
new file mode 100644
index 0000000..10b9700
--- /dev/null
+++ b/media/libstagefright/include/WAVExtractor.h
@@ -0,0 +1,61 @@
+/*
+ * 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 WAV_EXTRACTOR_H_
+
+#define WAV_EXTRACTOR_H_
+
+#include <media/stagefright/MediaExtractor.h>
+
+namespace android {
+
+class DataSource;
+class String8;
+
+class WAVExtractor : public MediaExtractor {
+public:
+    // Extractor assumes ownership of "source".
+    WAVExtractor(const sp<DataSource> &source);
+
+    virtual size_t countTracks();
+    virtual sp<MediaSource> getTrack(size_t index);
+    virtual sp<MetaData> getTrackMetaData(size_t index, uint32_t flags);
+
+protected:
+    virtual ~WAVExtractor();
+
+private:
+    sp<DataSource> mDataSource;
+    status_t mInitCheck;
+    bool mValidFormat;
+    uint16_t mNumChannels;
+    uint32_t mSampleRate;
+    off_t mDataOffset;
+    size_t mDataSize;
+
+    status_t init();
+
+    WAVExtractor(const WAVExtractor &);
+    WAVExtractor &operator=(const WAVExtractor &);
+};
+
+bool SniffWAV(
+        const sp<DataSource> &source, String8 *mimeType, float *confidence);
+
+}  // namespace android
+
+#endif  // WAV_EXTRACTOR_H_
+
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/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index 80ddc02..673c174 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -40,6 +40,7 @@
 #include <pixelflinger/pixelflinger.h>
 
 #include <private/ui/android_natives_priv.h>
+#include <private/ui/sw_gralloc_handle.h>
 
 #include <hardware/copybit.h>
 
@@ -449,15 +450,26 @@
 status_t egl_window_surface_v2_t::lock(
         android_native_buffer_t* buf, int usage, void** vaddr)
 {
-    int err = module->lock(module, buf->handle, 
-            usage, 0, 0, buf->width, buf->height, vaddr);
+    int err;
+    if (sw_gralloc_handle_t::validate(buf->handle) < 0) {
+        err = module->lock(module, buf->handle,
+                usage, 0, 0, buf->width, buf->height, vaddr);
+    } else {
+        sw_gralloc_handle_t const* hnd =
+                reinterpret_cast<sw_gralloc_handle_t const*>(buf->handle);
+        *vaddr = (void*)hnd->base;
+        err = NO_ERROR;
+    }
     return err;
 }
 
 status_t egl_window_surface_v2_t::unlock(android_native_buffer_t* buf)
 {
     if (!buf) return BAD_VALUE;
-    int err = module->unlock(module, buf->handle);
+    int err = NO_ERROR;
+    if (sw_gralloc_handle_t::validate(buf->handle) < 0) {
+        err = module->unlock(module, buf->handle);
+    }
     return err;
 }
 
@@ -623,6 +635,7 @@
     switch (format) {
     case HAL_PIXEL_FORMAT_RGB_565:
     case HAL_PIXEL_FORMAT_RGBA_8888:
+    case HAL_PIXEL_FORMAT_RGBX_8888:
     case HAL_PIXEL_FORMAT_RGBA_4444:
     case HAL_PIXEL_FORMAT_RGBA_5551:
     case HAL_PIXEL_FORMAT_BGRA_8888:
@@ -792,6 +805,7 @@
         case GGL_PIXEL_FORMAT_A_8:          size *= 1; break;
         case GGL_PIXEL_FORMAT_RGB_565:      size *= 2; break;
         case GGL_PIXEL_FORMAT_RGBA_8888:    size *= 4; break;
+        case GGL_PIXEL_FORMAT_RGBX_8888:    size *= 4; break;
         default:
             LOGE("incompatible pixel format for pbuffer (format=%d)", f);
             pbuffer.data = 0;
@@ -963,7 +977,7 @@
 // These configs can override the base attribute list
 // NOTE: when adding a config here, don't forget to update eglCreate*Surface()
 
-
+// 565 configs
 static config_pair_t const config_0_attribute_list[] = {
         { EGL_BUFFER_SIZE,     16 },
         { EGL_ALPHA_SIZE,       0 },
@@ -986,8 +1000,32 @@
         { EGL_SURFACE_TYPE,     EGL_WINDOW_BIT|EGL_PBUFFER_BIT|EGL_PIXMAP_BIT },
 };
 
+// RGB 888 configs
 static config_pair_t const config_2_attribute_list[] = {
         { EGL_BUFFER_SIZE,     32 },
+        { EGL_ALPHA_SIZE,       0 },
+        { EGL_BLUE_SIZE,        8 },
+        { EGL_GREEN_SIZE,       8 },
+        { EGL_RED_SIZE,         8 },
+        { EGL_DEPTH_SIZE,       0 },
+        { EGL_CONFIG_ID,        6 },
+        { EGL_SURFACE_TYPE,     EGL_WINDOW_BIT|EGL_PBUFFER_BIT|EGL_PIXMAP_BIT },
+};
+
+static config_pair_t const config_3_attribute_list[] = {
+        { EGL_BUFFER_SIZE,     32 },
+        { EGL_ALPHA_SIZE,       0 },
+        { EGL_BLUE_SIZE,        8 },
+        { EGL_GREEN_SIZE,       8 },
+        { EGL_RED_SIZE,         8 },
+        { EGL_DEPTH_SIZE,      16 },
+        { EGL_CONFIG_ID,        7 },
+        { EGL_SURFACE_TYPE,     EGL_WINDOW_BIT|EGL_PBUFFER_BIT|EGL_PIXMAP_BIT },
+};
+
+// 8888 configs
+static config_pair_t const config_4_attribute_list[] = {
+        { EGL_BUFFER_SIZE,     32 },
         { EGL_ALPHA_SIZE,       8 },
         { EGL_BLUE_SIZE,        8 },
         { EGL_GREEN_SIZE,       8 },
@@ -997,7 +1035,7 @@
         { EGL_SURFACE_TYPE,     EGL_WINDOW_BIT|EGL_PBUFFER_BIT|EGL_PIXMAP_BIT },
 };
 
-static config_pair_t const config_3_attribute_list[] = {
+static config_pair_t const config_5_attribute_list[] = {
         { EGL_BUFFER_SIZE,     32 },
         { EGL_ALPHA_SIZE,       8 },
         { EGL_BLUE_SIZE,        8 },
@@ -1008,7 +1046,8 @@
         { EGL_SURFACE_TYPE,     EGL_WINDOW_BIT|EGL_PBUFFER_BIT|EGL_PIXMAP_BIT },
 };
 
-static config_pair_t const config_4_attribute_list[] = {
+// A8 configs
+static config_pair_t const config_6_attribute_list[] = {
         { EGL_BUFFER_SIZE,      8 },
         { EGL_ALPHA_SIZE,       8 },
         { EGL_BLUE_SIZE,        0 },
@@ -1019,7 +1058,7 @@
         { EGL_SURFACE_TYPE,     EGL_WINDOW_BIT|EGL_PBUFFER_BIT|EGL_PIXMAP_BIT },
 };
 
-static config_pair_t const config_5_attribute_list[] = {
+static config_pair_t const config_7_attribute_list[] = {
         { EGL_BUFFER_SIZE,      8 },
         { EGL_ALPHA_SIZE,       8 },
         { EGL_BLUE_SIZE,        0 },
@@ -1037,6 +1076,8 @@
         { config_3_attribute_list, NELEM(config_3_attribute_list) },
         { config_4_attribute_list, NELEM(config_4_attribute_list) },
         { config_5_attribute_list, NELEM(config_5_attribute_list) },
+        { config_6_attribute_list, NELEM(config_6_attribute_list) },
+        { config_7_attribute_list, NELEM(config_7_attribute_list) },
 };
 
 static config_management_t const gConfigManagement[] = {
@@ -1083,6 +1124,50 @@
 
 // ----------------------------------------------------------------------------
 
+static status_t getConfigFormatInfo(EGLint configID,
+        int32_t& pixelFormat, int32_t& depthFormat)
+{
+    switch(configID) {
+    case 0:
+        pixelFormat = GGL_PIXEL_FORMAT_RGB_565;
+        depthFormat = 0;
+        break;
+    case 1:
+        pixelFormat = GGL_PIXEL_FORMAT_RGB_565;
+        depthFormat = GGL_PIXEL_FORMAT_Z_16;
+        break;
+    case 2:
+        pixelFormat = GGL_PIXEL_FORMAT_RGBX_8888;
+        depthFormat = 0;
+        break;
+    case 3:
+        pixelFormat = GGL_PIXEL_FORMAT_RGBX_8888;
+        depthFormat = GGL_PIXEL_FORMAT_Z_16;
+        break;
+    case 4:
+        pixelFormat = GGL_PIXEL_FORMAT_RGBA_8888;
+        depthFormat = 0;
+        break;
+    case 5:
+        pixelFormat = GGL_PIXEL_FORMAT_RGBA_8888;
+        depthFormat = GGL_PIXEL_FORMAT_Z_16;
+        break;
+    case 6:
+        pixelFormat = GGL_PIXEL_FORMAT_A_8;
+        depthFormat = 0;
+        break;
+    case 7:
+        pixelFormat = GGL_PIXEL_FORMAT_A_8;
+        depthFormat = GGL_PIXEL_FORMAT_Z_16;
+        break;
+    default:
+        return NAME_NOT_FOUND;
+    }
+    return NO_ERROR;
+}
+
+// ----------------------------------------------------------------------------
+
 template<typename T>
 static int binarySearch(T const sortedArray[], int first, int last, EGLint key)
 {
@@ -1226,32 +1311,7 @@
 
     int32_t depthFormat;
     int32_t pixelFormat;
-    switch(configID) {
-    case 0:
-        pixelFormat = GGL_PIXEL_FORMAT_RGB_565;
-        depthFormat = 0;
-        break;
-    case 1:
-        pixelFormat = GGL_PIXEL_FORMAT_RGB_565;
-        depthFormat = GGL_PIXEL_FORMAT_Z_16;
-        break;
-    case 2:
-        pixelFormat = GGL_PIXEL_FORMAT_RGBA_8888;
-        depthFormat = 0;
-        break;
-    case 3:
-        pixelFormat = GGL_PIXEL_FORMAT_RGBA_8888;
-        depthFormat = GGL_PIXEL_FORMAT_Z_16;
-        break;
-    case 4:
-        pixelFormat = GGL_PIXEL_FORMAT_A_8;
-        depthFormat = 0;
-        break;
-    case 5:
-        pixelFormat = GGL_PIXEL_FORMAT_A_8;
-        depthFormat = GGL_PIXEL_FORMAT_Z_16;
-        break;
-    default:
+    if (getConfigFormatInfo(configID, pixelFormat, depthFormat) != NO_ERROR) {
         return setError(EGL_BAD_MATCH, EGL_NO_SURFACE);
     }
 
@@ -1300,32 +1360,7 @@
 
     int32_t depthFormat;
     int32_t pixelFormat;
-    switch(configID) {
-    case 0:
-        pixelFormat = GGL_PIXEL_FORMAT_RGB_565;
-        depthFormat = 0;
-        break;
-    case 1:
-        pixelFormat = GGL_PIXEL_FORMAT_RGB_565;
-        depthFormat = GGL_PIXEL_FORMAT_Z_16;
-        break;
-    case 2:
-        pixelFormat = GGL_PIXEL_FORMAT_RGBA_8888;
-        depthFormat = 0;
-        break;
-    case 3:
-        pixelFormat = GGL_PIXEL_FORMAT_RGBA_8888;
-        depthFormat = GGL_PIXEL_FORMAT_Z_16;
-        break;
-    case 4:
-        pixelFormat = GGL_PIXEL_FORMAT_A_8;
-        depthFormat = 0;
-        break;
-    case 5:
-        pixelFormat = GGL_PIXEL_FORMAT_A_8;
-        depthFormat = GGL_PIXEL_FORMAT_Z_16;
-        break;
-    default:
+    if (getConfigFormatInfo(configID, pixelFormat, depthFormat) != NO_ERROR) {
         return setError(EGL_BAD_MATCH, EGL_NO_SURFACE);
     }
 
@@ -1364,32 +1399,7 @@
 
     int32_t depthFormat;
     int32_t pixelFormat;
-    switch(configID) {
-    case 0:
-        pixelFormat = GGL_PIXEL_FORMAT_RGB_565;
-        depthFormat = 0;
-        break;
-    case 1:
-        pixelFormat = GGL_PIXEL_FORMAT_RGB_565;
-        depthFormat = GGL_PIXEL_FORMAT_Z_16;
-        break;
-    case 2:
-        pixelFormat = GGL_PIXEL_FORMAT_RGBA_8888;
-        depthFormat = 0;
-        break;
-    case 3:
-        pixelFormat = GGL_PIXEL_FORMAT_RGBA_8888;
-        depthFormat = GGL_PIXEL_FORMAT_Z_16;
-        break;
-    case 4:
-        pixelFormat = GGL_PIXEL_FORMAT_A_8;
-        depthFormat = 0;
-        break;
-    case 5:
-        pixelFormat = GGL_PIXEL_FORMAT_A_8;
-        depthFormat = GGL_PIXEL_FORMAT_Z_16;
-        break;
-    default:
+    if (getConfigFormatInfo(configID, pixelFormat, depthFormat) != NO_ERROR) {
         return setError(EGL_BAD_MATCH, EGL_NO_SURFACE);
     }
 
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 a52fd20..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">"Subscrições de Emissão"</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 baa3330..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/BackupManagerService.java b/services/java/com/android/server/BackupManagerService.java
index 754e6e5..c3b591e 100644
--- a/services/java/com/android/server/BackupManagerService.java
+++ b/services/java/com/android/server/BackupManagerService.java
@@ -1260,9 +1260,20 @@
 
     // ----- Restore handling -----
 
-    private boolean signaturesMatch(Signature[] storedSigs, Signature[] deviceSigs) {
+    private boolean signaturesMatch(Signature[] storedSigs, PackageInfo target) {
+        // If the target resides on the system partition, we allow it to restore
+        // data from the like-named package in a restore set even if the signatures
+        // do not match.  (Unlike general applications, those flashed to the system
+        // partition will be signed with the device's platform certificate, so on
+        // different phones the same system app will have different signatures.)
+        if ((target.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
+            if (DEBUG) Log.v(TAG, "System app " + target.packageName + " - skipping sig check");
+            return true;
+        }
+
         // Allow unsigned apps, but not signed on one device and unsigned on the other
         // !!! TODO: is this the right policy?
+        Signature[] deviceSigs = target.signatures;
         if (DEBUG) Log.v(TAG, "signaturesMatch(): stored=" + storedSigs
                 + " device=" + deviceSigs);
         if ((storedSigs == null || storedSigs.length == 0)
@@ -1465,7 +1476,7 @@
                         continue;
                     }
 
-                    if (!signaturesMatch(metaInfo.signatures, packageInfo.signatures)) {
+                    if (!signaturesMatch(metaInfo.signatures, packageInfo)) {
                         Log.w(TAG, "Signature mismatch restoring " + packageName);
                         EventLog.writeEvent(RESTORE_AGENT_FAILURE_EVENT, packageName,
                                 "Signature mismatch");
diff --git a/services/java/com/android/server/HardwareService.java b/services/java/com/android/server/HardwareService.java
index b1d58ce..3e3cf06 100755
--- a/services/java/com/android/server/HardwareService.java
+++ b/services/java/com/android/server/HardwareService.java
@@ -52,6 +52,7 @@
 
     static final int LIGHT_FLASH_NONE = 0;
     static final int LIGHT_FLASH_TIMED = 1;
+    static final int LIGHT_FLASH_HARDWARE = 2;
 
     private final LinkedList<Vibration> mVibrations;
     private Vibration mCurrentVibration;
@@ -125,7 +126,7 @@
         mVibrations = new LinkedList<Vibration>();
 
         mBatteryStats = BatteryStatsService.getService();
-        
+
         IntentFilter filter = new IntentFilter();
         filter.addAction(Intent.ACTION_SCREEN_OFF);
         context.registerReceiver(mIntentReceiver, filter);
@@ -239,15 +240,15 @@
             Binder.restoreCallingIdentity(identity);
         }
     }
-    
+
     public boolean getFlashlightEnabled() {
         return Hardware.getFlashlightEnabled();
     }
-    
+
     public void setFlashlightEnabled(boolean on) {
-        if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.FLASHLIGHT) 
+        if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.FLASHLIGHT)
                 != PackageManager.PERMISSION_GRANTED &&
-                mContext.checkCallingOrSelfPermission(android.Manifest.permission.HARDWARE_TEST) 
+                mContext.checkCallingOrSelfPermission(android.Manifest.permission.HARDWARE_TEST)
                 != PackageManager.PERMISSION_GRANTED) {
             throw new SecurityException("Requires FLASHLIGHT or HARDWARE_TEST permission");
         }
@@ -255,9 +256,9 @@
     }
 
     public void enableCameraFlash(int milliseconds) {
-        if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.CAMERA) 
+        if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.CAMERA)
                 != PackageManager.PERMISSION_GRANTED &&
-                mContext.checkCallingOrSelfPermission(android.Manifest.permission.HARDWARE_TEST) 
+                mContext.checkCallingOrSelfPermission(android.Manifest.permission.HARDWARE_TEST)
                 != PackageManager.PERMISSION_GRANTED) {
             throw new SecurityException("Requires CAMERA or HARDWARE_TEST permission");
         }
@@ -282,13 +283,13 @@
         setLight_native(mNativePointer, light, color, mode, onMS, offMS);
     }
 
-    public void setAttentionLight(boolean on) {
+    public void setAttentionLight(boolean on, int color) {
         // Not worthy of a permission.  We shouldn't have a flashlight permission.
         synchronized (this) {
             mAttentionLightOn = on;
             mPulsing = false;
-            setLight_native(mNativePointer, LIGHT_ID_ATTENTION, on ? 0xffffffff : 0,
-                    LIGHT_FLASH_NONE, 0, 0);
+            setLight_native(mNativePointer, LIGHT_ID_ATTENTION, color,
+                    LIGHT_FLASH_HARDWARE, on ? 3 : 0, 0);
         }
     }
 
@@ -302,8 +303,8 @@
             }
             if (!mAttentionLightOn && !mPulsing) {
                 mPulsing = true;
-                setLight_native(mNativePointer, LIGHT_ID_ATTENTION, 0xff101010,
-                        LIGHT_FLASH_NONE, 0, 0);
+                setLight_native(mNativePointer, LIGHT_ID_ATTENTION, 0x00ffffff,
+                        LIGHT_FLASH_HARDWARE, 7, 0);
                 mH.sendMessageDelayed(Message.obtain(mH, 1), 3000);
             }
         }
@@ -391,7 +392,7 @@
     private class VibrateThread extends Thread {
         final Vibration mVibration;
         boolean mDone;
-    
+
         VibrateThread(Vibration vib) {
             mVibration = vib;
             mWakeLock.acquire();
@@ -425,7 +426,7 @@
                 long duration = 0;
 
                 while (!mDone) {
-                    // add off-time duration to any accumulated on-time duration 
+                    // add off-time duration to any accumulated on-time duration
                     if (index < len) {
                         duration += pattern[index++];
                     }
@@ -478,7 +479,7 @@
             }
         }
     };
-    
+
     private static native int init_native();
     private static native void finalize_native(int ptr);
 
@@ -489,7 +490,7 @@
     private final PowerManager.WakeLock mWakeLock;
 
     private final IBatteryStats mBatteryStats;
-    
+
     volatile VibrateThread mThread;
 
     private int mNativePointer;
diff --git a/services/java/com/android/server/PowerManagerService.java b/services/java/com/android/server/PowerManagerService.java
index f75f7195..93b469f 100644
--- a/services/java/com/android/server/PowerManagerService.java
+++ b/services/java/com/android/server/PowerManagerService.java
@@ -1760,7 +1760,8 @@
         try {
             if (mScreenBrightnessOverride >= 0) {
                 return mScreenBrightnessOverride;
-            } else if (mLightSensorBrightness >= 0 && mUseSoftwareAutoBrightness) {
+            } else if (mLightSensorBrightness >= 0 && mUseSoftwareAutoBrightness
+                    && mAutoBrightessEnabled) {
                 return mLightSensorBrightness;
             }
             final int brightness = Settings.System.getInt(mContext.getContentResolver(),
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 a5d3b22..04a03b2 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;
 
@@ -838,6 +842,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/AndroidTests/res/raw/v30_comma_separated.vcf b/tests/AndroidTests/res/raw/v30_comma_separated.vcf
new file mode 100644
index 0000000..98a7f20
--- /dev/null
+++ b/tests/AndroidTests/res/raw/v30_comma_separated.vcf
@@ -0,0 +1,5 @@
+BEGIN:VCARD

+VERSION:3.0

+N:F;G;M;;

+TEL;TYPE=PAGER,WORK,MSG:6101231234@pagersample.com

+END:VCARD

diff --git a/tests/AndroidTests/src/com/android/unit_tests/AppCacheTest.java b/tests/AndroidTests/src/com/android/unit_tests/AppCacheTest.java
index fb1b9ad..f2f7743 100755
--- a/tests/AndroidTests/src/com/android/unit_tests/AppCacheTest.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/AppCacheTest.java
@@ -137,7 +137,8 @@
         verifyTestFiles1(cacheDir, "testtmpdir", 5);
     }
     
-    @LargeTest
+    // TODO: flaky test
+    // @LargeTest
     public void testFreeApplicationCacheSomeFiles() throws Exception {
         StatFs st = new StatFs("/data");
         long blks1 = getFreeStorageBlks(st);
diff --git a/tests/AndroidTests/src/com/android/unit_tests/vcard/PropertyNodesVerifier.java b/tests/AndroidTests/src/com/android/unit_tests/vcard/PropertyNodesVerifier.java
index a0d6d16..917b18e 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/vcard/PropertyNodesVerifier.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/vcard/PropertyNodesVerifier.java
@@ -17,14 +17,73 @@
 package com.android.unit_tests.vcard;
 
 import android.content.ContentValues;
+import android.pim.vcard.VCardConfig;
+import android.pim.vcard.VCardParser;
+import android.pim.vcard.VCardParser_V21;
+import android.pim.vcard.VCardParser_V30;
+import android.pim.vcard.exception.VCardException;
+import android.test.AndroidTestCase;
+import android.util.Log;
 
+import junit.framework.TestCase;
+
+import java.io.IOException;
+import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 
-import junit.framework.TestCase;
+public class PropertyNodesVerifier extends VNodeBuilder {
+    private final List<PropertyNodesVerifierElem> mPropertyNodesVerifierElemList;
+    private final AndroidTestCase mAndroidTestCase;
+    private int mIndex;
+
+    public PropertyNodesVerifier(AndroidTestCase testCase) {
+        mPropertyNodesVerifierElemList = new ArrayList<PropertyNodesVerifierElem>();
+        mAndroidTestCase = testCase;
+    }
+
+    public PropertyNodesVerifierElem addPropertyNodesVerifierElem() {
+        PropertyNodesVerifierElem elem = new PropertyNodesVerifierElem(mAndroidTestCase);
+        mPropertyNodesVerifierElemList.add(elem);
+        return elem;
+    }
+
+    public void verify(int resId, int vCardType)
+            throws IOException, VCardException {
+        verify(mAndroidTestCase.getContext().getResources().openRawResource(resId), vCardType);
+    }
+
+    public void verify(InputStream is, int vCardType) throws IOException, VCardException {
+        final VCardParser vCardParser;
+        if (VCardConfig.isV30(vCardType)) {
+            vCardParser = new VCardParser_V30(true);  // use StrictParsing
+        } else {
+            vCardParser = new VCardParser_V21();
+        }
+        try {
+            vCardParser.parse(is, this);
+        } finally {
+            if (is != null) {
+                try {
+                    is.close();
+                } catch (IOException e) {
+                }
+            }
+        }
+    }
+
+    @Override
+    public void endRecord() {
+        super.endRecord();
+        mAndroidTestCase.assertTrue(mIndex < mPropertyNodesVerifierElemList.size());
+        mAndroidTestCase.assertTrue(mIndex < vNodeList.size());
+        mPropertyNodesVerifierElemList.get(mIndex).verify(vNodeList.get(mIndex));
+        mIndex++;
+    }
+}
 
 /**
  * Utility class which verifies input VNode.
@@ -34,7 +93,7 @@
  * If the node does not exist in the "ordered list", the class refers to
  * "unorderd expected property set" and checks the node is expected somewhere.
  */
-public class PropertyNodesVerifier {
+class PropertyNodesVerifierElem {
     public static class TypeSet extends HashSet<String> {
         public TypeSet(String ... array) {
             super(Arrays.asList(array));
@@ -53,7 +112,7 @@
     private final ArrayList<PropertyNode> mUnorderedNodeList;
     private final TestCase mTestCase;
 
-    public PropertyNodesVerifier(TestCase testCase) {
+    public PropertyNodesVerifierElem(TestCase testCase) {
         mOrderedNodeMap = new HashMap<String, List<PropertyNode>>();
         mUnorderedNodeList = new ArrayList<PropertyNode>();
         mTestCase = testCase;
@@ -61,42 +120,45 @@
 
     // WithOrder
 
-    public PropertyNodesVerifier addNodeWithOrder(String propName, String propValue) {
+    public PropertyNodesVerifierElem addNodeWithOrder(String propName, String propValue) {
         return addNodeWithOrder(propName, propValue, null, null, null, null, null);
     }
 
-    public PropertyNodesVerifier addNodeWithOrder(String propName, String propValue,
+    public PropertyNodesVerifierElem addNodeWithOrder(String propName, String propValue,
+            ContentValues contentValues) {
+        return addNodeWithOrder(propName, propValue, null, null, contentValues, null, null);
+    }
+
+    public PropertyNodesVerifierElem addNodeWithOrder(String propName, String propValue,
             List<String> propValueList) {
         return addNodeWithOrder(propName, propValue, propValueList, null, null, null, null);
     }
 
-    public PropertyNodesVerifier addNodeWithOrder(String propName, List<String> propValueList) {
-        StringBuffer buffer = new StringBuffer();
-        boolean first = true;
-        for (String propValueElem : propValueList) {
-            if (first) {
-                first = false;
-            } else {
-                buffer.append(';');
-            }
-            buffer.append(propValueElem);
-        }
-        return addNodeWithOrder(propName, buffer.toString(), propValueList,
+    public PropertyNodesVerifierElem addNodeWithOrder(String propName, List<String> propValueList) {
+        final String propValue = concatinateListWithSemiColon(propValueList);
+        return addNodeWithOrder(propName, propValue.toString(), propValueList,
                 null, null, null, null);
     }
 
-    public PropertyNodesVerifier addNodeWithOrder(String propName, String propValue,
+    public PropertyNodesVerifierElem addNodeWithOrder(String propName, String propValue,
             TypeSet paramMap_TYPE) {
         return addNodeWithOrder(propName, propValue, null, null, null, paramMap_TYPE, null);
     }
 
-    public PropertyNodesVerifier addNodeWithOrder(String propName, String propValue,
+    public PropertyNodesVerifierElem addNodeWithOrder(String propName,
+            List<String> propValueList, TypeSet paramMap_TYPE) {
+        final String propValue = concatinateListWithSemiColon(propValueList);
+        return addNodeWithOrder(propName, propValue, propValueList, null, null,
+                paramMap_TYPE, null);
+    }
+
+    public PropertyNodesVerifierElem addNodeWithOrder(String propName, String propValue,
             List<String> propValueList, TypeSet paramMap_TYPE) {
         return addNodeWithOrder(propName, propValue, propValueList, null, null,
                 paramMap_TYPE, null);
     }
 
-    public PropertyNodesVerifier addNodeWithOrder(String propName, String propValue,
+    public PropertyNodesVerifierElem addNodeWithOrder(String propName, String propValue,
             List<String> propValueList, byte[] propValue_bytes,
             ContentValues paramMap, TypeSet paramMap_TYPE, GroupSet propGroupSet) {
         PropertyNode propertyNode = new PropertyNode(propName,
@@ -113,42 +175,45 @@
 
     // WithoutOrder
 
-    public PropertyNodesVerifier addNodeWithoutOrder(String propName, String propValue) {
+    public PropertyNodesVerifierElem addNodeWithoutOrder(String propName, String propValue) {
         return addNodeWithoutOrder(propName, propValue, null, null, null, null, null);
     }
 
-    public PropertyNodesVerifier addNodeWithoutOrder(String propName, String propValue,
+    public PropertyNodesVerifierElem addNodeWithoutOrder(String propName, String propValue,
+            ContentValues contentValues) {
+        return addNodeWithoutOrder(propName, propValue, null, null, contentValues, null, null);
+    }
+
+    public PropertyNodesVerifierElem addNodeWithoutOrder(String propName, String propValue,
             List<String> propValueList) {
         return addNodeWithoutOrder(propName, propValue, propValueList, null, null, null, null);
     }
 
-    public PropertyNodesVerifier addNodeWithoutOrder(String propName, List<String> propValueList) {
-        StringBuffer buffer = new StringBuffer();
-        boolean first = true;
-        for (String propValueElem : propValueList) {
-            if (first) {
-                first = false;
-            } else {
-                buffer.append(';');
-            }
-            buffer.append(propValueElem);
-        }
-        return addNodeWithoutOrder(propName, buffer.toString(), propValueList,
+    public PropertyNodesVerifierElem addNodeWithoutOrder(String propName, List<String> propValueList) {
+        final String propValue = concatinateListWithSemiColon(propValueList);
+        return addNodeWithoutOrder(propName, propValue, propValueList,
                 null, null, null, null);
     }
 
-    public PropertyNodesVerifier addNodeWithoutOrder(String propName, String propValue,
+    public PropertyNodesVerifierElem addNodeWithoutOrder(String propName, String propValue,
             TypeSet paramMap_TYPE) {
         return addNodeWithoutOrder(propName, propValue, null, null, null, paramMap_TYPE, null);
     }
 
-    public PropertyNodesVerifier addNodeWithoutOrder(String propName, String propValue,
+    public PropertyNodesVerifierElem addNodeWithoutOrder(String propName,
+            List<String> propValueList, TypeSet paramMap_TYPE) {
+        final String propValue = concatinateListWithSemiColon(propValueList);
+        return addNodeWithoutOrder(propName, propValue, propValueList, null, null,
+                paramMap_TYPE, null);
+    }
+
+    public PropertyNodesVerifierElem addNodeWithoutOrder(String propName, String propValue,
             List<String> propValueList, TypeSet paramMap_TYPE) {
         return addNodeWithoutOrder(propName, propValue, propValueList, null, null,
                 paramMap_TYPE, null);
     }
 
-    public PropertyNodesVerifier addNodeWithoutOrder(String propName, String propValue,
+    public PropertyNodesVerifierElem addNodeWithoutOrder(String propName, String propValue,
             List<String> propValueList, byte[] propValue_bytes,
             ContentValues paramMap, TypeSet paramMap_TYPE, GroupSet propGroupSet) {
         mUnorderedNodeList.add(new PropertyNode(propName, propValue,
@@ -185,8 +250,7 @@
         if (size > 0) {
             for (int i = 0; i < size; i++) {
                 PropertyNode expectedNode = expectedNodeList.get(i);
-                List<PropertyNode> expectedButDifferentValueList =
-                    new ArrayList<PropertyNode>();
+                List<PropertyNode> expectedButDifferentValueList = new ArrayList<PropertyNode>();
                 if (expectedNode.propName.equals(propName)) {
                     if (expectedNode.equals(actualNode)) {
                         expectedNodeList.remove(i);
@@ -233,6 +297,21 @@
         }
     }
 
+    private String concatinateListWithSemiColon(List<String> array) {
+        StringBuffer buffer = new StringBuffer();
+        boolean first = true;
+        for (String propValueElem : array) {
+            if (first) {
+                first = false;
+            } else {
+                buffer.append(';');
+            }
+            buffer.append(propValueElem);
+        }
+
+        return buffer.toString();
+    }
+
     private boolean tryFoundExpectedNodeFromUnorderedList(PropertyNode actualNode,
             List<PropertyNode> expectedButDifferentValueList) {
         final String propName = actualNode.propName;
diff --git a/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardExporterTests.java b/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardExporterTests.java
index b2cc008..727d33b 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardExporterTests.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardExporterTests.java
@@ -17,7 +17,6 @@
 package com.android.unit_tests.vcard;
 
 import android.content.ContentValues;
-import android.pim.vcard.VCardComposer;
 import android.pim.vcard.VCardConfig;
 import android.provider.ContactsContract.CommonDataKinds.Email;
 import android.provider.ContactsContract.CommonDataKinds.Event;
@@ -31,7 +30,7 @@
 import android.provider.ContactsContract.CommonDataKinds.StructuredPostal;
 import android.provider.ContactsContract.CommonDataKinds.Website;
 
-import com.android.unit_tests.vcard.PropertyNodesVerifier.TypeSet;
+import com.android.unit_tests.vcard.PropertyNodesVerifierElem.TypeSet;
 
 import java.util.Arrays;
 
@@ -44,42 +43,24 @@
     private static final byte[] sPhotoByteArray =
         VCardImporterTests.sPhotoByteArrayForComplicatedCase;
 
-    private void verifyOneComposition(ExportTestResolver resolver,
-            VCardVerificationHandler handler, int version) {
-        final boolean isV30 = (version == V30);
-
-        final int vcardType = (isV30 ? VCardConfig.VCARD_TYPE_V30_GENERIC_UTF8
-                : VCardConfig.VCARD_TYPE_V21_GENERIC_UTF8);
-        VCardComposer composer = new VCardComposer(new CustomMockContext(resolver), vcardType);
-        composer.addHandler(handler);
-        if (!composer.init(VCardComposer.CONTACTS_TEST_CONTENT_URI, null, null, null)) {
-            fail("init() failed. Reason: " + composer.getErrorReason());
-        }
-        assertFalse(composer.isAfterLast());
-        assertTrue(composer.createOneEntry());
-        assertTrue(composer.isAfterLast());
-        composer.terminate();
-    }
-
     public void testSimpleV21() {
         ExportTestResolver resolver = new ExportTestResolver();
-        resolver.buildInput(StructuredName.CONTENT_ITEM_TYPE)
+        resolver.buildContactEntry().buildData(StructuredName.CONTENT_ITEM_TYPE)
                 .put(StructuredName.FAMILY_NAME, "Ando")
                 .put(StructuredName.GIVEN_NAME, "Roid");
 
-        VCardVerificationHandler handler = new VCardVerificationHandler(this, V21);
-        handler.addPropertyNodesVerifier()
+        VCardVerifier verifier = new VCardVerifier(resolver, V21);
+        verifier.addPropertyNodesVerifierElem()
                 .addNodeWithoutOrder("FN", "Roid Ando")
                 .addNodeWithoutOrder("N", "Ando;Roid;;;", Arrays.asList("Ando", "Roid", "", "", ""));
-
-        verifyOneComposition(resolver, handler, V21);
+        verifier.verify();
     }
 
     private void testStructuredNameBasic(int version) {
-        final boolean isV30 = (version == V30);
+        final boolean isV30 = VCardConfig.isV30(version);
         ExportTestResolver resolver = new ExportTestResolver();
 
-        resolver.buildInput(StructuredName.CONTENT_ITEM_TYPE)
+        resolver.buildContactEntry().buildData(StructuredName.CONTENT_ITEM_TYPE)
                 .put(StructuredName.FAMILY_NAME, "AppropriateFamilyName")
                 .put(StructuredName.GIVEN_NAME, "AppropriateGivenName")
                 .put(StructuredName.MIDDLE_NAME, "AppropriateMiddleName")
@@ -89,8 +70,8 @@
                 .put(StructuredName.PHONETIC_GIVEN_NAME, "AppropriatePhoneticGiven")
                 .put(StructuredName.PHONETIC_MIDDLE_NAME, "AppropriatePhoneticMiddle");
 
-        VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
-        PropertyNodesVerifier verifier = handler.addPropertyNodesVerifier()
+        VCardVerifier verifier = new VCardVerifier(resolver, version);
+        PropertyNodesVerifierElem elem = verifier.addPropertyNodesVerifierElem()
                 .addNodeWithOrder("N",
                         "AppropriateFamilyName;AppropriateGivenName;AppropriateMiddleName;"
                         + "AppropriatePrefix;AppropriateSuffix",
@@ -104,12 +85,12 @@
                 .addNodeWithoutOrder("X-PHONETIC-LAST-NAME", "AppropriatePhoneticFamily");
 
         if (isV30) {
-            verifier.addNodeWithoutOrder("SORT-STRING",
+            elem.addNodeWithoutOrder("SORT-STRING",
                     "AppropriatePhoneticGiven AppropriatePhoneticMiddle "
                     + "AppropriatePhoneticFamily");
         }
 
-        verifyOneComposition(resolver, handler, version);
+        verifier.verify();
     }
 
     public void testStructuredNameBasicV21() {
@@ -130,7 +111,8 @@
         final boolean isV30 = (version == V30);
         ExportTestResolver resolver = new ExportTestResolver();
 
-        resolver.buildInput(StructuredName.CONTENT_ITEM_TYPE)
+        ContactEntry entry = resolver.buildContactEntry();
+        entry.buildData(StructuredName.CONTENT_ITEM_TYPE)
                 .put(StructuredName.FAMILY_NAME, "DoNotEmitFamilyName1")
                 .put(StructuredName.GIVEN_NAME, "DoNotEmitGivenName1")
                 .put(StructuredName.MIDDLE_NAME, "DoNotEmitMiddleName1")
@@ -141,7 +123,7 @@
                 .put(StructuredName.PHONETIC_MIDDLE_NAME, "DoNotEmitPhoneticMiddle1");
 
         // With "IS_PRIMARY=1". This is what we should use.
-        resolver.buildInput(StructuredName.CONTENT_ITEM_TYPE)
+        entry.buildData(StructuredName.CONTENT_ITEM_TYPE)
                 .put(StructuredName.FAMILY_NAME, "AppropriateFamilyName")
                 .put(StructuredName.GIVEN_NAME, "AppropriateGivenName")
                 .put(StructuredName.MIDDLE_NAME, "AppropriateMiddleName")
@@ -153,7 +135,7 @@
                 .put(StructuredName.IS_PRIMARY, 1);
 
         // With "IS_PRIMARY=1", but we should ignore this time, since this is second, not first.
-        resolver.buildInput(StructuredName.CONTENT_ITEM_TYPE)
+        entry.buildData(StructuredName.CONTENT_ITEM_TYPE)
                 .put(StructuredName.FAMILY_NAME, "DoNotEmitFamilyName2")
                 .put(StructuredName.GIVEN_NAME, "DoNotEmitGivenName2")
                 .put(StructuredName.MIDDLE_NAME, "DoNotEmitMiddleName2")
@@ -164,8 +146,8 @@
                 .put(StructuredName.PHONETIC_MIDDLE_NAME, "DoNotEmitPhoneticMiddle2")
                 .put(StructuredName.IS_PRIMARY, 1);
 
-        VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
-        PropertyNodesVerifier verifier = handler.addPropertyNodesVerifier()
+        VCardVerifier verifier = new VCardVerifier(resolver, version);
+        PropertyNodesVerifierElem elem = verifier.addPropertyNodesVerifierElem()
                 .addNodeWithOrder("N",
                         "AppropriateFamilyName;AppropriateGivenName;AppropriateMiddleName;"
                         + "AppropriatePrefix;AppropriateSuffix",
@@ -179,12 +161,12 @@
                 .addNodeWithoutOrder("X-PHONETIC-LAST-NAME", "AppropriatePhoneticFamily");
 
         if (isV30) {
-            verifier.addNodeWithoutOrder("SORT-STRING",
+            elem.addNodeWithoutOrder("SORT-STRING",
                     "AppropriatePhoneticGiven AppropriatePhoneticMiddle "
                     + "AppropriatePhoneticFamily");
         }
 
-        verifyOneComposition(resolver, handler, version);
+        verifier.verify();
     }
 
     public void testStructuredNameUsePrimaryV21() {
@@ -203,7 +185,8 @@
         final boolean isV30 = (version == V30);
         ExportTestResolver resolver = new ExportTestResolver();
 
-        resolver.buildInput(StructuredName.CONTENT_ITEM_TYPE)
+        ContactEntry entry = resolver.buildContactEntry();
+        entry.buildData(StructuredName.CONTENT_ITEM_TYPE)
                 .put(StructuredName.FAMILY_NAME, "DoNotEmitFamilyName1")
                 .put(StructuredName.GIVEN_NAME, "DoNotEmitGivenName1")
                 .put(StructuredName.MIDDLE_NAME, "DoNotEmitMiddleName1")
@@ -214,7 +197,7 @@
                 .put(StructuredName.PHONETIC_MIDDLE_NAME, "DoNotEmitPhoneticMiddle1");
 
         // With "IS_PRIMARY=1", but we should ignore this time.
-        resolver.buildInput(StructuredName.CONTENT_ITEM_TYPE)
+        entry.buildData(StructuredName.CONTENT_ITEM_TYPE)
                 .put(StructuredName.FAMILY_NAME, "DoNotEmitFamilyName2")
                 .put(StructuredName.GIVEN_NAME, "DoNotEmitGivenName2")
                 .put(StructuredName.MIDDLE_NAME, "DoNotEmitMiddleName2")
@@ -226,7 +209,7 @@
                 .put(StructuredName.IS_PRIMARY, 1);
 
         // With "IS_SUPER_PRIMARY=1". This is what we should use.
-        resolver.buildInput(StructuredName.CONTENT_ITEM_TYPE)
+        entry.buildData(StructuredName.CONTENT_ITEM_TYPE)
                 .put(StructuredName.FAMILY_NAME, "AppropriateFamilyName")
                 .put(StructuredName.GIVEN_NAME, "AppropriateGivenName")
                 .put(StructuredName.MIDDLE_NAME, "AppropriateMiddleName")
@@ -237,7 +220,7 @@
                 .put(StructuredName.PHONETIC_MIDDLE_NAME, "AppropriatePhoneticMiddle")
                 .put(StructuredName.IS_SUPER_PRIMARY, 1);
 
-        resolver.buildInput(StructuredName.CONTENT_ITEM_TYPE)
+        entry.buildData(StructuredName.CONTENT_ITEM_TYPE)
                 .put(StructuredName.FAMILY_NAME, "DoNotEmitFamilyName3")
                 .put(StructuredName.GIVEN_NAME, "DoNotEmitGivenName3")
                 .put(StructuredName.MIDDLE_NAME, "DoNotEmitMiddleName3")
@@ -248,8 +231,8 @@
                 .put(StructuredName.PHONETIC_MIDDLE_NAME, "DoNotEmitPhoneticMiddle3")
                 .put(StructuredName.IS_PRIMARY, 1);
 
-        VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
-        PropertyNodesVerifier verifier = handler.addPropertyNodesVerifier()
+        VCardVerifier verifier = new VCardVerifier(resolver, version);
+        PropertyNodesVerifierElem elem = verifier.addPropertyNodesVerifierElem()
                 .addNodeWithOrder("N",
                         "AppropriateFamilyName;AppropriateGivenName;AppropriateMiddleName;"
                         + "AppropriatePrefix;AppropriateSuffix",
@@ -263,12 +246,12 @@
                 .addNodeWithoutOrder("X-PHONETIC-LAST-NAME", "AppropriatePhoneticFamily");
 
         if (isV30) {
-            verifier.addNodeWithoutOrder("SORT-STRING",
+            elem.addNodeWithoutOrder("SORT-STRING",
                     "AppropriatePhoneticGiven AppropriatePhoneticMiddle"
                     + " AppropriatePhoneticFamily");
         }
 
-        verifyOneComposition(resolver, handler, version);
+        verifier.verify();
     }
 
     public void testStructuredNameUseSuperPrimaryV21() {
@@ -281,28 +264,28 @@
 
     public void testNickNameV30() {
         ExportTestResolver resolver = new ExportTestResolver();
-        resolver.buildInput(Nickname.CONTENT_ITEM_TYPE)
+        resolver.buildContactEntry().buildData(Nickname.CONTENT_ITEM_TYPE)
                 .put(Nickname.NAME, "Nicky");
 
-        VCardVerificationHandler handler = new VCardVerificationHandler(this, V30);
-        handler.addPropertyVerifierWithEmptyName()
+        VCardVerifier verifier = new VCardVerifier(resolver, V30);
+        verifier.addPropertyNodesVerifierWithEmptyName()
             .addNodeWithOrder("NICKNAME", "Nicky");
 
-        verifyOneComposition(resolver, handler, V30);
+        verifier.verify();
     }
 
     private void testPhoneBasicCommon(int version) {
         ExportTestResolver resolver = new ExportTestResolver();
 
-        resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+        resolver.buildContactEntry().buildData(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "1")
                 .put(Phone.TYPE, Phone.TYPE_HOME);
 
-        VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
-        handler.addPropertyVerifierWithEmptyName()
-                .addNodeWithoutOrder("TEL", "1", new TypeSet("HOME", "VOICE"));
+        VCardVerifier verifier = new VCardVerifier(resolver, version);
+        verifier.addPropertyNodesVerifierWithEmptyName()
+                .addNodeWithoutOrder("TEL", "1", new TypeSet("HOME"));
 
-        verifyOneComposition(resolver, handler, version);
+        verifier.verify();
     }
 
     public void testPhoneBasicV21() {
@@ -319,72 +302,58 @@
     private void testPhoneVariousTypeSupport(int version) {
         ExportTestResolver resolver = new ExportTestResolver();
 
-        resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+        ContactEntry entry = resolver.buildContactEntry();
+        entry.buildData(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "10")
                 .put(Phone.TYPE, Phone.TYPE_HOME);
-
-        resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+        entry.buildData(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "20")
                 .put(Phone.TYPE, Phone.TYPE_WORK);
-
-        resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+        entry.buildData(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "30")
                 .put(Phone.TYPE, Phone.TYPE_FAX_HOME);
-
-        resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+        entry.buildData(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "40")
                 .put(Phone.TYPE, Phone.TYPE_FAX_WORK);
-
-        resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+        entry.buildData(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "50")
                 .put(Phone.TYPE, Phone.TYPE_MOBILE);
-
-        resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+        entry.buildData(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "60")
                 .put(Phone.TYPE, Phone.TYPE_PAGER);
-
-        resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+        entry.buildData(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "70")
                 .put(Phone.TYPE, Phone.TYPE_OTHER);
-
-        resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+        entry.buildData(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "80")
                 .put(Phone.TYPE, Phone.TYPE_CAR);
-
-        resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+        entry.buildData(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "90")
                 .put(Phone.TYPE, Phone.TYPE_COMPANY_MAIN);
-
-        resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+        entry.buildData(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "100")
                 .put(Phone.TYPE, Phone.TYPE_ISDN);
-
-        resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+        entry.buildData(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "110")
                 .put(Phone.TYPE, Phone.TYPE_MAIN);
-
-        resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+        entry.buildData(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "120")
                 .put(Phone.TYPE, Phone.TYPE_OTHER_FAX);
-
-        resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+        entry.buildData(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "130")
                 .put(Phone.TYPE, Phone.TYPE_TELEX);
-
-        resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+        entry.buildData(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "140")
                 .put(Phone.TYPE, Phone.TYPE_WORK_MOBILE);
-
-        resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+        entry.buildData(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "150")
                 .put(Phone.TYPE, Phone.TYPE_WORK_PAGER);
-
-        resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+        entry.buildData(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "160")
                 .put(Phone.TYPE, Phone.TYPE_MMS);
 
-        VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
-        handler.addPropertyVerifierWithEmptyName()
+        VCardVerifier verifier = new VCardVerifier(resolver, version);
+        verifier.addPropertyNodesVerifierWithEmptyName()
                 .addNodeWithoutOrder("TEL", "10", new TypeSet("HOME"))
                 .addNodeWithoutOrder("TEL", "20", new TypeSet("WORK"))
                 .addNodeWithoutOrder("TEL", "30", new TypeSet("HOME", "FAX"))
@@ -398,9 +367,10 @@
                 .addNodeWithoutOrder("TEL", "110", new TypeSet("PREF"))
                 .addNodeWithoutOrder("TEL", "120", new TypeSet("FAX"))
                 .addNodeWithoutOrder("TEL", "130", new TypeSet("TLX"))
-                .addNodeWithoutOrder("TEL", "140", new TypeSet("WORK", "MOBILE"))
+                .addNodeWithoutOrder("TEL", "140", new TypeSet("WORK", "CELL"))
                 .addNodeWithoutOrder("TEL", "150", new TypeSet("WORK", "PAGER"))
                 .addNodeWithoutOrder("TEL", "160", new TypeSet("MSG"));
+        verifier.verify();
     }
 
     public void testPhoneVariousTypeSupportV21() {
@@ -416,33 +386,29 @@
      */
     private void testPhonePrefHandlingCommon(int version) {
         ExportTestResolver resolver = new ExportTestResolver();
-
-        resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+        ContactEntry entry = resolver.buildContactEntry();
+        entry.buildData(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "1")
                 .put(Phone.TYPE, Phone.TYPE_HOME);
-
-        resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+        entry.buildData(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "2")
                 .put(Phone.TYPE, Phone.TYPE_WORK)
                 .put(Phone.IS_PRIMARY, 1);
-
-        resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+        entry.buildData(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "3")
                 .put(Phone.TYPE, Phone.TYPE_FAX_HOME)
                 .put(Phone.IS_PRIMARY, 1);
-
-        resolver.buildInput(Phone.CONTENT_ITEM_TYPE)
+        entry.buildData(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "4")
                 .put(Phone.TYPE, Phone.TYPE_FAX_WORK);
 
-        VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
-        handler.addPropertyVerifierWithEmptyName()
+        VCardVerifier verifier = new VCardVerifier(resolver, version);
+        verifier.addPropertyNodesVerifierWithEmptyName()
                 .addNodeWithoutOrder("TEL", "4", new TypeSet("WORK", "FAX"))
                 .addNodeWithoutOrder("TEL", "3", new TypeSet("HOME", "FAX", "PREF"))
-                .addNodeWithoutOrder("TEL", "2", new TypeSet("WORK", "VOICE", "PREF"))
-                .addNodeWithoutOrder("TEL", "1", new TypeSet("HOME", "VOICE"));
-
-        verifyOneComposition(resolver, handler, version);
+                .addNodeWithoutOrder("TEL", "2", new TypeSet("WORK", "PREF"))
+                .addNodeWithoutOrder("TEL", "1", new TypeSet("HOME"));
+        verifier.verify();
     }
 
     public void testPhonePrefHandlingV21() {
@@ -455,15 +421,15 @@
 
     private void testEmailBasicCommon(int version) {
         ExportTestResolver resolver = new ExportTestResolver();
-        resolver.buildInput(Email.CONTENT_ITEM_TYPE)
+        resolver.buildContactEntry().buildData(Email.CONTENT_ITEM_TYPE)
                 .put(Email.DATA, "sample@example.com");
 
-        VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
+        VCardVerifier verifier = new VCardVerifier(resolver, version);
 
-        handler.addPropertyVerifierWithEmptyName()
+        verifier.addPropertyNodesVerifierWithEmptyName()
             .addNodeWithoutOrder("EMAIL", "sample@example.com");
 
-        verifyOneComposition(resolver, handler, version);
+        verifier.verify();
     }
 
     public void testEmailBasicV21() {
@@ -477,31 +443,29 @@
     private void testEmailVariousTypeSupportCommon(int version) {
         ExportTestResolver resolver = new ExportTestResolver();
 
-        resolver.buildInput(Email.CONTENT_ITEM_TYPE)
+        ContactEntry entry = resolver.buildContactEntry();
+        entry.buildData(Email.CONTENT_ITEM_TYPE)
                 .put(Email.DATA, "type_home@example.com")
                 .put(Email.TYPE, Email.TYPE_HOME);
-
-        resolver.buildInput(Email.CONTENT_ITEM_TYPE)
+        entry.buildData(Email.CONTENT_ITEM_TYPE)
                 .put(Email.DATA, "type_work@example.com")
                 .put(Email.TYPE, Email.TYPE_WORK);
-
-        resolver.buildInput(Email.CONTENT_ITEM_TYPE)
+        entry.buildData(Email.CONTENT_ITEM_TYPE)
                 .put(Email.DATA, "type_mobile@example.com")
                 .put(Email.TYPE, Email.TYPE_MOBILE);
-
-        resolver.buildInput(Email.CONTENT_ITEM_TYPE)
+        entry.buildData(Email.CONTENT_ITEM_TYPE)
                 .put(Email.DATA, "type_other@example.com")
                 .put(Email.TYPE, Email.TYPE_OTHER);
 
-        VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
+        VCardVerifier verifier = new VCardVerifier(resolver, version);
 
-        handler.addPropertyVerifierWithEmptyName()
+        verifier.addPropertyNodesVerifierWithEmptyName()
                 .addNodeWithoutOrder("EMAIL", "type_home@example.com", new TypeSet("HOME"))
                 .addNodeWithoutOrder("EMAIL", "type_work@example.com", new TypeSet("WORK"))
                 .addNodeWithoutOrder("EMAIL", "type_mobile@example.com", new TypeSet("CELL"))
                 .addNodeWithoutOrder("EMAIL", "type_other@example.com");
 
-        verifyOneComposition(resolver, handler, version);
+        verifier.verify();
     }
 
     public void testEmailVariousTypeSupportV21() {
@@ -515,22 +479,22 @@
     private void testEmailPrefHandlingCommon(int version) {
         ExportTestResolver resolver = new ExportTestResolver();
 
-        resolver.buildInput(Email.CONTENT_ITEM_TYPE)
+        ContactEntry entry = resolver.buildContactEntry();
+        entry.buildData(Email.CONTENT_ITEM_TYPE)
                 .put(Email.DATA, "type_home@example.com")
                 .put(Email.TYPE, Email.TYPE_HOME)
                 .put(Email.IS_PRIMARY, 1);
-
-        resolver.buildInput(Email.CONTENT_ITEM_TYPE)
+        entry.buildData(Email.CONTENT_ITEM_TYPE)
                 .put(Email.DATA, "type_notype@example.com")
                 .put(Email.IS_PRIMARY, 1);
 
-        VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
+        VCardVerifier verifier = new VCardVerifier(resolver, version);
 
-        handler.addPropertyVerifierWithEmptyName()
+        verifier.addPropertyNodesVerifierWithEmptyName()
                 .addNodeWithoutOrder("EMAIL", "type_notype@example.com", new TypeSet("PREF"))
                 .addNodeWithoutOrder("EMAIL", "type_home@example.com", new TypeSet("HOME", "PREF"));
 
-        verifyOneComposition(resolver, handler, version);
+        verifier.verify();
     }
 
     public void testEmailPrefHandlingV21() {
@@ -547,7 +511,7 @@
         // adr-value    = 0*6(text-value ";") text-value
         //              ; PO Box, Extended Address, Street, Locality, Region, Postal Code,
         //              ; Country Name
-        resolver.buildInput(StructuredPostal.CONTENT_ITEM_TYPE)
+        resolver.buildContactEntry().buildData(StructuredPostal.CONTENT_ITEM_TYPE)
                 .put(StructuredPostal.POBOX, "Pobox")
                 .put(StructuredPostal.NEIGHBORHOOD, "Neighborhood")
                 .put(StructuredPostal.STREET, "Street")
@@ -555,13 +519,13 @@
                 .put(StructuredPostal.REGION, "Region")
                 .put(StructuredPostal.POSTCODE, "100")
                 .put(StructuredPostal.COUNTRY, "Country");
-        VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
-        handler.addPropertyVerifierWithEmptyName()
+        VCardVerifier verifier = new VCardVerifier(resolver, version);
+        verifier.addPropertyNodesVerifierWithEmptyName()
                 .addNodeWithoutOrder("ADR", "Pobox;Neighborhood;Street;City;Region;100;Country",
                         Arrays.asList("Pobox", "Neighborhood", "Street", "City",
                                 "Region", "100", "Country"), new TypeSet("HOME"));
 
-        verifyOneComposition(resolver, handler, version);
+        verifier.verify();
     }
 
     public void testPostalOnlyWithStructuredDataV21() {
@@ -575,17 +539,17 @@
     private void testPostalOnlyWithFormattedAddressCommon(int version) {
         ExportTestResolver resolver = new ExportTestResolver();
 
-        resolver.buildInput(StructuredPostal.CONTENT_ITEM_TYPE)
+        resolver.buildContactEntry().buildData(StructuredPostal.CONTENT_ITEM_TYPE)
                 .put(StructuredPostal.FORMATTED_ADDRESS,
                 "Formatted address CA 123-334 United Statue");
 
-        VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
-        handler.addPropertyVerifierWithEmptyName()
+        VCardVerifier verifier = new VCardVerifier(resolver, version);
+        verifier.addPropertyNodesVerifierWithEmptyName()
                 .addNodeWithOrder("ADR", ";Formatted address CA 123-334 United Statue;;;;;",
                         Arrays.asList("", "Formatted address CA 123-334 United Statue",
                                 "", "", "", "", ""), new TypeSet("HOME"));
 
-        verifyOneComposition(resolver, handler, version);
+        verifier.verify();
     }
 
     public void testPostalOnlyWithFormattedAddressV21() {
@@ -603,19 +567,19 @@
     private void testPostalWithBothStructuredAndFormattedCommon(int version) {
         ExportTestResolver resolver = new ExportTestResolver();
 
-        resolver.buildInput(StructuredPostal.CONTENT_ITEM_TYPE)
+        resolver.buildContactEntry().buildData(StructuredPostal.CONTENT_ITEM_TYPE)
                 .put(StructuredPostal.POBOX, "Pobox")
                 .put(StructuredPostal.COUNTRY, "Country")
                 .put(StructuredPostal.FORMATTED_ADDRESS,
                         "Formatted address CA 123-334 United Statue");  // Should be ignored
 
-        VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
-        handler.addPropertyVerifierWithEmptyName()
+        VCardVerifier verifier = new VCardVerifier(resolver, version);
+        verifier.addPropertyNodesVerifierWithEmptyName()
                 .addNodeWithoutOrder("ADR", "Pobox;;;;;;Country",
                         Arrays.asList("Pobox", "", "", "", "", "", "Country"),
                         new TypeSet("HOME"));
 
-        verifyOneComposition(resolver, handler, version);
+        verifier.verify();
     }
 
     public void testPostalWithBothStructuredAndFormattedV21() {
@@ -628,7 +592,8 @@
 
     private void testOrganizationCommon(int version) {
         ExportTestResolver resolver = new ExportTestResolver();
-        resolver.buildInput(Organization.CONTENT_ITEM_TYPE)
+        ContactEntry entry = resolver.buildContactEntry();
+        entry.buildData(Organization.CONTENT_ITEM_TYPE)
                 .put(Organization.COMPANY, "CompanyX")
                 .put(Organization.DEPARTMENT, "DepartmentY")
                 .put(Organization.TITLE, "TitleZ")
@@ -637,20 +602,20 @@
                 .put(Organization.PHONETIC_NAME, "PhoneticName!")  // Ignored
                 .put(Organization.SYMBOL, "(^o^)/~~");  // Ignore him (her).
 
-        resolver.buildInput(Organization.CONTENT_ITEM_TYPE)
+        entry.buildData(Organization.CONTENT_ITEM_TYPE)
                 .putNull(Organization.COMPANY)
                 .put(Organization.DEPARTMENT, "DepartmentXX")
                 .putNull(Organization.TITLE);
 
-        resolver.buildInput(Organization.CONTENT_ITEM_TYPE)
+        entry.buildData(Organization.CONTENT_ITEM_TYPE)
                 .put(Organization.COMPANY, "CompanyXYZ")
                 .putNull(Organization.DEPARTMENT)
                 .put(Organization.TITLE, "TitleXYZYX");
 
-        VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
+        VCardVerifier verifier = new VCardVerifier(resolver, version);
 
         // Currently we do not use group but depend on the order.
-        handler.addPropertyVerifierWithEmptyName()
+        verifier.addPropertyNodesVerifierWithEmptyName()
                 .addNodeWithOrder("ORG", "CompanyX;DepartmentY",
                         Arrays.asList("CompanyX", "DepartmentY"))
                 .addNodeWithOrder("TITLE", "TitleZ")
@@ -658,7 +623,7 @@
                 .addNodeWithOrder("ORG", "CompanyXYZ")
                 .addNodeWithOrder("TITLE", "TitleXYZYX");
 
-        verifyOneComposition(resolver, handler, version);
+        verifier.verify();
     }
 
     public void testOrganizationV21() {
@@ -672,46 +637,47 @@
     private void testImVariousTypeSupportCommon(int version) {
         ExportTestResolver resolver = new ExportTestResolver();
 
-        resolver.buildInput(Im.CONTENT_ITEM_TYPE)
+        ContactEntry entry = resolver.buildContactEntry();
+        entry.buildData(Im.CONTENT_ITEM_TYPE)
                 .put(Im.PROTOCOL, Im.PROTOCOL_AIM)
                 .put(Im.DATA, "aim");
 
-        resolver.buildInput(Im.CONTENT_ITEM_TYPE)
+        entry.buildData(Im.CONTENT_ITEM_TYPE)
                 .put(Im.PROTOCOL, Im.PROTOCOL_MSN)
                 .put(Im.DATA, "msn");
 
-        resolver.buildInput(Im.CONTENT_ITEM_TYPE)
+        entry.buildData(Im.CONTENT_ITEM_TYPE)
                 .put(Im.PROTOCOL, Im.PROTOCOL_YAHOO)
                 .put(Im.DATA, "yahoo");
 
-        resolver.buildInput(Im.CONTENT_ITEM_TYPE)
+        entry.buildData(Im.CONTENT_ITEM_TYPE)
                 .put(Im.PROTOCOL, Im.PROTOCOL_SKYPE)
                 .put(Im.DATA, "skype");
 
-        resolver.buildInput(Im.CONTENT_ITEM_TYPE)
+        entry.buildData(Im.CONTENT_ITEM_TYPE)
                 .put(Im.PROTOCOL, Im.PROTOCOL_QQ)
                 .put(Im.DATA, "qq");
 
-        resolver.buildInput(Im.CONTENT_ITEM_TYPE)
+        entry.buildData(Im.CONTENT_ITEM_TYPE)
                 .put(Im.PROTOCOL, Im.PROTOCOL_GOOGLE_TALK)
                 .put(Im.DATA, "google talk");
 
-        resolver.buildInput(Im.CONTENT_ITEM_TYPE)
+        entry.buildData(Im.CONTENT_ITEM_TYPE)
                 .put(Im.PROTOCOL, Im.PROTOCOL_ICQ)
                 .put(Im.DATA, "icq");
 
-        resolver.buildInput(Im.CONTENT_ITEM_TYPE)
+        entry.buildData(Im.CONTENT_ITEM_TYPE)
                 .put(Im.PROTOCOL, Im.PROTOCOL_JABBER)
                 .put(Im.DATA, "jabber");
 
-        resolver.buildInput(Im.CONTENT_ITEM_TYPE)
+        entry.buildData(Im.CONTENT_ITEM_TYPE)
                 .put(Im.PROTOCOL, Im.PROTOCOL_NETMEETING)
                 .put(Im.DATA, "netmeeting");
 
         // No determined way to express unknown type...
 
-        VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
-        handler.addPropertyVerifierWithEmptyName()
+        VCardVerifier verifier = new VCardVerifier(resolver, version);
+        verifier.addPropertyNodesVerifierWithEmptyName()
                 .addNodeWithoutOrder("X-JABBER", "jabber")
                 .addNodeWithoutOrder("X-ICQ", "icq")
                 .addNodeWithoutOrder("X-GOOGLE-TALK", "google talk")
@@ -722,7 +688,7 @@
                 .addNodeWithoutOrder("X-NETMEETING", "netmeeting")
                 .addNodeWithoutOrder("X-AIM", "aim");
 
-        verifyOneComposition(resolver, handler, version);
+        verifier.verify();
     }
 
     public void testImBasiV21() {
@@ -736,22 +702,23 @@
     private void testImPrefHandlingCommon(int version) {
         ExportTestResolver resolver = new ExportTestResolver();
 
-        resolver.buildInput(Im.CONTENT_ITEM_TYPE)
+        ContactEntry entry = resolver.buildContactEntry();
+        entry.buildData(Im.CONTENT_ITEM_TYPE)
                 .put(Im.PROTOCOL, Im.PROTOCOL_AIM)
                 .put(Im.DATA, "aim1");
 
-        resolver.buildInput(Im.CONTENT_ITEM_TYPE)
+        entry.buildData(Im.CONTENT_ITEM_TYPE)
                 .put(Im.PROTOCOL, Im.PROTOCOL_AIM)
                 .put(Im.DATA, "aim2")
                 .put(Im.TYPE, Im.TYPE_HOME)
                 .put(Im.IS_PRIMARY, 1);
 
-        VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
-        handler.addPropertyVerifierWithEmptyName()
+        VCardVerifier verifier = new VCardVerifier(resolver, version);
+        verifier.addPropertyNodesVerifierWithEmptyName()
                 .addNodeWithoutOrder("X-AIM", "aim1")
                 .addNodeWithoutOrder("X-AIM", "aim2", new TypeSet("HOME", "PREF"));
 
-        verifyOneComposition(resolver, handler, version);
+        verifier.verify();
     }
 
     public void testImPrefHandlingV21() {
@@ -765,21 +732,21 @@
     private void testWebsiteCommon(int version) {
         ExportTestResolver resolver = new ExportTestResolver();
 
-        resolver.buildInput(Website.CONTENT_ITEM_TYPE)
+        ContactEntry entry = resolver.buildContactEntry();
+        entry.buildData(Website.CONTENT_ITEM_TYPE)
                 .put(Website.URL, "http://website.example.android.com/index.html")
                 .put(Website.TYPE, Website.TYPE_BLOG);
 
-        resolver.buildInput(Website.CONTENT_ITEM_TYPE)
+        entry.buildData(Website.CONTENT_ITEM_TYPE)
                 .put(Website.URL, "ftp://ftp.example.android.com/index.html")
                 .put(Website.TYPE, Website.TYPE_FTP);
 
         // We drop TYPE information since vCard (especially 3.0) does not allow us to emit it.
-        VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
-        handler.addPropertyVerifierWithEmptyName()
+        VCardVerifier verifier = new VCardVerifier(resolver, version);
+        verifier.addPropertyNodesVerifierWithEmptyName()
                 .addNodeWithoutOrder("URL", "ftp://ftp.example.android.com/index.html")
                 .addNodeWithoutOrder("URL", "http://website.example.android.com/index.html");
-
-        verifyOneComposition(resolver, handler, version);
+        verifier.verify();
     }
 
     public void testWebsiteV21() {
@@ -793,32 +760,29 @@
     private void testEventCommon(int version) {
         ExportTestResolver resolver = new ExportTestResolver();
 
-        resolver.buildInput(Event.CONTENT_ITEM_TYPE)
+        ContactEntry entry = resolver.buildContactEntry();
+        entry.buildData(Event.CONTENT_ITEM_TYPE)
                 .put(Event.TYPE, Event.TYPE_ANNIVERSARY)
                 .put(Event.START_DATE, "1982-06-16");
-
-        resolver.buildInput(Event.CONTENT_ITEM_TYPE)
+        entry.buildData(Event.CONTENT_ITEM_TYPE)
                 .put(Event.TYPE, Event.TYPE_BIRTHDAY)
                 .put(Event.START_DATE, "2008-10-22");
-
-        resolver.buildInput(Event.CONTENT_ITEM_TYPE)
+        entry.buildData(Event.CONTENT_ITEM_TYPE)
                 .put(Event.TYPE, Event.TYPE_OTHER)
                 .put(Event.START_DATE, "2018-03-12");
-
-        resolver.buildInput(Event.CONTENT_ITEM_TYPE)
+        entry.buildData(Event.CONTENT_ITEM_TYPE)
                 .put(Event.TYPE, Event.TYPE_CUSTOM)
                 .put(Event.LABEL, "The last day")
                 .put(Event.START_DATE, "When the Tower of Hanoi with 64 rings is completed.");
-
-        resolver.buildInput(Event.CONTENT_ITEM_TYPE)
+        entry.buildData(Event.CONTENT_ITEM_TYPE)
                 .put(Event.TYPE, Event.TYPE_BIRTHDAY)
                 .put(Event.START_DATE, "2009-05-19");
 
-        VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
-        handler.addPropertyVerifierWithEmptyName()
+        VCardVerifier verifier = new VCardVerifier(resolver, version);
+        verifier.addPropertyNodesVerifierWithEmptyName()
                 .addNodeWithoutOrder("BDAY", "2008-10-22");
 
-        verifyOneComposition(resolver, handler, version);
+        verifier.verify();
     }
 
     public void testEventV21() {
@@ -832,19 +796,19 @@
     private void testNoteCommon(int version) {
         ExportTestResolver resolver = new ExportTestResolver();
 
-        resolver.buildInput(Note.CONTENT_ITEM_TYPE)
+        ContactEntry entry = resolver.buildContactEntry();
+        entry.buildData(Note.CONTENT_ITEM_TYPE)
                 .put(Note.NOTE, "note1");
-
-        resolver.buildInput(Note.CONTENT_ITEM_TYPE)
+        entry.buildData(Note.CONTENT_ITEM_TYPE)
                 .put(Note.NOTE, "note2")
                 .put(Note.IS_PRIMARY, 1);  // Just ignored.
 
-        VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
-        handler.addPropertyVerifierWithEmptyName()
+        VCardVerifier verifier = new VCardVerifier(resolver, version);
+        verifier.addPropertyNodesVerifierWithEmptyName()
                 .addNodeWithOrder("NOTE", "note1")
                 .addNodeWithOrder("NOTE", "note2");
 
-        verifyOneComposition(resolver, handler, version);
+        verifier.verify();
     }
 
     public void testNoteV21() {
@@ -858,23 +822,23 @@
     private void testPhotoCommon(int version) {
         final boolean isV30 = version == V30;
         ExportTestResolver resolver = new ExportTestResolver();
-        resolver.buildInput(StructuredName.CONTENT_ITEM_TYPE)
+        ContactEntry entry = resolver.buildContactEntry();
+        entry.buildData(StructuredName.CONTENT_ITEM_TYPE)
                 .put(StructuredName.FAMILY_NAME, "PhotoTest");
-
-        resolver.buildInput(Photo.CONTENT_ITEM_TYPE)
+        entry.buildData(Photo.CONTENT_ITEM_TYPE)
                 .put(Photo.PHOTO, sPhotoByteArray);
 
         ContentValues contentValuesForPhoto = new ContentValues();
         contentValuesForPhoto.put("ENCODING", (isV30 ? "b" : "BASE64"));
-        VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
-        handler.addPropertyNodesVerifier()
+        VCardVerifier verifier = new VCardVerifier(resolver, version);
+        verifier.addPropertyNodesVerifierElem()
                 .addNodeWithoutOrder("FN", "PhotoTest")
                 .addNodeWithoutOrder("N", "PhotoTest;;;;",
                         Arrays.asList("PhotoTest", "", "", "", ""))
                 .addNodeWithOrder("PHOTO", null, null, sPhotoByteArray,
                         contentValuesForPhoto, new TypeSet("JPEG"), null);
 
-        verifyOneComposition(resolver, handler, version);
+        verifier.verify();
     }
 
     public void testPhotoV21() {
@@ -888,21 +852,22 @@
     public void testV30HandleEscape() {
         final int version = V30;
         ExportTestResolver resolver = new ExportTestResolver();
-        resolver.buildInput(StructuredName.CONTENT_ITEM_TYPE)
+        resolver.buildContactEntry().buildData(StructuredName.CONTENT_ITEM_TYPE)
                 .put(StructuredName.FAMILY_NAME, "\\")
                 .put(StructuredName.GIVEN_NAME, ";")
                 .put(StructuredName.MIDDLE_NAME, ",")
                 .put(StructuredName.PREFIX, "\n")
                 .put(StructuredName.DISPLAY_NAME, "[<{Unescaped:Asciis}>]");
-        VCardVerificationHandler handler = new VCardVerificationHandler(this, version);
+        VCardVerifier verifier = new VCardVerifier(resolver, version);
         // Verifies the vCard String correctly escapes each character which must be escaped.
-        handler.addExpectedLine("N:\\\\;\\;;\\,;\\n;")
-                .addExpectedLine("FN:[<{Unescaped:Asciis}>]");
-        handler.addPropertyNodesVerifier()
+        verifier.addLineVerifier()
+                .addExpected("N:\\\\;\\;;\\,;\\n;")
+                .addExpected("FN:[<{Unescaped:Asciis}>]");
+        verifier.addPropertyNodesVerifierElem()
                 .addNodeWithoutOrder("FN", "[<{Unescaped:Asciis}>]")
                 .addNodeWithoutOrder("N", Arrays.asList("\\", ";", ",", "\n", ""));
 
-        verifyOneComposition(resolver, handler, version);
+        verifier.verify();
     }
 
     /**
@@ -912,18 +877,16 @@
      */
     public void testNickNameV21() {
         ExportTestResolver resolver = new ExportTestResolver();
-        resolver.buildInput(Nickname.CONTENT_ITEM_TYPE)
+        resolver.buildContactEntry().buildData(Nickname.CONTENT_ITEM_TYPE)
                 .put(Nickname.NAME, "Nicky");
 
-        VCardVerificationHandler handler = new VCardVerificationHandler(this, V21);
-        handler.addPropertyVerifierWithEmptyName()
+        VCardVerifier verifier = new VCardVerifier(resolver, V21);
+        verifier.addPropertyNodesVerifierWithEmptyName()
                 .addNodeWithOrder("X-ANDROID-CUSTOM",
                         Nickname.CONTENT_ITEM_TYPE + ";Nicky;;;;;;;;;;;;;;");
-
-        handler.addContentValuesVerifier()
-                .buildExpected(Nickname.CONTENT_ITEM_TYPE)
+        verifier.addImportVerifier()
+                .addExpected(Nickname.CONTENT_ITEM_TYPE)
                         .put(Nickname.NAME, "Nicky");
-
-        verifyOneComposition(resolver, handler, V21);
+        verifier.verify();
     }
 }
diff --git a/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardImporterTests.java b/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardImporterTests.java
index 0a20310..169ea71 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardImporterTests.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardImporterTests.java
@@ -16,10 +16,7 @@
 
 package com.android.unit_tests.vcard;
 
-import android.content.ContentValues;
 import android.pim.vcard.VCardConfig;
-import android.pim.vcard.VCardParser_V21;
-import android.pim.vcard.VCardParser_V30;
 import android.pim.vcard.exception.VCardException;
 import android.provider.ContactsContract.Data;
 import android.provider.ContactsContract.CommonDataKinds.Email;
@@ -33,10 +30,9 @@
 import android.provider.ContactsContract.CommonDataKinds.Website;
 
 import com.android.unit_tests.R;
-import com.android.unit_tests.vcard.PropertyNodesVerifier.TypeSet;
+import com.android.unit_tests.vcard.PropertyNodesVerifierElem.TypeSet;
 
 import java.io.IOException;
-import java.io.InputStream;
 import java.util.Arrays;
 
 public class VCardImporterTests extends VCardTestsBase {
@@ -410,53 +406,52 @@
     }
 
     public void testV21SimpleCase1_Parsing() throws IOException, VCardException {
-        VCardParser_V21 parser = new VCardParser_V21();
-        VNodeBuilder builder = new VNodeBuilder();
-        InputStream is = getContext().getResources().openRawResource(R.raw.v21_simple_1);
-        assertEquals(true, parser.parse(is,"ISO-8859-1", builder));
-        is.close();
-        assertEquals(1, builder.vNodeList.size());
-        PropertyNodesVerifier verifier = new PropertyNodesVerifier(this)
+        PropertyNodesVerifier verifier = new PropertyNodesVerifier(this);
+        verifier.addPropertyNodesVerifierElem()
                 .addNodeWithOrder("N", "Ando;Roid;", Arrays.asList("Ando", "Roid", ""));
-        verifier.verify(builder.vNodeList.get(0));
+        verifier.verify(R.raw.v21_simple_1, V21);
     }
 
     public void testV21SimpleCase1_Type_Generic() throws IOException, VCardException {
-        ContentValuesVerifier verifier = new ContentValuesVerifier();
-        verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
-                .put(StructuredName.FAMILY_NAME, "Ando")
-                .put(StructuredName.GIVEN_NAME, "Roid")
-                .put(StructuredName.DISPLAY_NAME, "Roid Ando");
+        ImportVerifier verifier = new ImportVerifier();
+        verifier.addImportVerifierElem()
+                .addExpected(StructuredName.CONTENT_ITEM_TYPE)
+                        .put(StructuredName.FAMILY_NAME, "Ando")
+                        .put(StructuredName.GIVEN_NAME, "Roid")
+                        .put(StructuredName.DISPLAY_NAME, "Roid Ando");
         verifier.verify(R.raw.v21_simple_1, VCardConfig.VCARD_TYPE_V21_GENERIC_UTF8);
     }
 
     public void testV21SimpleCase1_Type_Japanese() throws IOException, VCardException {
-        ContentValuesVerifier verifier = new ContentValuesVerifier();
-        verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
-                .put(StructuredName.FAMILY_NAME, "Ando")
-                .put(StructuredName.GIVEN_NAME, "Roid")
-                // If name-related strings only contains printable Ascii,
-                // the order is remained to be US's:
-                // "Prefix Given Middle Family Suffix"
-                .put(StructuredName.DISPLAY_NAME, "Roid Ando");
+        ImportVerifier verifier = new ImportVerifier();
+        verifier.addImportVerifierElem()
+                .addExpected(StructuredName.CONTENT_ITEM_TYPE)
+                        .put(StructuredName.FAMILY_NAME, "Ando")
+                        .put(StructuredName.GIVEN_NAME, "Roid")
+                        // If name-related strings only contains printable Ascii,
+                        // the order is remained to be US's:
+                        // "Prefix Given Middle Family Suffix"
+                        .put(StructuredName.DISPLAY_NAME, "Roid Ando");
         verifier.verify(R.raw.v21_simple_1, VCardConfig.VCARD_TYPE_V21_JAPANESE_SJIS);
     }
 
     public void testV21SimpleCase2() throws IOException, VCardException {
-        ContentValuesVerifier verifier = new ContentValuesVerifier();
-        verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
-                .put(StructuredName.DISPLAY_NAME, "Ando Roid");
+        ImportVerifier verifier = new ImportVerifier();
+        verifier.addImportVerifierElem()
+                .addExpected(StructuredName.CONTENT_ITEM_TYPE)
+                        .put(StructuredName.DISPLAY_NAME, "Ando Roid");
         verifier.verify(R.raw.v21_simple_2, VCardConfig.VCARD_TYPE_V21_GENERIC_UTF8);
     }
 
     public void testV21SimpleCase3() throws IOException, VCardException {
-        ContentValuesVerifier verifier = new ContentValuesVerifier();
-        verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
-                .put(StructuredName.FAMILY_NAME, "Ando")
-                .put(StructuredName.GIVEN_NAME, "Roid")
-                // "FN" field should be prefered since it should contain the original order
-                // intended by the author of the file.
-                .put(StructuredName.DISPLAY_NAME, "Ando Roid");
+        ImportVerifier verifier = new ImportVerifier();
+        verifier.addImportVerifierElem()
+                .addExpected(StructuredName.CONTENT_ITEM_TYPE)
+                        .put(StructuredName.FAMILY_NAME, "Ando")
+                        .put(StructuredName.GIVEN_NAME, "Roid")
+                        // "FN" field should be prefered since it should contain the original
+                        // order intended by the author of the file.
+                        .put(StructuredName.DISPLAY_NAME, "Ando Roid");
         verifier.verify(R.raw.v21_simple_3, VCardConfig.VCARD_TYPE_V21_GENERIC_UTF8);
     }
 
@@ -464,18 +459,13 @@
      * Tests ';' is properly handled by VCardParser implementation.
      */
     public void testV21BackslashCase_Parsing() throws IOException, VCardException {
-        VCardParser_V21 parser = new VCardParser_V21();
-        VNodeBuilder builder = new VNodeBuilder();
-        InputStream is = getContext().getResources().openRawResource(R.raw.v21_backslash);
-        assertEquals(true, parser.parse(is,"ISO-8859-1", builder));
-        is.close();
-        assertEquals(1, builder.vNodeList.size());
-        PropertyNodesVerifier verifier = new PropertyNodesVerifier(this)
+        PropertyNodesVerifier verifier = new PropertyNodesVerifier(this);
+        verifier.addPropertyNodesVerifierElem()
                 .addNodeWithOrder("VERSION", "2.1")
                 .addNodeWithOrder("N", ";A;B\\;C\\;;D;:E;\\\\;",
                         Arrays.asList("", "A;B\\", "C\\;", "D", ":E", "\\\\", ""))
                 .addNodeWithOrder("FN", "A;B\\C\\;D:E\\\\");
-        verifier.verify(builder.vNodeList.get(0));
+        verifier.verify(R.raw.v21_backslash, V21);
     }
 
     /**
@@ -483,23 +473,25 @@
      * inserts name related data.
      */
     public void testV21BackslashCase() throws IOException, VCardException {
-        ContentValuesVerifier verifier = new ContentValuesVerifier();
-        verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
-                // FAMILY_NAME is empty and removed in this test...
-                .put(StructuredName.GIVEN_NAME, "A;B\\")
-                .put(StructuredName.MIDDLE_NAME, "C\\;")
-                .put(StructuredName.PREFIX, "D")
-                .put(StructuredName.SUFFIX, ":E")
-                .put(StructuredName.DISPLAY_NAME, "A;B\\C\\;D:E\\\\");
+        ImportVerifier verifier = new ImportVerifier();
+        verifier.addImportVerifierElem()
+                .addExpected(StructuredName.CONTENT_ITEM_TYPE)
+                        // FAMILY_NAME is empty and removed in this test...
+                        .put(StructuredName.GIVEN_NAME, "A;B\\")
+                        .put(StructuredName.MIDDLE_NAME, "C\\;")
+                        .put(StructuredName.PREFIX, "D")
+                        .put(StructuredName.SUFFIX, ":E")
+                        .put(StructuredName.DISPLAY_NAME, "A;B\\C\\;D:E\\\\");
         verifier.verify(R.raw.v21_backslash, VCardConfig.VCARD_TYPE_V21_GENERIC_UTF8);
     }
 
     public void testOrgBeforTitle() throws IOException, VCardException {
-        ContentValuesVerifier verifier = new ContentValuesVerifier();
-        verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
+        ImportVerifier verifier = new ImportVerifier();
+        ImportVerifierElem elem = verifier.addImportVerifierElem();
+        elem.addExpected(StructuredName.CONTENT_ITEM_TYPE)
                 .put(StructuredName.DISPLAY_NAME, "Normal Guy");
 
-        verifier.buildExpected(Organization.CONTENT_ITEM_TYPE)
+        elem.addExpected(Organization.CONTENT_ITEM_TYPE)
                 .put(Organization.COMPANY, "Company")
                 .put(Organization.DEPARTMENT, "Organization Devision Room Sheet No.")
                 .put(Organization.TITLE, "Excellent Janitor")
@@ -508,11 +500,12 @@
     }
 
     public void testTitleBeforOrg() throws IOException, VCardException {
-        ContentValuesVerifier verifier = new ContentValuesVerifier();
-        verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
+        ImportVerifier verifier = new ImportVerifier();
+        ImportVerifierElem elem = verifier.addImportVerifierElem();
+        elem.addExpected(StructuredName.CONTENT_ITEM_TYPE)
                 .put(StructuredName.DISPLAY_NAME, "Nice Guy");
 
-        verifier.buildExpected(Organization.CONTENT_ITEM_TYPE)
+        elem.addExpected(Organization.CONTENT_ITEM_TYPE)
                 .put(Organization.COMPANY, "Marverous")
                 .put(Organization.DEPARTMENT, "Perfect Great Good Bad Poor")
                 .put(Organization.TITLE, "Cool Title")
@@ -525,45 +518,46 @@
      * The data contain three cases: one "PREF", no "PREF" and multiple "PREF", in each type.
      */
     public void testV21PrefToIsPrimary() throws IOException, VCardException {
-        ContentValuesVerifier verifier = new ContentValuesVerifier();
-        verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
+        ImportVerifier verifier = new ImportVerifier();
+        ImportVerifierElem elem = verifier.addImportVerifierElem();
+        elem.addExpected(StructuredName.CONTENT_ITEM_TYPE)
                 .put(Data.MIMETYPE, StructuredName.CONTENT_ITEM_TYPE)
                 .put(StructuredName.DISPLAY_NAME, "Smith");
 
-        verifier.buildExpected(Phone.CONTENT_ITEM_TYPE)
+        elem.addExpected(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "1")
                 .put(Phone.TYPE, Phone.TYPE_HOME);
 
-        verifier.buildExpected(Phone.CONTENT_ITEM_TYPE)
+        elem.addExpected(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "2")
                 .put(Phone.TYPE, Phone.TYPE_WORK)
                 .put(Phone.IS_PRIMARY, 1);
 
-        verifier.buildExpected(Phone.CONTENT_ITEM_TYPE)
+        elem.addExpected(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.NUMBER, "3")
                 .put(Phone.TYPE, Phone.TYPE_ISDN);
 
-        verifier.buildExpected(Email.CONTENT_ITEM_TYPE)
+        elem.addExpected(Email.CONTENT_ITEM_TYPE)
                 .put(Email.DATA, "test@example.com")
                 .put(Email.TYPE, Email.TYPE_HOME)
                 .put(Email.IS_PRIMARY, 1);
 
-        verifier.buildExpected(Email.CONTENT_ITEM_TYPE)
+        elem.addExpected(Email.CONTENT_ITEM_TYPE)
                 .put(Email.DATA, "test2@examination.com")
                 .put(Email.TYPE, Email.TYPE_MOBILE)
                 .put(Email.IS_PRIMARY, 1);
 
-        verifier.buildExpected(Organization.CONTENT_ITEM_TYPE)
+        elem.addExpected(Organization.CONTENT_ITEM_TYPE)
                 .put(Organization.COMPANY, "Company")
                 .put(Organization.TITLE, "Engineer")
                 .put(Organization.TYPE, Organization.TYPE_WORK);
 
-        verifier.buildExpected(Organization.CONTENT_ITEM_TYPE)
+        elem.addExpected(Organization.CONTENT_ITEM_TYPE)
                 .put(Organization.COMPANY, "Mystery")
                 .put(Organization.TITLE, "Blogger")
                 .put(Organization.TYPE, Organization.TYPE_WORK);
 
-        verifier.buildExpected(Organization.CONTENT_ITEM_TYPE)
+        elem.addExpected(Organization.CONTENT_ITEM_TYPE)
                 .put(Organization.COMPANY, "Poetry")
                 .put(Organization.TITLE, "Poet")
                 .put(Organization.TYPE, Organization.TYPE_WORK);
@@ -574,17 +568,8 @@
      * Tests all the properties in a complicated vCard are correctly parsed by the VCardParser.
      */
     public void testV21ComplicatedCase_Parsing() throws IOException, VCardException {
-        VCardParser_V21 parser = new VCardParser_V21();
-        VNodeBuilder builder = new VNodeBuilder();
-        InputStream is = getContext().getResources().openRawResource(R.raw.v21_complicated);
-        assertEquals(true, parser.parse(is,"ISO-8859-1", builder));
-        is.close();
-        assertEquals(1, builder.vNodeList.size());
-        ContentValues contentValuesForQP = new ContentValues();
-        contentValuesForQP.put("ENCODING", "QUOTED-PRINTABLE");
-        ContentValues contentValuesForPhoto = new ContentValues();
-        contentValuesForPhoto.put("ENCODING", "BASE64");
-        PropertyNodesVerifier verifier = new PropertyNodesVerifier(this)
+        PropertyNodesVerifier verifier = new PropertyNodesVerifier(this);
+        verifier.addPropertyNodesVerifierElem()
                 .addNodeWithOrder("VERSION", "2.1")
                 .addNodeWithOrder("N", "Gump;Forrest;Hoge;Pos;Tao",
                         Arrays.asList("Gump", "Forrest", "Hoge", "Pos", "Tao"))
@@ -606,7 +591,7 @@
                                 null, null, new TypeSet("WORK"), null)
                 .addNodeWithOrder("LABEL",
                         "100 Waters Edge\r\nBaytown, LA 30314\r\nUnited  States of America",
-                        null, null, contentValuesForQP, new TypeSet("WORK"), null)
+                        null, null, mContentValuesForQP, new TypeSet("WORK"), null)
                 .addNodeWithOrder("ADR",
                         ";;42 Plantation St.;Baytown;LA;30314;United States of America",
                         Arrays.asList("", "", "42 Plantation St.", "Baytown",
@@ -614,7 +599,7 @@
                                 new TypeSet("HOME"), null)
                 .addNodeWithOrder("LABEL",
                         "42 Plantation St.\r\nBaytown, LA 30314\r\nUnited  States of America",
-                        null, null, contentValuesForQP,
+                        null, null, mContentValuesForQP,
                         new TypeSet("HOME"), null)
                 .addNodeWithOrder("EMAIL", "forrestgump@walladalla.com",
                         new TypeSet("PREF", "INTERNET"))
@@ -622,16 +607,16 @@
                 .addNodeWithOrder("NOTE", "The following note is the example from RFC 2045.")
                 .addNodeWithOrder("NOTE",
                         "Now's the time for all folk to come to the aid of their country.",
-                        null, null, contentValuesForQP, null, null)
+                        null, null, mContentValuesForQP, null, null)
                 .addNodeWithOrder("PHOTO", null,
-                        null, sPhotoByteArrayForComplicatedCase, contentValuesForPhoto,
+                        null, sPhotoByteArrayForComplicatedCase, mContentValuesForBase64V21,
                         new TypeSet("JPEG"), null)
                 .addNodeWithOrder("X-ATTRIBUTE", "Some String")
                 .addNodeWithOrder("BDAY", "19800101")
                 .addNodeWithOrder("GEO", "35.6563854,139.6994233")
                 .addNodeWithOrder("URL", "http://www.example.com/")
                 .addNodeWithOrder("REV", "20080424T195243Z");
-        verifier.verify(builder.vNodeList.get(0));
+        verifier.verify(R.raw.v21_complicated, V21);
     }
 
     /**
@@ -639,8 +624,9 @@
      * into ContentResolver.
      */
     public void testV21ComplicatedCase() throws IOException, VCardException {
-        ContentValuesVerifier verifier = new ContentValuesVerifier();
-        verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
+        ImportVerifier verifier = new ImportVerifier();
+        ImportVerifierElem elem = verifier.addImportVerifierElem();
+        elem.addExpected(StructuredName.CONTENT_ITEM_TYPE)
                 .put(StructuredName.FAMILY_NAME, "Gump")
                 .put(StructuredName.GIVEN_NAME, "Forrest")
                 .put(StructuredName.MIDDLE_NAME, "Hoge")
@@ -648,36 +634,36 @@
                 .put(StructuredName.SUFFIX, "Tao")
                 .put(StructuredName.DISPLAY_NAME, "Joe Due");
         
-        verifier.buildExpected(Organization.CONTENT_ITEM_TYPE)
+        elem.addExpected(Organization.CONTENT_ITEM_TYPE)
                 .put(Organization.TYPE, Organization.TYPE_WORK)
                 .put(Organization.COMPANY, "Gump Shrimp Co.")
                 .put(Organization.DEPARTMENT, "Sales Dept.;Manager Fish keeper")
                 .put(Organization.TITLE, "Shrimp Man");
 
-        verifier.buildExpected(Phone.CONTENT_ITEM_TYPE)
+        elem.addExpected(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.TYPE, Phone.TYPE_WORK)
                 // Phone number is expected to be formated with NAMP format in default.
                 .put(Phone.NUMBER, "111-555-1212");
 
-        verifier.buildExpected(Phone.CONTENT_ITEM_TYPE)
+        elem.addExpected(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.TYPE, Phone.TYPE_HOME)
                 .put(Phone.NUMBER, "404-555-1212");
 
-        verifier.buildExpected(Phone.CONTENT_ITEM_TYPE)
+        elem.addExpected(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.TYPE, Phone.TYPE_MOBILE)
                 .put(Phone.NUMBER, "031-111-1111");
 
-        verifier.buildExpected(Phone.CONTENT_ITEM_TYPE)
+        elem.addExpected(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.TYPE, Phone.TYPE_CUSTOM)
                 .put(Phone.LABEL, "VIDEO")
                 .put(Phone.NUMBER, "032-222-2222");
 
-        verifier.buildExpected(Phone.CONTENT_ITEM_TYPE)
+        elem.addExpected(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.TYPE, Phone.TYPE_CUSTOM)
                 .put(Phone.LABEL, "VOICE")
                 .put(Phone.NUMBER, "033-333-3333");
 
-        verifier.buildExpected(StructuredPostal.CONTENT_ITEM_TYPE)
+        elem.addExpected(StructuredPostal.CONTENT_ITEM_TYPE)
                 .put(StructuredPostal.TYPE, StructuredPostal.TYPE_WORK)
                 .put(StructuredPostal.COUNTRY, "United States of America")
                 .put(StructuredPostal.POSTCODE, "30314")
@@ -687,7 +673,7 @@
                 .put(StructuredPostal.FORMATTED_ADDRESS,
                         "100 Waters Edge Baytown LA 30314 United States of America");
 
-        verifier.buildExpected(StructuredPostal.CONTENT_ITEM_TYPE)
+        elem.addExpected(StructuredPostal.CONTENT_ITEM_TYPE)
                 .put(StructuredPostal.TYPE, StructuredPostal.TYPE_HOME)
                 .put(StructuredPostal.COUNTRY, "United States of America")
                 .put(StructuredPostal.POSTCODE, "30314")
@@ -697,46 +683,41 @@
                 .put(StructuredPostal.FORMATTED_ADDRESS,
                         "42 Plantation St. Baytown LA 30314 United States of America");
 
-        verifier.buildExpected(Email.CONTENT_ITEM_TYPE)
+        elem.addExpected(Email.CONTENT_ITEM_TYPE)
                 // "TYPE=INTERNET" -> TYPE_CUSTOM + the label "INTERNET"
                 .put(Email.TYPE, Email.TYPE_CUSTOM)
                 .put(Email.LABEL, "INTERNET")
                 .put(Email.DATA, "forrestgump@walladalla.com")
                 .put(Email.IS_PRIMARY, 1);
 
-        verifier.buildExpected(Email.CONTENT_ITEM_TYPE)
+        elem.addExpected(Email.CONTENT_ITEM_TYPE)
                 .put(Email.TYPE, Email.TYPE_MOBILE)
                 .put(Email.DATA, "cell@example.com");
 
-        verifier.buildExpected(Note.CONTENT_ITEM_TYPE)
+        elem.addExpected(Note.CONTENT_ITEM_TYPE)
                 .put(Note.NOTE, "The following note is the example from RFC 2045.");
 
-        verifier.buildExpected(Note.CONTENT_ITEM_TYPE)
+        elem.addExpected(Note.CONTENT_ITEM_TYPE)
                 .put(Note.NOTE,
                         "Now's the time for all folk to come to the aid of their country.");
 
-        verifier.buildExpected(Photo.CONTENT_ITEM_TYPE)
+        elem.addExpected(Photo.CONTENT_ITEM_TYPE)
                 // No information about its image format can be inserted.
                 .put(Photo.PHOTO, sPhotoByteArrayForComplicatedCase);
 
-        verifier.buildExpected(Event.CONTENT_ITEM_TYPE)
+        elem.addExpected(Event.CONTENT_ITEM_TYPE)
                 .put(Event.START_DATE, "19800101")
                 .put(Event.TYPE, Event.TYPE_BIRTHDAY);
 
-        verifier.buildExpected(Website.CONTENT_ITEM_TYPE)
+        elem.addExpected(Website.CONTENT_ITEM_TYPE)
                 .put(Website.URL, "http://www.example.com/")
                 .put(Website.TYPE, Website.TYPE_HOMEPAGE);
         verifier.verify(R.raw.v21_complicated, VCardConfig.VCARD_TYPE_V21_GENERIC_UTF8);
     }
 
     public void testV30Simple_Parsing() throws IOException, VCardException {
-        VCardParser_V21 parser = new VCardParser_V30();
-        VNodeBuilder builder = new VNodeBuilder();
-        InputStream is = getContext().getResources().openRawResource(R.raw.v30_simple);
-        assertEquals(true, parser.parse(is,"ISO-8859-1", builder));
-        is.close();
-        assertEquals(1, builder.vNodeList.size());
-        PropertyNodesVerifier verifier = new PropertyNodesVerifier(this)
+        PropertyNodesVerifier verifier = new PropertyNodesVerifier(this);
+        verifier.addPropertyNodesVerifierElem()
                 .addNodeWithOrder("VERSION", "3.0")
                 .addNodeWithOrder("FN", "And Roid")
                 .addNodeWithOrder("N", "And;Roid;;;", Arrays.asList("And", "Roid", "", "", ""))
@@ -749,24 +730,22 @@
                 .addNodeWithOrder("X-GN", "group0")
                 .addNodeWithOrder("X-REDUCTION", "0")
                 .addNodeWithOrder("REV", "20081031T065854Z");
-        verifier.verify(builder.vNodeList.get(0));
+        verifier.verify(R.raw.v30_simple, V30);
     }
 
     public void testV30Simple() throws IOException, VCardException {
-        ContentValuesVerifier verifier = new ContentValuesVerifier();
-
-        verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
+        ImportVerifier verifier = new ImportVerifier();
+        ImportVerifierElem elem = verifier.addImportVerifierElem();
+        elem.addExpected(StructuredName.CONTENT_ITEM_TYPE)
                 .put(StructuredName.FAMILY_NAME, "And")
                 .put(StructuredName.GIVEN_NAME, "Roid")
                 .put(StructuredName.DISPLAY_NAME, "And Roid")
                 .put(StructuredName.PHONETIC_GIVEN_NAME, "android");
-
-        verifier.buildExpected(Organization.CONTENT_ITEM_TYPE)
+        elem.addExpected(Organization.CONTENT_ITEM_TYPE)
                 .put(Organization.COMPANY, "Open")
                 .put(Organization.DEPARTMENT, "Handset  Alliance")
                 .put(Organization.TYPE, Organization.TYPE_WORK);
-
-        verifier.buildExpected(Phone.CONTENT_ITEM_TYPE)
+        elem.addExpected(Phone.CONTENT_ITEM_TYPE)
                 .put(Phone.TYPE, Phone.TYPE_CUSTOM)
                 .put(Phone.LABEL, "VOICE")
                 .put(Phone.NUMBER, "030-000-0000")
@@ -775,35 +754,29 @@
     }
 
     public void testV21Japanese1_Parsing() throws IOException, VCardException {
-        VCardParser_V21 parser = new VCardParser_V21();
-        VNodeBuilder builder = new VNodeBuilder();
-        InputStream is = getContext().getResources().openRawResource(R.raw.v21_japanese_1);
-        assertEquals(true, parser.parse(is,"ISO-8859-1", builder));
-        is.close();
-        assertEquals(1, builder.vNodeList.size());
-        ContentValues contentValuesForShiftJis = new ContentValues();
-        contentValuesForShiftJis.put("CHARSET", "SHIFT_JIS");
         // Though Japanese careers append ";;;;" at the end of the value of "SOUND",
         // vCard 2.1/3.0 specification does not allow multiple values.
         // Do not need to handle it as multiple values.
-        PropertyNodesVerifier verifier = new PropertyNodesVerifier(this)
+        PropertyNodesVerifier verifier = new PropertyNodesVerifier(this);
+        verifier.addPropertyNodesVerifierElem()
                 .addNodeWithOrder("VERSION", "2.1", null, null, null, null, null)
                 .addNodeWithOrder("N", "\u5B89\u85E4\u30ED\u30A4\u30C9;;;;",
                         Arrays.asList("\u5B89\u85E4\u30ED\u30A4\u30C9", "", "", "", ""),
-                        null, contentValuesForShiftJis, null, null)
+                        null, mContentValuesForSJis, null, null)
                 .addNodeWithOrder("SOUND",
                         "\uFF71\uFF9D\uFF84\uFF9E\uFF73\uFF9B\uFF72\uFF84\uFF9E;;;;",
-                        null, null, contentValuesForShiftJis,
+                        null, null, mContentValuesForSJis,
                         new TypeSet("X-IRMC-N"), null)
                 .addNodeWithOrder("TEL", "0300000000", null, null, null,
                         new TypeSet("VOICE", "PREF"), null);
-        verifier.verify(builder.vNodeList.get(0));
+        verifier.verify(R.raw.v21_japanese_1, VCardConfig.VCARD_TYPE_V21_JAPANESE_SJIS);
     }
 
     private void testV21Japanese1Common(int resId, int vcardType, boolean japanese)
             throws IOException, VCardException {
-        ContentValuesVerifier verifier = new ContentValuesVerifier();
-        verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
+        ImportVerifier verifier = new ImportVerifier();
+        ImportVerifierElem elem = verifier.addImportVerifierElem();
+        elem.addExpected(StructuredName.CONTENT_ITEM_TYPE)
                 .put(StructuredName.FAMILY_NAME, "\u5B89\u85E4\u30ED\u30A4\u30C9")
                 .put(StructuredName.DISPLAY_NAME, "\u5B89\u85E4\u30ED\u30A4\u30C9")
                 // While vCard parser does not split "SOUND" property values,
@@ -811,7 +784,7 @@
                 .put(StructuredName.PHONETIC_FAMILY_NAME,
                         "\uFF71\uFF9D\uFF84\uFF9E\uFF73\uFF9B\uFF72\uFF84\uFF9E");
 
-        verifier.buildExpected(Phone.CONTENT_ITEM_TYPE)
+        elem.addExpected(Phone.CONTENT_ITEM_TYPE)
                 // Phone number formatting is different.
                 .put(Phone.NUMBER, (japanese ? "03-0000-0000" : "030-000-0000"))
                 .put(Phone.TYPE, Phone.TYPE_CUSTOM)
@@ -849,28 +822,18 @@
     }
 
     public void testV21Japanese2_Parsing() throws IOException, VCardException {
-        VCardParser_V21 parser = new VCardParser_V21();
-        VNodeBuilder builder = new VNodeBuilder();
-        InputStream is = getContext().getResources().openRawResource(R.raw.v21_japanese_2);
-        assertEquals(true, parser.parse(is,"ISO-8859-1", builder));
-        is.close();
-        assertEquals(1, builder.vNodeList.size());
-        ContentValues contentValuesForShiftJis = new ContentValues();
-        contentValuesForShiftJis.put("CHARSET", "SHIFT_JIS");
-        ContentValues contentValuesForQPAndSJ = new ContentValues();
-        contentValuesForQPAndSJ.put("ENCODING", "QUOTED-PRINTABLE");
-        contentValuesForQPAndSJ.put("CHARSET", "SHIFT_JIS");
-        PropertyNodesVerifier verifier = new PropertyNodesVerifier(this)
+        PropertyNodesVerifier verifier = new PropertyNodesVerifier(this);
+        verifier.addPropertyNodesVerifierElem()
                 .addNodeWithOrder("VERSION", "2.1")
                 .addNodeWithOrder("N", "\u5B89\u85E4;\u30ED\u30A4\u30C9\u0031;;;",
                         Arrays.asList("\u5B89\u85E4", "\u30ED\u30A4\u30C9\u0031",
                                 "", "", ""),
-                        null, contentValuesForShiftJis, null, null)
+                        null, mContentValuesForSJis, null, null)
                 .addNodeWithOrder("FN", "\u5B89\u85E4\u0020\u30ED\u30A4\u30C9\u0020\u0031",
-                        null, null, contentValuesForShiftJis, null, null)
+                        null, null, mContentValuesForSJis, null, null)
                 .addNodeWithOrder("SOUND",
                         "\uFF71\uFF9D\uFF84\uFF9E\uFF73;\uFF9B\uFF72\uFF84\uFF9E\u0031;;;",
-                        null, null, contentValuesForShiftJis,
+                        null, null, mContentValuesForSJis,
                         new TypeSet("X-IRMC-N"), null)
                 .addNodeWithOrder("ADR",
                         ";\u6771\u4EAC\u90FD\u6E0B\u8C37\u533A\u685C" +
@@ -882,15 +845,16 @@
                                 "\u4E18\u753A\u0032\u0036\u002D\u0031\u30BB" +
                                 "\u30EB\u30EA\u30A2\u30F3\u30BF\u30EF\u30FC" +
                                 "\u0036\u968E", "", "", "", "150-8512", ""),
-                        null, contentValuesForQPAndSJ, new TypeSet("HOME"), null)
+                        null, mContentValuesForQPAndSJis, new TypeSet("HOME"), null)
                 .addNodeWithOrder("NOTE", "\u30E1\u30E2", null, null,
-                        contentValuesForQPAndSJ, null, null);
-        verifier.verify(builder.vNodeList.get(0));
+                        mContentValuesForQPAndSJis, null, null);
+        verifier.verify(R.raw.v21_japanese_2, VCardConfig.VCARD_TYPE_V21_JAPANESE_SJIS);
     }
 
     public void testV21Japanese2_Type_Generic_Utf8() throws IOException, VCardException {
-        ContentValuesVerifier verifier = new ContentValuesVerifier();
-        verifier.buildExpected(StructuredName.CONTENT_ITEM_TYPE)
+        ImportVerifier verifier = new ImportVerifier();
+        ImportVerifierElem elem = verifier.addImportVerifierElem();
+        elem.addExpected(StructuredName.CONTENT_ITEM_TYPE)
                 .put(StructuredName.FAMILY_NAME, "\u5B89\u85E4")
                 .put(StructuredName.GIVEN_NAME, "\u30ED\u30A4\u30C9\u0031")
                 .put(StructuredName.DISPLAY_NAME,
@@ -900,7 +864,7 @@
                 .put(StructuredName.PHONETIC_FAMILY_NAME, "\uFF71\uFF9D\uFF84\uFF9E\uFF73")
                 .put(StructuredName.PHONETIC_GIVEN_NAME, "\uFF9B\uFF72\uFF84\uFF9E\u0031");
 
-        verifier.buildExpected(StructuredPostal.CONTENT_ITEM_TYPE)
+        elem.addExpected(StructuredPostal.CONTENT_ITEM_TYPE)
                 .put(StructuredPostal.POSTCODE, "150-8512")
                 .put(StructuredPostal.NEIGHBORHOOD,
                         "\u6771\u4EAC\u90FD\u6E0B\u8C37\u533A\u685C" +
@@ -913,62 +877,149 @@
                         "\u30EB\u30EA\u30A2\u30F3\u30BF\u30EF\u30FC" +
                         "\u0036\u968E 150-8512")
                 .put(StructuredPostal.TYPE, StructuredPostal.TYPE_HOME);
-        verifier.buildExpected(Note.CONTENT_ITEM_TYPE)
+        elem.addExpected(Note.CONTENT_ITEM_TYPE)
                 .put(Note.NOTE, "\u30E1\u30E2");
         verifier.verify(R.raw.v21_japanese_2, VCardConfig.VCARD_TYPE_V21_GENERIC_UTF8);
     }
 
-    public void testV21MultipleEntryCase() throws IOException, VCardException {
-        VCardParser_V21 parser = new VCardParser_V21();
-        VNodeBuilder builder = new VNodeBuilder();
-        InputStream is = getContext().getResources().openRawResource(R.raw.v21_multiple_entry);
-        assertEquals(true, parser.parse(is,"ISO-8859-1", builder));
-        is.close();
-        assertEquals(3, builder.vNodeList.size());
-        ContentValues contentValuesForShiftJis = new ContentValues();
-        contentValuesForShiftJis.put("CHARSET", "SHIFT_JIS");
-        PropertyNodesVerifier verifier = new PropertyNodesVerifier(this)
+    public void testV21MultipleEntryCase_Parse() throws IOException, VCardException {
+        PropertyNodesVerifier verifier = new PropertyNodesVerifier(this);
+        verifier.addPropertyNodesVerifierElem()
                 .addNodeWithOrder("VERSION", "2.1")
                 .addNodeWithOrder("N", "\u5B89\u85E4\u30ED\u30A4\u30C9\u0033;;;;",
                         Arrays.asList("\u5B89\u85E4\u30ED\u30A4\u30C9\u0033", "", "", "", ""),
-                        null, contentValuesForShiftJis, null, null)
+                        null, mContentValuesForSJis, null, null)
                 .addNodeWithOrder("SOUND",
                         "\uFF71\uFF9D\uFF84\uFF9E\uFF73\uFF9B\uFF72\uFF84\uFF9E\u0033;;;;",
-                        null, null, contentValuesForShiftJis,
+                        null, null, mContentValuesForSJis,
                         new TypeSet("X-IRMC-N"), null)
                 .addNodeWithOrder("TEL", "9", new TypeSet("X-NEC-SECRET"))
                 .addNodeWithOrder("TEL", "10", new TypeSet("X-NEC-HOTEL"))
                 .addNodeWithOrder("TEL", "11", new TypeSet("X-NEC-SCHOOL"))
                 .addNodeWithOrder("TEL", "12", new TypeSet("FAX", "HOME"));
-        verifier.verify(builder.vNodeList.get(0));
-        
-        verifier = new PropertyNodesVerifier(this)
+
+        verifier.addPropertyNodesVerifierElem()
                 .addNodeWithOrder("VERSION", "2.1")
                 .addNodeWithOrder("N", "\u5B89\u85E4\u30ED\u30A4\u30C9\u0034;;;;",
                         Arrays.asList("\u5B89\u85E4\u30ED\u30A4\u30C9\u0034", "", "", "", ""),
-                        null, contentValuesForShiftJis, null, null)
+                        null, mContentValuesForSJis, null, null)
                 .addNodeWithOrder("SOUND",
                         "\uFF71\uFF9D\uFF84\uFF9E\uFF73\uFF9B\uFF72\uFF84\uFF9E\u0034;;;;",
-                        null, null, contentValuesForShiftJis,
+                        null, null, mContentValuesForSJis,
                         new TypeSet("X-IRMC-N"), null)
                 .addNodeWithOrder("TEL", "13", new TypeSet("MODEM"))
                 .addNodeWithOrder("TEL", "14", new TypeSet("PAGER"))
                 .addNodeWithOrder("TEL", "15", new TypeSet("X-NEC-FAMILY"))
                 .addNodeWithOrder("TEL", "16", new TypeSet("X-NEC-GIRL"));
-        verifier.verify(builder.vNodeList.get(1));
-        verifier = new PropertyNodesVerifier(this)
+
+        verifier.addPropertyNodesVerifierElem()
                 .addNodeWithOrder("VERSION", "2.1")
                 .addNodeWithOrder("N", "\u5B89\u85E4\u30ED\u30A4\u30C9\u0035;;;;",
                         Arrays.asList("\u5B89\u85E4\u30ED\u30A4\u30C9\u0035", "", "", "", ""),
-                        null, contentValuesForShiftJis, null, null)
+                        null, mContentValuesForSJis, null, null)
                 .addNodeWithOrder("SOUND",
                         "\uFF71\uFF9D\uFF84\uFF9E\uFF73\uFF9B\uFF72\uFF84\uFF9E\u0035;;;;",
-                        null, null, contentValuesForShiftJis,
+                        null, null, mContentValuesForSJis,
                         new TypeSet("X-IRMC-N"), null)
                 .addNodeWithOrder("TEL", "17", new TypeSet("X-NEC-BOY"))
                 .addNodeWithOrder("TEL", "18", new TypeSet("X-NEC-FRIEND"))
                 .addNodeWithOrder("TEL", "19", new TypeSet("X-NEC-PHS"))
                 .addNodeWithOrder("TEL", "20", new TypeSet("X-NEC-RESTAURANT"));
-        verifier.verify(builder.vNodeList.get(2));
+        verifier.verify(R.raw.v21_multiple_entry, VCardConfig.VCARD_TYPE_V21_JAPANESE_SJIS);
+    }
+
+    public void testV21MultipleEntryCase() throws IOException, VCardException {
+        ImportVerifier verifier = new ImportVerifier();
+        ImportVerifierElem elem = verifier.addImportVerifierElem();
+        elem.addExpected(StructuredName.CONTENT_ITEM_TYPE)
+                .put(StructuredName.FAMILY_NAME, "\u5B89\u85E4\u30ED\u30A4\u30C9\u0033")
+                .put(StructuredName.DISPLAY_NAME, "\u5B89\u85E4\u30ED\u30A4\u30C9\u0033")
+                .put(StructuredName.PHONETIC_FAMILY_NAME,
+                        "\uFF71\uFF9D\uFF84\uFF9E\uFF73\uFF9B\uFF72\uFF84\uFF9E\u0033");
+        elem.addExpected(Phone.CONTENT_ITEM_TYPE)
+                .put(Phone.TYPE, Phone.TYPE_CUSTOM)
+                .put(Phone.LABEL, "NEC-SECRET")
+                .put(Phone.NUMBER, "9");
+        elem.addExpected(Phone.CONTENT_ITEM_TYPE)
+                .put(Phone.TYPE, Phone.TYPE_CUSTOM)
+                .put(Phone.LABEL, "NEC-HOTEL")
+                .put(Phone.NUMBER, "10");
+        elem.addExpected(Phone.CONTENT_ITEM_TYPE)
+                .put(Phone.TYPE, Phone.TYPE_CUSTOM)
+                .put(Phone.LABEL, "NEC-SCHOOL")
+                .put(Phone.NUMBER, "11");
+        elem.addExpected(Phone.CONTENT_ITEM_TYPE)
+                .put(Phone.TYPE, Phone.TYPE_FAX_HOME)
+                .put(Phone.NUMBER, "12");
+
+        elem = verifier.addImportVerifierElem();
+        elem.addExpected(StructuredName.CONTENT_ITEM_TYPE)
+                .put(StructuredName.FAMILY_NAME, "\u5B89\u85E4\u30ED\u30A4\u30C9\u0034")
+                .put(StructuredName.DISPLAY_NAME, "\u5B89\u85E4\u30ED\u30A4\u30C9\u0034")
+                .put(StructuredName.PHONETIC_FAMILY_NAME,
+                        "\uFF71\uFF9D\uFF84\uFF9E\uFF73\uFF9B\uFF72\uFF84\uFF9E\u0034");
+        elem.addExpected(Phone.CONTENT_ITEM_TYPE)
+                .put(Phone.TYPE, Phone.TYPE_CUSTOM)
+                .put(Phone.LABEL, "MODEM")
+                .put(Phone.NUMBER, "13");
+        elem.addExpected(Phone.CONTENT_ITEM_TYPE)
+                .put(Phone.TYPE, Phone.TYPE_PAGER)
+                .put(Phone.NUMBER, "14");
+        elem.addExpected(Phone.CONTENT_ITEM_TYPE)
+                .put(Phone.TYPE, Phone.TYPE_CUSTOM)
+                .put(Phone.LABEL, "NEC-FAMILY")
+                .put(Phone.NUMBER, "15");
+        elem.addExpected(Phone.CONTENT_ITEM_TYPE)
+                .put(Phone.TYPE, Phone.TYPE_CUSTOM)
+                .put(Phone.LABEL, "NEC-GIRL")
+                .put(Phone.NUMBER, "16");
+
+        elem = verifier.addImportVerifierElem();
+        elem.addExpected(StructuredName.CONTENT_ITEM_TYPE)
+                .put(StructuredName.FAMILY_NAME, "\u5B89\u85E4\u30ED\u30A4\u30C9\u0035")
+                .put(StructuredName.DISPLAY_NAME, "\u5B89\u85E4\u30ED\u30A4\u30C9\u0035")
+                .put(StructuredName.PHONETIC_FAMILY_NAME,
+                        "\uFF71\uFF9D\uFF84\uFF9E\uFF73\uFF9B\uFF72\uFF84\uFF9E\u0035");
+        elem.addExpected(Phone.CONTENT_ITEM_TYPE)
+                .put(Phone.TYPE, Phone.TYPE_CUSTOM)
+                .put(Phone.LABEL, "NEC-BOY")
+                .put(Phone.NUMBER, "17");
+        elem.addExpected(Phone.CONTENT_ITEM_TYPE)
+                .put(Phone.TYPE, Phone.TYPE_CUSTOM)
+                .put(Phone.LABEL, "NEC-FRIEND")
+                .put(Phone.NUMBER, "18");
+        elem.addExpected(Phone.CONTENT_ITEM_TYPE)
+                .put(Phone.TYPE, Phone.TYPE_CUSTOM)
+                .put(Phone.LABEL, "NEC-PHS")
+                .put(Phone.NUMBER, "19");
+        elem.addExpected(Phone.CONTENT_ITEM_TYPE)
+                .put(Phone.TYPE, Phone.TYPE_CUSTOM)
+                .put(Phone.LABEL, "NEC-RESTAURANT")
+                .put(Phone.NUMBER, "20");
+        verifier.verify(R.raw.v21_multiple_entry, VCardConfig.VCARD_TYPE_V21_JAPANESE_SJIS);
+    }
+
+    public void testPagerV30_Parse() throws IOException, VCardException {
+        PropertyNodesVerifier verifier = new PropertyNodesVerifier(this);
+        verifier.addPropertyNodesVerifierElem()
+                .addNodeWithOrder("VERSION", "3.0")
+                .addNodeWithOrder("N", Arrays.asList("F", "G", "M", "", ""))
+                .addNodeWithOrder("TEL", "6101231234@pagersample.com",
+                        new TypeSet("WORK", "MSG", "PAGER"));
+        verifier.verify(R.raw.v30_comma_separated, VCardConfig.VCARD_TYPE_V30_GENERIC_UTF8);
+    }
+
+    public void testPagerV30() throws IOException, VCardException {
+        ImportVerifier verifier = new ImportVerifier();
+        ImportVerifierElem elem = verifier.addImportVerifierElem();
+        elem.addExpected(StructuredName.CONTENT_ITEM_TYPE)
+                .put(StructuredName.FAMILY_NAME, "F")
+                .put(StructuredName.MIDDLE_NAME, "M")
+                .put(StructuredName.GIVEN_NAME, "G")
+                .put(StructuredName.DISPLAY_NAME, "G M F");
+        elem.addExpected(Phone.CONTENT_ITEM_TYPE)
+                .put(Phone.TYPE, Phone.TYPE_PAGER)
+                .put(Phone.NUMBER, "6101231234@pagersample.com");
+        verifier.verify(R.raw.v30_comma_separated, VCardConfig.VCARD_TYPE_V30_GENERIC_UTF8);
     }
 }
diff --git a/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardJapanizationTests.java b/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardJapanizationTests.java
new file mode 100644
index 0000000..4b65008
--- /dev/null
+++ b/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardJapanizationTests.java
@@ -0,0 +1,109 @@
+/*
+ * 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.
+ */
+
+package com.android.unit_tests.vcard;
+
+import android.content.ContentValues;
+import android.pim.vcard.VCardConfig;
+import android.provider.ContactsContract.CommonDataKinds.StructuredName;
+
+import com.android.unit_tests.vcard.PropertyNodesVerifierElem.TypeSet;
+
+import java.util.Arrays;
+
+public class VCardJapanizationTests extends VCardTestsBase {
+    private void testNameUtf8Common(int vcardType) {
+        ExportTestResolver resolver = new ExportTestResolver();
+        resolver.buildContactEntry().buildData(StructuredName.CONTENT_ITEM_TYPE)
+                .put(StructuredName.FAMILY_NAME, "\u3075\u308B\u3069")
+                .put(StructuredName.GIVEN_NAME, "\u3091\u308A\u304B")
+                .put(StructuredName.MIDDLE_NAME, "B")
+                .put(StructuredName.PREFIX, "Dr.")
+                .put(StructuredName.SUFFIX, "Ph.D");
+
+        VCardVerifier verifier = new VCardVerifier(resolver, vcardType);
+        ContentValues contentValues =
+            (VCardConfig.isV30(vcardType) ? null : mContentValuesForQPAndUtf8);
+        verifier.addPropertyNodesVerifierElem()
+                .addNodeWithoutOrder("FN", "Dr. \u3075\u308B\u3069 B \u3091\u308A\u304B Ph.D",
+                        contentValues)
+                .addNodeWithoutOrder("N", "\u3075\u308B\u3069;\u3091\u308A\u304B;B;Dr.;Ph.D",
+                        Arrays.asList(
+                                "\u3075\u308B\u3069", "\u3091\u308A\u304B", "B", "Dr.", "Ph.D"),
+                                null, contentValues, null, null);
+        verifier.verify();
+    }
+
+    public void testNameUtf8V21() {
+        testNameUtf8Common(VCardConfig.VCARD_TYPE_V21_JAPANESE_UTF8);
+    }
+
+    public void testNameUtf8V30() {
+        testNameUtf8Common(VCardConfig.VCARD_TYPE_V30_JAPANESE_UTF8);
+    }
+
+    public void testNameShiftJis() {
+        ExportTestResolver resolver = new ExportTestResolver();
+        resolver.buildContactEntry().buildData(StructuredName.CONTENT_ITEM_TYPE)
+                .put(StructuredName.FAMILY_NAME, "\u3075\u308B\u3069")
+                .put(StructuredName.GIVEN_NAME, "\u3091\u308A\u304B")
+                .put(StructuredName.MIDDLE_NAME, "B")
+                .put(StructuredName.PREFIX, "Dr.")
+                .put(StructuredName.SUFFIX, "Ph.D");
+
+        VCardVerifier verifier = new VCardVerifier(resolver,
+                VCardConfig.VCARD_TYPE_V30_JAPANESE_SJIS);
+        verifier.addPropertyNodesVerifierElem()
+                .addNodeWithoutOrder("FN", "Dr. \u3075\u308B\u3069 B \u3091\u308A\u304B Ph.D",
+                        mContentValuesForSJis)
+                .addNodeWithoutOrder("N", "\u3075\u308B\u3069;\u3091\u308A\u304B;B;Dr.;Ph.D",
+                        Arrays.asList(
+                                "\u3075\u308B\u3069", "\u3091\u308A\u304B", "B", "Dr.", "Ph.D"),
+                                null, mContentValuesForSJis, null, null);
+        verifier.verify();
+    }
+
+    /**
+     * DoCoMo phones require all name elements should be in "family name" field.
+     */
+    public void testNameDoCoMo() {
+        ExportTestResolver resolver = new ExportTestResolver();
+        resolver.buildContactEntry().buildData(StructuredName.CONTENT_ITEM_TYPE)
+                .put(StructuredName.FAMILY_NAME, "\u3075\u308B\u3069")
+                .put(StructuredName.GIVEN_NAME, "\u3091\u308A\u304B")
+                .put(StructuredName.MIDDLE_NAME, "B")
+                .put(StructuredName.PREFIX, "Dr.")
+                .put(StructuredName.SUFFIX, "Ph.D");
+
+        VCardVerifier verifier = new VCardVerifier(resolver,
+                VCardConfig.VCARD_TYPE_DOCOMO);
+        final String fullName = "Dr. \u3075\u308B\u3069 B \u3091\u308A\u304B Ph.D";
+        verifier.addPropertyNodesVerifierElem()
+                .addNodeWithoutOrder("N", fullName + ";;;;",
+                        Arrays.asList(fullName, "", "", "", ""),
+                        null, mContentValuesForSJis, null, null)
+                .addNodeWithoutOrder("FN", fullName, mContentValuesForSJis)
+                .addNodeWithoutOrder("SOUND", ";;;;", new TypeSet("X-IRMC-N"))
+                .addNodeWithoutOrder("TEL", "", new TypeSet("HOME"))
+                .addNodeWithoutOrder("EMAIL", "", new TypeSet("HOME"))
+                .addNodeWithoutOrder("ADR", "", new TypeSet("HOME"))
+                .addNodeWithoutOrder("X-CLASS", "PUBLIC")
+                .addNodeWithoutOrder("X-REDUCTION", "")
+                .addNodeWithoutOrder("X-NO", "")
+                .addNodeWithoutOrder("X-DCM-HMN-MODE", "");
+        verifier.verify();
+    }
+}
\ No newline at end of file
diff --git a/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardTestsBase.java b/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardTestsBase.java
index 08d1722..bd4d13a 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardTestsBase.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardTestsBase.java
@@ -33,7 +33,11 @@
 import android.os.IBinder;
 import android.os.ParcelFileDescriptor;
 import android.os.RemoteException;
+import android.pim.vcard.ContactStruct;
 import android.pim.vcard.EntryCommitter;
+import android.pim.vcard.EntryHandler;
+import android.pim.vcard.VCardBuilder;
+import android.pim.vcard.VCardBuilderCollection;
 import android.pim.vcard.VCardComposer;
 import android.pim.vcard.VCardConfig;
 import android.pim.vcard.VCardDataBuilder;
@@ -177,24 +181,53 @@
  * Please do not add each unit test here.
  */
 /* package */ class VCardTestsBase extends AndroidTestCase {
-    public static final int V21 = 0;
-    public static final int V30 = 1;
+    public static final int V21 = VCardConfig.VCARD_TYPE_V21_GENERIC_UTF8;
+    public static final int V30 = VCardConfig.VCARD_TYPE_V30_GENERIC_UTF8;
 
-    public class ImportVerificationResolver extends MockContentResolver {
-        ImportVerificationProvider mVerificationProvider = new ImportVerificationProvider();
+    // Do not modify these during tests.
+    protected final ContentValues mContentValuesForQP;
+    protected final ContentValues mContentValuesForSJis;
+    protected final ContentValues mContentValuesForUtf8;
+    protected final ContentValues mContentValuesForQPAndSJis;
+    protected final ContentValues mContentValuesForQPAndUtf8;
+    protected final ContentValues mContentValuesForBase64V21;
+    protected final ContentValues mContentValuesForBase64V30;
+
+    public VCardTestsBase() {
+        super();
+        mContentValuesForQP = new ContentValues();
+        mContentValuesForQP.put("ENCODING", "QUOTED-PRINTABLE");
+        mContentValuesForSJis = new ContentValues();
+        mContentValuesForSJis.put("CHARSET", "SHIFT_JIS");
+        mContentValuesForUtf8 = new ContentValues();
+        mContentValuesForUtf8.put("CHARSET", "UTF-8");
+        mContentValuesForQPAndSJis = new ContentValues();
+        mContentValuesForQPAndSJis.put("ENCODING", "QUOTED-PRINTABLE");
+        mContentValuesForQPAndSJis.put("CHARSET", "SHIFT_JIS");
+        mContentValuesForQPAndUtf8 = new ContentValues();
+        mContentValuesForQPAndUtf8.put("ENCODING", "QUOTED-PRINTABLE");
+        mContentValuesForQPAndUtf8.put("CHARSET", "UTF-8");
+        mContentValuesForBase64V21 = new ContentValues();
+        mContentValuesForBase64V21.put("ENCODING", "BASE64");
+        mContentValuesForBase64V30 = new ContentValues();
+        mContentValuesForBase64V30.put("ENCODING", "b");
+    }
+
+    public class ImportTestResolver extends MockContentResolver {
+        ImportTestProvider mProvider = new ImportTestProvider();
         @Override
         public ContentProviderResult[] applyBatch(String authority,
                 ArrayList<ContentProviderOperation> operations) {
             equalsString(authority, RawContacts.CONTENT_URI.toString());
-            return mVerificationProvider.applyBatch(operations);
+            return mProvider.applyBatch(operations);
         }
 
         public void addExpectedContentValues(ContentValues expectedContentValues) {
-            mVerificationProvider.addExpectedContentValues(expectedContentValues);
+            mProvider.addExpectedContentValues(expectedContentValues);
         }
 
         public void verify() {
-            mVerificationProvider.verify();
+            mProvider.verify();
         }
     }
 
@@ -208,10 +241,10 @@
                 Relation.CONTENT_ITEM_TYPE, Event.CONTENT_ITEM_TYPE,
                 GroupMembership.CONTENT_ITEM_TYPE));
 
-    public class ImportVerificationProvider extends MockContentProvider {
+    public class ImportTestProvider extends MockContentProvider {
         final Map<String, Collection<ContentValues>> mMimeTypeToExpectedContentValues;
 
-        public ImportVerificationProvider() {
+        public ImportTestProvider() {
             mMimeTypeToExpectedContentValues =
                 new HashMap<String, Collection<ContentValues>>();
             for (String acceptanbleMimeType : sKnownMimeTypeSet) {
@@ -303,11 +336,11 @@
                     }
                     boolean checked = false;
                     for (ContentValues expectedContentValues : contentValuesCollection) {
-                        /* for testing
+                        /*for testing
                         Log.d("@@@", "expected: "
                                 + convertToEasilyReadableString(expectedContentValues));
                         Log.d("@@@", "actual  : "
-                                + convertToEasilyReadableString(actualContentValues)); */
+                                + convertToEasilyReadableString(actualContentValues));*/
                         if (equalsForContentValues(expectedContentValues,
                                 actualContentValues)) {
                             assertTrue(contentValuesCollection.remove(expectedContentValues));
@@ -346,15 +379,16 @@
         }
     }
 
-    public class ContentValuesVerifier {
-        private final ImportVerificationResolver mResolver;
-        // private final String mCharset;
+    class ImportVerifierElem {
+        private final ImportTestResolver mResolver;
+        private final EntryHandler mHandler;
 
-        public ContentValuesVerifier() {
-            mResolver = new ImportVerificationResolver();
+        public ImportVerifierElem() {
+            mResolver = new ImportTestResolver();
+            mHandler = new EntryCommitter(mResolver);
         }
 
-        public ContentValuesBuilder buildExpected(String mimeType) {
+        public ContentValuesBuilder addExpected(String mimeType) {
             ContentValues contentValues = new ContentValues();
             contentValues.put(Data.MIMETYPE, mimeType);
             mResolver.addExpectedContentValues(contentValues);
@@ -366,8 +400,7 @@
             verify(getContext().getResources().openRawResource(resId), vCardType);
         }
 
-        public void verify(InputStream is, int vCardType)
-                throws IOException, VCardException {
+        public void verify(InputStream is, int vCardType) throws IOException, VCardException {
             final VCardParser vCardParser;
             if (VCardConfig.isV30(vCardType)) {
                 vCardParser = new VCardParser_V30(true);  // use StrictParsing
@@ -375,8 +408,8 @@
                 vCardParser = new VCardParser_V21();
             }
             VCardDataBuilder builder =
-                new VCardDataBuilder(null, null, false, vCardType, null);
-            builder.addEntryHandler(new EntryCommitter(mResolver));
+                    new VCardDataBuilder(null, null, false, vCardType, null);
+            builder.addEntryHandler(mHandler);
             try {
                 vCardParser.parse(is, builder);
             } finally {
@@ -387,8 +420,81 @@
                     }
                 }
             }
+            verifyResolver();
+        }
+
+        public void verifyResolver() {
             mResolver.verify();
         }
+
+        public void onParsingStart() {
+            mHandler.onParsingStart();
+        }
+
+        public void onEntryCreated(ContactStruct entry) {
+            mHandler.onEntryCreated(entry);
+        }
+
+        public void onParsingEnd() {
+            mHandler.onParsingEnd();
+        }
+    }
+
+    class ImportVerifier implements EntryHandler {
+        private List<ImportVerifierElem> mImportVerifierElemList =
+            new ArrayList<ImportVerifierElem>();
+        private int mIndex;
+
+        public ImportVerifierElem addImportVerifierElem() {
+            ImportVerifierElem importVerifier = new ImportVerifierElem();
+            mImportVerifierElemList.add(importVerifier);
+            return importVerifier;
+        }
+
+        public void verify(int resId, int vCardType) throws IOException, VCardException {
+            verify(getContext().getResources().openRawResource(resId), vCardType);
+        }
+
+        public void verify(InputStream is, int vCardType) throws IOException, VCardException {
+            final VCardParser vCardParser;
+            if (VCardConfig.isV30(vCardType)) {
+                vCardParser = new VCardParser_V30(true);  // use StrictParsing
+            } else {
+                vCardParser = new VCardParser_V21();
+            }
+            VCardDataBuilder builder =
+                new VCardDataBuilder(null, null, false, vCardType, null);
+            builder.addEntryHandler(this);
+            try {
+                vCardParser.parse(is, builder);
+            } finally {
+                if (is != null) {
+                    try {
+                        is.close();
+                    } catch (IOException e) {
+                    }
+                }
+            }
+        }
+
+        public void onParsingStart() {
+            for (ImportVerifierElem elem : mImportVerifierElemList) {
+                elem.onParsingStart();
+            }
+        }
+
+        public void onEntryCreated(ContactStruct entry) {
+            assertTrue(mIndex < mImportVerifierElemList.size());
+            mImportVerifierElemList.get(mIndex).onEntryCreated(entry);
+            mIndex++;
+        }
+
+        public void onParsingEnd() {
+            for (ImportVerifierElem elem : mImportVerifierElemList) {
+                elem.onParsingEnd();
+                elem.verifyResolver();
+            }
+        }
     }
 
     public class ExportTestResolver extends MockContentResolver {
@@ -398,24 +504,23 @@
             addProvider(RawContacts.CONTENT_URI.getAuthority(), mProvider);
         }
 
-        public ContentValuesBuilder buildInput(String mimeType) {
-            return mProvider.buildData(mimeType);
+        public ContactEntry buildContactEntry() {
+            return mProvider.buildInputEntry();
         }
     }
 
     public static class MockEntityIterator implements EntityIterator {
-        Collection<Entity> mEntityCollection;
+        List<Entity> mEntityList;
         Iterator<Entity> mIterator;
 
-        // TODO: Support multiple vCard entries.
-        public MockEntityIterator(Collection<ContentValues> contentValuesCollection) {
-            mEntityCollection = new ArrayList<Entity>();
+        public MockEntityIterator(List<ContentValues> contentValuesList) {
+            mEntityList = new ArrayList<Entity>();
             Entity entity = new Entity(new ContentValues());
-            for (ContentValues contentValues : contentValuesCollection) {
-                entity.addSubValue(Data.CONTENT_URI, contentValues);
+            for (ContentValues contentValues : contentValuesList) {
+                    entity.addSubValue(Data.CONTENT_URI, contentValues);
             }
-            mEntityCollection.add(entity);
-            mIterator = mEntityCollection.iterator();
+            mEntityList.add(entity);
+            mIterator = mEntityList.iterator();
         }
 
         public boolean hasNext() {
@@ -427,15 +532,20 @@
         }
 
         public void reset() {
-            mIterator = mEntityCollection.iterator();
+            mIterator = mEntityList.iterator();
         }
 
         public void close() {
         }
     }
 
-    public class ExportTestProvider extends MockContentProvider {
-        List<ContentValues> mContentValuesList = new ArrayList<ContentValues>();
+    /**
+     * Represents one contact, which should contain multiple ContentValues like
+     * StructuredName, Email, etc.
+     */
+    static class ContactEntry {
+        private final List<ContentValues> mContentValuesList = new ArrayList<ContentValues>();
+
         public ContentValuesBuilder buildData(String mimeType) {
             ContentValues contentValues = new ContentValues();
             contentValues.put(Data.MIMETYPE, mimeType);
@@ -443,28 +553,50 @@
             return new ContentValuesBuilder(contentValues);
         }
 
-        @Override
-        public EntityIterator queryEntities(Uri uri, String selection, String[] selectionArgs,
-                String sortOrder) {
-            assert(uri != null);
-            assert(ContentResolver.SCHEME_CONTENT.equals(uri.getScheme()));
-            final String authority = uri.getAuthority();
-            assert(RawContacts.CONTENT_URI.getAuthority().equals(authority));
+        public List<ContentValues> getList() {
+            return mContentValuesList;
+        }
+    }
 
-            return new MockEntityIterator(mContentValuesList);
+    class ExportTestProvider extends MockContentProvider {
+        ArrayList<ContactEntry> mContactEntryList = new ArrayList<ContactEntry>();
+
+        public ContactEntry buildInputEntry() {
+            ContactEntry contactEntry = new ContactEntry();
+            mContactEntryList.add(contactEntry);
+            return contactEntry;
         }
 
         @Override
-        public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs,
+        public EntityIterator queryEntities(Uri uri, String selection, String[] selectionArgs,
                 String sortOrder) {
-            assert(VCardComposer.CONTACTS_TEST_CONTENT_URI.equals(uri));
-            // Support multiple rows.
+            assertTrue(uri != null);
+            assertTrue(ContentResolver.SCHEME_CONTENT.equals(uri.getScheme()));
+            final String authority = uri.getAuthority();
+            assertTrue(RawContacts.CONTENT_URI.getAuthority().equals(authority));
+            assertTrue((Data.CONTACT_ID + "=?").equals(selection));
+            assertEquals(1, selectionArgs.length);
+            int id = Integer.parseInt(selectionArgs[0]);
+            assertTrue(id >= 0 && id < mContactEntryList.size());
+
+            return new MockEntityIterator(mContactEntryList.get(id).getList());
+        }
+
+        @Override
+        public Cursor query(Uri uri, String[] projection,
+                String selection, String[] selectionArgs, String sortOrder) {
+            assertTrue(VCardComposer.CONTACTS_TEST_CONTENT_URI.equals(uri));
+            // In this test, following arguments are not supported.
+            assertNull(selection);
+            assertNull(selectionArgs);
+            assertNull(sortOrder);
+
             return new MockCursor() {
                 int mCurrentPosition = -1;
 
                 @Override
                 public int getCount() {
-                    return 1;
+                    return mContactEntryList.size();
                 }
 
                 @Override
@@ -475,7 +607,7 @@
 
                 @Override
                 public boolean moveToNext() {
-                    if (mCurrentPosition == 0 || mCurrentPosition == -1) {
+                    if (mCurrentPosition < mContactEntryList.size()) {
                         mCurrentPosition++;
                         return true;
                     } else {
@@ -490,7 +622,7 @@
 
                 @Override
                 public boolean isAfterLast() {
-                    return mCurrentPosition > 0;
+                    return mCurrentPosition >= mContactEntryList.size();
                 }
 
                 @Override
@@ -502,7 +634,9 @@
                 @Override
                 public int getInt(int columnIndex) {
                     assertEquals(0, columnIndex);
-                    return 0;
+                    assertTrue(mCurrentPosition >= 0
+                            && mCurrentPosition < mContactEntryList.size());
+                    return mCurrentPosition;
                 }
 
                 @Override
@@ -517,130 +651,254 @@
         }
     }
 
-    public class VCardVerificationHandler implements VCardComposer.OneEntryHandler {
-        final private TestCase mTestCase;
-        final private List<PropertyNodesVerifier> mPropertyNodesVerifierList;
-        final private boolean mIsV30;
-        // To allow duplication, use list instead of set.
-        // TODO: support multiple vCard entries.
-        final private List<String> mExpectedLineList;
-        final private List<ContentValuesVerifier> mContentValuesVerifierList;
-        final private int mVCardType;
-        int mCount;
+    class LineVerifierElem {
+        private final List<String> mExpectedLineList = new ArrayList<String>();
+        private final boolean mIsV30;
 
-        public VCardVerificationHandler(final TestCase testCase, final int version) {
-            mTestCase = testCase;
-            mPropertyNodesVerifierList = new ArrayList<PropertyNodesVerifier>();
-            mIsV30 = (version == V30);
-            mExpectedLineList = new ArrayList<String>();
-            mContentValuesVerifierList = new ArrayList<ContentValuesVerifier>();
-            mVCardType = (version == V30 ? VCardConfig.VCARD_TYPE_V30_GENERIC_UTF8
-                    : VCardConfig.VCARD_TYPE_V21_GENERIC_UTF8);
-            mCount = 1;
+        public LineVerifierElem(boolean isV30) {
+            mIsV30 = isV30;
         }
 
-        public PropertyNodesVerifier addPropertyNodesVerifier() {
-            PropertyNodesVerifier verifier = new PropertyNodesVerifier(mTestCase);
-            mPropertyNodesVerifierList.add(verifier);
-            verifier.addNodeWithOrder("VERSION", mIsV30 ? "3.0" : "2.1");
-            return verifier;
-        }
-
-        public PropertyNodesVerifier addPropertyVerifierWithEmptyName() {
-            PropertyNodesVerifier verifier = addPropertyNodesVerifier();
-            if (mIsV30) {
-                verifier.addNodeWithOrder("N", "").addNodeWithOrder("FN", "");
+        public LineVerifierElem addExpected(final String line) {
+            if (!TextUtils.isEmpty(line)) {
+                mExpectedLineList.add(line);
             }
-            return verifier;
-        }
-
-        public ContentValuesVerifier addContentValuesVerifier() {
-            ContentValuesVerifier verifier = new ContentValuesVerifier();
-            mContentValuesVerifierList.add(verifier);
-            return verifier;
-        }
-
-        public VCardVerificationHandler addExpectedLine(String line) {
-            mExpectedLineList.add(line);
             return this;
         }
 
-        public boolean onInit(final Context context) {
-            return true;
-        }
-
-        public boolean onEntryCreated(final String vcard) {
-            if (!mExpectedLineList.isEmpty()) {
-                verifyLines(vcard);
-            }
-            verifyNodes(vcard);
-            return true;
-        }
-
-        private void verifyLines(final String vcard) {
+        public void verify(final String vcard) {
             final String[] lineArray = vcard.split("\\r?\\n");
             final int length = lineArray.length;
+            final TestCase testCase = VCardTestsBase.this;
+            boolean beginExists = false;
+            boolean endExists = false;
+            boolean versionExists = false;
+
             for (int i = 0; i < length; i++) {
                 final String line = lineArray[i];
-                // TODO: support multiple vcard entries.
-                if ("BEGIN:VCARD".equals(line) || "END:VCARD".equals(line) ||
-                        (mIsV30 ? "VERSION:3.0" : "VERSION:2.1").equals(line)) {
+                if (TextUtils.isEmpty(line)) {
                     continue;
                 }
+
+                if ("BEGIN:VCARD".equalsIgnoreCase(line)) {
+                    if (beginExists) {
+                        testCase.fail("Multiple \"BEGIN:VCARD\" line found");
+                    } else {
+                        beginExists = true;
+                        continue;
+                    }
+                } else if ("END:VCARD".equalsIgnoreCase(line)) {
+                    if (endExists) {
+                        testCase.fail("Multiple \"END:VCARD\" line found");
+                    } else {
+                        endExists = true;
+                        continue;
+                    }
+                } else if (
+                        (mIsV30 ? "VERSION:3.0" : "VERSION:2.1").equalsIgnoreCase(line)) {
+                    if (versionExists) {
+                        testCase.fail("Multiple VERSION line + found");
+                    } else {
+                        versionExists = true;
+                        continue;
+                    }
+                }
+
+                if (!beginExists) {
+                    testCase.fail(
+                            "Property other than BEGIN came before BEGIN property: " + line);
+                } else if (endExists) {
+                    testCase.fail("Property other than END came after END property: " + line);
+                }
+
                 final int index = mExpectedLineList.indexOf(line);
                 if (index >= 0) {
                     mExpectedLineList.remove(index);
                 } else {
-                    mTestCase.fail("Unexpected line: " + line);
+                    testCase.fail("Unexpected line: " + line);
                 }
             }
+
             if (!mExpectedLineList.isEmpty()) {
                 StringBuffer buffer = new StringBuffer();
                 for (String expectedLine : mExpectedLineList) {
                     buffer.append(expectedLine);
                     buffer.append("\n");
                 }
-                mTestCase.fail("Expected line(s) not found:" + buffer.toString());
+
+                testCase.fail("Expected line(s) not found:" + buffer.toString());
             }
         }
+    }
 
-        private void verifyNodes(final String vcard) {
-            if (mPropertyNodesVerifierList.size() == 0) {
-                mTestCase.fail("Too many vCard entries seems to be inserted(No."
-                        + mCount + " of the entries (No.1 is the first entry))");
+    class LineVerifier implements VCardComposer.OneEntryHandler {
+        private final ArrayList<LineVerifierElem> mLineVerifierElemList;
+        private final boolean mIsV30;
+        private int index;
+
+        public LineVerifier(final boolean isV30) {
+            mLineVerifierElemList = new ArrayList<LineVerifierElem>();
+            mIsV30 = isV30;
+        }
+
+        public LineVerifierElem addLineVerifierElem() {
+            LineVerifierElem lineVerifier = new LineVerifierElem(mIsV30);
+            mLineVerifierElemList.add(lineVerifier);
+            return lineVerifier;
+        }
+
+        public void verify(String vcard) {
+            if (index >= mLineVerifierElemList.size()) {
+                VCardTestsBase.this.fail("Insufficient number of LineVerifier (" + index + ")");
             }
-            PropertyNodesVerifier propertyNodesVerifier =
-                    mPropertyNodesVerifierList.get(0);
-            mPropertyNodesVerifierList.remove(0);
-            VCardParser parser = (mIsV30 ? new VCardParser_V30(true) : new VCardParser_V21());
-            VNodeBuilder builder = new VNodeBuilder();
-            InputStream is;
-            try {
-                is = new ByteArrayInputStream(vcard.getBytes("UTF-8"));
-                mTestCase.assertEquals(true, parser.parse(is, null, builder));
-                is.close();
-                mTestCase.assertEquals(1, builder.vNodeList.size());
-                propertyNodesVerifier.verify(builder.vNodeList.get(0));
-                if (!mContentValuesVerifierList.isEmpty()) {
-                    ContentValuesVerifier contentValuesVerifier =
-                            mContentValuesVerifierList.get(0);
-                    is = new ByteArrayInputStream(vcard.getBytes("UTF-8"));
-                    contentValuesVerifier.verify(is, mVCardType);
-                    is.close();
-                }
-            } catch (IOException e) {
-                mTestCase.fail("Unexpected IOException: " + e.getMessage());
-            } catch (VCardException e) {
-                mTestCase.fail("Unexpected VCardException: " + e.getMessage());
-            } finally {
-                mCount++;
-            }
+
+            LineVerifierElem lineVerifier = mLineVerifierElemList.get(index);
+            lineVerifier.verify(vcard);
+
+            index++;
+        }
+
+        public boolean onEntryCreated(String vcard) {
+            verify(vcard);
+            return true;
+        }
+
+        public boolean onInit(Context context) {
+            return true;
         }
 
         public void onTerminate() {
         }
     }
 
+    class VCardVerifier {
+        private class VCardVerifierInternal implements VCardComposer.OneEntryHandler {
+            public boolean onInit(Context context) {
+                return true;
+            }
+            public boolean onEntryCreated(String vcard) {
+                verifyOneVCard(vcard);
+                return true;
+            }
+            public void onTerminate() {
+            }
+        }
+
+        private final VCardVerifierInternal mVCardVerifierInternal;
+        private final ExportTestResolver mResolver;
+        private final int mVCardType;
+        private final boolean mIsV30;
+
+        // To allow duplication, use list instead of set.
+        // When null, we don't need to do the verification.
+        private PropertyNodesVerifier mPropertyNodesVerifier;
+        private LineVerifier mLineVerificationHandler;
+        private ImportVerifier mImportVerifier;
+
+        public VCardVerifier(ExportTestResolver resolver, int vcardType) {
+            mVCardVerifierInternal = new VCardVerifierInternal();
+            mResolver = resolver;
+            mIsV30 = VCardConfig.isV30(vcardType);
+            mVCardType = vcardType;
+        }
+
+        public PropertyNodesVerifierElem addPropertyNodesVerifierElem() {
+            if (mPropertyNodesVerifier == null) {
+                mPropertyNodesVerifier = new PropertyNodesVerifier(VCardTestsBase.this);
+            }
+            PropertyNodesVerifierElem elem =
+                    mPropertyNodesVerifier.addPropertyNodesVerifierElem();
+            elem.addNodeWithOrder("VERSION", (mIsV30 ? "3.0" : "2.1"));
+
+            return elem;
+        }
+
+        public PropertyNodesVerifierElem addPropertyNodesVerifierWithEmptyName() {
+            PropertyNodesVerifierElem elem = addPropertyNodesVerifierElem();
+            if (mIsV30) {
+                elem.addNodeWithOrder("N", "").addNodeWithOrder("FN", "");
+            }
+            return elem;
+        }
+
+        public LineVerifierElem addLineVerifier() {
+            if (mLineVerificationHandler == null) {
+                mLineVerificationHandler = new LineVerifier(mIsV30);
+            }
+            return mLineVerificationHandler.addLineVerifierElem();
+        }
+
+        public ImportVerifierElem addImportVerifier() {
+            if (mImportVerifier == null) {
+                mImportVerifier = new ImportVerifier();
+            }
+
+            return mImportVerifier.addImportVerifierElem();
+        }
+
+        private void verifyOneVCard(final String vcard) {
+            final VCardBuilder builder;
+            if (mImportVerifier != null) {
+                final VNodeBuilder vnodeBuilder = mPropertyNodesVerifier;
+                final VCardDataBuilder vcardDataBuilder = new VCardDataBuilder();
+                vcardDataBuilder.addEntryHandler(mImportVerifier);
+                if (mPropertyNodesVerifier != null) {
+                    builder = new VCardBuilderCollection(Arrays.asList(
+                            vcardDataBuilder, mPropertyNodesVerifier));
+                } else {
+                    builder = vnodeBuilder;
+                }
+            } else {
+                if (mPropertyNodesVerifier != null) {
+                    builder = mPropertyNodesVerifier;
+                } else {
+                    return;
+                }
+            }
+
+            final VCardParser parser =
+                    (mIsV30 ? new VCardParser_V30(true) : new VCardParser_V21());
+            final TestCase testCase = VCardTestsBase.this;
+
+            InputStream is = null;
+            try {
+                String charset =
+                    (VCardConfig.usesShiftJis(mVCardType) ? "SHIFT_JIS" : "UTF-8");
+                is = new ByteArrayInputStream(vcard.getBytes(charset));
+                testCase.assertEquals(true, parser.parse(is, null, builder));
+            } catch (IOException e) {
+                testCase.fail("Unexpected IOException: " + e.getMessage());
+            } catch (VCardException e) {
+                testCase.fail("Unexpected VCardException: " + e.getMessage());
+            } finally {
+                if (is != null) {
+                    try {
+                        is.close();
+                    } catch (IOException e) {
+                    }
+                }
+            }
+        }
+
+        public void verify() {
+            VCardComposer composer =
+                    new VCardComposer(new CustomMockContext(mResolver), mVCardType);
+            composer.addHandler(mLineVerificationHandler);
+            composer.addHandler(mVCardVerifierInternal);
+            if (!composer.init(VCardComposer.CONTACTS_TEST_CONTENT_URI, null, null, null)) {
+                fail("init() failed. Reason: " + composer.getErrorReason());
+            }
+            assertFalse(composer.isAfterLast());
+            try {
+                while (!composer.isAfterLast()) {
+                    assertTrue(composer.createOneEntry());
+                }
+            } finally {
+                composer.terminate();
+            }
+        }
+    }
+
     /**
      * Utility method to print ContentValues whose content is printed with sorted keys.
      */
@@ -683,6 +941,7 @@
         } else if (expected == null || actual == null || expected.size() != actual.size()) {
             return false;
         }
+
         for (Entry<String, Object> entry : expected.valueSet()) {
             final String key = entry.getKey();
             final Object value = entry.getValue();
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..942b647 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;
diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp
index 10849921..fdcada4 100644
--- a/tools/aapt/Resource.cpp
+++ b/tools/aapt/Resource.cpp
@@ -1285,10 +1285,10 @@
                     hasTable = true;
                     fprintf(fp,
                             "%s   <p>Includes the following attributes:</p>\n"
-                            "%s   <table border=\"2\" width=\"85%%\" align=\"center\" frame=\"hsides\" rules=\"all\" cellpadding=\"5\">\n"
+                            "%s   <table>\n"
                             "%s   <colgroup align=\"left\" />\n"
                             "%s   <colgroup align=\"left\" />\n"
-                            "%s   <tr><th>Attribute<th>Summary</tr>\n",
+                            "%s   <tr><th>Attribute</th><th>Description</th></tr>\n",
                             indentStr,
                             indentStr,
                             indentStr,
@@ -1322,7 +1322,7 @@
                 }
                 String16 name(name8);
                 fixupSymbol(&name);
-                fprintf(fp, "%s   <tr><th><code>{@link #%s_%s %s:%s}</code><td>%s</tr>\n",
+                fprintf(fp, "%s   <tr><td><code>{@link #%s_%s %s:%s}</code></td><td>%s</td></tr>\n",
                         indentStr, nclassName.string(),
                         String8(name).string(),
                         assets->getPackage().string(),
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp
index 3cf6a71..19b9b01 100644
--- a/tools/aapt/ResourceTable.cpp
+++ b/tools/aapt/ResourceTable.cpp
@@ -480,22 +480,22 @@
                     enumOrFlagsComment.append((attr.type&ResTable_map::TYPE_ENUM)
                                        ? String16(" be one of the following constant values.")
                                        : String16(" be one or more (separated by '|') of the following constant values."));
-                    enumOrFlagsComment.append(String16("</p>\n<table border=\"2\" width=\"85%\" align=\"center\" frame=\"hsides\" rules=\"all\" cellpadding=\"5\">\n"
+                    enumOrFlagsComment.append(String16("</p>\n<table>\n"
                                                 "<colgroup align=\"left\" />\n"
                                                 "<colgroup align=\"left\" />\n"
                                                 "<colgroup align=\"left\" />\n"
-                                                "<tr><th>Constant<th>Value<th>Description</tr>"));
+                                                "<tr><th>Constant</th><th>Value</th><th>Description</th></tr>"));
                 }
                 
-                enumOrFlagsComment.append(String16("\n<tr><th><code>"));
+                enumOrFlagsComment.append(String16("\n<tr><td><code>"));
                 enumOrFlagsComment.append(itemIdent);
-                enumOrFlagsComment.append(String16("</code><td>"));
+                enumOrFlagsComment.append(String16("</code></td><td>"));
                 enumOrFlagsComment.append(value);
-                enumOrFlagsComment.append(String16("<td>"));
+                enumOrFlagsComment.append(String16("</td><td>"));
                 if (block.getComment(&len)) {
                     enumOrFlagsComment.append(String16(block.getComment(&len)));
                 }
-                enumOrFlagsComment.append(String16("</tr>"));
+                enumOrFlagsComment.append(String16("</td></tr>"));
                 
                 err = outTable->addBag(SourcePos(in->getPrintableSource(), block.getLineNumber()),
                                        myPackage,