Merge "Additional loading methods for fonts and a3d files. Cleaned up error messages." into honeycomb
diff --git a/api/current.xml b/api/current.xml
index ae55230..bf004c7 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -258107,7 +258107,7 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<parameter name="arg0" type="T">
+<parameter name="t" type="T">
 </parameter>
 </method>
 </interface>
diff --git a/core/java/android/database/sqlite/SQLiteCursor.java b/core/java/android/database/sqlite/SQLiteCursor.java
index 26a1440..4c2d123 100644
--- a/core/java/android/database/sqlite/SQLiteCursor.java
+++ b/core/java/android/database/sqlite/SQLiteCursor.java
@@ -412,6 +412,7 @@
                 db = mQuery.mDatabase.getDatabaseHandle(mQuery.mSql);
             } catch (IllegalStateException e) {
                 // for backwards compatibility, just return false
+                Log.w(TAG, "requery() failed " + e.getMessage(), e);
                 return false;
             }
             if (!db.equals(mQuery.mDatabase)) {
@@ -421,6 +422,7 @@
                     db.lock();
                 } catch (IllegalStateException e) {
                     // for backwards compatibility, just return false
+                    Log.w(TAG, "requery() failed " + e.getMessage(), e);
                     return false;
                 }
                 try {
@@ -429,6 +431,7 @@
                     mQuery = new SQLiteQuery(db, mQuery);
                 } catch (IllegalStateException e) {
                     // for backwards compatibility, just return false
+                    Log.w(TAG, "requery() failed " + e.getMessage(), e);
                     return false;
                 } finally {
                     db.unlock();
@@ -443,6 +446,7 @@
                 mQuery.requery();
             } catch (IllegalStateException e) {
                 // for backwards compatibility, just return false
+                Log.w(TAG, "requery() failed " + e.getMessage(), e);
                 return false;
             } finally {
                 queryThreadUnlock();
@@ -459,6 +463,7 @@
             result = super.requery();
         } catch (IllegalStateException e) {
             // for backwards compatibility, just return false
+            Log.w(TAG, "requery() failed " + e.getMessage(), e);
         }
         if (Config.LOGV) {
             long timeEnd = System.currentTimeMillis();
diff --git a/core/java/android/provider/MediaStore.java b/core/java/android/provider/MediaStore.java
index fb4bed7..9f0ea32 100644
--- a/core/java/android/provider/MediaStore.java
+++ b/core/java/android/provider/MediaStore.java
@@ -1028,6 +1028,13 @@
             public static final String ALBUM_ARTIST = "album_artist";
 
             /**
+             * Whether the song is part of a compilation
+             * <P>Type: TEXT</P>
+             * @hide
+             */
+            public static final String COMPILATION = "compilation";
+
+            /**
              * A non human readable key calculated from the ARTIST, used for
              * searching, sorting and grouping
              * <P>Type: TEXT</P>
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index fa74b4c..da27ea8 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -738,16 +738,6 @@
         boolean smoothScrollbar = a.getBoolean(R.styleable.AbsListView_smoothScrollbar, true);
         setSmoothScrollbarEnabled(smoothScrollbar);
 
-        final int adapterId = a.getResourceId(R.styleable.AbsListView_adapter, 0);
-        if (adapterId != 0) {
-            final Context c = context;
-            post(new Runnable() {
-                public void run() {
-                    setAdapter(Adapters.loadAdapter(c, adapterId));
-                }
-            });
-        }
-
         setChoiceMode(a.getInt(R.styleable.AbsListView_choiceMode, CHOICE_MODE_NONE));
         setFastScrollAlwaysVisible(
                 a.getBoolean(R.styleable.AbsListView_fastScrollAlwaysVisible, false));
diff --git a/core/java/android/widget/Adapters.java b/core/java/android/widget/Adapters.java
deleted file mode 100644
index 3849aa4..0000000
--- a/core/java/android/widget/Adapters.java
+++ /dev/null
@@ -1,1235 +0,0 @@
-/*
- * Copyright (C) 2010 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 android.widget;
-
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-
-import android.app.Activity;
-import android.content.Context;
-import android.content.res.Resources;
-import android.content.res.TypedArray;
-import android.content.res.XmlResourceParser;
-import android.database.Cursor;
-import android.graphics.BitmapFactory;
-import android.net.Uri;
-import android.os.AsyncTask;
-import android.util.AttributeSet;
-import android.util.Xml;
-import android.view.View;
-
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashMap;
-
-/**
- * @hide -- not sure if we really want this in the framework.
- *
- * <p>This class can be used to load {@link android.widget.Adapter adapters} defined in
- * XML resources. XML-defined adapters can be used to easily create adapters in your
- * own application or to pass adapters to other processes.</p>
- * 
- * <h2>Types of adapters</h2>
- * <p>Adapters defined using XML resources can only be one of the following supported
- * types. Arbitrary adapters are not supported to guarantee the safety of the loaded
- * code when adapters are loaded across packages.</p>
- * <ul>
- *  <li><a href="#xml-cursor-adapter">Cursor adapter</a>: a cursor adapter can be used
- *  to display the content of a cursor, most often coming from a content provider</li>
- * </ul>
- * <p>The complete XML format definition of each adapter type is available below.</p>
- * 
- * <a name="xml-cursor-adapter"></a>
- * <h2>Cursor adapter</h2>
- * <p>A cursor adapter XML definition starts with the
- * <a href="#xml-cursor-adapter-tag"><code>&lt;cursor-adapter /&gt;</code></a>
- * tag and may contain one or more instances of the following tags:</p>
- * <ul>
- *  <li><a href="#xml-cursor-adapter-select-tag"><code>&lt;select /&gt;</code></a></li>
- *  <li><a href="#xml-cursor-adapter-bind-tag"><code>&lt;bind /&gt;</code></a></li>
- * </ul>
- * 
- * <a name="xml-cursor-adapter-tag"></a>
- * <h3>&lt;cursor-adapter /&gt;</h3>
- * <p>The <code>&lt;cursor-adapter /&gt;</code> element defines the beginning of the
- * document and supports the following attributes:</p>
- * <ul>
- *  <li><code>android:layout</code>: Reference to the XML layout to be inflated for
- *  each item of the adapter. This attribute is mandatory.</li>
- *  <li><code>android:selection</code>: Selection expression, used when the
- *  <code>android:uri</code> attribute is defined or when the adapter is loaded with
- *  {@link android.widget.Adapters#loadCursorAdapter(android.content.Context, int, String, Object[])}.
- *  This attribute is optional.</li>
- *  <li><code>android:sortOrder</code>: Sort expression, used when the
- *  <code>android:uri</code> attribute is defined or when the adapter is loaded with
- *  {@link android.widget.Adapters#loadCursorAdapter(android.content.Context, int, String, Object[])}.
- *  This attribute is optional.</li>
- *  <li><code>android:uri</code>: URI of the content provider to query to retrieve a cursor.
- *  Specifying this attribute is equivalent to calling
- *  {@link android.widget.Adapters#loadCursorAdapter(android.content.Context, int, String, Object[])}.
- *  If you call this method, the value of the XML attribute is ignored. This attribute is
- *  optional.</li>
- * </ul>
- * <p>In addition, you can specify one or more instances of
- * <a href="#xml-cursor-adapter-select-tag"><code>&lt;select /&gt;</code></a> and
- * <a href="#xml-cursor-adapter-bind-tag"><code>&lt;bind /&gt;</code></a> tags as children
- * of <code>&lt;cursor-adapter /&gt;</code>.</p>
- * 
- * <a name="xml-cursor-adapter-select-tag"></a>
- * <h3>&lt;select /&gt;</h3>
- * <p>The <code>&lt;select /&gt;</code> tag is used to select columns from the cursor
- * when doing the query. This can be very useful when using transformations in the
- * <code>&lt;bind /&gt;</code> elements. It can also be very useful if you are providing
- * your own <a href="#xml-cursor-adapter-bind-data-types">binder</a> or
- * <a href="#xml-cursor-adapter-bind-data-types">transformation</a> classes.
- * <code>&lt;select /&gt;</code> elements are ignored if you supply the cursor yourself.</p>
- * <p>The <code>&lt;select /&gt;</code> supports the following attributes:</p>
- * <ul>
- *  <li><code>android:column</code>: Name of the column to select in the cursor during the
- *  query operation</li>
- * </ul>
- * <p><strong>Note:</strong> The column named <code>_id</code> is always implicitly
- * selected.</p>
- * 
- * <a name="xml-cursor-adapter-bind-tag"></a>
- * <h3>&lt;bind /&gt;</h3>
- * <p>The <code>&lt;bind /&gt;</code> tag is used to bind a column from the cursor to
- * a {@link android.view.View}. A column bound using this tag is automatically selected
- * during the query and a matching
- * <a href="#xml-cursor-adapter-select-tag"><code>&lt;select /&gt;</code> tag is therefore
- * not required.</p>
- * 
- * <p>Each binding is declared as a one to one matching but
- * custom binder classes or special
- * <a href="#xml-cursor-adapter-bind-data-transformation">data transformations</a> can
- * allow you to bind several columns to a single view. In this case you must use the
- * <a href="#xml-cursor-adapter-select-tag"><code>&lt;select /&gt;</code> tag to make
- * sure any required column is part of the query.</p>
- * 
- * <p>The <code>&lt;bind /&gt;</code> tag supports the following attributes:</p>
- * <ul>
- *  <li><code>android:from</code>: The name of the column to bind from.
- *  This attribute is mandatory. Note that <code>@</code> which are not used to reference resources
- *  should be backslash protected as in <code>\@</code>.</li>
- *  <li><code>android:to</code>: The id of the view to bind to. This attribute is mandatory.</li>
- *  <li><code>android:as</code>: The <a href="#xml-cursor-adapter-bind-data-types">data type</a>
- *  of the binding. This attribute is mandatory.</li>
- * </ul>
- * 
- * <p>In addition, a <code>&lt;bind /&gt;</code> can contain zero or more instances of
- * <a href="#xml-cursor-adapter-bind-data-transformation">data transformations</a> children
- * tags.</p>
- *
- * <a name="xml-cursor-adapter-bind-data-types"></a>
- * <h4>Binding data types</h4>
- * <p>For a binding to occur the data type of the bound column/view pair must be specified.
- * The following data types are currently supported:</p>
- * <ul>
- *  <li><code>string</code>: The content of the column is interpreted as a string and must be
- *  bound to a {@link android.widget.TextView}</li>
- *  <li><code>image</code>: The content of the column is interpreted as a blob describing an
- *  image and must be bound to an {@link android.widget.ImageView}</li>
- *  <li><code>image-uri</code>: The content of the column is interpreted as a URI to an image
- *  and must be bound to an {@link android.widget.ImageView}</li>
- *  <li><code>drawable</code>: The content of the column is interpreted as a resource id to a
- *  drawable and must be bound to an {@link android.widget.ImageView}</li>
- *  <li><code>tag</code>: The content of the column is interpreted as a string and will be set as
- *  the tag (using {@link View#setTag(Object)} of the associated View. This can be used to
- *  associate meta-data to your view, that can be used for instance by a listener.</li>
- *  <li>A fully qualified class name: The name of a class corresponding to an implementation of
- *  {@link android.widget.Adapters.CursorBinder}. Cursor binders can be used to provide
- *  bindings not supported by default. Custom binders cannot be used with
- *  {@link android.content.Context#isRestricted() restricted contexts}, for instance in an
- *  application widget</li>
- * </ul>
- * 
- * <a name="xml-cursor-adapter-bind-transformation"></a>
- * <h4>Binding transformations</h4>
- * <p>When defining a data binding you can specify an optional transformation by using one
- * of the following tags as a child of a <code>&lt;bind /&gt;</code> elements:</p>
- * <ul>
- *  <li><code>&lt;map /&gt;</code>: Maps a constant string to a string or a resource. Use
- *  one instance of this tag per value you want to map</li>
- *  <li><code>&lt;transform /&gt;</code>: Transforms a column's value using an expression
- *  or an instance of {@link android.widget.Adapters.CursorTransformation}</li>
- * </ul>
- * <p>While several <code>&lt;map /&gt;</code> tags can be used at the same time, you cannot
- * mix <code>&lt;map /&gt;</code> and <code>&lt;transform /&gt;</code> tags. If several
- * <code>&lt;transform /&gt;</code> tags are specified, only the last one is retained.</p>
- * 
- * <a name="xml-cursor-adapter-bind-transformation-map" />
- * <p><strong>&lt;map /&gt;</strong></p>
- * <p>A map element simply specifies a value to match from and a value to match to. When
- * a column's value equals the value to match from, it is replaced with the value to match
- * to. The following attributes are supported:</p>
- * <ul>
- *  <li><code>android:fromValue</code>: The value to match from. This attribute is mandatory</li>
- *  <li><code>android:toValue</code>: The value to match to. This value can be either a string
- *  or a resource identifier. This value is interpreted as a resource identifier when the
- *  data binding is of type <code>drawable</code>. This attribute is mandatory</li>
- * </ul>
- * 
- * <a name="xml-cursor-adapter-bind-transformation-transform"></a>
- * <p><strong>&lt;transform /&gt;</strong></p>
- * <p>A simple transform that occurs either by calling a specified class or by performing
- * simple text substitution. The following attributes are supported:</p>
- * <ul>
- *  <li><code>android:withExpression</code>: The transformation expression. The expression is
- *  a string containing column names surrounded with curly braces { and }. During the
- *  transformation each column name is replaced by its value. All columns must have been
- *  selected in the query. An example of expression is <code>"First name: {first_name},
- *  last name: {last_name}"</code>. This attribute is mandatory
- *  if <code>android:withClass</code> is not specified and ignored if <code>android:withClass</code>
- *  is specified</li>
- *  <li><code>android:withClass</code>: A fully qualified class name corresponding to an
- *  implementation of {@link android.widget.Adapters.CursorTransformation}. Custom
- *  transformations cannot be used with
- *  {@link android.content.Context#isRestricted() restricted contexts}, for instance in
- *  an app widget This attribute is mandatory if <code>android:withExpression</code> is
- *  not specified</li>
- * </ul>
- * 
- * <h3>Example</h3>
- * <p>The following example defines a cursor adapter that queries all the contacts with
- * a phone number using the contacts content provider. Each contact is displayed with
- * its display name, its favorite status and its photo. To display photos, a custom data
- * binder is declared:</p>
- * 
- * <pre class="prettyprint">
- * &lt;cursor-adapter xmlns:android="http://schemas.android.com/apk/res/android"
- *     android:uri="content://com.android.contacts/contacts"
- *     android:selection="has_phone_number=1"
- *     android:layout="@layout/contact_item"&gt;
- *
- *     &lt;bind android:from="display_name" android:to="@id/name" android:as="string" /&gt;
- *     &lt;bind android:from="starred" android:to="@id/star" android:as="drawable"&gt;
- *         &lt;map android:fromValue="0" android:toValue="@android:drawable/star_big_off" /&gt;
- *         &lt;map android:fromValue="1" android:toValue="@android:drawable/star_big_on" /&gt;
- *     &lt;/bind&gt;
- *     &lt;bind android:from="_id" android:to="@id/name"
- *              android:as="com.google.android.test.adapters.ContactPhotoBinder" /&gt;
- *
- * &lt;/cursor-adapter&gt;
- * </pre>
- * 
- * <h3>Related APIs</h3>
- * <ul>
- *  <li>{@link android.widget.Adapters#loadAdapter(android.content.Context, int, Object[])}</li>
- *  <li>{@link android.widget.Adapters#loadCursorAdapter(android.content.Context, int, android.database.Cursor, Object[])}</li>
- *  <li>{@link android.widget.Adapters#loadCursorAdapter(android.content.Context, int, String, Object[])}</li>
- *  <li>{@link android.widget.Adapters.CursorBinder}</li>
- *  <li>{@link android.widget.Adapters.CursorTransformation}</li>
- *  <li>{@link android.widget.CursorAdapter}</li>
- * </ul>
- * 
- * @see android.widget.Adapter
- * @see android.content.ContentProvider
- * 
- * attr ref android.R.styleable#CursorAdapter_layout
- * attr ref android.R.styleable#CursorAdapter_selection
- * attr ref android.R.styleable#CursorAdapter_sortOrder
- * attr ref android.R.styleable#CursorAdapter_uri
- * attr ref android.R.styleable#CursorAdapter_BindItem_as
- * attr ref android.R.styleable#CursorAdapter_BindItem_from
- * attr ref android.R.styleable#CursorAdapter_BindItem_to
- * attr ref android.R.styleable#CursorAdapter_MapItem_fromValue
- * attr ref android.R.styleable#CursorAdapter_MapItem_toValue
- * attr ref android.R.styleable#CursorAdapter_SelectItem_column
- * attr ref android.R.styleable#CursorAdapter_TransformItem_withClass
- * attr ref android.R.styleable#CursorAdapter_TransformItem_withExpression
- */
-@SuppressWarnings({"JavadocReference"})
-public class Adapters {
-    private static final String ADAPTER_CURSOR = "cursor-adapter";
-
-    /**
-     * <p>Interface used to bind a {@link android.database.Cursor} column to a View. This
-     * interface can be used to provide bindings for data types not supported by the
-     * standard implementation of {@link android.widget.Adapters}.</p>
-     * 
-     * <p>A binder is provided with a cursor transformation which may or may not be used
-     * to transform the value retrieved from the cursor. The transformation is guaranteed
-     * to never be null so it's always safe to apply the transformation.</p>
-     * 
-     * <p>The binder is associated with a Context but can be re-used with multiple cursors.
-     * As such, the implementation should make no assumption about the Cursor in use.</p>
-     *
-     * @see android.view.View 
-     * @see android.database.Cursor
-     * @see android.widget.Adapters.CursorTransformation
-     */
-    public static abstract class CursorBinder {
-        /**
-         * <p>The context associated with this binder.</p>
-         */
-        protected final Context mContext;
-
-        /**
-         * <p>The transformation associated with this binder. This transformation is never
-         * null and may or may not be applied to the Cursor data during the
-         * {@link #bind(android.view.View, android.database.Cursor, int)} operation.</p>
-         * 
-         * @see #bind(android.view.View, android.database.Cursor, int) 
-         */
-        protected final CursorTransformation mTransformation;
-
-        /**
-         * <p>Creates a new Cursor binder.</p> 
-         * 
-         * @param context The context associated with this binder.
-         * @param transformation The transformation associated with this binder. This
-         *        transformation may or may not be applied by the binder and is guaranteed
-         *        to not be null.
-         */
-        public CursorBinder(Context context, CursorTransformation transformation) {
-            mContext = context;
-            mTransformation = transformation;
-        }
-
-        /**
-         * <p>Binds the specified Cursor column to the supplied View. The binding operation
-         * can query other Cursor columns as needed. During the binding operation, values
-         * retrieved from the Cursor may or may not be transformed using this binder's
-         * cursor transformation.</p>
-         * 
-         * @param view The view to bind data to.
-         * @param cursor The cursor to bind data from.
-         * @param columnIndex The column index in the cursor where the data to bind resides.
-         * 
-         * @see #mTransformation
-         * 
-         * @return True if the column was successfully bound to the View, false otherwise.
-         */
-        public abstract boolean bind(View view, Cursor cursor, int columnIndex);
-    }
-
-    /**
-     * <p>Interface used to transform data coming out of a {@link android.database.Cursor}
-     * before it is bound to a {@link android.view.View}.</p>
-     * 
-     * <p>Transformations are used to transform text-based data (in the form of a String),
-     * or to transform data into a resource identifier. A default implementation is provided
-     * to generate resource identifiers.</p>
-     * 
-     * @see android.database.Cursor
-     * @see android.widget.Adapters.CursorBinder
-     */
-    public static abstract class CursorTransformation {
-        /**
-         * <p>The context associated with this transformation.</p>
-         */
-        protected final Context mContext;
-
-        /**
-         * <p>Creates a new Cursor transformation.</p>
-         * 
-         * @param context The context associated with this transformation.
-         */
-        public CursorTransformation(Context context) {
-            mContext = context;
-        }
-
-        /**
-         * <p>Transforms the specified Cursor column into a String. The transformation
-         * can simply return the content of the column as a String (this is known
-         * as the identity transformation) or manipulate the content. For instance,
-         * a transformation can perform text substitutions or concatenate other
-         * columns with the specified column.</p>
-         * 
-         * @param cursor The cursor that contains the data to transform. 
-         * @param columnIndex The index of the column to transform.
-         * 
-         * @return A String containing the transformed value of the column.
-         */
-        public abstract String transform(Cursor cursor, int columnIndex);
-
-        /**
-         * <p>Transforms the specified Cursor column into a resource identifier.
-         * The default implementation simply interprets the content of the column
-         * as an integer.</p>
-         * 
-         * @param cursor The cursor that contains the data to transform. 
-         * @param columnIndex The index of the column to transform.
-         * 
-         * @return A resource identifier.
-         */
-        public int transformToResource(Cursor cursor, int columnIndex) {
-            return cursor.getInt(columnIndex);
-        }        
-    }
-
-    /**
-     * <p>Loads the {@link android.widget.CursorAdapter} defined in the specified
-     * XML resource. The content of the adapter is loaded from the content provider
-     * identified by the supplied URI.</p>
-     * 
-     * <p><strong>Note:</strong> If the supplied {@link android.content.Context} is
-     * an {@link android.app.Activity}, the cursor returned by the content provider
-     * will be automatically managed. Otherwise, you are responsible for managing the
-     * cursor yourself.</p>
-     * 
-     * <p>The format of the XML definition of the cursor adapter is documented at
-     * the top of this page.</p>
-     * 
-     * @param context The context to load the XML resource from.
-     * @param id The identifier of the XML resource declaring the adapter.
-     * @param uri The URI of the content provider.
-     * @param parameters Optional parameters to pass to the CursorAdapter, used
-     *        to substitute values in the selection expression.
-     * 
-     * @return A {@link android.widget.CursorAdapter}
-     * 
-     * @throws IllegalArgumentException If the XML resource does not contain
-     *         a valid &lt;cursor-adapter /&gt; definition.
-     * 
-     * @see android.content.ContentProvider
-     * @see android.widget.CursorAdapter
-     * @see #loadAdapter(android.content.Context, int, Object[]) 
-     */
-    public static CursorAdapter loadCursorAdapter(Context context, int id, String uri,
-            Object... parameters) {
-
-        XmlCursorAdapter adapter = (XmlCursorAdapter) loadAdapter(context, id, ADAPTER_CURSOR,
-                parameters);
-
-        if (uri != null) {
-            adapter.setUri(uri);
-        }
-        adapter.load();
-
-        return adapter;
-    }
-
-    /**
-     * <p>Loads the {@link android.widget.CursorAdapter} defined in the specified
-     * XML resource. The content of the adapter is loaded from the specified cursor.
-     * You are responsible for managing the supplied cursor.</p>
-     * 
-     * <p>The format of the XML definition of the cursor adapter is documented at
-     * the top of this page.</p>
-     * 
-     * @param context The context to load the XML resource from.
-     * @param id The identifier of the XML resource declaring the adapter.
-     * @param cursor The cursor containing the data for the adapter.
-     * @param parameters Optional parameters to pass to the CursorAdapter, used
-     *        to substitute values in the selection expression.
-     * 
-     * @return A {@link android.widget.CursorAdapter}
-     * 
-     * @throws IllegalArgumentException If the XML resource does not contain
-     *         a valid &lt;cursor-adapter /&gt; definition.
-     * 
-     * @see android.content.ContentProvider
-     * @see android.widget.CursorAdapter
-     * @see android.database.Cursor
-     * @see #loadAdapter(android.content.Context, int, Object[]) 
-     */
-    public static CursorAdapter loadCursorAdapter(Context context, int id, Cursor cursor,
-            Object... parameters) {
-
-        XmlCursorAdapter adapter = (XmlCursorAdapter) loadAdapter(context, id, ADAPTER_CURSOR,
-                parameters);
-
-        if (cursor != null) {
-            adapter.changeCursor(cursor);
-        }
-
-        return adapter;
-    }
-
-    /**
-     * <p>Loads the adapter defined in the specified XML resource. The XML definition of
-     * the adapter must follow the format definition of one of the supported adapter
-     * types described at the top of this page.</p>
-     * 
-     * <p><strong>Note:</strong> If the loaded adapter is a {@link android.widget.CursorAdapter}
-     * and the supplied {@link android.content.Context} is an {@link android.app.Activity},
-     * the cursor returned by the content provider will be automatically managed. Otherwise,
-     * you are responsible for managing the cursor yourself.</p>
-     * 
-     * @param context The context to load the XML resource from.
-     * @param id The identifier of the XML resource declaring the adapter.
-     * @param parameters Optional parameters to pass to the adapter.
-     *  
-     * @return An adapter instance.
-     * 
-     * @see #loadCursorAdapter(android.content.Context, int, android.database.Cursor, Object[]) 
-     * @see #loadCursorAdapter(android.content.Context, int, String, Object[]) 
-     */
-    public static BaseAdapter loadAdapter(Context context, int id, Object... parameters) {
-        final BaseAdapter adapter = loadAdapter(context, id, null, parameters);
-        if (adapter instanceof ManagedAdapter) {
-            ((ManagedAdapter) adapter).load();
-        }
-        return adapter;
-    }
-
-    /**
-     * Loads an adapter from the specified XML resource. The optional assertName can
-     * be used to exit early if the adapter defined in the XML resource is not of the
-     * expected type.
-     * 
-     * @param context The context to associate with the adapter.
-     * @param id The resource id of the XML document defining the adapter.
-     * @param assertName The mandatory name of the adapter in the XML document.
-     *        Ignored if null.
-     * @param parameters Optional parameters passed to the adapter.
-     * 
-     * @return An instance of {@link android.widget.BaseAdapter}.
-     */
-    private static BaseAdapter loadAdapter(Context context, int id, String assertName,
-            Object... parameters) {
-
-        XmlResourceParser parser = null;
-        try {
-            parser = context.getResources().getXml(id);
-            return createAdapterFromXml(context, parser, Xml.asAttributeSet(parser),
-                    id, parameters, assertName);
-        } catch (XmlPullParserException ex) {
-            Resources.NotFoundException rnf = new Resources.NotFoundException(
-                    "Can't load adapter resource ID " +
-                    context.getResources().getResourceEntryName(id));
-            rnf.initCause(ex);
-            throw rnf;
-        } catch (IOException ex) {
-            Resources.NotFoundException rnf = new Resources.NotFoundException(
-                    "Can't load adapter resource ID " +
-                    context.getResources().getResourceEntryName(id));
-            rnf.initCause(ex);
-            throw rnf;
-        } finally {
-            if (parser != null) parser.close();
-        }
-    }
-
-    /**
-     * Generates an adapter using the specified XML parser. This method is responsible
-     * for choosing the type of the adapter to create based on the content of the
-     * XML parser.
-     * 
-     * This method will generate an {@link IllegalArgumentException} if
-     * <code>assertName</code> is not null and does not match the root tag of the XML
-     * document. 
-     */
-    private static BaseAdapter createAdapterFromXml(Context c,
-            XmlPullParser parser, AttributeSet attrs, int id, Object[] parameters,
-            String assertName) throws XmlPullParserException, IOException {
-
-        BaseAdapter adapter = null;
-
-        // Make sure we are on a start tag.
-        int type;
-        int depth = parser.getDepth();
-
-        while (((type = parser.next()) != XmlPullParser.END_TAG || parser.getDepth() > depth) &&
-                type != XmlPullParser.END_DOCUMENT) {
-
-            if (type != XmlPullParser.START_TAG) {
-                continue;
-            }
-
-            String name = parser.getName();
-            if (assertName != null && !assertName.equals(name)) {
-                throw new IllegalArgumentException("The adapter defined in " +
-                        c.getResources().getResourceEntryName(id) + " must be a <" +
-                        assertName + " />");
-            }
-
-            if (ADAPTER_CURSOR.equals(name)) {
-                adapter = createCursorAdapter(c, parser, attrs, id, parameters);
-            } else {
-                throw new IllegalArgumentException("Unknown adapter name " + parser.getName() +
-                        " in " + c.getResources().getResourceEntryName(id));
-            }
-        }
-
-        return adapter;
-
-    }
-
-    /**
-     * Creates an XmlCursorAdapter using an XmlCursorAdapterParser.
-     */
-    private static XmlCursorAdapter createCursorAdapter(Context c, XmlPullParser parser,
-            AttributeSet attrs, int id, Object[] parameters)
-            throws IOException, XmlPullParserException {
-
-        return new XmlCursorAdapterParser(c, parser, attrs, id).parse(parameters);
-    }
-
-    /**
-     * Parser that can generate XmlCursorAdapter instances. This parser is responsible for
-     * handling all the attributes and child nodes for a &lt;cursor-adapter /&gt;.
-     */
-    private static class XmlCursorAdapterParser {
-        private static final String ADAPTER_CURSOR_BIND = "bind";
-        private static final String ADAPTER_CURSOR_SELECT = "select";
-        private static final String ADAPTER_CURSOR_AS_STRING = "string";
-        private static final String ADAPTER_CURSOR_AS_IMAGE = "image";
-        private static final String ADAPTER_CURSOR_AS_TAG = "tag";
-        private static final String ADAPTER_CURSOR_AS_IMAGE_URI = "image-uri";
-        private static final String ADAPTER_CURSOR_AS_DRAWABLE = "drawable";
-        private static final String ADAPTER_CURSOR_MAP = "map";
-        private static final String ADAPTER_CURSOR_TRANSFORM = "transform";
-
-        private final Context mContext;
-        private final XmlPullParser mParser;
-        private final AttributeSet mAttrs;
-        private final int mId;
-
-        private final HashMap<String, CursorBinder> mBinders;
-        private final ArrayList<String> mFrom;
-        private final ArrayList<Integer> mTo;
-        private final CursorTransformation mIdentity;
-        private final Resources mResources;
-
-        public XmlCursorAdapterParser(Context c, XmlPullParser parser, AttributeSet attrs, int id) {
-            mContext = c;
-            mParser = parser;
-            mAttrs = attrs;
-            mId = id;
-
-            mResources = mContext.getResources();
-            mBinders = new HashMap<String, CursorBinder>();
-            mFrom = new ArrayList<String>();
-            mTo = new ArrayList<Integer>();
-            mIdentity = new IdentityTransformation(mContext);            
-        }
-
-        public XmlCursorAdapter parse(Object[] parameters)
-               throws IOException, XmlPullParserException {
-
-            Resources resources = mResources;
-            TypedArray a = resources.obtainAttributes(mAttrs, com.android.internal.R.styleable.CursorAdapter);
-
-            String uri = a.getString(com.android.internal.R.styleable.CursorAdapter_uri);
-            String selection = a.getString(com.android.internal.R.styleable.CursorAdapter_selection);
-            String sortOrder = a.getString(com.android.internal.R.styleable.CursorAdapter_sortOrder);
-            int layout = a.getResourceId(com.android.internal.R.styleable.CursorAdapter_layout, 0);
-            if (layout == 0) {
-                throw new IllegalArgumentException("The layout specified in " +
-                        resources.getResourceEntryName(mId) + " does not exist");
-            }
-
-            a.recycle();
-
-            XmlPullParser parser = mParser;
-            int type;
-            int depth = parser.getDepth();
-
-            while (((type = parser.next()) != XmlPullParser.END_TAG || parser.getDepth() > depth) &&
-                    type != XmlPullParser.END_DOCUMENT) {
-
-                if (type != XmlPullParser.START_TAG) {
-                    continue;
-                }
-
-                String name = parser.getName();
-
-                if (ADAPTER_CURSOR_BIND.equals(name)) {
-                    parseBindTag();
-                } else if (ADAPTER_CURSOR_SELECT.equals(name)) {
-                    parseSelectTag();
-                } else {
-                    throw new RuntimeException("Unknown tag name " + parser.getName() + " in " +
-                            resources.getResourceEntryName(mId));
-                }
-            }
-
-            String[] fromArray = mFrom.toArray(new String[mFrom.size()]);
-            int[] toArray = new int[mTo.size()];
-            for (int i = 0; i < toArray.length; i++) {
-                toArray[i] = mTo.get(i);
-            }
-
-            String[] selectionArgs = null;
-            if (parameters != null) {
-                selectionArgs = new String[parameters.length];
-                for (int i = 0; i < selectionArgs.length; i++) {
-                    selectionArgs[i] = (String) parameters[i];
-                }
-            }
-
-            return new XmlCursorAdapter(mContext, layout, uri, fromArray, toArray, selection,
-                    selectionArgs, sortOrder, mBinders);
-        }
-
-        private void parseSelectTag() {
-            TypedArray a = mResources.obtainAttributes(mAttrs,
-                    com.android.internal.R.styleable.CursorAdapter_SelectItem);
-
-            String fromName = a.getString(com.android.internal.R.styleable.CursorAdapter_SelectItem_column);
-            if (fromName == null) {
-                throw new IllegalArgumentException("A select item in " +
-                        mResources.getResourceEntryName(mId) +
-                        " does not have a 'column' attribute");
-            }
-
-            a.recycle();
-
-            mFrom.add(fromName);
-            mTo.add(View.NO_ID);
-        }
-
-        private void parseBindTag() throws IOException, XmlPullParserException {
-            Resources resources = mResources;
-            TypedArray a = resources.obtainAttributes(mAttrs,
-                    com.android.internal.R.styleable.CursorAdapter_BindItem);
-
-            String fromName = a.getString(com.android.internal.R.styleable.CursorAdapter_BindItem_from);
-            if (fromName == null) {
-                throw new IllegalArgumentException("A bind item in " +
-                        resources.getResourceEntryName(mId) + " does not have a 'from' attribute");
-            }
-
-            int toName = a.getResourceId(com.android.internal.R.styleable.CursorAdapter_BindItem_to, 0);
-            if (toName == 0) {
-                throw new IllegalArgumentException("A bind item in " +
-                        resources.getResourceEntryName(mId) + " does not have a 'to' attribute");
-            }
-
-            String asType = a.getString(com.android.internal.R.styleable.CursorAdapter_BindItem_as);
-            if (asType == null) {
-                throw new IllegalArgumentException("A bind item in " +
-                        resources.getResourceEntryName(mId) + " does not have an 'as' attribute");
-            }
-
-            mFrom.add(fromName);
-            mTo.add(toName);
-            mBinders.put(fromName, findBinder(asType));
-
-            a.recycle();
-        }
-
-        private CursorBinder findBinder(String type) throws IOException, XmlPullParserException {
-            final XmlPullParser parser = mParser;
-            final Context context = mContext;
-            CursorTransformation transformation = mIdentity;
-
-            int tagType;
-            int depth = parser.getDepth();
-
-            final boolean isDrawable = ADAPTER_CURSOR_AS_DRAWABLE.equals(type);            
-
-            while (((tagType = parser.next()) != XmlPullParser.END_TAG || parser.getDepth() > depth)
-                    && tagType != XmlPullParser.END_DOCUMENT) {
-
-                if (tagType != XmlPullParser.START_TAG) {
-                    continue;
-                }
-
-                String name = parser.getName();
-
-                if (ADAPTER_CURSOR_TRANSFORM.equals(name)) {
-                    transformation = findTransformation();
-                } else if (ADAPTER_CURSOR_MAP.equals(name)) {
-                    if (!(transformation instanceof MapTransformation)) {
-                        transformation = new MapTransformation(context);
-                    }
-                    findMap(((MapTransformation) transformation), isDrawable);
-                } else {
-                    throw new RuntimeException("Unknown tag name " + parser.getName() + " in " +
-                            context.getResources().getResourceEntryName(mId));
-                }
-            }
-
-            if (ADAPTER_CURSOR_AS_STRING.equals(type)) {
-                return new StringBinder(context, transformation);
-            } else if (ADAPTER_CURSOR_AS_TAG.equals(type)) {
-                return new TagBinder(context, transformation);
-            } else if (ADAPTER_CURSOR_AS_IMAGE.equals(type)) {
-                return new ImageBinder(context, transformation);            
-            } else if (ADAPTER_CURSOR_AS_IMAGE_URI.equals(type)) {
-                return new ImageUriBinder(context, transformation);
-            } else if (isDrawable) {
-                return new DrawableBinder(context, transformation);
-            } else {
-                return createBinder(type, transformation);
-            }
-        }
-
-        private CursorBinder createBinder(String type, CursorTransformation transformation) {
-            if (mContext.isRestricted()) return null;
-
-            try {
-                final Class<?> klass = Class.forName(type, true, mContext.getClassLoader());
-                if (CursorBinder.class.isAssignableFrom(klass)) {
-                    final Constructor<?> c = klass.getDeclaredConstructor(
-                            Context.class, CursorTransformation.class);
-                    return (CursorBinder) c.newInstance(mContext, transformation);
-                }
-            } catch (ClassNotFoundException e) {
-                throw new IllegalArgumentException("Cannot instanciate binder type in " +
-                        mContext.getResources().getResourceEntryName(mId) + ": " + type, e);
-            } catch (NoSuchMethodException e) {
-                throw new IllegalArgumentException("Cannot instanciate binder type in " +
-                        mContext.getResources().getResourceEntryName(mId) + ": " + type, e);
-            } catch (InvocationTargetException e) {
-                throw new IllegalArgumentException("Cannot instanciate binder type in " +
-                        mContext.getResources().getResourceEntryName(mId) + ": " + type, e);
-            } catch (InstantiationException e) {
-                throw new IllegalArgumentException("Cannot instanciate binder type in " +
-                        mContext.getResources().getResourceEntryName(mId) + ": " + type, e);
-            } catch (IllegalAccessException e) {
-                throw new IllegalArgumentException("Cannot instanciate binder type in " +
-                        mContext.getResources().getResourceEntryName(mId) + ": " + type, e);
-            }
-
-            return null;
-        }
-
-        private void findMap(MapTransformation transformation, boolean drawable) {
-            Resources resources = mResources;
-
-            TypedArray a = resources.obtainAttributes(mAttrs,
-                    com.android.internal.R.styleable.CursorAdapter_MapItem);
-
-            String from = a.getString(com.android.internal.R.styleable.CursorAdapter_MapItem_fromValue);
-            if (from == null) {
-                throw new IllegalArgumentException("A map item in " +
-                        resources.getResourceEntryName(mId) +
-                        " does not have a 'fromValue' attribute");
-            }
-
-            if (!drawable) {
-                String to = a.getString(com.android.internal.R.styleable.CursorAdapter_MapItem_toValue);
-                if (to == null) {
-                    throw new IllegalArgumentException("A map item in " +
-                            resources.getResourceEntryName(mId) +
-                            " does not have a 'toValue' attribute");
-                }
-                transformation.addStringMapping(from, to);
-            } else {
-                int to = a.getResourceId(com.android.internal.R.styleable.CursorAdapter_MapItem_toValue, 0);
-                if (to == 0) {
-                    throw new IllegalArgumentException("A map item in " +
-                            resources.getResourceEntryName(mId) +
-                            " does not have a 'toValue' attribute");
-                }
-                transformation.addResourceMapping(from, to);
-            }
-
-            a.recycle();
-        }
-
-        private CursorTransformation findTransformation() {
-            Resources resources = mResources;
-            CursorTransformation transformation = null;
-            TypedArray a = resources.obtainAttributes(mAttrs,
-                    com.android.internal.R.styleable.CursorAdapter_TransformItem);
-
-            String className = a.getString(com.android.internal.R.styleable.CursorAdapter_TransformItem_withClass);
-            if (className == null) {
-                String expression = a.getString(
-                        com.android.internal.R.styleable.CursorAdapter_TransformItem_withExpression);
-                transformation = createExpressionTransformation(expression);
-            } else if (!mContext.isRestricted()) {
-                try {
-                    final Class<?> klas = Class.forName(className, true, mContext.getClassLoader());
-                    if (CursorTransformation.class.isAssignableFrom(klas)) {
-                        final Constructor<?> c = klas.getDeclaredConstructor(Context.class);
-                        transformation = (CursorTransformation) c.newInstance(mContext);
-                    }
-                } catch (ClassNotFoundException e) {
-                    throw new IllegalArgumentException("Cannot instanciate transform type in " +
-                           mContext.getResources().getResourceEntryName(mId) + ": " + className, e);
-                } catch (NoSuchMethodException e) {
-                    throw new IllegalArgumentException("Cannot instanciate transform type in " +
-                           mContext.getResources().getResourceEntryName(mId) + ": " + className, e);
-                } catch (InvocationTargetException e) {
-                    throw new IllegalArgumentException("Cannot instanciate transform type in " +
-                           mContext.getResources().getResourceEntryName(mId) + ": " + className, e);
-                } catch (InstantiationException e) {
-                    throw new IllegalArgumentException("Cannot instanciate transform type in " +
-                           mContext.getResources().getResourceEntryName(mId) + ": " + className, e);
-                } catch (IllegalAccessException e) {
-                    throw new IllegalArgumentException("Cannot instanciate transform type in " +
-                           mContext.getResources().getResourceEntryName(mId) + ": " + className, e);
-                }
-            }
-
-            a.recycle();
-
-            if (transformation == null) {
-                throw new IllegalArgumentException("A transform item in " +
-                    resources.getResourceEntryName(mId) + " must have a 'withClass' or " +
-                    "'withExpression' attribute");
-            }
-
-            return transformation;
-        }
-
-        private CursorTransformation createExpressionTransformation(String expression) {
-            return new ExpressionTransformation(mContext, expression);
-        }
-    }
-
-    /**
-     * Interface used by adapters that require to be loaded after creation.
-     */
-    private static interface ManagedAdapter {
-        /**
-         * Loads the content of the adapter, asynchronously.
-         */
-        void load();
-    }
-
-    /**
-     * Implementation of a Cursor adapter defined in XML. This class is a thin wrapper
-     * of a SimpleCursorAdapter. The main difference is the ability to handle CursorBinders.
-     */
-    private static class XmlCursorAdapter extends SimpleCursorAdapter implements ManagedAdapter {
-        private String mUri;
-        private final String mSelection;
-        private final String[] mSelectionArgs;
-        private final String mSortOrder;
-        private final String[] mColumns;
-        private final CursorBinder[] mBinders;
-        private AsyncTask<Void,Void,Cursor> mLoadTask;
-
-        XmlCursorAdapter(Context context, int layout, String uri, String[] from, int[] to,
-                String selection, String[] selectionArgs, String sortOrder,
-                HashMap<String, CursorBinder> binders) {
-
-            super(context, layout, null, from, to);
-            mContext = context;
-            mUri = uri;
-            mSelection = selection;
-            mSelectionArgs = selectionArgs;
-            mSortOrder = sortOrder;
-            mColumns = new String[from.length + 1];
-            // This is mandatory in CursorAdapter
-            mColumns[0] = "_id";
-            System.arraycopy(from, 0, mColumns, 1, from.length);
-
-            CursorBinder basic = new StringBinder(context, new IdentityTransformation(context));
-            final int count = from.length;
-            mBinders = new CursorBinder[count];
-
-            for (int i = 0; i < count; i++) {
-                CursorBinder binder = binders.get(from[i]);
-                if (binder == null) binder = basic;
-                mBinders[i] = binder;
-            }
-        }
-
-        @Override
-        public void bindView(View view, Context context, Cursor cursor) {
-            final int count = mTo.length;
-            final int[] from = mFrom;
-            final int[] to = mTo;
-            final CursorBinder[] binders = mBinders;
-
-            for (int i = 0; i < count; i++) {
-                final View v = view.findViewById(to[i]);
-                if (v != null) {
-                    binders[i].bind(v, cursor, from[i]);
-                }
-            }
-        }
-
-        public void load() {
-            if (mUri != null) {
-                mLoadTask = new QueryTask().execute();
-            }
-        }
-
-        void setUri(String uri) {
-            mUri = uri;
-        }
-
-        @Override
-        public void changeCursor(Cursor c) {
-            if (mLoadTask != null && mLoadTask.getStatus() != QueryTask.Status.FINISHED) {
-                mLoadTask.cancel(true);
-                mLoadTask = null;
-            }
-            super.changeCursor(c);
-        }
-
-        class QueryTask extends AsyncTask<Void, Void, Cursor> {
-            @Override
-            protected Cursor doInBackground(Void... params) {
-                if (mContext instanceof Activity) {
-                    return ((Activity) mContext).managedQuery(
-                            Uri.parse(mUri), mColumns, mSelection, mSelectionArgs, mSortOrder);
-                } else {
-                    return mContext.getContentResolver().query(
-                            Uri.parse(mUri), mColumns, mSelection, mSelectionArgs, mSortOrder);
-                }
-            }
-
-            @Override
-            protected void onPostExecute(Cursor cursor) {
-                if (!isCancelled()) {
-                    XmlCursorAdapter.super.changeCursor(cursor);
-                }
-            }
-        }
-    }
-
-    /**
-     * Identity transformation, returns the content of the specified column as a String,
-     * without performing any manipulation. This is used when no transformation is specified.
-     */
-    private static class IdentityTransformation extends CursorTransformation {
-        public IdentityTransformation(Context context) {
-            super(context);
-        }
-
-        @Override
-        public String transform(Cursor cursor, int columnIndex) {
-            return cursor.getString(columnIndex);
-        }
-    }
-
-    /**
-     * An expression transformation is a simple template based replacement utility.
-     * In an expression, each segment of the form <code>{([^}]+)}</code> is replaced
-     * with the value of the column of name $1.
-     */
-    private static class ExpressionTransformation extends CursorTransformation {
-        private final ExpressionNode mFirstNode = new ConstantExpressionNode("");
-        private final StringBuilder mBuilder = new StringBuilder();
-
-        public ExpressionTransformation(Context context, String expression) {
-            super(context);
-
-            parse(expression);
-        }
-
-        private void parse(String expression) {
-            ExpressionNode node = mFirstNode;
-            int segmentStart;
-            int count = expression.length();
-
-            for (int i = 0; i < count; i++) {
-                char c = expression.charAt(i);
-                // Start a column name segment
-                segmentStart = i;
-                if (c == '{') {
-                    while (i < count && (c = expression.charAt(i)) != '}') {
-                        i++;
-                    }
-                    // We've reached the end, but the expression didn't close
-                    if (c != '}') {
-                        throw new IllegalStateException("The transform expression contains a " +
-                                "non-closed column name: " +
-                                expression.substring(segmentStart + 1, i));
-                    }
-                    node.next = new ColumnExpressionNode(expression.substring(segmentStart + 1, i));
-                } else {
-                    while (i < count && (c = expression.charAt(i)) != '{') {
-                        i++;
-                    }
-                    node.next = new ConstantExpressionNode(expression.substring(segmentStart, i));
-                    // Rewind if we've reached a column expression
-                    if (c == '{') i--;
-                }
-                node = node.next;
-            }
-        }
-
-        @Override
-        public String transform(Cursor cursor, int columnIndex) {
-            final StringBuilder builder = mBuilder;
-            builder.delete(0, builder.length());
-
-            ExpressionNode node = mFirstNode;
-            // Skip the first node
-            while ((node = node.next) != null) {
-                builder.append(node.asString(cursor));
-            }
-
-            return builder.toString();
-        }
-
-        static abstract class ExpressionNode {
-            public ExpressionNode next;
-
-            public abstract String asString(Cursor cursor);
-        }
-
-        static class ConstantExpressionNode extends ExpressionNode {
-            private final String mConstant;
-
-            ConstantExpressionNode(String constant) {
-                mConstant = constant;
-            }
-
-            @Override
-            public String asString(Cursor cursor) {
-                return mConstant;
-            }
-        }
-
-        static class ColumnExpressionNode extends ExpressionNode {
-            private final String mColumnName;
-            private Cursor mSignature;
-            private int mColumnIndex = -1;
-
-            ColumnExpressionNode(String columnName) {
-                mColumnName = columnName;
-            }
-
-            @Override
-            public String asString(Cursor cursor) {
-                if (cursor != mSignature || mColumnIndex == -1) {
-                    mColumnIndex = cursor.getColumnIndex(mColumnName);
-                    mSignature = cursor;
-                }
-
-                return cursor.getString(mColumnIndex);
-            }
-        }
-    }
-
-    /**
-     * A map transformation offers a simple mapping between specified String values
-     * to Strings or integers.
-     */
-    private static class MapTransformation extends CursorTransformation {
-        private final HashMap<String, String> mStringMappings;
-        private final HashMap<String, Integer> mResourceMappings;
-
-        public MapTransformation(Context context) {
-            super(context);
-            mStringMappings = new HashMap<String, String>();
-            mResourceMappings = new HashMap<String, Integer>();
-        }
-
-        void addStringMapping(String from, String to) {
-            mStringMappings.put(from, to);
-        }
-
-        void addResourceMapping(String from, int to) {
-            mResourceMappings.put(from, to);
-        }
-
-        @Override
-        public String transform(Cursor cursor, int columnIndex) {
-            final String value = cursor.getString(columnIndex);
-            final String transformed = mStringMappings.get(value);
-            return transformed == null ? value : transformed;
-        }
-
-        @Override
-        public int transformToResource(Cursor cursor, int columnIndex) {
-            final String value = cursor.getString(columnIndex);
-            final Integer transformed = mResourceMappings.get(value);
-            try {
-                return transformed == null ? Integer.parseInt(value) : transformed;
-            } catch (NumberFormatException e) {
-                return 0;
-            }
-        }
-    }
-
-    /**
-     * Binds a String to a TextView.
-     */
-    private static class StringBinder extends CursorBinder {
-        public StringBinder(Context context, CursorTransformation transformation) {
-            super(context, transformation);
-        }
-
-        @Override
-        public boolean bind(View view, Cursor cursor, int columnIndex) {
-            if (view instanceof TextView) {
-                final String text = mTransformation.transform(cursor, columnIndex);
-                ((TextView) view).setText(text);
-                return true;
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Binds an image blob to an ImageView.
-     */
-    private static class ImageBinder extends CursorBinder {
-        public ImageBinder(Context context, CursorTransformation transformation) {
-            super(context, transformation);
-        }
-
-        @Override
-        public boolean bind(View view, Cursor cursor, int columnIndex) {
-            if (view instanceof ImageView) {
-                final byte[] data = cursor.getBlob(columnIndex);
-                ((ImageView) view).setImageBitmap(BitmapFactory.decodeByteArray(data, 0,
-                        data.length));
-                return true;
-            }
-            return false;
-        }
-    }
-
-    private static class TagBinder extends CursorBinder {
-        public TagBinder(Context context, CursorTransformation transformation) {
-            super(context, transformation);
-        }
-
-        @Override
-        public boolean bind(View view, Cursor cursor, int columnIndex) {
-            final String text = mTransformation.transform(cursor, columnIndex);
-            view.setTag(text);
-            return true;
-        }
-    }
-
-    /**
-     * Binds an image URI to an ImageView.
-     */
-    private static class ImageUriBinder extends CursorBinder {
-        public ImageUriBinder(Context context, CursorTransformation transformation) {
-            super(context, transformation);
-        }
-
-        @Override
-        public boolean bind(View view, Cursor cursor, int columnIndex) {
-            if (view instanceof ImageView) {
-                ((ImageView) view).setImageURI(Uri.parse(
-                        mTransformation.transform(cursor, columnIndex)));
-                return true;
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Binds a drawable resource identifier to an ImageView.
-     */
-    private static class DrawableBinder extends CursorBinder {
-        public DrawableBinder(Context context, CursorTransformation transformation) {
-            super(context, transformation);
-        }
-
-        @Override
-        public boolean bind(View view, Cursor cursor, int columnIndex) {
-            if (view instanceof ImageView) {
-                final int resource = mTransformation.transformToResource(cursor, columnIndex);
-                if (resource == 0) return false;
-
-                ((ImageView) view).setImageResource(resource);
-                return true;
-            }
-            return false;
-        }
-    }
-}
diff --git a/core/java/android/widget/FrameLayout.java b/core/java/android/widget/FrameLayout.java
index 7bae360..2bc6301 100644
--- a/core/java/android/widget/FrameLayout.java
+++ b/core/java/android/widget/FrameLayout.java
@@ -321,7 +321,7 @@
                             mPaddingTop - mPaddingBottom - lp.topMargin - lp.bottomMargin,
                             MeasureSpec.EXACTLY);
                 } else {
-                    childHeightMeasureSpec = getChildMeasureSpec(widthMeasureSpec,
+                    childHeightMeasureSpec = getChildMeasureSpec(heightMeasureSpec,
                             mPaddingTop + mPaddingBottom + lp.topMargin + lp.bottomMargin,
                             lp.height);
                 }
diff --git a/core/java/com/android/internal/view/menu/ActionMenuView.java b/core/java/com/android/internal/view/menu/ActionMenuView.java
index f927fae..2c5baba 100644
--- a/core/java/com/android/internal/view/menu/ActionMenuView.java
+++ b/core/java/com/android/internal/view/menu/ActionMenuView.java
@@ -187,17 +187,6 @@
             final MenuItemImpl itemData = itemsToShow.get(i);
             View actionView = itemData.getActionView();
 
-            if (actionView == null) {
-                // Check for a layout ID instead
-                final int layoutId = itemData.getActionViewId();
-                if (layoutId != 0) {
-                    LayoutInflater inflater = LayoutInflater.from(getContext());
-                    actionView = inflater.inflate(layoutId, this, false);
-                    itemData.setActionView(0);
-                    itemData.setActionView(actionView);
-                }
-            }
-
             if (actionView != null) {
                 final ViewParent parent = actionView.getParent();
                 if (parent instanceof ViewGroup) {
diff --git a/core/java/com/android/internal/view/menu/MenuItemImpl.java b/core/java/com/android/internal/view/menu/MenuItemImpl.java
index 9faffe5..e1aa385 100644
--- a/core/java/com/android/internal/view/menu/MenuItemImpl.java
+++ b/core/java/com/android/internal/view/menu/MenuItemImpl.java
@@ -83,7 +83,6 @@
     private int mShowAsAction = SHOW_AS_ACTION_NEVER;
 
     private View mActionView;
-    private int mActionViewId;
 
     /** Used for the icon resource ID if this item does not have an icon */
     static final int NO_ICON = 0;
@@ -696,15 +695,13 @@
     }
 
     public MenuItem setActionView(int resId) {
-        mActionViewId = resId;
+        LayoutInflater inflater = LayoutInflater.from(mMenu.getContext());
+        ViewGroup parent = (ViewGroup) mMenu.getMenuView(MenuBuilder.TYPE_ACTION_BUTTON, null);
+        setActionView(inflater.inflate(resId, parent, false));
         return this;
     }
 
     public View getActionView() {
         return mActionView;
     }
-
-    public int getActionViewId() {
-        return mActionViewId;
-    }
 }
diff --git a/core/res/res/values-es-rUS-xlarge/strings.xml b/core/res/res/values-es-rUS-xlarge/strings.xml
new file mode 100644
index 0000000..cef8d12
--- /dev/null
+++ b/core/res/res/values-es-rUS-xlarge/strings.xml
@@ -0,0 +1,331 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- XL -->
+    <string name="fileSizeSuffix" msgid="3468563433835560758">"Segmento <xliff:g id="NUMBER">%1$s</xliff:g><xliff:g id="UNIT">%2$s</xliff:g>"</string>
+    <!-- XL -->
+    <string name="unknownName" msgid="3202822008051920747">"(Desconocido)"</string>
+    <!-- XL -->
+    <string name="defaultVoiceMailAlphaTag" msgid="3668436100965334106">"Buzón de voz"</string>
+    <!-- XL -->
+    <string name="serviceClassVoice" msgid="7086876533404179039">"Google Voice"</string>
+    <!-- XL -->
+    <string name="cfTemplateNotForwarded" msgid="8534356655497306518">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: no se ha reenviado"</string>
+    <!-- XL -->
+    <string name="cfTemplateRegistered" msgid="1255841210142514510">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: no se ha reenviado"</string>
+    <!-- XL -->
+    <string name="cfTemplateRegisteredTime" msgid="7798907169190952367">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: no se ha reenviado"</string>
+    <!-- XL -->
+    <string name="notification_title" msgid="5210128823045542445">"Error al acceder a <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string>
+    <!-- XL -->
+    <string name="low_memory" product="tablet" msgid="4855646606241379548">"¡El espacio de almacenamiento de la tableta está completo! Elimina algunos archivos para liberar espacio."</string>
+    <string name="low_memory" product="default" msgid="9195238880281578473">"¡El espacio de almacenamiento está completo! Elimina algunos archivos para liberar espacio."</string>
+    <!-- XL -->
+    <string name="power_dialog" product="tablet" msgid="6884163545695410971">"Opciones de tableta"</string>
+    <string name="power_dialog" product="default" msgid="8882103237148972564">"Opciones de teléfono"</string>
+    <!-- XL -->
+    <string name="silent_mode" msgid="5687977677409351252">"Modo silencio"</string>
+    <!-- XL -->
+    <string name="shutdown_confirm" product="tablet" msgid="5776903973889956395">"Tu tableta se apagará."</string>
+    <string name="shutdown_confirm" product="default" msgid="3040950969577046278">"Tu teléfono se apagará."</string>
+    <!-- XL -->
+    <string name="global_actions" product="tablet" msgid="110297659383505180">"Opciones de tableta"</string>
+    <string name="global_actions" product="default" msgid="2108237350837066773">"Opciones de teléfono"</string>
+    <!-- XL -->
+    <string name="global_action_toggle_silent_mode" msgid="4538951049191334644">"Modo silencio"</string>
+    <!-- XL -->
+    <string name="global_action_silent_mode_off_status" msgid="9045822172493147761">"El sonido está ENCENDIDO"</string>
+    <!-- XL -->
+    <string name="global_actions_airplane_mode_on_status" msgid="7272433204482202219">"El modo avión está ENCENDIDO"</string>
+    <!-- XL -->
+    <string name="android_system_label" msgid="844561213652704593">"Sistema Androide"</string>
+    <!-- XL -->
+    <string name="permgroupdesc_costMoney" msgid="4836624191696189469">"Admitir que las aplicaciones realicen actividades que se cobran."</string>
+    <!-- XL -->
+    <string name="permgroupdesc_developmentTools" msgid="5514251182135739578">"Las funciones sólo son necesarias para los programadores de aplicaciones."</string>
+    <!-- XL -->
+    <string name="permgrouplab_storage" msgid="746210798053836644">"Almacenamiento"</string>
+    <!-- XL -->
+    <string name="permdesc_readSms" product="tablet" msgid="3026416194429353337">"Permite que la aplicación lea los mensajes SMS almacenados en tu tableta o tarjeta SIM. Las aplicaciones maliciosas pueden leer tus mensajes confidenciales."</string>
+    <string name="permdesc_readSms" product="default" msgid="191875931331016383">"Admite que la aplicación lea los mensajes SMS almacenados en tu teléfono o tarjeta SIM. Las aplicaciones maliciosas pueden leer tus mensajes confidenciales."</string>
+    <!-- XL -->
+    <string name="permdesc_writeSms" product="tablet" msgid="692041754996169941">"Permite que la aplicación escriba a los mensajes SMS almacenados en tu tableta o tarjeta SIM. Las aplicaciones maliciosas pueden borrar tus mensajes."</string>
+    <string name="permdesc_writeSms" product="default" msgid="1659315878254882599">"Admite que la aplicación escriba a los mensajes SMS almacenados en tu teléfono o tarjeta SIM. Las aplicaciones maliciosas pueden borrar tus mensajes."</string>
+    <!-- XL -->
+    <string name="permlab_forceStopPackages" msgid="1277034765943155677">"provocar la detención de otras aplicaciones"</string>
+    <!-- XL -->
+    <string name="permlab_forceBack" msgid="4272218642115232597">"cerrar la aplicación a la fuerza"</string>
+    <!-- XL -->
+    <string name="permdesc_injectEvents" product="tablet" msgid="6096352450860864899">"Permite que una aplicación ofrezca sus propios eventos de entrada (presionar teclas, etc.) a otras aplicaciones. Las aplicaciones maliciosas pueden utilizarlo para tomar el control de la tableta."</string>
+    <string name="permdesc_injectEvents" product="default" msgid="2842435693076075109">"Admite una aplicación que ofrece sus propios eventos de entrada (presionar teclas, etc.) a otras aplicaciones. Las aplicaciones maliciosas pueden utilizarlo para tomar el control del teléfono."</string>
+    <!-- XL -->
+    <string name="permdesc_clearAppCache" product="tablet" msgid="1147333973960547529">"Permite que una aplicación libere espacio de almacenamiento en la tableta eliminando archivos del directorio de memoria caché de la aplicación. En general, el acceso es muy restringido para el proceso del sistema."</string>
+    <string name="permdesc_clearAppCache" product="default" msgid="5790679870501740958">"Admite una aplicación que libera espacio de almacenamiento en el teléfono al eliminar archivos del directorio de memoria caché de la aplicación. En general, el acceso es muy restringido para el proceso del sistema."</string>
+    <!-- XL -->
+    <string name="permdesc_readLogs" product="tablet" msgid="3701009088710926065">"Permite que una aplicación lea diversos archivos de registro del sistema. Esto le permite descubrir información general acerca de lo que haces con la tableta, y puede potencialmente incluir información personal o privada."</string>
+    <string name="permdesc_readLogs" product="default" msgid="8520101632251038537">"Admite una aplicación que lee diversos archivos de registro del sistema. Esto te permite descubrir información general acerca de lo que haces con el teléfono, y puede potencialmente incluir información personal o privada."</string>
+    <!-- XL -->
+    <string name="permdesc_changeComponentState" product="tablet" msgid="1791075936446230356">"Permite que una aplicación cambie si se debe activar o no un componente de otra aplicación. Las aplicaciones maliciosas pueden utilizarlo para desactivar funciones importantes de la tableta. Se debe tener cuidado con el permiso, ya que es posible que los componentes de la aplicación alcancen un estado inservible, imperfecto e inestable."</string>
+    <string name="permdesc_changeComponentState" product="default" msgid="587130297076242796">"Permite que una aplicación cambie si se debe activar o no un componente de otra aplicación. Las aplicaciones maliciosas pueden utilizarlo para desactivar funciones importantes del teléfono. Se debe tener cuidado con el permiso, ya que es posible que los componentes de la aplicación alcancen un estado inservible, imperfecto e inestable."</string>
+    <!-- XL -->
+    <string name="permdesc_receiveBootCompleted" product="tablet" msgid="8660405432665162821">"Permite que una aplicación se inicie en cuanto el sistema haya finalizado la inicialización. Esto puede ocasionar que la tableta demore más en inicializar y que la aplicación retarde el funcionamiento total de la tableta al estar en ejecución constante."</string>
+    <string name="permdesc_receiveBootCompleted" product="default" msgid="1827765096700833418">"Admite una aplicación que se inicia cuando el sistema haya finalizado la inicialización. Esto puede ocasionar que se demore más tiempo en inicializar el teléfono y que la aplicación retarde el funcionamiento total del teléfono al estar en ejecución constante."</string>
+    <!-- XL -->
+    <string name="permdesc_readContacts" product="tablet" msgid="1611730857475623952">"Permite que una aplicación lea todos los datos de de contacto (direcciones) almacenados en tu tableta. Las aplicaciones maliciosas pueden utilizarlo para enviar tus datos a otras personas."</string>
+    <string name="permdesc_readContacts" product="default" msgid="6610535719925788049">"Admite una aplicación que lee todos los datos de (direcciones) de contactos almacenados en tu teléfono. Las aplicaciones maliciosas pueden utilizarlo para enviar tus eventos de calendario a otras personas."</string>
+    <!-- XL -->
+    <string name="permdesc_writeContacts" product="tablet" msgid="4572703488642353934">"Permite que una aplicación modifique los datos de (dirección) guardados en tu tableta. Las aplicaciones maliciosas pueden utilizarlo para borrar o modificar los datos de contacto."</string>
+    <string name="permdesc_writeContacts" product="default" msgid="714397557711969040">"Admite una aplicación que modifica los datos de (dirección de) contacto guardados en tu teléfono. Las aplicaciones maliciosas pueden utilizarlo para borrar o modificar los datos de contacto."</string>
+    <!-- XL -->
+    <string name="permdesc_readCalendar" product="tablet" msgid="2991522150157238929">"Permite que una aplicación lea todos los eventos de calendario almacenados en tu tableta. Las aplicaciones maliciosas pueden utilizarlo para enviar tus eventos de calendario a otras personas."</string>
+    <string name="permdesc_readCalendar" product="default" msgid="2618681024074734985">"Admite que una aplicación lea todos los eventos de calendario almacenados en tu teléfono. Las aplicaciones maliciosas pueden utilizarlo para enviar tus eventos de calendario a otras personas."</string>
+    <!-- XL -->
+    <string name="permdesc_accessFineLocation" product="tablet" msgid="9186984659787705379">"Accede a las fuentes de ubicación precisa, como el Sistema de posicionamiento global en la tableta, si está disponible. Las aplicaciones maliciosas pueden utilizarlo para determinar donde te encuentras y puede consumir energía adicional de la batería."</string>
+    <string name="permdesc_accessFineLocation" product="default" msgid="7130852247133907221">"Accede a las fuentes de ubicación precisa, como el Sistema de posicionamiento global en el teléfono, si está disponible. Las aplicaciones maliciosas pueden utilizarlo para determinar donde te encuentras y puede consumir energía adicional de la batería."</string>
+    <!-- XL -->
+    <string name="permdesc_accessCoarseLocation" product="tablet" msgid="2943949975553225591">"Accede a las fuentes de ubicación aproximada, como la base de datos de la red de celulares, para determinar la ubicación aproximada de un tableta, si está disponible. Las aplicaciones maliciosas pueden utilizarlo para determinar aproximadamente dónde te encuentras."</string>
+    <string name="permdesc_accessCoarseLocation" product="default" msgid="7474972764638621839">"Accede a las fuentes de ubicación aproximada, como la base de datos de la red de celulares, para determinar una ubicación telefónica aproximada, si está disponible. Las aplicaciones maliciosas pueden utilizarlo para determinar aproximadamente donde te encuentras."</string>
+    <!-- XL -->
+    <string name="permlab_brick" product="tablet" msgid="6967130388106614085">"inhabilitar tableta de forma permanente"</string>
+    <string name="permlab_brick" product="default" msgid="3120283238813720510">"desactivar teléfono de manera permanente"</string>
+    <!-- XL -->
+    <string name="permdesc_brick" product="tablet" msgid="8506097851567246888">"Permite que la aplicación desactive todo la tableta de manera permanente. Esto es muy peligroso."</string>
+    <string name="permdesc_brick" product="default" msgid="6696459767254028146">"Admite que la aplicación desactive todo el teléfono de manera permanente. Esto es muy peligroso."</string>
+    <!-- XL -->
+    <string name="permlab_reboot" product="tablet" msgid="8299304590708874992">"forzar reinicio de la tableta"</string>
+    <string name="permlab_reboot" product="default" msgid="7761230490609718232">"provocar el reinicio del teléfono"</string>
+    <!-- XL -->
+    <string name="permdesc_reboot" product="tablet" msgid="8289402537687518137">"Permite que la aplicación provoque el reinicio de la tableta."</string>
+    <string name="permdesc_reboot" product="default" msgid="2425170170087532554">"Admite que la aplicación provoque que el teléfono se reinicie."</string>
+    <!-- XL -->
+    <string name="permlab_performCdmaProvisioning" product="tablet" msgid="1602175938040327630">"iniciar directamente la configuración CDMA de la tableta"</string>
+    <string name="permlab_performCdmaProvisioning" product="default" msgid="2364447039211144234">"comienza directamente la configuración CDMA del teléfono"</string>
+    <!-- XL -->
+    <string name="permlab_checkinProperties" msgid="8770356116386811264">"acceder a las propiedades de registro"</string>
+    <!-- XL -->
+    <string name="permlab_bindGadget" msgid="2772444448613501375">"elegir controles"</string>
+    <!-- XL -->
+    <string name="permdesc_bindGadget" msgid="5172327215211875807">"Admite que la aplicación indique al sistema cuáles controles puede utilizar cada aplicación. Con este permiso, las aplicaciones pueden brindar acceso a los datos personales a otras aplicaciones. Las aplicaciones normales no deben utilizarlo."</string>
+    <!-- XL -->
+    <string name="permlab_wakeLock" product="tablet" msgid="8548785337425173690">"evitar que la tableta entre en estado de inactividad"</string>
+    <string name="permlab_wakeLock" product="default" msgid="7590534090355174805">"evitar que el teléfono entre en estado de inactividad"</string>
+    <!-- XL -->
+    <string name="permdesc_wakeLock" product="tablet" msgid="6871828582124115814">"Permite que una aplicación evite que la tableta entre en estado de inactividad."</string>
+    <string name="permdesc_wakeLock" product="default" msgid="1200311528451468554">"Admite una aplicación que evita que el teléfono entre en estado de inactividad."</string>
+    <!-- XL -->
+    <string name="permlab_devicePower" product="tablet" msgid="4737873025369971061">"apagar o encender la tableta"</string>
+    <string name="permlab_devicePower" product="default" msgid="6879460773734563850">"apagar o encender el teléfono"</string>
+    <!-- XL -->
+    <string name="permdesc_devicePower" product="tablet" msgid="5930342678996327905">"Permite que una aplicación encienda o apague la tableta."</string>
+    <string name="permdesc_devicePower" product="default" msgid="6653901512148320818">"Admite que la aplicación encienda o apague el teléfono."</string>
+    <!-- XL -->
+    <string name="permdesc_factoryTest" product="tablet" msgid="396653994609190055">"Se ejecuta como una prueba de fábrica de bajo nivel que permite un acceso completo al hardware de la tableta. Sólo disponible cuando la tableta se ejecuta en el modo de prueba de fábrica."</string>
+    <string name="permdesc_factoryTest" product="default" msgid="4581239666568781766">"Se ejecuta como una prueba de fábrica de bajo nivel que permite un acceso completo al hardware del teléfono. Sólo disponible cuando un teléfono se ejecuta en el modo de prueba de fábrica."</string>
+    <!-- XL -->
+    <string name="permlab_setWallpaper" msgid="845032615203772571">"establecer fondo de pantalla"</string>
+    <!-- XL -->
+    <string name="permdesc_setWallpaper" msgid="3378501759667797259">"Admite que la aplicación establezca el fondo de pantalla del sistema."</string>
+    <!-- XL -->
+    <string name="permlab_setWallpaperHints" msgid="4995885499848128983">"establecer sugerencias de tamaño del fondo de pantalla"</string>
+    <!-- XL -->
+    <string name="permdesc_setWallpaperHints" msgid="8857901708691279048">"Admite que la aplicación establezca las sugerencias de tamaño del fondo de pantalla del sistema."</string>
+    <!-- XL -->
+    <string name="permdesc_setTime" product="tablet" msgid="7329574196603775554">"Permite que una aplicación cambie la hora de la tableta."</string>
+    <string name="permdesc_setTime" product="default" msgid="7787175369529849526">"Permite a una aplicación cambiar la hora del teléfono."</string>
+    <!-- XL -->
+    <string name="permdesc_setTimeZone" product="tablet" msgid="3851480395450283316">"Permite que una aplicación cambie la zona horaria de la tableta."</string>
+    <string name="permdesc_setTimeZone" product="default" msgid="3231143515254577541">"Admite una aplicación que cambia la zona horaria del teléfono."</string>
+    <!-- XL -->
+    <string name="permdesc_getAccounts" product="tablet" msgid="374861616407073729">"Permite que una aplicación obtenga una la lista de cuentas conocidas por la tableta."</string>
+    <string name="permdesc_getAccounts" product="default" msgid="6356501268884684429">"Admite una aplicación que obtiene la lista de cuentas conocidas del teléfono."</string>
+    <!-- XL -->
+    <string name="permdesc_bluetoothAdmin" product="tablet" msgid="8034248164659819866">"Permite que una aplicación configure el Bluetooth local de la tableta, y descubra y se vincule con dispositivos remotos."</string>
+    <string name="permdesc_bluetoothAdmin" product="default" msgid="2555370145147752776">"Admite una aplicación que configura el teléfono Bluetooth local y descubre y se vincula con dispositivos remotos."</string>
+    <!-- XL -->
+    <string name="permdesc_bluetooth" product="tablet" msgid="4631562404621086816">"Permite que una aplicación vea la configuración de la tableta Bluetooth local, y que realice y acepte conexiones con dispositivos vinculados."</string>
+    <string name="permdesc_bluetooth" product="default" msgid="1202135959389935958">"Admite una aplicación que ve la configuración del teléfono Bluetooth local, y realiza y acepta conexiones con dispositivos vinculados."</string>
+    <!-- XL -->
+    <string name="policydesc_watchLogin" product="tablet" msgid="7927990389488709968">"Supervisar el número de contraseñas incorrectas ingresadas al desbloquear la pantalla, y bloquear la tableta o eliminar todos los datos del teléfono si se ingresan demasiadas contraseñas incorrectas."</string>
+    <string name="policydesc_watchLogin" product="default" msgid="4998594853332798741">"Supervisa el número de contraseñas incorrectas ingresadas al desbloquear la pantalla, y bloquee el teléfono o elimine todos los datos del teléfono si se ingresan demasiadas contraseñas incorrectas."</string>
+    <!-- XL -->
+    <string name="policydesc_wipeData" product="tablet" msgid="7871059407132175855">"Borrar los datos de la tableta sin advertencias, restableciendo la configuración de fábrica"</string>
+    <string name="policydesc_wipeData" product="default" msgid="6003127471292136411">"Borrar los datos del teléfono sin advertencias al restablecer la configuración original"</string>
+    <!-- XL -->
+  <string-array name="phoneTypes">
+    <item msgid="7066790683658405096">"Pantalla principal"</item>
+    <item msgid="5813675571320075289">"Teléfono móvil"</item>
+    <item msgid="1236863745322977021">"Trabajo"</item>
+    <item msgid="7018038125868933566">"Fax laboral"</item>
+    <item msgid="4280105707643078852">"Fax personal"</item>
+    <item msgid="6527083287534782580">"Localizador"</item>
+    <item msgid="706618935041239888">"Otro"</item>
+    <item msgid="8099625332540070724">"Personalizado"</item>
+  </string-array>
+    <!-- XL -->
+  <string-array name="emailAddressTypes">
+    <item msgid="8080673853442355385">"Pantalla principal"</item>
+    <item msgid="924798042157989715">"Trabajo"</item>
+    <item msgid="1959796935508361158">"Otro"</item>
+    <item msgid="756534161520555926">"Personalizado"</item>
+  </string-array>
+    <!-- XL -->
+  <string-array name="postalAddressTypes">
+    <item msgid="1166454994471190496">"Pantalla principal"</item>
+    <item msgid="3602955376664951787">"Trabajo"</item>
+    <item msgid="4646105398231575508">"Otro"</item>
+    <item msgid="8191179302220976184">"Personalizado"</item>
+  </string-array>
+    <!-- XL -->
+  <string-array name="imAddressTypes">
+    <item msgid="2528436635522549040">"Pantalla principal"</item>
+    <item msgid="5834207144511084508">"Trabajo"</item>
+    <item msgid="3796683891024584813">"Otro"</item>
+    <item msgid="6644316676098098833">"Personalizado"</item>
+  </string-array>
+    <!-- XL -->
+  <string-array name="organizationTypes">
+    <item msgid="6571823895277482483">"Trabajo"</item>
+    <item msgid="4013674940836786104">"Otro"</item>
+    <item msgid="8549998141814637453">"Personalizado"</item>
+  </string-array>
+    <!-- XL -->
+    <string name="phoneTypeHome" msgid="2087652870939635038">"Pantalla principal"</string>
+    <!-- XL -->
+    <string name="phoneTypeMobile" msgid="7084573626440935140">"Teléfono móvil"</string>
+    <!-- XL -->
+    <string name="emailTypeHome" msgid="1298773522695936612">"Pantalla principal"</string>
+    <!-- XL -->
+    <string name="emailTypeMobile" msgid="5515624509217674980">"Teléfono móvil"</string>
+    <!-- XL -->
+    <string name="postalTypeHome" msgid="7553888805834710738">"Pantalla principal"</string>
+    <!-- XL -->
+    <string name="imTypeHome" msgid="3732426015472142690">"Pantalla principal"</string>
+    <!-- XL -->
+    <string name="sipAddressTypeHome" msgid="8212230577724692911">"Pantalla principal"</string>
+    <!-- XL -->
+    <string name="lockscreen_pattern_instructions" msgid="9171665895877154059">"Extraer el patrón para desbloquear"</string>
+    <!-- XL -->
+    <string name="lockscreen_battery_short" msgid="891372653127247039">"Segmento <xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+    <!-- XL -->
+    <string name="lockscreen_missing_sim_message" product="tablet" msgid="3961770350078423154">"No hay tarjeta SIM en la tableta."</string>
+    <string name="lockscreen_missing_sim_message" product="default" msgid="5997031739677800758">"No hay tarjeta SIM en el teléfono."</string>
+    <!-- XL -->
+    <string name="lockscreen_too_many_failed_attempts_dialog_message" msgid="2429599468920598896">"Has establecido incorrectamente tu gráfico de desbloqueo <xliff:g id="NUMBER_0">%d</xliff:g> veces. "\n\n"Vuelve a intentarlo en <xliff:g id="NUMBER_1">%d</xliff:g> segundos."</string>
+    <!-- XL -->
+    <string name="lockscreen_failed_attempts_almost_glogin" product="tablet" msgid="3211267232692817092">"Has establecido incorrectamente tu gráfico de desbloqueo <xliff:g id="NUMBER_0">%d</xliff:g> veces. Luego de <xliff:g id="NUMBER_1">%d</xliff:g> intentos incorrectos más, se te solicitará que desbloquees tu tableta al acceder a Google."\n\n" Vuelve a intentarlo en <xliff:g id="NUMBER_2">%d</xliff:g> segundos."</string>
+    <string name="lockscreen_failed_attempts_almost_glogin" product="default" msgid="7097890594752816076">"Has establecido incorrectamente tu gráfico de desbloqueo <xliff:g id="NUMBER_0">%d</xliff:g> veces. Luego de <xliff:g id="NUMBER_1">%d</xliff:g> intentos incorrectos, se te solicitará que desbloquees tu teléfono al acceder a Google. "\n\n" Vuelve a intentarlo en <xliff:g id="NUMBER_2">%d</xliff:g> segundos."</string>
+    <!-- XL -->
+    <string name="lockscreen_glogin_submit_button" msgid="4760302858316749698">"Acceder"</string>
+    <!-- XL -->
+    <string name="lockscreen_glogin_invalid_input" msgid="7265806099449246244">"Nombre de usuario o contraseña no válidos."</string>
+    <!-- XL -->
+    <string name="hour_ampm" msgid="6161399724998500216">"Segmento <xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%P</xliff:g>"</string>
+    <!-- XL -->
+    <string name="hour_cap_ampm" msgid="724197720606114012">"Segmento <xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%p</xliff:g>"</string>
+    <!-- XL -->
+    <string name="double_tap_toast" msgid="2893001600485832537">"Sugerencia: presiona dos veces para acercar y alejar"</string>
+    <!-- XL -->
+    <string name="autofill_address_name_separator" msgid="5171727678145785075">" Segmento "</string>
+    <!-- XL -->
+    <string name="permlab_readHistoryBookmarks" msgid="6148149152792104516">"leer historial y favoritos del navegador"</string>
+    <!-- XL -->
+    <string name="permdesc_readHistoryBookmarks" msgid="7371336472744100059">"Permite a la aplicación leer todas las URL que ha visitado el navegador y todos los favoritos del navegador."</string>
+    <!-- XL -->
+    <string name="permlab_writeHistoryBookmarks" msgid="1369319390968848231">"escribir historial y favoritos del navegador"</string>
+    <!-- XL -->
+    <string name="permdesc_writeHistoryBookmarks" product="tablet" msgid="3870229397949634482">"Permite que una aplicación modifique el historial de navegación y los favoritos del navegador almacenados en tu tableta. Las aplicaciones maliciosas pueden utilizarlo para borrar o modificar los datos en tu navegador."</string>
+    <string name="permdesc_writeHistoryBookmarks" product="default" msgid="6845659334691579933">"Permite a una aplicación modificar el historial y los favoritos del navegador almacenados en tu teléfono. Las aplicaciones maliciosas pueden utilizarlo para borrar o modificar tus datos."</string>
+    <!-- XL -->
+    <string name="permlab_setAlarm" msgid="8112208516527103653">"fija la alarma en el reloj de alarma"</string>
+    <!-- XL -->
+    <string name="permdesc_setAlarm" msgid="5454386032150297784">"Permite a la aplicación fijar una alarma en una aplicación de alarma. Es posible que algunas aplicaciones de alarma no implementen esta función."</string>
+    <!-- XL -->
+    <string name="menu_delete_shortcut_label" msgid="8482704027019632634">"eliminar"</string>
+    <!-- XL -->
+  <plurals name="num_minutes_ago">
+    <item quantity="one" msgid="468685153446407901">"hace 1 minuto"</item>
+    <item quantity="other" msgid="211907662145171054">"Hace <xliff:g id="COUNT">%d</xliff:g> minutos"</item>
+  </plurals>
+    <!-- XL -->
+  <plurals name="num_hours_ago">
+    <item quantity="one" msgid="2172827344495633666">"hace 1 hora"</item>
+    <item quantity="other" msgid="6094391999921908511">"Hace <xliff:g id="COUNT">%d</xliff:g> horas"</item>
+  </plurals>
+    <!-- XL -->
+  <plurals name="num_days_ago">
+    <item quantity="one" msgid="3766494702684657165">"ayer"</item>
+    <item quantity="other" msgid="5030316952487658828">"Hace <xliff:g id="COUNT">%d</xliff:g> días"</item>
+  </plurals>
+    <!-- XL -->
+  <plurals name="abbrev_num_seconds_ago">
+    <item quantity="one" msgid="1441918190525197797">"hace 1 s"</item>
+    <item quantity="other" msgid="3958332340802316933">"hace <xliff:g id="COUNT">%d</xliff:g> segundos"</item>
+  </plurals>
+    <!-- XL -->
+  <plurals name="abbrev_num_minutes_ago">
+    <item quantity="one" msgid="3404245071272952255">"hace 1 min"</item>
+    <item quantity="other" msgid="6004808520903389765">"hace <xliff:g id="COUNT">%d</xliff:g> min"</item>
+  </plurals>
+    <!-- XL -->
+  <plurals name="abbrev_num_hours_ago">
+    <item quantity="one" msgid="806010152744475654">"hace 1 hora"</item>
+    <item quantity="other" msgid="7553525762196895290">"Hace <xliff:g id="COUNT">%d</xliff:g> horas"</item>
+  </plurals>
+    <!-- XL -->
+  <plurals name="abbrev_num_days_ago">
+    <item quantity="one" msgid="5819444260187611238">"ayer"</item>
+    <item quantity="other" msgid="1069986768190052012">"Hace <xliff:g id="COUNT">%d</xliff:g> días"</item>
+  </plurals>
+    <!-- XL -->
+    <string name="preposition_for_time" msgid="3606608741888559522">"a la/s <xliff:g id="TIME">%s</xliff:g>"</string>
+    <!-- XL -->
+    <string name="minutes" msgid="1486240209627391507">"min"</string>
+    <!-- XL -->
+    <string name="selectAll" msgid="847570914566450966">"Seleccionar todos"</string>
+    <!-- XL -->
+    <string name="low_internal_storage_view_text" product="tablet" msgid="6497548813789342134">"Está quedando poco espacio de almacenamiento en la tableta."</string>
+    <string name="low_internal_storage_view_text" product="default" msgid="2901569701336868928">"Hay poco espacio de almacenamiento en el teléfono."</string>
+    <!-- XL -->
+    <string name="capital_on" msgid="5705918046896729554">"ENCENDIDO"</string>
+    <!-- XL -->
+    <string name="wait" msgid="8036803866051401072">"Espera"</string>
+    <!-- XL -->
+    <string name="heavy_weight_notification" msgid="5762367358298413602">"<xliff:g id="APP">%1$s</xliff:g> se está ejecutando"</string>
+    <!-- XL -->
+    <string name="ext_media_checking_notification_title" product="nosdcard" msgid="103298639852047758">"Preparando almacenamiento USB"</string>
+    <string name="ext_media_checking_notification_title" product="default" msgid="2111086053471573248">"Preparando la tarjeta SD"</string>
+    <!-- XL -->
+    <string name="ime_action_done" msgid="7200237418945571897">"Listo"</string>
+    <!-- XL -->
+    <string name="wallpaper_binding_label" msgid="6966627494441714436">"Fondo de pantalla"</string>
+    <!-- XL -->
+    <string name="websearch" msgid="904596193450917688">"Búsqueda web"</string>
+    <!-- XL -->
+    <string name="permlab_mediaStorageWrite" product="default" msgid="5585262071354704256">"modificar/eliminar los contenidos del almacenamientos de medios internos"</string>
+    <!-- XL -->
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="2372999661142345443">"Permite que una aplicación modifique los contenidos del almacenamiento interno de medios."</string>
+    <!-- XL -->
+    <string name="autofill_address_summary_name_format" msgid="7531610259426153850">"$1$2$3"</string>
+    <!-- XL -->
+    <string name="autofill_address_summary_format" msgid="8398158823767723887">"$1$2$3"</string>
+    <!-- XL -->
+    <string name="gpsNotifTicker" msgid="6612390321359669319">"Solicitud de ubicación de <xliff:g id="NAME">%s</xliff:g>"</string>
+    <!-- XL -->
+    <string name="gpsNotifTitle" msgid="7533028619350196545">"Solicitud de ubicación"</string>
+    <!-- XL -->
+    <string name="gpsNotifMessage" msgid="5592972401593755530">"Solicitado por <xliff:g id="NAME">%1$s</xliff:g> (<xliff:g id="SERVICE">%2$s</xliff:g>)"</string>
+    <!-- XL -->
+    <string name="gpsVerifYes" msgid="1511016393202739483">"Sí"</string>
+    <!-- XL -->
+    <string name="gpsVerifNo" msgid="661731239940896232">"No"</string>
+    <!-- XL -->
+    <string name="sync_too_many_deletes" msgid="6088394702274114202">"Eliminar el límite excedido"</string>
+    <!-- XL -->
+    <string name="sync_too_many_deletes_desc" msgid="4794082462774743277">"Existen <xliff:g id="NUMBER_OF_DELETED_ITEMS">%1$d</xliff:g> artículos eliminados para <xliff:g id="TYPE_OF_SYNC">%2$s</xliff:g>, cuenta <xliff:g id="ACCOUNT_NAME">%3$s</xliff:g>. ¿Qué te gustaría hacer?"</string>
+    <!-- XL -->
+    <string name="sync_really_delete" msgid="7782215155483034729">"Eliminar artículos."</string>
+    <!-- XL -->
+    <string name="sync_undo_deletes" msgid="6501390120900825477">"Deshacer eliminaciones."</string>
+    <!-- XL -->
+    <string name="sync_do_nothing" msgid="612038572646360281">"No hagas nada por el momento."</string>
+</resources>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index f909bd6..7275ef4 100755
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -2047,9 +2047,6 @@
              will use only the number of items in the adapter and the number of items visible
              on screen to determine the scrollbar's properties. -->
         <attr name="smoothScrollbar" format="boolean" />
-        <!-- A reference to an XML description of the adapter to attach to the list.
-             XXX Should remove? -->
-        <attr name="adapter" format="reference" />
         <!-- Defines the choice behavior for the view. By default, lists do not have
              any choice behavior. By setting the choiceMode to singleChoice, the list
              allows up to one item to be in a chosen state. By setting the choiceMode to
@@ -4578,74 +4575,6 @@
         <attr name="settingsActivity" />
     </declare-styleable>
 
-    <!-- =============================== -->
-    <!-- Adapters attributes             -->
-    <!-- =============================== -->
-    <eat-comment />
-
-    <!-- Adapter used to bind cursors.
-         @hide XXX should remove? -->
-    <declare-styleable name="CursorAdapter">
-        <!-- URI to get the cursor from. Optional. -->
-        <attr name="uri" format="string" />
-        <!-- Selection statement for the query. Optional. -->
-        <attr name="selection" format="string" />
-        <!-- Sort order statement for the query. Optional. -->
-        <attr name="sortOrder" format="string" />
-        <!-- Layout resource used to display each row from the cursor. Mandatory. -->
-        <attr name="layout" />
-    </declare-styleable>
-
-    <!-- Attributes used in bind items for XML cursor adapters.
-         @hide XXX should remove? -->
-    <declare-styleable name="CursorAdapter_BindItem">
-        <!-- The name of the column to bind from. Mandatory. -->
-        <attr name="from" format="string" />
-        <!-- The resource id of the view to bind to. Mandatory. -->
-        <attr name="to" format="reference" />
-        <!-- The type of binding. If this value is not specified, the type will be
-             inferred from the type of the "to" target view. Mandatory.
-
-             The type can be one of:
-             <ul>
-             <li>string, The content of the column is interpreted as a string.</li>
-             <li>image, The content of the column is interpreted as a blob describing an image.</li>
-             <li>image-uri, The content of the column is interpreted as a URI to an image.</li>
-             <li>drawable, The content of the column is interpreted as a resource id to a drawable.</li>
-             <li>A fully qualified class name, corresponding to an implementation of
-                 android.widget.Adapters.CursorBinder.</li>
-             </ul>
-         -->
-        <attr name="as" format="string" />
-    </declare-styleable>
-
-    <!-- Attributes used in select items for XML cursor adapters.
-         @hide XXX should remove? -->
-    <declare-styleable name="CursorAdapter_SelectItem">
-        <!-- The name of the column to select. Mandatory. -->
-        <attr name="column" format="string" />
-    </declare-styleable>
-
-    <!-- Attributes used to map values to new values in XML cursor adapters' bind items.
-         @hide XXX should remove? -->
-    <declare-styleable name="CursorAdapter_MapItem">
-        <!-- The original value from the column. Mandatory. -->
-        <attr name="fromValue" format="string" />
-        <!-- The new value from the column. Mandatory. -->
-        <attr name="toValue" format="string" />
-    </declare-styleable>
-
-    <!-- Attributes used to map values to new values in XML cursor adapters' bind items.
-         @hide XXX should remove? -->
-    <declare-styleable name="CursorAdapter_TransformItem">
-        <!-- The transformation expression. Mandatory if "withClass" is not specified. -->
-        <attr name="withExpression" format="string" />
-        <!-- The transformation class, an implementation of
-             android.widget.Adapters.CursorTransformation. Mandatory if "withExpression"
-             is not specified. -->
-        <attr name="withClass" format="string" />
-    </declare-styleable>
-
     <!-- Attributes used to style the Action Bar. -->
     <declare-styleable name="ActionBar">
         <!-- The type of navigation to use. -->
diff --git a/include/media/mediametadataretriever.h b/include/media/mediametadataretriever.h
index ed54b37..03dd52d 100644
--- a/include/media/mediametadataretriever.h
+++ b/include/media/mediametadataretriever.h
@@ -56,6 +56,7 @@
     METADATA_KEY_MIMETYPE        = 22,
     METADATA_KEY_DISC_NUMBER     = 23,
     METADATA_KEY_ALBUMARTIST     = 24,
+    METADATA_KEY_COMPILATION     = 25,
     // Add more here...
 };
 
diff --git a/include/media/stagefright/MetaData.h b/include/media/stagefright/MetaData.h
index 5f33739..5170a2c 100644
--- a/include/media/stagefright/MetaData.h
+++ b/include/media/stagefright/MetaData.h
@@ -80,6 +80,7 @@
     kKeyDiscNumber        = 'dnum',  // cstring
     kKeyDate              = 'date',  // cstring
     kKeyWriter            = 'writ',  // cstring
+    kKeyCompilation       = 'cpil',  // cstring
     kKeyTimeScale         = 'tmsl',  // int32_t
 
     // video profile and level
diff --git a/media/java/android/media/MediaMetadataRetriever.java b/media/java/android/media/MediaMetadataRetriever.java
index 6209dc0..b99f7ed 100644
--- a/media/java/android/media/MediaMetadataRetriever.java
+++ b/media/java/android/media/MediaMetadataRetriever.java
@@ -345,5 +345,6 @@
     public static final int METADATA_KEY_MIMETYPE        = 22;
     public static final int METADATA_KEY_DISCNUMBER      = 23;
     public static final int METADATA_KEY_ALBUMARTIST     = 24;
+    public static final int METADATA_KEY_COMPILATION     = 25;
     // Add more here...
 }
diff --git a/media/libstagefright/MP3Extractor.cpp b/media/libstagefright/MP3Extractor.cpp
index 9610f90..0bb3a86 100644
--- a/media/libstagefright/MP3Extractor.cpp
+++ b/media/libstagefright/MP3Extractor.cpp
@@ -614,6 +614,7 @@
         { kKeyAuthor, "TXT", "TEXT" },
         { kKeyCDTrackNumber, "TRK", "TRCK" },
         { kKeyDiscNumber, "TPA", "TPOS" },
+        { kKeyCompilation, "TCP", "TCMP" },
     };
     static const size_t kNumMapEntries = sizeof(kMap) / sizeof(kMap[0]);
 
diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp
index dfc9b5a..bafa243 100644
--- a/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/MPEG4Extractor.cpp
@@ -1392,6 +1392,17 @@
             metadataKey = kKeyGenre;
             break;
         }
+        case FOURCC('c', 'p', 'i', 'l'):
+        {
+            if (size == 9 && flags == 21) {
+                char tmp[16];
+                sprintf(tmp, "%d",
+                        (int)buffer[size - 1]);
+
+                mFileMetaData->setCString(kKeyCompilation, tmp);
+            }
+            break;
+        }
         case FOURCC('t', 'r', 'k', 'n'):
         {
             if (size == 16 && flags == 0) {
diff --git a/media/libstagefright/OggExtractor.cpp b/media/libstagefright/OggExtractor.cpp
index 4b8a014..cf622af 100644
--- a/media/libstagefright/OggExtractor.cpp
+++ b/media/libstagefright/OggExtractor.cpp
@@ -660,6 +660,9 @@
     } kMap[] = {
         { "TITLE", kKeyTitle },
         { "ARTIST", kKeyArtist },
+        { "ALBUMARTIST", kKeyAlbumArtist },
+        { "ALBUM ARTIST", kKeyAlbumArtist },
+        { "COMPILATION", kKeyCompilation },
         { "ALBUM", kKeyAlbum },
         { "COMPOSER", kKeyComposer },
         { "GENRE", kKeyGenre },
diff --git a/media/libstagefright/StagefrightMediaScanner.cpp b/media/libstagefright/StagefrightMediaScanner.cpp
index 86e0e73..5d15246 100644
--- a/media/libstagefright/StagefrightMediaScanner.cpp
+++ b/media/libstagefright/StagefrightMediaScanner.cpp
@@ -156,6 +156,7 @@
             { "year", METADATA_KEY_YEAR },
             { "duration", METADATA_KEY_DURATION },
             { "writer", METADATA_KEY_WRITER },
+            { "compilation", METADATA_KEY_COMPILATION },
         };
         static const size_t kNumEntries = sizeof(kKeyMap) / sizeof(kKeyMap[0]);
 
diff --git a/media/libstagefright/StagefrightMetadataRetriever.cpp b/media/libstagefright/StagefrightMetadataRetriever.cpp
index 8cd2998..4f483ac 100644
--- a/media/libstagefright/StagefrightMetadataRetriever.cpp
+++ b/media/libstagefright/StagefrightMetadataRetriever.cpp
@@ -394,6 +394,7 @@
         { kKeyTitle, METADATA_KEY_TITLE },
         { kKeyYear, METADATA_KEY_YEAR },
         { kKeyWriter, METADATA_KEY_WRITER },
+        { kKeyCompilation, METADATA_KEY_COMPILATION },
     };
     static const size_t kNumMapEntries = sizeof(kMap) / sizeof(kMap[0]);
 
diff --git a/packages/SystemUI/res/values-es-rUS-xlarge-land/strings.xml b/packages/SystemUI/res/values-es-rUS-xlarge-land/strings.xml
new file mode 100644
index 0000000..78a4c18
--- /dev/null
+++ b/packages/SystemUI/res/values-es-rUS-xlarge-land/strings.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- XL -->
+    <string name="toast_rotation_locked" msgid="2686639138967158852">"La pantalla está bloqueada en orientación paisaje."</string>
+</resources>
diff --git a/packages/SystemUI/res/values-es-rUS-xlarge-port/strings.xml b/packages/SystemUI/res/values-es-rUS-xlarge-port/strings.xml
new file mode 100644
index 0000000..9daef6a
--- /dev/null
+++ b/packages/SystemUI/res/values-es-rUS-xlarge-port/strings.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- XL -->
+    <string name="toast_rotation_locked" msgid="4297721709987511908">"La pantalla está bloqueada en orientación retrato."</string>
+</resources>
diff --git a/packages/SystemUI/res/values-es-rUS-xlarge/strings.xml b/packages/SystemUI/res/values-es-rUS-xlarge/strings.xml
index bf627f4..f29259a 100644
--- a/packages/SystemUI/res/values-es-rUS-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS-xlarge/strings.xml
@@ -1,26 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/**
- * Copyright (c) 2010, 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">
-    <!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
-    <skip />
-    <string name="status_bar_settings_signal_meter_disconnected" msgid="4684094636492991496">"Sin conexión a Int."</string>
-    <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="1456658018593445677">"WiFi conectado"</string>
+    <!-- XL xlarge -->
+    <string name="status_bar_clear_all_button" msgid="4341545325987974494">"Eliminar todos"</string>
+    <!-- XL -->
+    <string name="status_bar_no_notifications_title" msgid="2492933749414725897">"No tienes notificaciones"</string>
+    <!-- XL -->
+    <string name="status_bar_settings_rotation_lock" msgid="9125161825884157545">"Bloquear orient. de pant."</string>
+    <!-- XL -->
+    <string name="recent_tasks_app_label" msgid="5550538721034982973">"Google Apps"</string>
+    <!-- XL xlarge -->
+    <string name="status_bar_settings_signal_meter_disconnected" msgid="4866302415753953027">"Sin conexión a Internet"</string>
+    <!-- XL xlarge -->
+    <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="3832182580451976589">"Wi-Fi conectado"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-xlarge/config.xml b/packages/SystemUI/res/values-xlarge/config.xml
index e140914..299ab97 100644
--- a/packages/SystemUI/res/values-xlarge/config.xml
+++ b/packages/SystemUI/res/values-xlarge/config.xml
@@ -24,7 +24,7 @@
 
     <!-- Component to be used as the status bar service.  Must implement the IStatusBar
      interface.  This name is in the ComponentName flattened format (package/class)  -->
-    <string name="config_statusBarComponent">com.android.systemui.statusbar.tablet.TabletStatusBar</string>
+    <string name="config_statusBarComponent" translatable="false">com.android.systemui.statusbar.tablet.TabletStatusBar</string>
 
     <!-- Whether or not we show the number in the bar. -->
     <bool name="config_statusBarShowNumber">false</bool>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
index bfc2aa1..9ddb432 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
@@ -1149,7 +1149,11 @@
                     }
                 });
         } else {
-            vetoButton.setVisibility(View.INVISIBLE);
+            if ((sbn.notification.flags & Notification.FLAG_ONGOING_EVENT) == 0) {
+                vetoButton.setVisibility(View.INVISIBLE);
+            } else {
+                vetoButton.setVisibility(View.GONE);
+            }
         }
 
         // the large icon
diff --git a/telephony/java/com/android/internal/telephony/SMSDispatcher.java b/telephony/java/com/android/internal/telephony/SMSDispatcher.java
index e7cfe75..99123af 100644
--- a/telephony/java/com/android/internal/telephony/SMSDispatcher.java
+++ b/telephony/java/com/android/internal/telephony/SMSDispatcher.java
@@ -37,6 +37,7 @@
 import android.os.Message;
 import android.os.PowerManager;
 import android.os.StatFs;
+import android.os.SystemProperties;
 import android.provider.Telephony;
 import android.provider.Telephony.Sms.Intents;
 import android.provider.Settings;
@@ -156,8 +157,10 @@
     protected boolean mStorageAvailable = true;
     protected boolean mReportMemoryStatusPending = false;
 
-    /* Flag indicating whether the current device allows sms service */
+    /* Flags indicating whether the current device allows sms service */
     protected boolean mSmsCapable = true;
+    protected boolean mSmsReceiveDisabled;
+    protected boolean mSmsSendDisabled;
 
     protected static int getNextConcatenatedRef() {
         sConcatenatedRef += 1;
@@ -255,6 +258,13 @@
 
         mSmsCapable = mContext.getResources().getBoolean(
                 com.android.internal.R.bool.config_sms_capable);
+        mSmsReceiveDisabled = !SystemProperties.getBoolean(
+                                TelephonyProperties.PROPERTY_SMS_RECEIVE, mSmsCapable);
+        mSmsSendDisabled = !SystemProperties.getBoolean(
+                                TelephonyProperties.PROPERTY_SMS_SEND, mSmsCapable);
+        Log.d(TAG, "SMSDispatcher: ctor mSmsCapable=" + mSmsCapable
+                + " mSmsReceiveDisabled=" + mSmsReceiveDisabled
+                + " mSmsSendDisabled=" + mSmsSendDisabled);
     }
 
     public void dispose() {
@@ -783,13 +793,13 @@
      */
     protected void sendRawPdu(byte[] smsc, byte[] pdu, PendingIntent sentIntent,
             PendingIntent deliveryIntent) {
-        if (!mSmsCapable) {
+        if (mSmsSendDisabled) {
             if (sentIntent != null) {
                 try {
                     sentIntent.send(RESULT_ERROR_NO_SERVICE);
                 } catch (CanceledException ex) {}
             }
-            Log.d(TAG, "Device does not support sms service.");
+            Log.d(TAG, "Device does not support sending sms.");
             return;
         }
 
diff --git a/telephony/java/com/android/internal/telephony/TelephonyProperties.java b/telephony/java/com/android/internal/telephony/TelephonyProperties.java
index 136d5b1..e6189be 100644
--- a/telephony/java/com/android/internal/telephony/TelephonyProperties.java
+++ b/telephony/java/com/android/internal/telephony/TelephonyProperties.java
@@ -147,4 +147,16 @@
      * when there is a radio technology change.
      */
     static final String PROPERTY_RESET_ON_RADIO_TECH_CHANGE = "persist.radio.reset_on_switch";
+
+    /**
+     * Set to false to disable SMS receiving, default is
+     * the value of config_sms_capable
+     */
+    static final String PROPERTY_SMS_RECEIVE = "telephony.sms.receive";
+
+    /**
+     * Set to false to disable SMS sending, default is
+     * the value of config_sms_capable
+     */
+    static final String PROPERTY_SMS_SEND = "telephony.sms.send";
 }
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java b/telephony/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java
index 01234b0..6bd2d09 100644
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java
@@ -107,10 +107,10 @@
             return Activity.RESULT_OK;
         }
 
-        if (!mSmsCapable) {
-            // Device doesn't support SMS service,
+        if (mSmsReceiveDisabled) {
+            // Device doesn't support receiving SMS,
             Log.d(TAG, "Received short message on device which doesn't support "
-                    + "SMS service. Ignored.");
+                    + "receiving SMS. Ignored.");
             return Intents.RESULT_SMS_HANDLED;
         }
 
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
index de15408..17cf36d 100755
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
@@ -605,7 +605,11 @@
         // mOperatorAlphaLong contains the ERI text
         String plmn = ss.getOperatorAlphaLong();
         if (!TextUtils.equals(plmn, curPlmn)) {
-            boolean showPlmn = !TextUtils.isEmpty(plmn);
+            // Allow A blank plmn, "" to set showPlmn to true. Previously, we
+            // would set showPlmn to true only if plmn was not empty, i.e. was not
+            // null and not blank. But this would cause us to incorrectly display
+            // "No Service". Now showPlmn is set to true for any non null string.
+            boolean showPlmn = plmn != null;
             Log.d(LOG_TAG,
                     String.format("updateSpnDisplay: changed sending intent" +
                             " showPlmn='%b' plmn='%s'", showPlmn, plmn));
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java b/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java
index 497c552..bbe579d 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java
@@ -110,7 +110,7 @@
             return Intents.RESULT_SMS_HANDLED;
         }
 
-        if (!mSmsCapable) {
+        if (mSmsReceiveDisabled) {
             // Device doesn't support SMS service,
             Log.d(TAG, "Received short message on device which doesn't support "
                     + "SMS service. Ignored.");
diff --git a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
index 61bf33b..0c78952 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
@@ -418,7 +418,7 @@
             assert false;
             Bridge.getLog().fidelityWarning(null,
                     "android.graphics.Canvas#setMatrix(android.graphics.Matrix) only " +
-                    "supports affine transformations in the Layout Preview.", null);
+                    "supports affine transformations.", null);
         }
     }
 
diff --git a/tools/layoutlib/bridge/src/android/graphics/Matrix_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Matrix_Delegate.java
index 94beef3..22c216d 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Matrix_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Matrix_Delegate.java
@@ -17,6 +17,7 @@
 package android.graphics;
 
 
+import com.android.layoutlib.bridge.Bridge;
 import com.android.layoutlib.bridge.impl.DelegateManager;
 
 import android.graphics.Matrix.ScaleToFit;
@@ -599,7 +600,10 @@
     /*package*/ static boolean native_setPolyToPoly(int native_object, float[] src, int srcIndex,
             float[] dst, int dstIndex, int pointCount) {
         // FIXME
-        throw new UnsupportedOperationException("Native delegate needed: Matrix_Delegate.native_setPolyToPoly");
+        Bridge.getLog().fidelityWarning(null,
+                "Matrix.setPolyToPoly is not supported.",
+                null);
+        return false;
     }
 
     /*package*/ static boolean native_invert(int native_object, int inverse) {
@@ -639,9 +643,7 @@
         if (isPts) {
             d.mapPoints(dst, dstIndex, src, srcIndex, ptCount);
         } else {
-            // src is vectors
-            // FIXME
-            throw new UnsupportedOperationException("Native delegate needed: Matrix_Delegate.native_mapPoints");
+            d.mapVectors(dst, dstIndex, src, srcIndex, ptCount);
         }
     }
 
@@ -655,8 +657,18 @@
     }
 
     /*package*/ static float native_mapRadius(int native_object, float radius) {
-        // FIXME
-        throw new UnsupportedOperationException("Native delegate needed: Matrix_Delegate.native_mapRadius");
+        Matrix_Delegate d = sManager.getDelegate(native_object);
+        if (d == null) {
+            return 0.f;
+        }
+
+        float[] src = new float[] { radius, 0.f, 0.f, radius };
+        d.mapVectors(src, 0, src, 0, 2);
+
+        float l1 = getPointLength(src, 0);
+        float l2 = getPointLength(src, 2);
+
+        return (float) Math.sqrt(l1 * l2);
     }
 
     /*package*/ static void native_getValues(int native_object, float[] values) {
@@ -842,15 +854,15 @@
 
      private void mapPoints(float[] dst, int dstIndex, float[] src, int srcIndex,
                            int pointCount) {
-         //checkPointArrays(src, srcIndex, dst, dstIndex, pointCount);
+         final int count = pointCount * 2;
 
          float[] tmpDest = dst;
          boolean inPlace = dst == src;
          if (inPlace) {
-             tmpDest = new float[dstIndex + pointCount * 2];
+             tmpDest = new float[dstIndex + count];
          }
 
-         for (int i = 0 ; i < pointCount * 2 ; i += 2) {
+         for (int i = 0 ; i < count ; i += 2) {
              // just in case we are doing in place, we better put this in temp vars
              float x = mValues[0] * src[i + srcIndex] +
                        mValues[1] * src[i + srcIndex + 1] +
@@ -864,7 +876,7 @@
          }
 
          if (inPlace) {
-             System.arraycopy(tmpDest, dstIndex, dst, dstIndex, pointCount * 2);
+             System.arraycopy(tmpDest, dstIndex, dst, dstIndex, count);
          }
      }
 
@@ -879,6 +891,37 @@
          mapPoints(pts, 0, pts, 0, pts.length >> 1);
      }
 
+     private void mapVectors(float[] dst, int dstIndex, float[] src, int srcIndex, int ptCount) {
+         if (hasPerspective()) {
+             // transform the (0,0) point
+             float[] origin = new float[] { 0.f, 0.f};
+             mapPoints(origin);
+
+             // translate the vector data as points
+             mapPoints(dst, dstIndex, src, srcIndex, ptCount);
+
+             // then substract the transformed origin.
+             final int count = ptCount * 2;
+             for (int i = 0 ; i < count ; i += 2) {
+                 dst[dstIndex + i] = dst[dstIndex + i] - origin[0];
+                 dst[dstIndex + i + 1] = dst[dstIndex + i + 1] - origin[1];
+             }
+         } else {
+             // make a copy of the matrix
+             Matrix_Delegate copy = new Matrix_Delegate(mValues);
+
+             // remove the translation
+             setTranslate(copy.mValues, 0, 0);
+
+             // map the content as points.
+             copy.mapPoints(dst, dstIndex, src, srcIndex, ptCount);
+         }
+     }
+
+     private static float getPointLength(float[] src, int index) {
+         return (float) Math.sqrt(src[index] * src[index] + src[index + 1] * src[index + 1]);
+     }
+
     /**
      * multiply two matrices and store them in a 3rd.
      * <p/>This in effect does dest = a*b
diff --git a/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
index 66ab29c..03a1815 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
@@ -703,7 +703,7 @@
             assert false;
             Bridge.getLog().fidelityWarning(null,
                     "android.graphics.Path#transform() only " +
-                    "supports affine transformations in the Layout Preview.", null);
+                    "supports affine transformations.", null);
         }
 
         GeneralPath newPath = new GeneralPath();