Merge changes I674abfcc,Ia40f4c53 into honeycomb-mr1

* changes:
  When the user touches a peeked notification, reset the fadeout timer.
  Fix touches on glowing region around panel.
diff --git a/api/12.xml b/api/12.xml
index 7835c7f..a65d9c1 100644
--- a/api/12.xml
+++ b/api/12.xml
@@ -235596,7 +235596,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -236083,7 +236083,7 @@
  synchronized="true"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -236149,7 +236149,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -236270,7 +236270,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -236639,7 +236639,7 @@
  synchronized="true"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="l" type="android.webkit.WebSettings.LayoutAlgorithm">
@@ -236717,7 +236717,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="enabled" type="boolean">
@@ -236912,7 +236912,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="view" type="boolean">
@@ -237040,7 +237040,7 @@
  abstract="false"
  static="true"
  final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <method name="valueOf"
@@ -237726,7 +237726,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -237748,7 +237748,7 @@
  synchronized="false"
  static="true"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -237772,7 +237772,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -237783,7 +237783,7 @@
  synchronized="false"
  static="true"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -238320,7 +238320,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="b" type="android.os.Bundle">
@@ -238376,7 +238376,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="b" type="android.os.Bundle">
@@ -238531,7 +238531,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="listener" type="android.webkit.WebView.PictureListener">
@@ -238803,7 +238803,7 @@
  abstract="true"
  static="true"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <method name="onNewPicture"
@@ -238813,7 +238813,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="view" type="android.webkit.WebView">
diff --git a/api/current.xml b/api/current.xml
index a01658a..2517c23 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -30386,9 +30386,26 @@
  synchronized="false"
  static="false"
  final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="attrs" type="android.util.AttributeSet">
+</parameter>
+<parameter name="savedInstanceState" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="onInflate"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
  deprecated="not deprecated"
  visibility="public"
 >
+<parameter name="activity" type="android.app.Activity">
+</parameter>
 <parameter name="attrs" type="android.util.AttributeSet">
 </parameter>
 <parameter name="savedInstanceState" type="android.os.Bundle">
@@ -143820,6 +143837,21 @@
 <parameter name="key" type="java.lang.String">
 </parameter>
 </method>
+<method name="getCharSequence"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="java.lang.CharSequence">
+</parameter>
+</method>
 <method name="getCharSequenceArray"
  return="java.lang.CharSequence[]"
  abstract="false"
@@ -144153,6 +144185,21 @@
 <parameter name="key" type="java.lang.String">
 </parameter>
 </method>
+<method name="getString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="defaultValue" type="java.lang.String">
+</parameter>
+</method>
 <method name="getStringArray"
  return="java.lang.String[]"
  abstract="false"
@@ -194867,7 +194914,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="contextStart" type="int">
@@ -240876,7 +240923,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -241363,7 +241410,7 @@
  synchronized="true"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -241429,7 +241476,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -241550,7 +241597,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -241919,7 +241966,7 @@
  synchronized="true"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="l" type="android.webkit.WebSettings.LayoutAlgorithm">
@@ -241997,7 +242044,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="enabled" type="boolean">
@@ -242192,7 +242239,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="view" type="boolean">
@@ -242320,7 +242367,7 @@
  abstract="false"
  static="true"
  final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <method name="valueOf"
@@ -243006,7 +243053,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -243028,7 +243075,7 @@
  synchronized="false"
  static="true"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -243052,7 +243099,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -243063,7 +243110,7 @@
  synchronized="false"
  static="true"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -243600,7 +243647,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="b" type="android.os.Bundle">
@@ -243656,7 +243703,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="b" type="android.os.Bundle">
@@ -243811,7 +243858,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="listener" type="android.webkit.WebView.PictureListener">
@@ -244083,7 +244130,7 @@
  abstract="true"
  static="true"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <method name="onNewPicture"
@@ -244093,7 +244140,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="view" type="android.webkit.WebView">
@@ -266726,7 +266773,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/app/Activity.java b/core/java/android/app/Activity.java
index 3a82c78..edfd6ef 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -4137,7 +4137,7 @@
             fragment.mInLayout = true;
             fragment.mImmediateActivity = this;
             fragment.mFragmentManager = mFragments;
-            fragment.onInflate(attrs, fragment.mSavedFragmentState);
+            fragment.onInflate(this, attrs, fragment.mSavedFragmentState);
             mFragments.addFragment(fragment, true);
 
         } else if (fragment.mInLayout) {
@@ -4156,7 +4156,7 @@
             // from last saved state), then give it the attributes to
             // initialize itself.
             if (!fragment.mRetaining) {
-                fragment.onInflate(attrs, fragment.mSavedFragmentState);
+                fragment.onInflate(this, attrs, fragment.mSavedFragmentState);
             }
             mFragments.moveToState(fragment);
         }
diff --git a/core/java/android/app/Fragment.java b/core/java/android/app/Fragment.java
index 8982110f..53dc7c8 100644
--- a/core/java/android/app/Fragment.java
+++ b/core/java/android/app/Fragment.java
@@ -859,32 +859,57 @@
     }
     
     /**
+     * @deprecated Use {@link #onInflate(Activity, AttributeSet, Bundle)} instead.
+     */
+    @Deprecated
+    public void onInflate(AttributeSet attrs, Bundle savedInstanceState) {
+        mCalled = true;
+    }
+
+    /**
      * Called when a fragment is being created as part of a view layout
      * inflation, typically from setting the content view of an activity.  This
-     * will be called immediately after the fragment is created from a <fragment>
+     * may be called immediately after the fragment is created from a <fragment>
      * tag in a layout file.  Note this is <em>before</em> the fragment's
      * {@link #onAttach(Activity)} has been called; all you should do here is
-     * parse the attributes and save them away.  A convenient thing to do is
-     * simply copy them into a Bundle that is given to {@link #setArguments(Bundle)}.
+     * parse the attributes and save them away.
      * 
      * <p>This is called every time the fragment is inflated, even if it is
-     * being inflated into a new instance with saved state.  Because a fragment's
-     * arguments are retained across instances, it may make no sense to re-parse
-     * the attributes into new arguments.  You may want to first check
-     * {@link #getArguments()} and only parse the attributes if it returns null,
-     * the assumption being that if it is non-null those are the same arguments
-     * from the first time the fragment was inflated.  (That said, you may want
-     * to have layouts change for different configurations such as landscape
-     * and portrait, which can have different attributes.  If so, you will need
-     * to re-parse the attributes each time this is called to generate new
-     * arguments.)</p>
+     * being inflated into a new instance with saved state.  It typically makes
+     * sense to re-parse the parameters each time, to allow them to change with
+     * different configurations.</p>
+     *
+     * <p>Here is a typical implementation of a fragment that can take parameters
+     * both through attributes supplied here as well from {@link #getArguments()}:</p>
+     *
+     * {@sample development/samples/ApiDemos/src/com/example/android/apis/app/FragmentArguments.java
+     *      fragment}
+     *
+     * <p>Note that parsing the XML attributes uses a "styleable" resource.  The
+     * declaration for the styleable used here is:</p>
+     *
+     * {@sample development/samples/ApiDemos/res/values/attrs.xml fragment_arguments}
      * 
+     * <p>The fragment can then be declared within its activity's content layout
+     * through a tag like this:</p>
+     *
+     * {@sample development/samples/ApiDemos/res/layout/fragment_arguments.xml from_attributes}
+     *
+     * <p>This fragment can also be created dynamically from arguments given
+     * at runtime in the arguments Bundle; here is an example of doing so at
+     * creation of the containing activity:</p>
+     *
+     * {@sample development/samples/ApiDemos/src/com/example/android/apis/app/FragmentArguments.java
+     *      create}
+     *
+     * @param activity The Activity that is inflating this fragment.
      * @param attrs The attributes at the tag where the fragment is
      * being created.
      * @param savedInstanceState If the fragment is being re-created from
      * a previous saved state, this is the state.
      */
-    public void onInflate(AttributeSet attrs, Bundle savedInstanceState) {
+    public void onInflate(Activity activity, AttributeSet attrs, Bundle savedInstanceState) {
+        onInflate(attrs, savedInstanceState);
         mCalled = true;
     }
     
diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java
index d8d0a5b..ab60cf0 100644
--- a/core/java/android/app/FragmentManager.java
+++ b/core/java/android/app/FragmentManager.java
@@ -660,6 +660,12 @@
         }
         
         if (f.mState < newState) {
+            // For fragments that are created from a layout, when restoring from
+            // state we don't want to allow them to be created until they are
+            // being reloaded from the layout.
+            if (f.mFromLayout && !f.mInLayout) {
+                return;
+            }
             if (f.mAnimatingAway != null) {
                 // The fragment is currently being animated...  but!  Now we
                 // want to move our state back up.  Give up on waiting for the
diff --git a/core/java/android/os/Bundle.java b/core/java/android/os/Bundle.java
index 8eac7aa..c288f8a 100644
--- a/core/java/android/os/Bundle.java
+++ b/core/java/android/os/Bundle.java
@@ -1028,7 +1028,6 @@
         }
     }
 
-
     /**
      * Returns the value associated with the given key, or null if
      * no mapping of the desired type exists for the given key or a null
@@ -1052,6 +1051,28 @@
     }
 
     /**
+     * Returns the value associated with the given key, or defaultValue if
+     * no mapping of the desired type exists for the given key.
+     *
+     * @param key a String, or null
+     * @param defaultValue Value to return if key does not exist
+     * @return a String value, or null
+     */
+    public String getString(String key, String defaultValue) {
+        unparcel();
+        Object o = mMap.get(key);
+        if (o == null) {
+            return defaultValue;
+        }
+        try {
+            return (String) o;
+        } catch (ClassCastException e) {
+            typeWarning(key, o, "String", e);
+            return defaultValue;
+        }
+    }
+
+    /**
      * Returns the value associated with the given key, or null if
      * no mapping of the desired type exists for the given key or a null
      * value is explicitly associated with the key.
@@ -1074,6 +1095,28 @@
     }
 
     /**
+     * Returns the value associated with the given key, or defaultValue if
+     * no mapping of the desired type exists for the given key.
+     *
+     * @param key a String, or null
+     * @param defaultValue Value to return if key does not exist
+     * @return a CharSequence value, or null
+     */
+    public CharSequence getCharSequence(String key, CharSequence defaultValue) {
+        unparcel();
+        Object o = mMap.get(key);
+        if (o == null) {
+            return defaultValue;
+        }
+        try {
+            return (CharSequence) o;
+        } catch (ClassCastException e) {
+            typeWarning(key, o, "CharSequence", e);
+            return defaultValue;
+        }
+    }
+
+    /**
      * Returns the value associated with the given key, or null if
      * no mapping of the desired type exists for the given key or a null
      * value is explicitly associated with the key.
diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java
index 6d7b7ce..186af70 100755
--- a/core/java/android/speech/tts/TextToSpeech.java
+++ b/core/java/android/speech/tts/TextToSpeech.java
@@ -414,8 +414,10 @@
 
         /**
          * {@hide}
+         * Total number of cached speech parameters.
+         * This number should be equal to (max param position/2) + 1.
          */
-        protected static final int NB_CACHED_PARAMS = 20;
+        protected static final int NB_CACHED_PARAMS = 10;
     }
 
     /**
diff --git a/core/java/android/text/SpannableStringBuilder.java b/core/java/android/text/SpannableStringBuilder.java
index 53fa7c2..ea5cdfe 100644
--- a/core/java/android/text/SpannableStringBuilder.java
+++ b/core/java/android/text/SpannableStringBuilder.java
@@ -1192,7 +1192,9 @@
      * CURSOR_AT_OR_BEFORE, or CURSOR_AT
      * @param p the Paint object that is requesting this information
      * @return the offset of the next position, or -1
+     * @deprecated This is an internal method, refrain from using it in your code
      */
+    @Deprecated
     public int getTextRunCursor(int contextStart, int contextEnd, int flags, int offset,
             int cursorOpt, Paint p) {
 
diff --git a/core/java/android/webkit/WebHistoryItem.java b/core/java/android/webkit/WebHistoryItem.java
index 7c0e478..ccf3d6b 100644
--- a/core/java/android/webkit/WebHistoryItem.java
+++ b/core/java/android/webkit/WebHistoryItem.java
@@ -90,7 +90,9 @@
      * another item, the identifiers will be the same even if they are not the
      * same object.
      * @return The id for this item.
+     * @deprecated This method is now obsolete.
      */
+    @Deprecated
     public int getId() {
         return mId;
     }
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index 71d6080..2b507fd 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -43,8 +43,10 @@
      * SINGLE_COLUMN moves all content into one column that is the width of the
      * view.
      * NARROW_COLUMNS makes all columns no wider than the screen if possible.
+     * @deprecated This enum is now obsolete.
      */
     // XXX: These must match LayoutAlgorithm in Settings.h in WebCore.
+    @Deprecated
     public enum LayoutAlgorithm {
         NORMAL,
         SINGLE_COLUMN,
@@ -510,14 +512,18 @@
 
     /**
      * Enables dumping the pages navigation cache to a text file.
+     * @deprecated This method is now obsolete.
      */
+    @Deprecated
     public void setNavDump(boolean enabled) {
         mNavDump = enabled;
     }
 
     /**
      * Returns true if dumping the navigation cache is enabled.
+     * @deprecated This method is now obsolete.
      */
+    @Deprecated
     public boolean getNavDump() {
         return mNavDump;
     }
@@ -655,7 +661,9 @@
      * Set whether the WebView uses its background for over scroll background.
      * If true, it will use the WebView's background. If false, it will use an
      * internal pattern. Default is true.
+     * @deprecated This method is now obsolete.
      */
+    @Deprecated
     public void setUseWebViewBackgroundForOverscrollBackground(boolean view) {
         mUseWebViewBackgroundForOverscroll = view;
     }
@@ -663,7 +671,9 @@
     /**
      * Returns true if this WebView uses WebView's background instead of
      * internal pattern for over scroll background.
+     * @deprecated This method is now obsolete.
      */
+    @Deprecated
     public boolean getUseWebViewBackgroundForOverscrollBackground() {
         return mUseWebViewBackgroundForOverscroll;
     }
@@ -866,7 +876,9 @@
      * WebView.
      * @param l A LayoutAlgorithm enum specifying the algorithm to use.
      * @see WebSettings.LayoutAlgorithm
+     * @deprecated This method is now obsolete.
      */
+    @Deprecated
     public synchronized void setLayoutAlgorithm(LayoutAlgorithm l) {
         // XXX: This will only be affective if libwebcore was built with
         // ANDROID_LAYOUT defined.
@@ -881,7 +893,9 @@
      * @return LayoutAlgorithm enum value describing the layout algorithm
      *         being used.
      * @see WebSettings.LayoutAlgorithm
+     * @deprecated This method is now obsolete.
      */
+    @Deprecated
     public synchronized LayoutAlgorithm getLayoutAlgorithm() {
         return mLayoutAlgorithm;
     }
diff --git a/core/java/android/webkit/WebTextView.java b/core/java/android/webkit/WebTextView.java
index 47c69be..28b09519 100644
--- a/core/java/android/webkit/WebTextView.java
+++ b/core/java/android/webkit/WebTextView.java
@@ -415,7 +415,7 @@
             }
             CharSequence text = getText();
             // Copy from the existing Layout.
-            mLayout = new WebTextViewLayout(text, text, getPaint(), w,
+            mLayout = new WebTextViewLayout(text, text, getPaint(), mLayout.getWidth(),
                     mLayout.getAlignment(), mLayout.getSpacingMultiplier(),
                     mLayout.getSpacingAdd(), false, null, ellipsisWidth,
                     lineHeight);
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 642cd02..ef71055 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -847,17 +847,24 @@
     private Rect mScrollingLayerBounds = new Rect();
     private boolean mSentAutoScrollMessage = false;
 
+    // used for serializing asynchronously handled touch events.
+    private final TouchEventQueue mTouchEventQueue = new TouchEventQueue();
+
     // Used to notify listeners of a new picture.
     private PictureListener mPictureListener;
     /**
      * Interface to listen for new pictures as they change.
+     * @deprecated This interface is now obsolete.
      */
+    @Deprecated
     public interface PictureListener {
         /**
          * Notify the listener that the picture has changed.
          * @param view The WebView that owns the picture.
          * @param picture The new picture.
+         * @deprecated This method is now obsolete.
          */
+        @Deprecated
         public void onNewPicture(WebView view, Picture picture);
     }
 
@@ -1500,7 +1507,9 @@
 
     /**
      * Enables platform notifications of data state and proxy changes.
+     * @deprecated Obsolete - platform notifications are always enabled.
      */
+    @Deprecated
     public static void enablePlatformNotifications() {
         Network.enablePlatformNotifications();
     }
@@ -1508,7 +1517,9 @@
     /**
      * If platform notifications are enabled, this should be called
      * from the Activity's onPause() or onStop().
+     * @deprecated Obsolete - platform notifications are always enabled.
      */
+    @Deprecated
     public static void disablePlatformNotifications() {
         Network.disablePlatformNotifications();
     }
@@ -1611,7 +1622,9 @@
      * @param dest The file to store the serialized picture data. Will be
      *             overwritten with this WebView's picture data.
      * @return True if the picture was successfully saved.
+     * @deprecated This method is now obsolete.
      */
+    @Deprecated
     public boolean savePicture(Bundle b, final File dest) {
         if (dest == null || b == null) {
             return false;
@@ -1672,7 +1685,9 @@
      * @param b A Bundle containing the saved display data.
      * @param src The file where the picture data was stored.
      * @return True if the picture was successfully restored.
+     * @deprecated This method is now obsolete.
      */
+    @Deprecated
     public boolean restorePicture(Bundle b, File src) {
         if (src == null || b == null) {
             return false;
@@ -3609,7 +3624,9 @@
      * Set the Picture listener. This is an interface used to receive
      * notifications of a new Picture.
      * @param listener An implementation of WebView.PictureListener.
+     * @deprecated This method is now obsolete.
      */
+    @Deprecated
     public void setPictureListener(PictureListener listener) {
         mPictureListener = listener;
     }
@@ -4965,7 +4982,9 @@
     /**
      * Use this method to put the WebView into text selection mode.
      * Do not rely on this functionality; it will be deprecated in the future.
+     * @deprecated This method is now obsolete.
      */
+    @Deprecated
     public void emulateShiftHeld() {
         setUpSelect(false, 0, 0);
     }
@@ -5065,6 +5084,8 @@
         }
 
         addAccessibilityApisToJavaScript();
+
+        mTouchEventQueue.reset();
     }
 
     @Override
@@ -5416,34 +5437,17 @@
                 + " numPointers=" + ev.getPointerCount());
         }
 
-        int action = ev.getActionMasked();
-        if (ev.getPointerCount() > 1) {  // Multi-touch
-            mIsHandlingMultiTouch = true;
-
-            // If WebKit already showed no interests in this sequence of events,
-            // WebView handles them directly.
-            if (mPreventDefault == PREVENT_DEFAULT_NO) {
-                handleMultiTouchInWebView(ev);
-            } else {
-                passMultiTouchToWebKit(ev);
-            }
-            return true;
+        // If WebKit wasn't interested in this multitouch gesture, enqueue
+        // the event for handling directly rather than making the round trip
+        // to WebKit and back.
+        if (ev.getPointerCount() > 1 && mPreventDefault != PREVENT_DEFAULT_NO) {
+            passMultiTouchToWebKit(ev, mTouchEventQueue.nextTouchSequence());
         } else {
-            final ScaleGestureDetector detector = mZoomManager.getMultiTouchGestureDetector();
-            if (detector != null) {
-                // ScaleGestureDetector needs a consistent event stream to operate properly.
-                // It won't take any action with fewer than two pointers, but it needs to
-                // update internal bookkeeping state.
-                detector.onTouchEvent(ev);
-            }
+            mTouchEventQueue.enqueueTouchEvent(ev);
         }
 
-        // Skip ACTION_MOVE for single touch if it's still handling multi-touch.
-        if (mIsHandlingMultiTouch && action == MotionEvent.ACTION_MOVE) {
-            return false;
-        }
-
-        return handleTouchEventCommon(ev, action, Math.round(ev.getX()), Math.round(ev.getY()));
+        // Since all events are handled asynchronously, we always want the gesture stream.
+        return true;
     }
 
     /*
@@ -5563,6 +5567,7 @@
                         ted.mReprocess = mDeferTouchProcess;
                         ted.mNativeLayer = nativeScrollableLayer(
                                 contentX, contentY, ted.mNativeLayerRect, null);
+                        ted.mDontEnqueueResult = true;
                         mWebViewCore.sendMessage(EventHub.TOUCH_EVENT, ted);
                         if (mDeferTouchProcess) {
                             // still needs to set them for compute deltaX/Y
@@ -5609,6 +5614,7 @@
                     ted.mReprocess = mDeferTouchProcess;
                     ted.mNativeLayer = mScrollingLayer;
                     ted.mNativeLayerRect.set(mScrollingLayerRect);
+                    ted.mDontEnqueueResult = true;
                     mWebViewCore.sendMessage(EventHub.TOUCH_EVENT, ted);
                     mLastSentTouchTime = eventTime;
                     if (mDeferTouchProcess) {
@@ -5790,6 +5796,7 @@
                     ted.mReprocess = mDeferTouchProcess;
                     ted.mNativeLayer = mScrollingLayer;
                     ted.mNativeLayerRect.set(mScrollingLayerRect);
+                    ted.mDontEnqueueResult = true;
                     mWebViewCore.sendMessage(EventHub.TOUCH_EVENT, ted);
                 }
                 mLastTouchUpTime = eventTime;
@@ -5812,6 +5819,7 @@
                             ted.mNativeLayer = nativeScrollableLayer(
                                     contentX, contentY,
                                     ted.mNativeLayerRect, null);
+                            ted.mDontEnqueueResult = true;
                             mWebViewCore.sendMessage(EventHub.TOUCH_EVENT, ted);
                         } else if (mPreventDefault != PREVENT_DEFAULT_YES){
                             mZoomManager.handleDoubleTap(mLastTouchX, mLastTouchY);
@@ -5936,7 +5944,7 @@
         return true;
     }
 
-    private void passMultiTouchToWebKit(MotionEvent ev) {
+    private void passMultiTouchToWebKit(MotionEvent ev, long sequence) {
         TouchEventData ted = new TouchEventData();
         ted.mAction = ev.getActionMasked();
         final int count = ev.getPointerCount();
@@ -5951,6 +5959,7 @@
         ted.mMetaState = ev.getMetaState();
         ted.mReprocess = true;
         ted.mMotionEvent = MotionEvent.obtain(ev);
+        ted.mSequence = sequence;
         mWebViewCore.sendMessage(EventHub.TOUCH_EVENT, ted);
         cancelLongPress();
         mPrivateHandler.removeMessages(SWITCH_TO_LONGPRESS);
@@ -6000,7 +6009,7 @@
         if (action == MotionEvent.ACTION_POINTER_DOWN) {
             cancelTouch();
             action = MotionEvent.ACTION_DOWN;
-        } else if (action == MotionEvent.ACTION_POINTER_UP) {
+        } else if (action == MotionEvent.ACTION_POINTER_UP && ev.getPointerCount() == 2) {
             // set mLastTouchX/Y to the remaining point
             mLastTouchX = Math.round(x);
             mLastTouchY = Math.round(y);
@@ -6028,6 +6037,7 @@
             ted.mAction = MotionEvent.ACTION_CANCEL;
             ted.mNativeLayer = nativeScrollableLayer(
                     x, y, ted.mNativeLayerRect, null);
+            ted.mDontEnqueueResult = true;
             mWebViewCore.sendMessage(EventHub.TOUCH_EVENT, ted);
             mPreventDefault = PREVENT_DEFAULT_IGNORE;
         }
@@ -7105,6 +7115,297 @@
         return mWebViewCore;
     }
 
+    /**
+     * Used only by TouchEventQueue to store pending touch events.
+     */
+    private static class QueuedTouch {
+        long mSequence;
+        MotionEvent mEvent; // Optional
+        TouchEventData mTed; // Optional
+
+        QueuedTouch mNext;
+
+        public QueuedTouch set(TouchEventData ted) {
+            mSequence = ted.mSequence;
+            mTed = ted;
+            mEvent = null;
+            mNext = null;
+            return this;
+        }
+
+        public QueuedTouch set(MotionEvent ev, long sequence) {
+            mEvent = MotionEvent.obtain(ev);
+            mSequence = sequence;
+            mTed = null;
+            mNext = null;
+            return this;
+        }
+
+        public QueuedTouch add(QueuedTouch other) {
+            if (other.mSequence < mSequence) {
+                other.mNext = this;
+                return other;
+            }
+
+            QueuedTouch insertAt = this;
+            while (insertAt.mNext != null && insertAt.mNext.mSequence < other.mSequence) {
+                insertAt = insertAt.mNext;
+            }
+            other.mNext = insertAt.mNext;
+            insertAt.mNext = other;
+            return this;
+        }
+    }
+
+    /**
+     * WebView handles touch events asynchronously since some events must be passed to WebKit
+     * for potentially slower processing. TouchEventQueue serializes touch events regardless
+     * of which path they take to ensure that no events are ever processed out of order
+     * by WebView.
+     */
+    private class TouchEventQueue {
+        private long mNextTouchSequence = Long.MIN_VALUE + 1;
+        private long mLastHandledTouchSequence = Long.MIN_VALUE;
+        private QueuedTouch mTouchEventQueue;
+        private QueuedTouch mQueuedTouchRecycleBin;
+        private int mQueuedTouchRecycleCount;
+        private static final int MAX_RECYCLED_QUEUED_TOUCH = 15;
+
+        private QueuedTouch obtainQueuedTouch() {
+            if (mQueuedTouchRecycleBin != null) {
+                QueuedTouch result = mQueuedTouchRecycleBin;
+                mQueuedTouchRecycleBin = result.mNext;
+                mQueuedTouchRecycleCount--;
+                return result;
+            }
+            return new QueuedTouch();
+        }
+
+        private void recycleQueuedTouch(QueuedTouch qd) {
+            if (mQueuedTouchRecycleCount < MAX_RECYCLED_QUEUED_TOUCH) {
+                qd.mNext = mQueuedTouchRecycleBin;
+                mQueuedTouchRecycleBin = qd;
+                mQueuedTouchRecycleCount++;
+            }
+        }
+
+        /**
+         * Reset the touch event queue. This will dump any pending events
+         * and reset the sequence numbering.
+         */
+        public void reset() {
+            mNextTouchSequence = Long.MIN_VALUE + 1;
+            mLastHandledTouchSequence = Long.MIN_VALUE;
+            while (mTouchEventQueue != null) {
+                QueuedTouch recycleMe = mTouchEventQueue;
+                mTouchEventQueue = mTouchEventQueue.mNext;
+                recycleQueuedTouch(recycleMe);
+            }
+        }
+
+        /**
+         * Return the next valid sequence number for tagging incoming touch events.
+         * @return The next touch event sequence number
+         */
+        public long nextTouchSequence() {
+            return mNextTouchSequence++;
+        }
+
+        /**
+         * Enqueue a touch event in the form of TouchEventData.
+         * The sequence number will be read from the mSequence field of the argument.
+         *
+         * If the touch event's sequence number is the next in line to be processed, it will
+         * be handled before this method returns. Any subsequent events that have already
+         * been queued will also be processed in their proper order.
+         *
+         * @param ted Touch data to be processed in order.
+         */
+        public void enqueueTouchEvent(TouchEventData ted) {
+            if (mLastHandledTouchSequence + 1 == ted.mSequence) {
+                handleQueuedTouchEventData(ted);
+
+                mLastHandledTouchSequence++;
+
+                // Do we have any more? Run them if so.
+                QueuedTouch qd = mTouchEventQueue;
+                while (qd != null && qd.mSequence == mLastHandledTouchSequence + 1) {
+                    handleQueuedTouch(qd);
+                    QueuedTouch recycleMe = qd;
+                    qd = qd.mNext;
+                    recycleQueuedTouch(recycleMe);
+                    mLastHandledTouchSequence++;
+                }
+                mTouchEventQueue = qd;
+            } else {
+                QueuedTouch qd = obtainQueuedTouch().set(ted);
+                mTouchEventQueue = mTouchEventQueue == null ? qd : mTouchEventQueue.add(qd);
+            }
+        }
+
+        /**
+         * Enqueue a touch event in the form of a MotionEvent from the framework.
+         *
+         * If the touch event's sequence number is the next in line to be processed, it will
+         * be handled before this method returns. Any subsequent events that have already
+         * been queued will also be processed in their proper order.
+         *
+         * @param ev MotionEvent to be processed in order
+         */
+        public void enqueueTouchEvent(MotionEvent ev) {
+            final long sequence = nextTouchSequence();
+            if (mLastHandledTouchSequence + 1 == sequence) {
+                handleQueuedMotionEvent(ev);
+
+                mLastHandledTouchSequence++;
+
+                // Do we have any more? Run them if so.
+                QueuedTouch qd = mTouchEventQueue;
+                while (qd != null && qd.mSequence == mLastHandledTouchSequence + 1) {
+                    handleQueuedTouch(qd);
+                    QueuedTouch recycleMe = qd;
+                    qd = qd.mNext;
+                    recycleQueuedTouch(recycleMe);
+                    mLastHandledTouchSequence++;
+                }
+                mTouchEventQueue = qd;
+            } else {
+                QueuedTouch qd = obtainQueuedTouch().set(ev, sequence);
+                mTouchEventQueue = mTouchEventQueue == null ? qd : mTouchEventQueue.add(qd);
+            }
+        }
+
+        private void handleQueuedTouch(QueuedTouch qt) {
+            if (qt.mTed != null) {
+                handleQueuedTouchEventData(qt.mTed);
+            } else {
+                handleQueuedMotionEvent(qt.mEvent);
+                qt.mEvent.recycle();
+            }
+        }
+
+        private void handleQueuedMotionEvent(MotionEvent ev) {
+            int action = ev.getActionMasked();
+            if (ev.getPointerCount() > 1) {  // Multi-touch
+                mIsHandlingMultiTouch = true;
+
+                handleMultiTouchInWebView(ev);
+            } else {
+                final ScaleGestureDetector detector = mZoomManager.getMultiTouchGestureDetector();
+                if (detector != null) {
+                    // ScaleGestureDetector needs a consistent event stream to operate properly.
+                    // It won't take any action with fewer than two pointers, but it needs to
+                    // update internal bookkeeping state.
+                    detector.onTouchEvent(ev);
+                }
+
+                handleTouchEventCommon(ev, action, Math.round(ev.getX()), Math.round(ev.getY()));
+            }
+        }
+
+        private void handleQueuedTouchEventData(TouchEventData ted) {
+            if (!ted.mReprocess) {
+                if (ted.mAction == MotionEvent.ACTION_DOWN
+                        && mPreventDefault == PREVENT_DEFAULT_MAYBE_YES) {
+                    // if prevent default is called from WebCore, UI
+                    // will not handle the rest of the touch events any
+                    // more.
+                    mPreventDefault = ted.mNativeResult ? PREVENT_DEFAULT_YES
+                            : PREVENT_DEFAULT_NO_FROM_TOUCH_DOWN;
+                } else if (ted.mAction == MotionEvent.ACTION_MOVE
+                        && mPreventDefault == PREVENT_DEFAULT_NO_FROM_TOUCH_DOWN) {
+                    // the return for the first ACTION_MOVE will decide
+                    // whether UI will handle touch or not. Currently no
+                    // support for alternating prevent default
+                    mPreventDefault = ted.mNativeResult ? PREVENT_DEFAULT_YES
+                            : PREVENT_DEFAULT_NO;
+                }
+                if (mPreventDefault == PREVENT_DEFAULT_YES) {
+                    mTouchHighlightRegion.setEmpty();
+                }
+            } else {
+                if (ted.mPoints.length > 1) {  // multi-touch
+                    if (ted.mAction == MotionEvent.ACTION_POINTER_UP &&
+                            ted.mMotionEvent.getPointerCount() == 2) {
+                        mIsHandlingMultiTouch = false;
+                    }
+                    if (!ted.mNativeResult) {
+                        mPreventDefault = PREVENT_DEFAULT_NO;
+                        handleMultiTouchInWebView(ted.mMotionEvent);
+                    } else {
+                        mPreventDefault = PREVENT_DEFAULT_YES;
+                    }
+                    return;
+                }
+
+                // prevent default is not called in WebCore, so the
+                // message needs to be reprocessed in UI
+                if (!ted.mNativeResult) {
+                    // Following is for single touch.
+                    switch (ted.mAction) {
+                        case MotionEvent.ACTION_DOWN:
+                            mLastDeferTouchX = contentToViewX(ted.mPoints[0].x)
+                                    - mScrollX;
+                            mLastDeferTouchY = contentToViewY(ted.mPoints[0].y)
+                                    - mScrollY;
+                            mDeferTouchMode = TOUCH_INIT_MODE;
+                            break;
+                        case MotionEvent.ACTION_MOVE: {
+                            // no snapping in defer process
+                            int x = contentToViewX(ted.mPoints[0].x) - mScrollX;
+                            int y = contentToViewY(ted.mPoints[0].y) - mScrollY;
+                            if (mDeferTouchMode != TOUCH_DRAG_MODE) {
+                                mDeferTouchMode = TOUCH_DRAG_MODE;
+                                mLastDeferTouchX = x;
+                                mLastDeferTouchY = y;
+                                startScrollingLayer(x, y);
+                                startDrag();
+                            }
+                            int deltaX = pinLocX((int) (mScrollX
+                                    + mLastDeferTouchX - x))
+                                    - mScrollX;
+                            int deltaY = pinLocY((int) (mScrollY
+                                    + mLastDeferTouchY - y))
+                                    - mScrollY;
+                            doDrag(deltaX, deltaY);
+                            if (deltaX != 0) mLastDeferTouchX = x;
+                            if (deltaY != 0) mLastDeferTouchY = y;
+                            break;
+                        }
+                        case MotionEvent.ACTION_UP:
+                        case MotionEvent.ACTION_CANCEL:
+                            if (mDeferTouchMode == TOUCH_DRAG_MODE) {
+                                // no fling in defer process
+                                mScroller.springBack(mScrollX, mScrollY, 0,
+                                        computeMaxScrollX(), 0,
+                                        computeMaxScrollY());
+                                invalidate();
+                                WebViewCore.resumePriority();
+                                WebViewCore.resumeUpdatePicture(mWebViewCore);
+                            }
+                            mDeferTouchMode = TOUCH_DONE_MODE;
+                            break;
+                        case WebViewCore.ACTION_DOUBLETAP:
+                            // doDoubleTap() needs mLastTouchX/Y as anchor
+                            mLastTouchX = contentToViewX(ted.mPoints[0].x) - mScrollX;
+                            mLastTouchY = contentToViewY(ted.mPoints[0].y) - mScrollY;
+                            mZoomManager.handleDoubleTap(mLastTouchX, mLastTouchY);
+                            mDeferTouchMode = TOUCH_DONE_MODE;
+                            break;
+                        case WebViewCore.ACTION_LONGPRESS:
+                            HitTestResult hitTest = getHitTestResult();
+                            if (hitTest != null && hitTest.mType
+                                    != HitTestResult.UNKNOWN_TYPE) {
+                                performLongClick();
+                            }
+                            mDeferTouchMode = TOUCH_DONE_MODE;
+                            break;
+                    }
+                }
+            }
+        }
+    }
+
     //-------------------------------------------------------------------------
     // Methods can be called from a separate thread, like WebViewCore
     // If it needs to call the View system, it has to send message.
@@ -7220,6 +7521,7 @@
                         ted.mNativeLayer = nativeScrollableLayer(
                                 ted.mPoints[0].x, ted.mPoints[0].y,
                                 ted.mNativeLayerRect, null);
+                        ted.mDontEnqueueResult = true;
                         mWebViewCore.sendMessage(EventHub.TOUCH_EVENT, ted);
                     } else if (mPreventDefault != PREVENT_DEFAULT_YES) {
                         mTouchMode = TOUCH_DONE_MODE;
@@ -7434,105 +7736,9 @@
                     if (inFullScreenMode()) {
                         break;
                     }
-                    if (msg.obj == null) {
-                        if (msg.arg1 == MotionEvent.ACTION_DOWN
-                                && mPreventDefault == PREVENT_DEFAULT_MAYBE_YES) {
-                            // if prevent default is called from WebCore, UI
-                            // will not handle the rest of the touch events any
-                            // more.
-                            mPreventDefault = msg.arg2 == 1 ? PREVENT_DEFAULT_YES
-                                    : PREVENT_DEFAULT_NO_FROM_TOUCH_DOWN;
-                        } else if (msg.arg1 == MotionEvent.ACTION_MOVE
-                                && mPreventDefault == PREVENT_DEFAULT_NO_FROM_TOUCH_DOWN) {
-                            // the return for the first ACTION_MOVE will decide
-                            // whether UI will handle touch or not. Currently no
-                            // support for alternating prevent default
-                            mPreventDefault = msg.arg2 == 1 ? PREVENT_DEFAULT_YES
-                                    : PREVENT_DEFAULT_NO;
-                        }
-                        if (mPreventDefault == PREVENT_DEFAULT_YES) {
-                            mTouchHighlightRegion.setEmpty();
-                        }
-                    } else {
-                        TouchEventData ted = (TouchEventData) msg.obj;
-
-                        if (ted.mPoints.length > 1) {  // multi-touch
-                            if (ted.mAction == MotionEvent.ACTION_POINTER_UP) {
-                                mIsHandlingMultiTouch = false;
-                            }
-                            if (msg.arg2 == 0) {
-                                mPreventDefault = PREVENT_DEFAULT_NO;
-                                handleMultiTouchInWebView(ted.mMotionEvent);
-                            } else {
-                                mPreventDefault = PREVENT_DEFAULT_YES;
-                            }
-                            break;
-                        }
-
-                        // prevent default is not called in WebCore, so the
-                        // message needs to be reprocessed in UI
-                        if (msg.arg2 == 0) {
-                            // Following is for single touch.
-                            switch (ted.mAction) {
-                                case MotionEvent.ACTION_DOWN:
-                                    mLastDeferTouchX = contentToViewX(ted.mPoints[0].x)
-                                            - mScrollX;
-                                    mLastDeferTouchY = contentToViewY(ted.mPoints[0].y)
-                                            - mScrollY;
-                                    mDeferTouchMode = TOUCH_INIT_MODE;
-                                    break;
-                                case MotionEvent.ACTION_MOVE: {
-                                    // no snapping in defer process
-                                    int x = contentToViewX(ted.mPoints[0].x) - mScrollX;
-                                    int y = contentToViewY(ted.mPoints[0].y) - mScrollY;
-                                    if (mDeferTouchMode != TOUCH_DRAG_MODE) {
-                                        mDeferTouchMode = TOUCH_DRAG_MODE;
-                                        mLastDeferTouchX = x;
-                                        mLastDeferTouchY = y;
-                                        startScrollingLayer(x, y);
-                                        startDrag();
-                                    }
-                                    int deltaX = pinLocX((int) (mScrollX
-                                            + mLastDeferTouchX - x))
-                                            - mScrollX;
-                                    int deltaY = pinLocY((int) (mScrollY
-                                            + mLastDeferTouchY - y))
-                                            - mScrollY;
-                                    doDrag(deltaX, deltaY);
-                                    if (deltaX != 0) mLastDeferTouchX = x;
-                                    if (deltaY != 0) mLastDeferTouchY = y;
-                                    break;
-                                }
-                                case MotionEvent.ACTION_UP:
-                                case MotionEvent.ACTION_CANCEL:
-                                    if (mDeferTouchMode == TOUCH_DRAG_MODE) {
-                                        // no fling in defer process
-                                        mScroller.springBack(mScrollX, mScrollY, 0,
-                                                computeMaxScrollX(), 0,
-                                                computeMaxScrollY());
-                                        invalidate();
-                                        WebViewCore.resumePriority();
-                                        WebViewCore.resumeUpdatePicture(mWebViewCore);
-                                    }
-                                    mDeferTouchMode = TOUCH_DONE_MODE;
-                                    break;
-                                case WebViewCore.ACTION_DOUBLETAP:
-                                    // doDoubleTap() needs mLastTouchX/Y as anchor
-                                    mLastTouchX = contentToViewX(ted.mPoints[0].x) - mScrollX;
-                                    mLastTouchY = contentToViewY(ted.mPoints[0].y) - mScrollY;
-                                    mZoomManager.handleDoubleTap(mLastTouchX, mLastTouchY);
-                                    mDeferTouchMode = TOUCH_DONE_MODE;
-                                    break;
-                                case WebViewCore.ACTION_LONGPRESS:
-                                    HitTestResult hitTest = getHitTestResult();
-                                    if (hitTest != null && hitTest.mType
-                                            != HitTestResult.UNKNOWN_TYPE) {
-                                        performLongClick();
-                                    }
-                                    mDeferTouchMode = TOUCH_DONE_MODE;
-                                    break;
-                            }
-                        }
+                    TouchEventData ted = (TouchEventData) msg.obj;
+                    if (!ted.mDontEnqueueResult) {
+                        mTouchEventQueue.enqueueTouchEvent(ted);
                     }
                     break;
 
@@ -8236,6 +8442,10 @@
         mWebViewCore.sendMessage(EventHub.SET_BACKGROUND_COLOR, color);
     }
 
+    /**
+     * @deprecated This method is now obsolete.
+     */
+    @Deprecated
     public void debugDump() {
         nativeDebugDump();
         mWebViewCore.sendMessage(EventHub.DUMP_NAVTREE);
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index c18c9e4..f367b93 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -825,6 +825,9 @@
         MotionEvent mMotionEvent;
         int mNativeLayer;
         Rect mNativeLayerRect = new Rect();
+        long mSequence;
+        boolean mNativeResult;
+        boolean mDontEnqueueResult;
     }
 
     static class GeolocationPermissionsData {
@@ -1332,13 +1335,14 @@
                                 nativeScrollLayer(ted.mNativeLayer,
                                         ted.mNativeLayerRect);
                             }
+                            ted.mNativeResult = nativeHandleTouchEvent(ted.mAction, ted.mIds,
+                                    xArray, yArray, count, ted.mMetaState);
                             Message.obtain(
                                     mWebView.mPrivateHandler,
                                     WebView.PREVENT_TOUCH_ID,
                                     ted.mAction,
-                                    nativeHandleTouchEvent(ted.mAction, ted.mIds,
-                                        xArray, yArray, count, ted.mMetaState) ? 1 : 0,
-                                    ted.mReprocess ? ted : null).sendToTarget();
+                                    ted.mNativeResult ? 1 : 0,
+                                    ted).sendToTarget();
                             break;
                         }
 
diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java
index 2802144..427126b 100644
--- a/core/java/android/widget/ListView.java
+++ b/core/java/android/widget/ListView.java
@@ -3015,8 +3015,22 @@
 
     @Override
     public boolean isOpaque() {
-        return (mCachingActive && mIsCacheColorOpaque && mDividerIsOpaque &&
+        boolean retValue = (mCachingActive && mIsCacheColorOpaque && mDividerIsOpaque &&
                 hasOpaqueScrollbars()) || super.isOpaque();
+        if (retValue) {
+            // only return true if the list items cover the entire area of the view
+            final int listTop = mListPadding.top;
+            View first = getChildAt(0);
+            if (first == null || first.getTop() > listTop) {
+                return false;
+            }
+            final int listBottom = getHeight() - mListPadding.bottom;
+            View last = getChildAt(getChildCount() - 1);
+            if (last == null || last.getBottom() < listBottom) {
+                return false;
+            }
+        }
+        return retValue;
     }
 
     @Override
diff --git a/core/java/android/widget/RemoteViewsAdapter.java b/core/java/android/widget/RemoteViewsAdapter.java
index 2d2165b..1c0a2bb 100644
--- a/core/java/android/widget/RemoteViewsAdapter.java
+++ b/core/java/android/widget/RemoteViewsAdapter.java
@@ -889,7 +889,7 @@
             boolean isConnected = mServiceConnection.isConnected();
             boolean hasNewItems = false;
 
-            if (!isConnected) {
+            if (!isInCache && !isConnected) {
                 // Requesting bind service will trigger a super.notifyDataSetChanged(), which will
                 // in turn trigger another request to getView()
                 requestBindService();
diff --git a/core/jni/android_util_Binder.cpp b/core/jni/android_util_Binder.cpp
index 5deed1e..9e00a7d 100644
--- a/core/jni/android_util_Binder.cpp
+++ b/core/jni/android_util_Binder.cpp
@@ -44,6 +44,13 @@
 //#undef LOGV
 //#define LOGV(...) fprintf(stderr, __VA_ARGS__)
 
+#define DEBUG_DEATH 0
+#if DEBUG_DEATH
+#define LOGDEATH LOGD
+#else
+#define LOGDEATH LOGV
+#endif
+
 using namespace android;
 
 // ----------------------------------------------------------------------------
@@ -363,6 +370,7 @@
     Mutex mLock;
 
 public:
+    DeathRecipientList();
     ~DeathRecipientList();
 
     void add(const sp<JavaDeathRecipient>& recipient);
@@ -380,6 +388,7 @@
     {
         // These objects manage their own lifetimes so are responsible for final bookkeeping.
         // The list holds a strong reference to this object.
+        LOGDEATH("Adding JDR %p to DRL %p", this, list.get());
         list->add(this);
 
         android_atomic_inc(&gNumDeathRefs);
@@ -390,7 +399,7 @@
     {
         JNIEnv* env = javavm_to_jnienv(mVM);
 
-        LOGV("Receiving binderDied() on JavaDeathRecipient %p\n", this);
+        LOGDEATH("Receiving binderDied() on JavaDeathRecipient %p\n", this);
 
         env->CallStaticVoidMethod(gBinderProxyOffsets.mClass,
             gBinderProxyOffsets.mSendDeathNotice, mObject);
@@ -399,15 +408,16 @@
             report_exception(env, excep,
                 "*** Uncaught exception returned from death notification!");
         }
-
-        clearReference();
     }
 
     void clearReference()
     {
         sp<DeathRecipientList> list = mList.promote();
         if (list != NULL) {
+            LOGDEATH("Removing JDR %p from DRL %p", this, list.get());
             list->remove(this);
+        } else {
+            LOGDEATH("clearReference() on JDR %p but DRL wp purged", this);
         }
     }
 
@@ -433,7 +443,12 @@
 
 // ----------------------------------------------------------------------------
 
+DeathRecipientList::DeathRecipientList() {
+    LOGDEATH("New DRL @ %p", this);
+}
+
 DeathRecipientList::~DeathRecipientList() {
+    LOGDEATH("Destroy DRL @ %p", this);
     AutoMutex _l(mLock);
 
     // Should never happen -- the JavaDeathRecipient objects that have added themselves
@@ -447,6 +462,7 @@
 void DeathRecipientList::add(const sp<JavaDeathRecipient>& recipient) {
     AutoMutex _l(mLock);
 
+    LOGDEATH("DRL @ %p : add JDR %p", this, recipient.get());
     mList.push_back(recipient);
 }
 
@@ -456,6 +472,7 @@
     List< sp<JavaDeathRecipient> >::iterator iter;
     for (iter = mList.begin(); iter != mList.end(); iter++) {
         if (*iter == recipient) {
+            LOGDEATH("DRL @ %p : remove JDR %p", this, recipient.get());
             mList.erase(iter);
             return;
         }
@@ -518,7 +535,7 @@
 
     object = env->NewObject(gBinderProxyOffsets.mClass, gBinderProxyOffsets.mConstructor);
     if (object != NULL) {
-        LOGV("objectForBinder %p: created new proxy %p !\n", val.get(), object);
+        LOGDEATH("objectForBinder %p: created new proxy %p !\n", val.get(), object);
         // The proxy holds a reference to the native object.
         env->SetIntField(object, gBinderProxyOffsets.mObject, (int)val.get());
         val->incStrong(object);
@@ -1030,7 +1047,7 @@
         assert(false);
     }
 
-    LOGV("linkToDeath: binder=%p recipient=%p\n", target, recipient);
+    LOGDEATH("linkToDeath: binder=%p recipient=%p\n", target, recipient);
 
     if (!target->localBinder()) {
         DeathRecipientList* list = (DeathRecipientList*)
@@ -1062,7 +1079,7 @@
         return JNI_FALSE;
     }
 
-    LOGV("unlinkToDeath: binder=%p recipient=%p\n", target, recipient);
+    LOGDEATH("unlinkToDeath: binder=%p recipient=%p\n", target, recipient);
 
     if (!target->localBinder()) {
         status_t err = NAME_NOT_FOUND;
@@ -1071,6 +1088,7 @@
         DeathRecipientList* list = (DeathRecipientList*)
                 env->GetIntField(obj, gBinderProxyOffsets.mOrgue);
         sp<JavaDeathRecipient> origJDR = list->find(recipient);
+        LOGDEATH("   unlink found list %p and JDR %p", list, origJDR.get());
         if (origJDR != NULL) {
             wp<IBinder::DeathRecipient> dr;
             err = target->unlinkToDeath(origJDR, NULL, flags, &dr);
@@ -1101,7 +1119,7 @@
     DeathRecipientList* drl = (DeathRecipientList*)
             env->GetIntField(obj, gBinderProxyOffsets.mOrgue);
 
-    LOGV("Destroying BinderProxy %p: binder=%p drl=%p\n", obj, b, drl);
+    LOGDEATH("Destroying BinderProxy %p: binder=%p drl=%p\n", obj, b, drl);
     env->SetIntField(obj, gBinderProxyOffsets.mObject, 0);
     env->SetIntField(obj, gBinderProxyOffsets.mOrgue, 0);
     drl->decStrong((void*)javaObjectForIBinder);
diff --git a/core/res/res/drawable-hdpi/stat_notify_call_mute.png b/core/res/res/drawable-hdpi/stat_notify_call_mute.png
index 048f56e..9887faa 100755
--- a/core/res/res/drawable-hdpi/stat_notify_call_mute.png
+++ b/core/res/res/drawable-hdpi/stat_notify_call_mute.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_car_mode.png b/core/res/res/drawable-hdpi/stat_notify_car_mode.png
index 76dd2ae..94f288c 100644
--- a/core/res/res/drawable-hdpi/stat_notify_car_mode.png
+++ b/core/res/res/drawable-hdpi/stat_notify_car_mode.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_chat.png b/core/res/res/drawable-hdpi/stat_notify_chat.png
index d7c1545..bddea50 100644
--- a/core/res/res/drawable-hdpi/stat_notify_chat.png
+++ b/core/res/res/drawable-hdpi/stat_notify_chat.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_disk_full.png b/core/res/res/drawable-hdpi/stat_notify_disk_full.png
index 9956fad..b44ce58 100755
--- a/core/res/res/drawable-hdpi/stat_notify_disk_full.png
+++ b/core/res/res/drawable-hdpi/stat_notify_disk_full.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_email_generic.png b/core/res/res/drawable-hdpi/stat_notify_email_generic.png
index 4ea619c..8d60237 100644
--- a/core/res/res/drawable-hdpi/stat_notify_email_generic.png
+++ b/core/res/res/drawable-hdpi/stat_notify_email_generic.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_error.png b/core/res/res/drawable-hdpi/stat_notify_error.png
index 598094f..6942871 100755
--- a/core/res/res/drawable-hdpi/stat_notify_error.png
+++ b/core/res/res/drawable-hdpi/stat_notify_error.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_gmail.png b/core/res/res/drawable-hdpi/stat_notify_gmail.png
index 7028ea7..bf8582a 100644
--- a/core/res/res/drawable-hdpi/stat_notify_gmail.png
+++ b/core/res/res/drawable-hdpi/stat_notify_gmail.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_missed_call.png b/core/res/res/drawable-hdpi/stat_notify_missed_call.png
index b0f7a6e..6df57ff3 100644
--- a/core/res/res/drawable-hdpi/stat_notify_missed_call.png
+++ b/core/res/res/drawable-hdpi/stat_notify_missed_call.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sdcard.png b/core/res/res/drawable-hdpi/stat_notify_sdcard.png
index a916488..0857774 100755
--- a/core/res/res/drawable-hdpi/stat_notify_sdcard.png
+++ b/core/res/res/drawable-hdpi/stat_notify_sdcard.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sdcard_prepare.png b/core/res/res/drawable-hdpi/stat_notify_sdcard_prepare.png
index e267700..3880496 100755
--- a/core/res/res/drawable-hdpi/stat_notify_sdcard_prepare.png
+++ b/core/res/res/drawable-hdpi/stat_notify_sdcard_prepare.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sdcard_usb.png b/core/res/res/drawable-hdpi/stat_notify_sdcard_usb.png
index 233e438..ac984ef 100755
--- a/core/res/res/drawable-hdpi/stat_notify_sdcard_usb.png
+++ b/core/res/res/drawable-hdpi/stat_notify_sdcard_usb.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sim_toolkit.png b/core/res/res/drawable-hdpi/stat_notify_sim_toolkit.png
index 42101077..b7ba4ba 100755
--- a/core/res/res/drawable-hdpi/stat_notify_sim_toolkit.png
+++ b/core/res/res/drawable-hdpi/stat_notify_sim_toolkit.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sync.png b/core/res/res/drawable-hdpi/stat_notify_sync.png
index 2076c55..76319b0 100755
--- a/core/res/res/drawable-hdpi/stat_notify_sync.png
+++ b/core/res/res/drawable-hdpi/stat_notify_sync.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sync_anim0.png b/core/res/res/drawable-hdpi/stat_notify_sync_anim0.png
index 2076c55..863c3d7 100755
--- a/core/res/res/drawable-hdpi/stat_notify_sync_anim0.png
+++ b/core/res/res/drawable-hdpi/stat_notify_sync_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sync_error.png b/core/res/res/drawable-hdpi/stat_notify_sync_error.png
index bade508..0083c3f 100755
--- a/core/res/res/drawable-hdpi/stat_notify_sync_error.png
+++ b/core/res/res/drawable-hdpi/stat_notify_sync_error.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_voicemail.png b/core/res/res/drawable-hdpi/stat_notify_voicemail.png
index 43fe530..499325b 100755
--- a/core/res/res/drawable-hdpi/stat_notify_voicemail.png
+++ b/core/res/res/drawable-hdpi/stat_notify_voicemail.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_wifi_in_range.png b/core/res/res/drawable-hdpi/stat_notify_wifi_in_range.png
index 5c42e53..8d80709 100644
--- a/core/res/res/drawable-hdpi/stat_notify_wifi_in_range.png
+++ b/core/res/res/drawable-hdpi/stat_notify_wifi_in_range.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_adb.png b/core/res/res/drawable-hdpi/stat_sys_adb.png
index af713e8..877e731 100755
--- a/core/res/res/drawable-hdpi/stat_sys_adb.png
+++ b/core/res/res/drawable-hdpi/stat_sys_adb.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_bluetooth.png b/core/res/res/drawable-hdpi/stat_sys_data_bluetooth.png
index 42a774e..526fbfa 100644
--- a/core/res/res/drawable-hdpi/stat_sys_data_bluetooth.png
+++ b/core/res/res/drawable-hdpi/stat_sys_data_bluetooth.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_usb.png b/core/res/res/drawable-hdpi/stat_sys_data_usb.png
index 6987b09..606ef80 100755
--- a/core/res/res/drawable-hdpi/stat_sys_data_usb.png
+++ b/core/res/res/drawable-hdpi/stat_sys_data_usb.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_download_anim0.png b/core/res/res/drawable-hdpi/stat_sys_download_anim0.png
index 943e620..0510128 100644
--- a/core/res/res/drawable-hdpi/stat_sys_download_anim0.png
+++ b/core/res/res/drawable-hdpi/stat_sys_download_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_download_anim1.png b/core/res/res/drawable-hdpi/stat_sys_download_anim1.png
index 28edae1..631622b 100644
--- a/core/res/res/drawable-hdpi/stat_sys_download_anim1.png
+++ b/core/res/res/drawable-hdpi/stat_sys_download_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_download_anim2.png b/core/res/res/drawable-hdpi/stat_sys_download_anim2.png
index 556a46f..e300245 100644
--- a/core/res/res/drawable-hdpi/stat_sys_download_anim2.png
+++ b/core/res/res/drawable-hdpi/stat_sys_download_anim2.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_download_anim3.png b/core/res/res/drawable-hdpi/stat_sys_download_anim3.png
index 422d72b..fd220e3 100644
--- a/core/res/res/drawable-hdpi/stat_sys_download_anim3.png
+++ b/core/res/res/drawable-hdpi/stat_sys_download_anim3.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_download_anim4.png b/core/res/res/drawable-hdpi/stat_sys_download_anim4.png
index 24a0db5..a1ea9e3 100644
--- a/core/res/res/drawable-hdpi/stat_sys_download_anim4.png
+++ b/core/res/res/drawable-hdpi/stat_sys_download_anim4.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_download_anim5.png b/core/res/res/drawable-hdpi/stat_sys_download_anim5.png
index 97e5a6b..7804a29 100644
--- a/core/res/res/drawable-hdpi/stat_sys_download_anim5.png
+++ b/core/res/res/drawable-hdpi/stat_sys_download_anim5.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_gps_on.png b/core/res/res/drawable-hdpi/stat_sys_gps_on.png
index 0d6f622..542ebb0 100644
--- a/core/res/res/drawable-hdpi/stat_sys_gps_on.png
+++ b/core/res/res/drawable-hdpi/stat_sys_gps_on.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_secure.png b/core/res/res/drawable-hdpi/stat_sys_secure.png
index 8d24990..c4a17de 100755
--- a/core/res/res/drawable-hdpi/stat_sys_secure.png
+++ b/core/res/res/drawable-hdpi/stat_sys_secure.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_speakerphone.png b/core/res/res/drawable-hdpi/stat_sys_speakerphone.png
index 82c06a9..a9a2b2e 100755
--- a/core/res/res/drawable-hdpi/stat_sys_speakerphone.png
+++ b/core/res/res/drawable-hdpi/stat_sys_speakerphone.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_throttled.png b/core/res/res/drawable-hdpi/stat_sys_throttled.png
index bd8323a..99ae4ac 100755
--- a/core/res/res/drawable-hdpi/stat_sys_throttled.png
+++ b/core/res/res/drawable-hdpi/stat_sys_throttled.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_upload_anim0.png b/core/res/res/drawable-hdpi/stat_sys_upload_anim0.png
index 45f3c7b..48ba735 100644
--- a/core/res/res/drawable-hdpi/stat_sys_upload_anim0.png
+++ b/core/res/res/drawable-hdpi/stat_sys_upload_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_upload_anim1.png b/core/res/res/drawable-hdpi/stat_sys_upload_anim1.png
index f4d5a72..cbb06a5 100644
--- a/core/res/res/drawable-hdpi/stat_sys_upload_anim1.png
+++ b/core/res/res/drawable-hdpi/stat_sys_upload_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_upload_anim2.png b/core/res/res/drawable-hdpi/stat_sys_upload_anim2.png
index b7448c8..e4edda9 100644
--- a/core/res/res/drawable-hdpi/stat_sys_upload_anim2.png
+++ b/core/res/res/drawable-hdpi/stat_sys_upload_anim2.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_upload_anim3.png b/core/res/res/drawable-hdpi/stat_sys_upload_anim3.png
index dfbd726..c2a9b03 100644
--- a/core/res/res/drawable-hdpi/stat_sys_upload_anim3.png
+++ b/core/res/res/drawable-hdpi/stat_sys_upload_anim3.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_upload_anim4.png b/core/res/res/drawable-hdpi/stat_sys_upload_anim4.png
index c4513bf..23f2f9d 100644
--- a/core/res/res/drawable-hdpi/stat_sys_upload_anim4.png
+++ b/core/res/res/drawable-hdpi/stat_sys_upload_anim4.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_upload_anim5.png b/core/res/res/drawable-hdpi/stat_sys_upload_anim5.png
index cc21de2..3fd8b7f 100644
--- a/core/res/res/drawable-hdpi/stat_sys_upload_anim5.png
+++ b/core/res/res/drawable-hdpi/stat_sys_upload_anim5.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_warning.png b/core/res/res/drawable-hdpi/stat_sys_warning.png
index 2783d89..0d1a33c 100755
--- a/core/res/res/drawable-hdpi/stat_sys_warning.png
+++ b/core/res/res/drawable-hdpi/stat_sys_warning.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/textfield_search_default_holo_dark.9.png b/core/res/res/drawable-hdpi/textfield_search_default_holo_dark.9.png
index 5b62564..9646e63 100644
--- a/core/res/res/drawable-hdpi/textfield_search_default_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/textfield_search_default_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/textfield_search_default_holo_light.9.png b/core/res/res/drawable-hdpi/textfield_search_default_holo_light.9.png
index 881edeb..8c8e56a 100644
--- a/core/res/res/drawable-hdpi/textfield_search_default_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/textfield_search_default_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/textfield_search_right_default_holo_dark.9.png b/core/res/res/drawable-hdpi/textfield_search_right_default_holo_dark.9.png
new file mode 100644
index 0000000..b9407ba
--- /dev/null
+++ b/core/res/res/drawable-hdpi/textfield_search_right_default_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/textfield_search_right_default_holo_light.9.png b/core/res/res/drawable-hdpi/textfield_search_right_default_holo_light.9.png
new file mode 100644
index 0000000..0090124
--- /dev/null
+++ b/core/res/res/drawable-hdpi/textfield_search_right_default_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/textfield_search_right_selected_holo_dark.9.png b/core/res/res/drawable-hdpi/textfield_search_right_selected_holo_dark.9.png
new file mode 100644
index 0000000..16b75c6
--- /dev/null
+++ b/core/res/res/drawable-hdpi/textfield_search_right_selected_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/textfield_search_right_selected_holo_light.9.png b/core/res/res/drawable-hdpi/textfield_search_right_selected_holo_light.9.png
new file mode 100644
index 0000000..472c564
--- /dev/null
+++ b/core/res/res/drawable-hdpi/textfield_search_right_selected_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/textfield_search_selected_holo_dark.9.png b/core/res/res/drawable-hdpi/textfield_search_selected_holo_dark.9.png
index cb3f35b..d097577 100644
--- a/core/res/res/drawable-hdpi/textfield_search_selected_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/textfield_search_selected_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/textfield_search_selected_holo_light.9.png b/core/res/res/drawable-hdpi/textfield_search_selected_holo_light.9.png
index 742b137..f36cad8 100644
--- a/core/res/res/drawable-hdpi/textfield_search_selected_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/textfield_search_selected_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_call_mute.png b/core/res/res/drawable-mdpi/stat_notify_call_mute.png
index be26065..845ec86 100644
--- a/core/res/res/drawable-mdpi/stat_notify_call_mute.png
+++ b/core/res/res/drawable-mdpi/stat_notify_call_mute.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_car_mode.png b/core/res/res/drawable-mdpi/stat_notify_car_mode.png
index 60d9202..dfd2e0a 100644
--- a/core/res/res/drawable-mdpi/stat_notify_car_mode.png
+++ b/core/res/res/drawable-mdpi/stat_notify_car_mode.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_chat.png b/core/res/res/drawable-mdpi/stat_notify_chat.png
index 36ac850..e4464c2 100644
--- a/core/res/res/drawable-mdpi/stat_notify_chat.png
+++ b/core/res/res/drawable-mdpi/stat_notify_chat.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_disk_full.png b/core/res/res/drawable-mdpi/stat_notify_disk_full.png
index 4e198ef..69b513c 100755
--- a/core/res/res/drawable-mdpi/stat_notify_disk_full.png
+++ b/core/res/res/drawable-mdpi/stat_notify_disk_full.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_email_generic.png b/core/res/res/drawable-mdpi/stat_notify_email_generic.png
index a01485e..42d518d 100644
--- a/core/res/res/drawable-mdpi/stat_notify_email_generic.png
+++ b/core/res/res/drawable-mdpi/stat_notify_email_generic.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_error.png b/core/res/res/drawable-mdpi/stat_notify_error.png
index 69c02d7..ddf0a2f 100644
--- a/core/res/res/drawable-mdpi/stat_notify_error.png
+++ b/core/res/res/drawable-mdpi/stat_notify_error.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_gmail.png b/core/res/res/drawable-mdpi/stat_notify_gmail.png
index 55bae33..516e865 100644
--- a/core/res/res/drawable-mdpi/stat_notify_gmail.png
+++ b/core/res/res/drawable-mdpi/stat_notify_gmail.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_missed_call.png b/core/res/res/drawable-mdpi/stat_notify_missed_call.png
index 58030fd..d2e3631 100644
--- a/core/res/res/drawable-mdpi/stat_notify_missed_call.png
+++ b/core/res/res/drawable-mdpi/stat_notify_missed_call.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sdcard.png b/core/res/res/drawable-mdpi/stat_notify_sdcard.png
index 0071bf4..8f64201 100644
--- a/core/res/res/drawable-mdpi/stat_notify_sdcard.png
+++ b/core/res/res/drawable-mdpi/stat_notify_sdcard.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sdcard_prepare.png b/core/res/res/drawable-mdpi/stat_notify_sdcard_prepare.png
index c04d70d..fc051fa 100644
--- a/core/res/res/drawable-mdpi/stat_notify_sdcard_prepare.png
+++ b/core/res/res/drawable-mdpi/stat_notify_sdcard_prepare.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sdcard_usb.png b/core/res/res/drawable-mdpi/stat_notify_sdcard_usb.png
index 2880934..b936f45 100644
--- a/core/res/res/drawable-mdpi/stat_notify_sdcard_usb.png
+++ b/core/res/res/drawable-mdpi/stat_notify_sdcard_usb.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sim_toolkit.png b/core/res/res/drawable-mdpi/stat_notify_sim_toolkit.png
index ee7b10c..87327b4 100755
--- a/core/res/res/drawable-mdpi/stat_notify_sim_toolkit.png
+++ b/core/res/res/drawable-mdpi/stat_notify_sim_toolkit.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sync.png b/core/res/res/drawable-mdpi/stat_notify_sync.png
index ef9d4eb..4876b8e 100644
--- a/core/res/res/drawable-mdpi/stat_notify_sync.png
+++ b/core/res/res/drawable-mdpi/stat_notify_sync.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sync_anim0.png b/core/res/res/drawable-mdpi/stat_notify_sync_anim0.png
index ef9d4eb..8372756 100644
--- a/core/res/res/drawable-mdpi/stat_notify_sync_anim0.png
+++ b/core/res/res/drawable-mdpi/stat_notify_sync_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sync_error.png b/core/res/res/drawable-mdpi/stat_notify_sync_error.png
index f55bf58..2725549 100644
--- a/core/res/res/drawable-mdpi/stat_notify_sync_error.png
+++ b/core/res/res/drawable-mdpi/stat_notify_sync_error.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_voicemail.png b/core/res/res/drawable-mdpi/stat_notify_voicemail.png
index b72a07a..67a0f91 100644
--- a/core/res/res/drawable-mdpi/stat_notify_voicemail.png
+++ b/core/res/res/drawable-mdpi/stat_notify_voicemail.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_wifi_in_range.png b/core/res/res/drawable-mdpi/stat_notify_wifi_in_range.png
index 90dd76e..de63297 100644
--- a/core/res/res/drawable-mdpi/stat_notify_wifi_in_range.png
+++ b/core/res/res/drawable-mdpi/stat_notify_wifi_in_range.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_adb.png b/core/res/res/drawable-mdpi/stat_sys_adb.png
index 2c4d2b5..e259ca5 100644
--- a/core/res/res/drawable-mdpi/stat_sys_adb.png
+++ b/core/res/res/drawable-mdpi/stat_sys_adb.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_bluetooth.png b/core/res/res/drawable-mdpi/stat_sys_data_bluetooth.png
index f7f554e..46f6901 100644
--- a/core/res/res/drawable-mdpi/stat_sys_data_bluetooth.png
+++ b/core/res/res/drawable-mdpi/stat_sys_data_bluetooth.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_usb.png b/core/res/res/drawable-mdpi/stat_sys_data_usb.png
index 6cdfab7..44860bf 100644
--- a/core/res/res/drawable-mdpi/stat_sys_data_usb.png
+++ b/core/res/res/drawable-mdpi/stat_sys_data_usb.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_download_anim0.png b/core/res/res/drawable-mdpi/stat_sys_download_anim0.png
index c6f2f4e..9c77ecb 100644
--- a/core/res/res/drawable-mdpi/stat_sys_download_anim0.png
+++ b/core/res/res/drawable-mdpi/stat_sys_download_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_download_anim1.png b/core/res/res/drawable-mdpi/stat_sys_download_anim1.png
index 429ebd7..4bf5e6c 100644
--- a/core/res/res/drawable-mdpi/stat_sys_download_anim1.png
+++ b/core/res/res/drawable-mdpi/stat_sys_download_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_download_anim2.png b/core/res/res/drawable-mdpi/stat_sys_download_anim2.png
index b3de461..2211810 100644
--- a/core/res/res/drawable-mdpi/stat_sys_download_anim2.png
+++ b/core/res/res/drawable-mdpi/stat_sys_download_anim2.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_download_anim3.png b/core/res/res/drawable-mdpi/stat_sys_download_anim3.png
index 195498e..7db3096 100644
--- a/core/res/res/drawable-mdpi/stat_sys_download_anim3.png
+++ b/core/res/res/drawable-mdpi/stat_sys_download_anim3.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_download_anim4.png b/core/res/res/drawable-mdpi/stat_sys_download_anim4.png
index 8fc3e86..894dd63 100644
--- a/core/res/res/drawable-mdpi/stat_sys_download_anim4.png
+++ b/core/res/res/drawable-mdpi/stat_sys_download_anim4.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_download_anim5.png b/core/res/res/drawable-mdpi/stat_sys_download_anim5.png
index c6f2f4e..889c01e 100644
--- a/core/res/res/drawable-mdpi/stat_sys_download_anim5.png
+++ b/core/res/res/drawable-mdpi/stat_sys_download_anim5.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_gps_on.png b/core/res/res/drawable-mdpi/stat_sys_gps_on.png
index ab59f7c..e0b9d6e 100644
--- a/core/res/res/drawable-mdpi/stat_sys_gps_on.png
+++ b/core/res/res/drawable-mdpi/stat_sys_gps_on.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_secure.png b/core/res/res/drawable-mdpi/stat_sys_secure.png
index db73d06..7167c3a 100644
--- a/core/res/res/drawable-mdpi/stat_sys_secure.png
+++ b/core/res/res/drawable-mdpi/stat_sys_secure.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_speakerphone.png b/core/res/res/drawable-mdpi/stat_sys_speakerphone.png
index 0673060..25fef56 100644
--- a/core/res/res/drawable-mdpi/stat_sys_speakerphone.png
+++ b/core/res/res/drawable-mdpi/stat_sys_speakerphone.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_throttled.png b/core/res/res/drawable-mdpi/stat_sys_throttled.png
index 28a293b..2cbe7f4 100644
--- a/core/res/res/drawable-mdpi/stat_sys_throttled.png
+++ b/core/res/res/drawable-mdpi/stat_sys_throttled.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_upload_anim0.png b/core/res/res/drawable-mdpi/stat_sys_upload_anim0.png
index f804e5e..6a05585e 100644
--- a/core/res/res/drawable-mdpi/stat_sys_upload_anim0.png
+++ b/core/res/res/drawable-mdpi/stat_sys_upload_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_upload_anim1.png b/core/res/res/drawable-mdpi/stat_sys_upload_anim1.png
index 0cbb85c..af492c8 100644
--- a/core/res/res/drawable-mdpi/stat_sys_upload_anim1.png
+++ b/core/res/res/drawable-mdpi/stat_sys_upload_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_upload_anim2.png b/core/res/res/drawable-mdpi/stat_sys_upload_anim2.png
index cfa74f3..4ba150c8 100644
--- a/core/res/res/drawable-mdpi/stat_sys_upload_anim2.png
+++ b/core/res/res/drawable-mdpi/stat_sys_upload_anim2.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_upload_anim3.png b/core/res/res/drawable-mdpi/stat_sys_upload_anim3.png
index de5c314..cbcf280 100644
--- a/core/res/res/drawable-mdpi/stat_sys_upload_anim3.png
+++ b/core/res/res/drawable-mdpi/stat_sys_upload_anim3.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_upload_anim4.png b/core/res/res/drawable-mdpi/stat_sys_upload_anim4.png
index 8847949..cb8628c 100644
--- a/core/res/res/drawable-mdpi/stat_sys_upload_anim4.png
+++ b/core/res/res/drawable-mdpi/stat_sys_upload_anim4.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_upload_anim5.png b/core/res/res/drawable-mdpi/stat_sys_upload_anim5.png
index f804e5e..e7a5376 100644
--- a/core/res/res/drawable-mdpi/stat_sys_upload_anim5.png
+++ b/core/res/res/drawable-mdpi/stat_sys_upload_anim5.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_warning.png b/core/res/res/drawable-mdpi/stat_sys_warning.png
index 494c96a..2a764fa 100644
--- a/core/res/res/drawable-mdpi/stat_sys_warning.png
+++ b/core/res/res/drawable-mdpi/stat_sys_warning.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_search_default_holo_dark.9.png b/core/res/res/drawable-mdpi/textfield_search_default_holo_dark.9.png
index 3549948..9646e63 100644
--- a/core/res/res/drawable-mdpi/textfield_search_default_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/textfield_search_default_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_search_default_holo_light.9.png b/core/res/res/drawable-mdpi/textfield_search_default_holo_light.9.png
index 6db03cb..8c8e56a 100644
--- a/core/res/res/drawable-mdpi/textfield_search_default_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/textfield_search_default_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_search_right_default_holo_dark.9.png b/core/res/res/drawable-mdpi/textfield_search_right_default_holo_dark.9.png
new file mode 100644
index 0000000..b9407ba
--- /dev/null
+++ b/core/res/res/drawable-mdpi/textfield_search_right_default_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_search_right_default_holo_light.9.png b/core/res/res/drawable-mdpi/textfield_search_right_default_holo_light.9.png
new file mode 100644
index 0000000..0090124
--- /dev/null
+++ b/core/res/res/drawable-mdpi/textfield_search_right_default_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_search_right_selected_holo_dark.9.png b/core/res/res/drawable-mdpi/textfield_search_right_selected_holo_dark.9.png
new file mode 100644
index 0000000..16b75c6
--- /dev/null
+++ b/core/res/res/drawable-mdpi/textfield_search_right_selected_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_search_right_selected_holo_light.9.png b/core/res/res/drawable-mdpi/textfield_search_right_selected_holo_light.9.png
new file mode 100644
index 0000000..472c564
--- /dev/null
+++ b/core/res/res/drawable-mdpi/textfield_search_right_selected_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_search_selected_holo_dark.9.png b/core/res/res/drawable-mdpi/textfield_search_selected_holo_dark.9.png
index 670439a..d097577 100644
--- a/core/res/res/drawable-mdpi/textfield_search_selected_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/textfield_search_selected_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_search_selected_holo_light.9.png b/core/res/res/drawable-mdpi/textfield_search_selected_holo_light.9.png
index 90e26e2..f36cad8 100644
--- a/core/res/res/drawable-mdpi/textfield_search_selected_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/textfield_search_selected_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-hdpi/stat_sys_battery_charge_anim0.png b/core/res/res/drawable-xlarge-hdpi/stat_sys_battery_charge_anim0.png
index f8063d1..a526fcf 100644
--- a/core/res/res/drawable-xlarge-hdpi/stat_sys_battery_charge_anim0.png
+++ b/core/res/res/drawable-xlarge-hdpi/stat_sys_battery_charge_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/stat_sys_battery_charge_anim0.png b/core/res/res/drawable-xlarge-mdpi/stat_sys_battery_charge_anim0.png
index 577f7cc..3640f55 100644
--- a/core/res/res/drawable-xlarge-mdpi/stat_sys_battery_charge_anim0.png
+++ b/core/res/res/drawable-xlarge-mdpi/stat_sys_battery_charge_anim0.png
Binary files differ
diff --git a/core/res/res/drawable/textfield_searchview_holo_dark.xml b/core/res/res/drawable/textfield_searchview_holo_dark.xml
new file mode 100644
index 0000000..1396f83
--- /dev/null
+++ b/core/res/res/drawable/textfield_searchview_holo_dark.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_focused="true"
+        android:drawable="@drawable/textfield_search_selected_holo_dark" />
+    <item android:drawable="@drawable/textfield_search_default_holo_dark" />
+</selector>
+
diff --git a/core/res/res/drawable/textfield_searchview_holo_light.xml b/core/res/res/drawable/textfield_searchview_holo_light.xml
new file mode 100644
index 0000000..5198f9c
--- /dev/null
+++ b/core/res/res/drawable/textfield_searchview_holo_light.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_focused="true"
+        android:drawable="@drawable/textfield_search_selected_holo_light" />
+    <item android:drawable="@drawable/textfield_search_default_holo_light" />
+</selector>
+
diff --git a/core/res/res/drawable/textfield_searchview_right_holo_dark.xml b/core/res/res/drawable/textfield_searchview_right_holo_dark.xml
new file mode 100644
index 0000000..b4f1ca1
--- /dev/null
+++ b/core/res/res/drawable/textfield_searchview_right_holo_dark.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_focused="true"
+        android:drawable="@drawable/textfield_search_right_selected_holo_dark" />
+    <item android:drawable="@drawable/textfield_search_right_default_holo_dark" />
+</selector>
+
diff --git a/core/res/res/drawable/textfield_searchview_right_holo_light.xml b/core/res/res/drawable/textfield_searchview_right_holo_light.xml
new file mode 100644
index 0000000..e521bf6
--- /dev/null
+++ b/core/res/res/drawable/textfield_searchview_right_holo_light.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_focused="true"
+        android:drawable="@drawable/textfield_search_right_selected_holo_light" />
+    <item android:drawable="@drawable/textfield_search_right_default_holo_light" />
+</selector>
+
diff --git a/core/res/res/layout/media_controller.xml b/core/res/res/layout/media_controller.xml
index f4a701e..582101a 100644
--- a/core/res/res/layout/media_controller.xml
+++ b/core/res/res/layout/media_controller.xml
@@ -59,7 +59,7 @@
             style="?android:attr/progressBarStyleHorizontal"
             android:layout_width="0dip"
             android:layout_weight="1"
-            android:layout_height="30dip"
+            android:layout_height="32dip"
             android:layout_alignParentLeft="true"
             android:layout_alignParentRight="true" />
 
diff --git a/core/res/res/layout/search_view.xml b/core/res/res/layout/search_view.xml
index c41c2de..93b6deb 100644
--- a/core/res/res/layout/search_view.xml
+++ b/core/res/res/layout/search_view.xml
@@ -64,7 +64,7 @@
             android:layout_weight="1"
             android:layout_gravity="center_vertical"
             android:orientation="horizontal"
-            android:background="?android:attr/editTextBackground">
+            android:background="?android:attr/searchViewTextField">
 
             <ImageView
                 android:id="@+id/search_app_icon"
@@ -91,7 +91,7 @@
                 android:inputType="text|textAutoComplete"
                 android:imeOptions="actionSearch"
                 android:dropDownHeight="wrap_content"
-                android:dropDownAnchor="@id/search_plate"
+                android:dropDownAnchor="@id/search_edit_frame"
                 android:dropDownVerticalOffset="0dip"
                 android:dropDownHorizontalOffset="0dip"
             />
@@ -110,38 +110,39 @@
 
         </LinearLayout>
 
-    </LinearLayout>
-
-    <LinearLayout
-        android:id="@+id/submit_area"
-        android:orientation="horizontal"
-        android:layout_width="wrap_content"
-        android:layout_height="match_parent">
-
-        <ImageView
-            android:id="@+id/search_go_btn"
+        <LinearLayout
+            android:id="@+id/submit_area"
+            android:orientation="horizontal"
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
-            android:layout_gravity="center_vertical"
-            android:paddingLeft="16dip"
-            android:paddingRight="16dip"
-            android:background="?android:attr/selectableItemBackground"
-            android:src="?android:attr/searchViewGoIcon"
-            android:visibility="gone"
-            android:focusable="true"
-        />
-
-        <ImageView
-            android:id="@+id/search_voice_btn"
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:layout_gravity="center_vertical"
-            android:paddingLeft="16dip"
-            android:paddingRight="16dip"
-            android:src="?android:attr/searchViewVoiceIcon"
-            android:background="?android:attr/selectableItemBackground"
-            android:visibility="gone"
-            android:focusable="true"
-        />
+            android:background="?android:attr/searchViewTextFieldRight">
+    
+            <ImageView
+                android:id="@+id/search_go_btn"
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:layout_gravity="center_vertical"
+                android:paddingLeft="16dip"
+                android:paddingRight="16dip"
+                android:background="?android:attr/selectableItemBackground"
+                android:src="?android:attr/searchViewGoIcon"
+                android:visibility="gone"
+                android:focusable="true"
+            />
+    
+            <ImageView
+                android:id="@+id/search_voice_btn"
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:layout_gravity="center_vertical"
+                android:paddingLeft="16dip"
+                android:paddingRight="16dip"
+                android:src="?android:attr/searchViewVoiceIcon"
+                android:background="?android:attr/selectableItemBackground"
+                android:visibility="gone"
+                android:focusable="true"
+            />
+        </LinearLayout>
     </LinearLayout>
+
 </LinearLayout>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 68a225a..ae29e83 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -211,7 +211,7 @@
     <string name="permlab_enableCarMode" msgid="5684504058192921098">"habilitar el modo de auto"</string>
     <string name="permdesc_enableCarMode" msgid="5673461159384850628">"Permite que una aplicación habilite el modo auto."</string>
     <string name="permlab_killBackgroundProcesses" msgid="8373714752793061963">"eliminar los procesos de fondo"</string>
-    <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"Permite que una aplicación elimine los procesos de fondo de otras aplicaciones, aun si la memoria no es baja."</string>
+    <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"Permite que una aplicación elimine los procesos de fondo de otras aplicaciones, aun si la no queda poco espacio en la memoria."</string>
     <string name="permlab_forceStopPackages" msgid="1447830113260156236">"forzar la detención de otras aplicaciones"</string>
     <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"Permite que una aplicación provoque la detención de otras aplicaciones."</string>
     <string name="permlab_forceBack" msgid="1804196839880393631">"provocar que la aplicación se acerque"</string>
@@ -257,7 +257,7 @@
     <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Permite al propietario vincularse a la interfaz de nivel superior de un fondo de pantalla. Se debe evitar utilizarlo en aplicaciones normales."</string>
     <string name="permlab_bindRemoteViews" msgid="5697987759897367099">"vincular a un servicio de widget"</string>
     <string name="permdesc_bindRemoteViews" msgid="2930855984822926963">"Permite al propietario vincularse a la interfaz de nivel superior del servicio de widget. Se debe evitar utilizarlo en aplicaciones normales."</string>
-    <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interactuar con un administrador de dispositivo"</string>
+    <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interactuar con un administrador de dispositivos"</string>
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Permite que el propietario envíe sus intentos a un administrador de dispositivos. No se necesita para las aplicaciones normales."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"cambiar la orientación de la pantalla"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Admite una aplicación que cambia la rotación de la pantalla en cualquier momento. Se debe evitar utilizarlo en aplicaciones normales."</string>
@@ -277,12 +277,12 @@
     <string name="permdesc_installPackages" msgid="526669220850066132">"Admite una aplicación que instala paquetes de Android nuevos o actualizados. Las aplicaciones maliciosas pueden utilizarlo para agregar aplicaciones nuevas con permisos arbitrariamente potentes."</string>
     <string name="permlab_clearAppCache" msgid="4747698311163766540">"eliminar todos los datos de memoria caché de la aplicación"</string>
     <string name="permdesc_clearAppCache" product="tablet" msgid="3097119797652477973">"Permite que una aplicación libere espacio de almacenamiento en el tablet 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="7740465694193671402">"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>
+    <string name="permdesc_clearAppCache" product="default" msgid="7740465694193671402">"Permite que una aplicación libere espacio de almacenamiento en el teléfono borrando archivos del directorio de memoria caché de la aplicación. En general el acceso está muy restringido al proceso del sistema."</string>
     <string name="permlab_movePackage" msgid="728454979946503926">"Mover recursos de la aplicación"</string>
     <string name="permdesc_movePackage" msgid="6323049291923925277">"Permite a una aplicación mover recursos de aplicación de medios internos a externos y viceversa."</string>
     <string name="permlab_readLogs" msgid="6615778543198967614">"lee los datos confidenciales del registro"</string>
     <string name="permdesc_readLogs" product="tablet" msgid="4077356893924755294">"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 el tablet, y puede potencialmente incluir información personal o privada."</string>
-    <string name="permdesc_readLogs" product="default" msgid="8896449437464867766">"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>
+    <string name="permdesc_readLogs" product="default" msgid="8896449437464867766">"Permite que una aplicación lea los diversos archivos de registro del sistema. Esto le permite descubrir información general acerca de lo que haces con el teléfono, y puede potencialmente incluir información personal o privada."</string>
     <string name="permlab_diagnostic" msgid="8076743953908000342">"leer y escribir a recursos dentro del grupo de diagnóstico"</string>
     <string name="permdesc_diagnostic" msgid="3121238373951637049">"Admite una aplicación que lee y escribe a cualquier recurso dentro del grupo de diagnóstico; por ejemplo, archivos con /dev. Esto puede afectar potencialmente la estabilidad y la seguridad del sistema. Debe utilizarlo SÓLO el fabricante o el operador en los diagnósticos específicos del hardware."</string>
     <string name="permlab_changeComponentState" msgid="79425198834329406">"activar o desactivar componentes de la aplicación"</string>
@@ -296,15 +296,15 @@
     <string name="permdesc_writeSecureSettings" msgid="5497873143539034724">"Permite a una aplicación modificar los datos de la configuración segura de los sistemas. Las aplicaciones normales no deben utilizarlo."</string>
     <string name="permlab_writeGservices" msgid="2149426664226152185">"modificar el mapa de servicios de Google"</string>
     <string name="permdesc_writeGservices" msgid="6602362746516676175">"Admite una aplicación que modifica el mapa de servicios de Google. Las aplicaciones normales no deben utilizarlo."</string>
-    <string name="permlab_receiveBootCompleted" msgid="7776779842866993377">"iniciar automáticamente durante la inicialización"</string>
+    <string name="permlab_receiveBootCompleted" msgid="7776779842866993377">"ejecutar automáticamente al iniciar"</string>
     <string name="permdesc_receiveBootCompleted" product="tablet" msgid="7530977064379338199">"Permite que una aplicación se inicie en cuanto el sistema haya finalizado la inicialización. Esto puede ocasionar que el tablet demore más en inicializar y que la aplicación retarde el funcionamiento total del tablet al estar en ejecución constante."</string>
-    <string name="permdesc_receiveBootCompleted" product="default" msgid="698336728415008796">"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>
+    <string name="permdesc_receiveBootCompleted" product="default" msgid="698336728415008796">"Permite que una aplicación se inicie en cuanto el sistema haya finalizado la inicialización. Esto puede ocasionar que el teléfono tarde más en inicializarse y que la aplicación demore el funcionamiento total del teléfono al estar en ejecución constante."</string>
     <string name="permlab_broadcastSticky" msgid="7919126372606881614">"enviar emisiones pegajosas"</string>
     <string name="permdesc_broadcastSticky" product="tablet" msgid="6322249605930062595">"Permite que una aplicación envíe emisiones adhesivas, que permanecen luego de que finaliza la emisión. Las aplicaciones maliciosas pueden hacer que la tableta funcione más lento y esté inestable haciendo que utilicen demasiada memoria."</string>
     <string name="permdesc_broadcastSticky" product="default" msgid="1920045289234052219">"Admite una aplicación que envía emisiones pegajosas, las cuales permanecen luego de que finaliza la emisión. Las aplicaciones maliciosas pueden hacer lento e inestable al teléfono, ya que ocasiona que utilice demasiada memoria."</string>
     <string name="permlab_readContacts" msgid="6219652189510218240">"leer datos de contacto"</string>
     <string name="permdesc_readContacts" product="tablet" msgid="7596158687301157686">"Permite que una aplicación lea todos los datos de de contacto (direcciones) almacenados en tu tablet. Las aplicaciones maliciosas pueden utilizarlo para enviar tus datos a otras personas."</string>
-    <string name="permdesc_readContacts" product="default" msgid="3371591512896545975">"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>
+    <string name="permdesc_readContacts" product="default" msgid="3371591512896545975">"Permite que una aplicación lea todos los datos (direcciones) de contactos almacenados en tu tablet. Las aplicaciones maliciosas pueden utilizarlo para enviar tus datos a otras personas."</string>
     <string name="permlab_writeContacts" msgid="644616215860933284">"escribir datos de contacto"</string>
     <string name="permdesc_writeContacts" product="tablet" msgid="7782689510038568495">"Permite que una aplicación modifique los datos de (dirección) guardados en tu tablet. Las aplicaciones maliciosas pueden utilizarlo para borrar o modificar los datos de contacto."</string>
     <string name="permdesc_writeContacts" product="default" msgid="3924383579108183601">"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>
@@ -340,9 +340,9 @@
     <string name="permdesc_brick" product="tablet" msgid="7379164636920817963">"Permite que la aplicación desactive todo el tablet de manera permanente. Esto es muy peligroso."</string>
     <string name="permdesc_brick" product="default" msgid="5569526552607599221">"Admite que la aplicación desactive todo el teléfono de manera permanente. Esto es muy peligroso."</string>
     <string name="permlab_reboot" product="tablet" msgid="3436634972561795002">"forzar reinicio del tablet"</string>
-    <string name="permlab_reboot" product="default" msgid="2898560872462638242">"provocar el reinicio del teléfono"</string>
+    <string name="permlab_reboot" product="default" msgid="2898560872462638242">"forzar reinicio del teléfono"</string>
     <string name="permdesc_reboot" product="tablet" msgid="4555793623560701557">"Permite que la aplicación provoque el reinicio del tablet."</string>
-    <string name="permdesc_reboot" product="default" msgid="7914933292815491782">"Admite que la aplicación provoque que el teléfono se reinicie."</string>
+    <string name="permdesc_reboot" product="default" msgid="7914933292815491782">"Permite que la aplicación fuerce el reinicio del tablet."</string>
     <string name="permlab_mount_unmount_filesystems" msgid="1761023272170956541">"montar y desmontar filesystems"</string>
     <string name="permdesc_mount_unmount_filesystems" msgid="6253263792535859767">"Admite que la aplicación monte y desmonte filesystems para obtener almacenamiento extraíble."</string>
     <string name="permlab_mount_format_filesystems" msgid="5523285143576718981">"espacio de almacenamiento externo del formato"</string>
@@ -374,7 +374,7 @@
     <string name="permlab_callPrivileged" msgid="4198349211108497879">"llamar directamente a cualquier número de teléfono"</string>
     <string name="permdesc_callPrivileged" msgid="244405067160028452">"Admite que la aplicación llame a cualquier número de teléfono, incluidos los números de emergencia, sin tu intervención. Las aplicaciones maliciosas pueden realizar llamadas innecesarias e ilegales a los servicios de emergencia."</string>
     <string name="permlab_performCdmaProvisioning" product="tablet" msgid="4842576994144604821">"iniciar directamente la configuración CDMA del tablet"</string>
-    <string name="permlab_performCdmaProvisioning" product="default" msgid="5604848095315421425">"comienza directamente la configuración CDMA del teléfono"</string>
+    <string name="permlab_performCdmaProvisioning" product="default" msgid="5604848095315421425">"iniciar directamente la configuración CDMA del teléfono"</string>
     <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Admite la aplicación para comenzar con el aprovisionamiento CDMA. Las aplicaciones maliciosas pueden comenzar con el aprovisionamiento CDMA sin necesidad."</string>
     <string name="permlab_locationUpdates" msgid="7785408253364335740">"controlar las notificaciones de actualización de ubicación"</string>
     <string name="permdesc_locationUpdates" msgid="2300018303720930256">"Permite activar y desactivar las notificaciones de actualización de ubicación de la radio. Las aplicaciones normales no deben utilizarlo."</string>
@@ -429,7 +429,7 @@
     <string name="permlab_changeNetworkState" msgid="958884291454327309">"cambiar la conectividad de la red"</string>
     <string name="permdesc_changeNetworkState" msgid="4199958910396387075">"Permite que una aplicación cambie el estado de la conectividad de red."</string>
     <string name="permlab_changeTetherState" msgid="2702121155761140799">"Cambiar la conectividad de anclaje a red"</string>
-    <string name="permdesc_changeTetherState" msgid="8905815579146349568">"Permite que una aplicación cambie el estado de la conectividad de red del anclaje."</string>
+    <string name="permdesc_changeTetherState" msgid="8905815579146349568">"ermite que una aplicación cambie el estado de la conectividad de anclaje a red."</string>
     <string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"cambiar la configuración del uso de datos del fondo"</string>
     <string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"Admite una aplicación que cambia la configuración del uso de datos del fondo."</string>
     <string name="permlab_accessWifiState" msgid="8100926650211034400">"ver el estado de Wi-Fi"</string>
@@ -835,7 +835,7 @@
     <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g> se inició originalmente."</string>
     <string name="smv_application" msgid="295583804361236288">"La aplicación <xliff:g id="APPLICATION">%1$s</xliff:g> (proceso <xliff:g id="PROCESS">%2$s</xliff:g>) ha violado su política StrictMode autoimpuesta."</string>
     <string name="smv_process" msgid="5120397012047462446">"El proceso <xliff:g id="PROCESS">%1$s</xliff:g> ha violado su política StrictMode autoimpuesta."</string>
-    <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> Correr"</string>
+    <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> en ejecución"</string>
     <string name="heavy_weight_notification_detail" msgid="2423977499339403402">"Selecciona cambiar la aplicación"</string>
     <string name="heavy_weight_switcher_title" msgid="1135403633766694316">"¿Deseas cambiar aplicaciones?"</string>
     <string name="heavy_weight_switcher_text" msgid="4592075610079319667">"Ya se está ejecutando una aplicación que debe detenerse antes de iniciar una nueva."</string>
@@ -923,17 +923,17 @@
     <string name="ext_media_unmountable_notification_message" product="nosdcard" msgid="529021299294450667">"Almacenamiento USB dañado. Es posible que debas reformatearlo."</string>
     <string name="ext_media_unmountable_notification_message" product="default" msgid="6902531775948238989">"Tarjeta SD dañada. Es posible que debas reformatearla."</string>
     <string name="ext_media_badremoval_notification_title" product="nosdcard" msgid="1661683031330951073">"Almacenamiento USB extraído inesperadamente"</string>
-    <string name="ext_media_badremoval_notification_title" product="default" msgid="6872152882604407837">"Tarjeta SD extraída de forma imprevista"</string>
+    <string name="ext_media_badremoval_notification_title" product="default" msgid="6872152882604407837">"Almacenamiento USB extraído de forma imprevista"</string>
     <string name="ext_media_badremoval_notification_message" product="nosdcard" msgid="4329848819865594241">"Desmontar el almacenamiento USB antes de extraerlo para evitar la pérdida de datos."</string>
     <string name="ext_media_badremoval_notification_message" product="default" msgid="7260183293747448241">"Desmontar la tarjeta SD antes de extraerla para evitar la pérdida de datos."</string>
     <string name="ext_media_safe_unmount_notification_title" product="nosdcard" msgid="3967973893270360230">"Es seguro extraer el almacenamiento USB"</string>
-    <string name="ext_media_safe_unmount_notification_title" product="default" msgid="6729801130790616200">"Tarjeta SD fácil de extraer"</string>
+    <string name="ext_media_safe_unmount_notification_title" product="default" msgid="6729801130790616200">"Es seguro extraer la tarjeta SD"</string>
     <string name="ext_media_safe_unmount_notification_message" product="nosdcard" msgid="6142195361606493530">"Puedes extraer de forma segura el almacenamiento USB."</string>
-    <string name="ext_media_safe_unmount_notification_message" product="default" msgid="568841278138377604">"Puedes eliminar la tarjeta SD sin riesgos."</string>
+    <string name="ext_media_safe_unmount_notification_message" product="default" msgid="568841278138377604">"Puedes extraer de forma segura la tarjeta SD."</string>
     <string name="ext_media_nomedia_notification_title" product="nosdcard" msgid="4486377230140227651">"Almacenamiento USB extraído"</string>
     <string name="ext_media_nomedia_notification_title" product="default" msgid="8902518030404381318">"Tarjeta SD extraída"</string>
     <string name="ext_media_nomedia_notification_message" product="nosdcard" msgid="6921126162580574143">"Almacenamiento USB eliminado. Insertar nuevos medios."</string>
-    <string name="ext_media_nomedia_notification_message" product="default" msgid="3870120652983659641">"Tarjeta SD eliminada. Inserta una nueva."</string>
+    <string name="ext_media_nomedia_notification_message" product="default" msgid="3870120652983659641">"Tarjeta SD extraída. Insertar una nueva."</string>
     <string name="activity_list_empty" msgid="4168820609403385789">"No se encontraron actividades coincidentes"</string>
     <string name="permlab_pkgUsageStats" msgid="8787352074326748892">"actualizar la estadística de uso de los componentes"</string>
     <string name="permdesc_pkgUsageStats" msgid="891553695716752835">"Permite la modificación de estadísticas recopiladas sobre el uso de componentes. Las aplicaciones normales no deben utilizarlo."</string>
@@ -966,8 +966,8 @@
     <string name="chooser_wallpaper" msgid="7873476199295190279">"Cambiar fondo de pantalla"</string>
     <string name="pptp_vpn_description" msgid="2688045385181439401">"Protocolo de túnel punto a punto"</string>
     <string name="l2tp_vpn_description" msgid="3750692169378923304">"Protocolo de túnel de nivel 2"</string>
-    <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"Clave previamente compartida según L2TP/IPSec VPN"</string>
-    <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"Certificado según L2TP/IPSec VPN"</string>
+    <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"VPN L2TP/IPSec basada en clave compartida previamente"</string>
+    <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"VPN L2TP/IPSec basada en certificado"</string>
     <string name="upload_file" msgid="2897957172366730416">"Elegir archivo"</string>
     <string name="no_file_chosen" msgid="6363648562170759465">"No se seleccionó un archivo."</string>
     <string name="reset" msgid="2448168080964209908">"Restablecer"</string>
@@ -995,7 +995,7 @@
     <string name="progress_erasing" product="nosdcard" msgid="4183664626203056915">"Borrando almacenamiento USB..."</string>
     <string name="progress_erasing" product="default" msgid="2115214724367534095">"Borrando tarjeta SD..."</string>
     <string name="format_error" product="nosdcard" msgid="4320339096529911637">"No pudo borrar el almacenamiento USB."</string>
-    <string name="format_error" product="default" msgid="1343380371925238343">"No pudo borrar la tarjeta SD."</string>
+    <string name="format_error" product="default" msgid="1343380371925238343">"No se pudo borrar la tarjeta SD."</string>
     <string name="media_bad_removal" msgid="7960864061016603281">"Se ha extraído la tarjeta SD antes de ser desmontada."</string>
     <string name="media_checking" product="nosdcard" msgid="418188720009569693">"Se está verificando el almacenamiento USB en este momento."</string>
     <string name="media_checking" product="default" msgid="7334762503904827481">"Se está verificando la tarjeta SD en este momento."</string>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index cba5a15..44cefa3 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -160,7 +160,7 @@
     <string name="permgroupdesc_messages" msgid="7045736972019211994">"Permet de lire et rédiger vos SMS, e-mails et autres messages."</string>
     <string name="permgrouplab_personalInfo" msgid="3519163141070533474">"Vos informations personnelles"</string>
     <string name="permgroupdesc_personalInfo" product="tablet" msgid="6975389054186265786">"Accéder directement aux contacts et à l\'agenda enregistrés sur la tablette"</string>
-    <string name="permgroupdesc_personalInfo" product="default" msgid="5488050357388806068">"Accédez directement aux contacts et à l\'agenda enregistrés sur votre téléphone."</string>
+    <string name="permgroupdesc_personalInfo" product="default" msgid="5488050357388806068">"Accéder directement aux contacts et à l\'agenda enregistrés sur votre téléphone"</string>
     <string name="permgrouplab_location" msgid="635149742436692049">"Votre position"</string>
     <string name="permgroupdesc_location" msgid="2430258821648348660">"Suivre votre position géographique"</string>
     <string name="permgrouplab_network" msgid="5808983377727109831">"Communications réseau"</string>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index f363bd3..71a8b2a 100755
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -729,6 +729,10 @@
         <attr name="searchViewEditQuery" format="reference" />
         <!-- SearchView query refinement icon background -->
         <attr name="searchViewEditQueryBackground" format="reference" />
+        <!-- SearchView text field background for the left section -->
+        <attr name="searchViewTextField" format="reference" />
+        <!-- SearchView text field background for the right section -->
+        <attr name="searchViewTextFieldRight" format="reference" />
 
         <!-- Specifies a drawable to use for the 'home as up' indicator. -->
         <attr name="homeAsUpIndicator" format="reference" />
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index 41ee55a..11c3916 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -982,7 +982,7 @@
     <eat-comment />
 
     <style name="MediaButton">
-        <item name="android:background">@android:drawable/media_button_background</item>
+        <item name="android:background">@null</item>
         <item name="android:layout_width">71dip</item>
         <item name="android:layout_height">52dip</item>
     </style>
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index b7cc7f98..5f4ea32 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -285,6 +285,8 @@
 
         <!-- SearchView attributes -->
         <item name="searchDropdownBackground">@android:drawable/spinner_dropdown_background</item>
+        <item name="searchViewTextField">@drawable/textfield_searchview_holo_dark</item>
+        <item name="searchViewTextFieldRight">@drawable/textfield_searchview_right_holo_dark</item>
         <item name="searchViewCloseIcon">@android:drawable/ic_clear</item>
         <item name="searchViewSearchIcon">@android:drawable/ic_search</item>
         <item name="searchViewGoIcon">@android:drawable/ic_go</item>
@@ -393,6 +395,8 @@
 
         <!-- SearchView attributes -->
         <item name="searchDropdownBackground">@android:drawable/search_dropdown_light</item>
+        <item name="searchViewTextField">@drawable/textfield_searchview_holo_light</item>
+        <item name="searchViewTextFieldRight">@drawable/textfield_searchview_right_holo_light</item>
         <item name="searchViewCloseIcon">@android:drawable/ic_clear_holo_light</item>
         <item name="searchViewSearchIcon">@android:drawable/ic_search_api_holo_light</item>
         <item name="searchViewGoIcon">@android:drawable/ic_go_search_api_holo_light</item>
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerStressTestRunner.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerStressTestRunner.java
index 5b76e39..3f78ce0 100644
--- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerStressTestRunner.java
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerStressTestRunner.java
@@ -19,6 +19,7 @@
 import android.os.Bundle;
 import android.test.InstrumentationTestRunner;
 import android.test.InstrumentationTestSuite;
+
 import com.android.connectivitymanagertest.stress.WifiApStress;
 import com.android.connectivitymanagertest.stress.WifiStressTest;
 
@@ -44,8 +45,18 @@
     @Override
     public TestSuite getAllTests() {
         TestSuite suite = new InstrumentationTestSuite(this);
-        suite.addTestSuite(WifiApStress.class);
-        suite.addTestSuite(WifiStressTest.class);
+        if (!UtilHelper.isWifiOnly()) {
+            suite.addTestSuite(WifiApStress.class);
+            suite.addTestSuite(WifiStressTest.class);
+        } else {
+            // create a new test suite
+            suite.setName("WifiOnlyStressTests");
+            String[] methodNames = {"testWifiScanning"};
+            Class<WifiStressTest> testClass = WifiStressTest.class;
+            for (String method: methodNames) {
+                suite.addTest(TestSuite.createTest(testClass, method));
+            }
+        }
         return suite;
     }
 
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java
index 3d4dc3d..20aae47 100644
--- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java
@@ -19,7 +19,7 @@
 import android.os.Bundle;
 import android.test.InstrumentationTestRunner;
 import android.test.InstrumentationTestSuite;
-import android.util.Log;
+
 import com.android.connectivitymanagertest.functional.ConnectivityManagerMobileTest;
 import com.android.connectivitymanagertest.functional.WifiConnectionTest;
 
@@ -35,10 +35,24 @@
  */
 
 public class ConnectivityManagerTestRunner extends InstrumentationTestRunner {
+    public String TEST_SSID = null;
+
     @Override
     public TestSuite getAllTests() {
         TestSuite suite = new InstrumentationTestSuite(this);
-        suite.addTestSuite(ConnectivityManagerMobileTest.class);
+        if (!UtilHelper.isWifiOnly()) {
+            suite.addTestSuite(ConnectivityManagerMobileTest.class);
+        } else {
+            // create a new test suite
+            suite.setName("ConnectivityManagerWifiOnlyFunctionalTests");
+            String[] methodNames = {"testConnectToWifi", "testConnectToWifWithKnownAP",
+                    "testDisconnectWifi", "testDataConnectionOverAMWithWifi",
+                    "testDataConnectionWithWifiToAMToWifi", "testWifiStateChange"};
+            Class<ConnectivityManagerMobileTest> testClass = ConnectivityManagerMobileTest.class;
+            for (String method: methodNames) {
+                suite.addTest(TestSuite.createTest(testClass, method));
+            }
+        }
         suite.addTestSuite(WifiConnectionTest.class);
         return suite;
     }
@@ -56,6 +70,4 @@
             TEST_SSID = testSSID;
         }
     }
-
-    public String TEST_SSID = null;
 }
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/UtilHelper.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/UtilHelper.java
new file mode 100644
index 0000000..1b966bf
--- /dev/null
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/UtilHelper.java
@@ -0,0 +1,27 @@
+/*
+ * 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 com.android.connectivitymanagertest;
+
+import android.os.SystemProperties;
+
+public class UtilHelper {
+    public static boolean isWifiOnly() {
+        return "wifi-only".equals(SystemProperties.get("ro.carrier"));
+    }
+
+
+}
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java
index b87021a..d9b770a 100644
--- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java
@@ -17,6 +17,7 @@
 package com.android.connectivitymanagertest.functional;
 
 import com.android.connectivitymanagertest.ConnectivityManagerTestActivity;
+import com.android.connectivitymanagertest.UtilHelper;
 
 import android.content.Intent;
 import android.content.Context;
@@ -48,7 +49,7 @@
     private WakeLock wl;
 
     public ConnectivityManagerMobileTest() {
-        super(PKG_NAME, ConnectivityManagerTestActivity.class);
+        super(ConnectivityManagerTestActivity.class);
     }
 
     @Override
@@ -68,13 +69,15 @@
             Log.v(LOG_TAG, "airplane is not disabled, disable it.");
             cmActivity.setAirplaneMode(getInstrumentation().getContext(), false);
         }
-        if (!cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED,
-                ConnectivityManagerTestActivity.LONG_TIMEOUT)) {
-            // Note: When the test fails in setUp(), tearDown is not called. In that case,
-            // the activity is destroyed which blocks the next test at "getActivity()".
-            // tearDown() is called here to avoid that situation.
-            tearDown();
-            fail("Device is not connected to Mobile, setUp failed");
+        if (!UtilHelper.isWifiOnly()) {
+            if (!cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED,
+                    ConnectivityManagerTestActivity.LONG_TIMEOUT)) {
+                // Note: When the test fails in setUp(), tearDown is not called. In that case,
+                // the activity is destroyed which blocks the next test at "getActivity()".
+                // tearDown() is called here to avoid that situation.
+                tearDown();
+                fail("Device is not connected to Mobile, setUp failed");
+            }
         }
     }
 
@@ -128,8 +131,8 @@
         // As Wifi stays in DISCONNETED, Mobile statys in CONNECTED,
         // the connectivity manager will not broadcast any network connectivity event for Wifi
         NetworkInfo networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
-        cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_MOBILE, networkInfo.getState(),
-                NetworkState.DO_NOTHING, State.CONNECTED);
+        cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_MOBILE,
+                networkInfo.getState(), NetworkState.DO_NOTHING, State.CONNECTED);
         networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
         cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_WIFI, networkInfo.getState(),
                 NetworkState.DO_NOTHING, State.DISCONNECTED);
@@ -162,10 +165,13 @@
     @LargeTest
     public void testConnectToWifi() {
         assertNotNull("SSID is null", TEST_ACCESS_POINT);
-        //Prepare for connectivity verification
-        NetworkInfo networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
-        cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_MOBILE, networkInfo.getState(),
-                NetworkState.TO_DISCONNECTION, State.DISCONNECTED);
+        NetworkInfo networkInfo;
+        if (!UtilHelper.isWifiOnly()) {
+            //Prepare for connectivity verification
+            networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
+            cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_MOBILE,
+                    networkInfo.getState(), NetworkState.TO_DISCONNECTION, State.DISCONNECTED);
+        }
         networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
         cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_WIFI, networkInfo.getState(),
                 NetworkState.TO_CONNECTION, State.CONNECTED);
@@ -179,8 +185,10 @@
         Log.v(LOG_TAG, "wifi state is enabled");
         assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
                 ConnectivityManagerTestActivity.LONG_TIMEOUT));
-        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.DISCONNECTED,
-                ConnectivityManagerTestActivity.LONG_TIMEOUT));
+        if (!UtilHelper.isWifiOnly()) {
+            assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE,
+                    State.DISCONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT));
+        }
 
         // validate states
         if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_WIFI)) {
@@ -189,11 +197,13 @@
                     cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_WIFI));
             assertTrue(false);
         }
-        if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_MOBILE)) {
-            Log.v(LOG_TAG, "Mobile state transition validation failed.");
-            Log.v(LOG_TAG, "reason: " +
-                    cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_MOBILE));
-            assertTrue(false);
+        if (!UtilHelper.isWifiOnly()) {
+            if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_MOBILE)) {
+                Log.v(LOG_TAG, "Mobile state transition validation failed.");
+                Log.v(LOG_TAG, "reason: " +
+                        cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_MOBILE));
+                assertTrue(false);
+            }
         }
     }
 
@@ -225,16 +235,21 @@
         // Wait for the Wifi state to be DISABLED
         assertTrue(cmActivity.waitForWifiState(WifiManager.WIFI_STATE_DISABLED,
                 ConnectivityManagerTestActivity.LONG_TIMEOUT));
-        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.DISCONNECTED,
-                ConnectivityManagerTestActivity.LONG_TIMEOUT));
-        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED,
-                ConnectivityManagerTestActivity.LONG_TIMEOUT));
+        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI,
+                State.DISCONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT));
+        if (!UtilHelper.isWifiOnly()) {
+            assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE,
+                    State.CONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT));
+        }
 
-        //Prepare for connectivity state verification
-        NetworkInfo networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
-        cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_MOBILE,
-                                              networkInfo.getState(), NetworkState.DO_NOTHING,
-                                              State.DISCONNECTED);
+        NetworkInfo networkInfo;
+        if (!UtilHelper.isWifiOnly()) {
+            //Prepare for connectivity state verification
+            networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
+            cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_MOBILE,
+                                                  networkInfo.getState(), NetworkState.DO_NOTHING,
+                                                  State.DISCONNECTED);
+        }
         networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
         cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_WIFI, networkInfo.getState(),
                 NetworkState.TO_CONNECTION, State.CONNECTED);
@@ -246,8 +261,10 @@
         // Wait for Wifi to be connected and mobile to be disconnected
         assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
                 ConnectivityManagerTestActivity.LONG_TIMEOUT));
-        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.DISCONNECTED,
-                ConnectivityManagerTestActivity.LONG_TIMEOUT));
+        if (!UtilHelper.isWifiOnly()) {
+            assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE,
+                    State.DISCONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT));
+        }
 
         // validate wifi states
         if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_WIFI)) {
@@ -277,11 +294,14 @@
             Log.v(LOG_TAG, "exception: " + e.toString());
         }
 
-        NetworkInfo networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
-        cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_MOBILE,
-                                              networkInfo.getState(),
-                                              NetworkState.TO_CONNECTION,
-                                              State.CONNECTED);
+        NetworkInfo networkInfo;
+        if (!UtilHelper.isWifiOnly()) {
+            networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
+            cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_MOBILE,
+                                                  networkInfo.getState(),
+                                                  NetworkState.TO_CONNECTION,
+                                                  State.CONNECTED);
+        }
         networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
         cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_WIFI, networkInfo.getState(),
                 NetworkState.TO_DISCONNECTION, State.DISCONNECTED);
@@ -291,8 +311,10 @@
 
         assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.DISCONNECTED,
                 ConnectivityManagerTestActivity.LONG_TIMEOUT));
-        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED,
-                ConnectivityManagerTestActivity.LONG_TIMEOUT));
+        if (!UtilHelper.isWifiOnly()) {
+            assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE,
+                    State.CONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT));
+        }
 
         // validate states
         if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_WIFI)) {
@@ -301,11 +323,13 @@
                     cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_WIFI));
             assertTrue(false);
         }
-        if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_MOBILE)) {
-            Log.v(LOG_TAG, "Mobile state transition validation failed.");
-            Log.v(LOG_TAG, "reason: " +
-                    cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_MOBILE));
-            assertTrue(false);
+        if (!UtilHelper.isWifiOnly()) {
+            if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_MOBILE)) {
+                Log.v(LOG_TAG, "Mobile state transition validation failed.");
+                Log.v(LOG_TAG, "reason: " +
+                        cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_MOBILE));
+                assertTrue(false);
+            }
         }
     }
 
@@ -377,14 +401,16 @@
         // Eanble airplane mode
         cmActivity.setAirplaneMode(getInstrumentation().getContext(), true);
 
-        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.DISCONNECTED,
-                ConnectivityManagerTestActivity.LONG_TIMEOUT));
-
-        NetworkInfo networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
-        cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_MOBILE,
-                                              networkInfo.getState(),
-                                              NetworkState.DO_NOTHING,
-                                              State.DISCONNECTED);
+        NetworkInfo networkInfo;
+        if (!UtilHelper.isWifiOnly()) {
+            assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE,
+                    State.DISCONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT));
+            networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
+            cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_MOBILE,
+                                                  networkInfo.getState(),
+                                                  NetworkState.DO_NOTHING,
+                                                  State.DISCONNECTED);
+        }
         networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
         cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_WIFI, networkInfo.getState(),
                                               NetworkState.TO_CONNECTION, State.CONNECTED);
@@ -402,11 +428,13 @@
                     cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_WIFI));
             assertTrue("State validation failed", false);
         }
-        if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_MOBILE)) {
-            Log.v(LOG_TAG, "state validation for Mobile failed");
-            Log.v(LOG_TAG, "reason: " +
-                    cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_MOBILE));
-            assertTrue("state validation failed", false);
+        if (!UtilHelper.isWifiOnly()) {
+            if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_MOBILE)) {
+                Log.v(LOG_TAG, "state validation for Mobile failed");
+                Log.v(LOG_TAG, "reason: " +
+                        cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_MOBILE));
+                assertTrue("state validation failed", false);
+            }
         }
         cmActivity.setAirplaneMode(getInstrumentation().getContext(), false);
     }
@@ -452,8 +480,10 @@
 
         assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
                             ConnectivityManagerTestActivity.LONG_TIMEOUT));
-        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.DISCONNECTED,
-                            ConnectivityManagerTestActivity.LONG_TIMEOUT));
+        if (!UtilHelper.isWifiOnly()) {
+            assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE,
+                    State.DISCONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT));
+        }
 
         // validate the state transition
         if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_WIFI)) {
diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs
index b13600c..c258949 100644
--- a/docs/html/guide/guide_toc.cs
+++ b/docs/html/guide/guide_toc.cs
@@ -630,7 +630,7 @@
             <span class="zh-TW" style="display:none">準備發佈</span>
           </a></li>
       <li><a href="<?cs var:toroot ?>guide/publishing/publishing.html">
-            <span class="en">Publishing Your Applications</span>
+            <span class="en">Publishing on Android Market</span>
           </a></li>
     </ul>
   </li>
diff --git a/docs/html/guide/publishing/publishing.jd b/docs/html/guide/publishing/publishing.jd
index af1ea74..0cbba53 100644
--- a/docs/html/guide/publishing/publishing.jd
+++ b/docs/html/guide/publishing/publishing.jd
@@ -1,4 +1,4 @@
-page.title=Publishing Your Applications
+page.title=Publishing on Android Market
 @jd:body
 
 <div id="qv-wrapper">
@@ -16,22 +16,22 @@
 <h2>In this document</h2>
 
 <ol>
-<li><a href="#overview">Publishing on Android Market</a>
-    <ol>
-    <li><a href="#marketupgrade">Publishing Updates on Android Market</a></li>
-    <li><a href="#marketLicensing">Using Android Market Licensing Service</a></li>
-    <li><a href="#marketintent">Using Intents to Launch the Market Application</a></li>
-    </ol></li>
-<!--
-<li><span style="color:ccc">Publishing on Other Hosted Services</a></li>
-<li><span style="color:ccc">Publishing through a Web Server</a></li>
--->
+<li><a href="#overview">About Android Market</a>
+<li><a href="#marketupgrade">Publishing Updates on Android Market</a></li>
+<li><a href="#marketLicensing">Using Android Market Licensing Service</a></li>
+<li><a href="#marketintent">Linking to Your Apps on Android Market</a>
+  <ol>
+    <li><a href="#OpeningDetails">Opening an app's details page</a></li>
+    <li><a href="#PerformingSearch">Performing a search</a></li>
+    <li><a href="#UriSummary">Summary of URI formats</a></li>
+  </ol>  
+</li>
 </ol>
 
 <h2>See also</h2>
 
 <ol>
-<li><a href="{@docRoot}guide/publishing/licensing.html">Licensing Your Applications</a></li>
+<li><a href="{@docRoot}guide/publishing/licensing.html">Application Licensing</a></li>
 <li><a href="{@docRoot}guide/publishing/preparing.html">Preparing to Publish</a></li>
 </ol>
 
@@ -39,43 +39,45 @@
   <img id="rule" src="{@docRoot}assets/images/grad-rule-qv.png">
   <div id="qv-sub-rule">
     <img src="{@docRoot}assets/images/icon_market.jpg" style="float:left;margin:0;padding:0;">
-    <p style="color:#669999;">Interested in publishing your app on Android Market?</p>
-    <a id="publish-link" href="http://market.android.com/publish">Go to Android Market &raquo;</a>
+    <h2 style="color:#669999;">Interested in publishing your app on Android Market?</h2>
+    <p><a href="http://market.android.com/publish">Go to Android Market</a> to
+create a developer account and upload your application. For more information about the
+required assets, listing details, and options, see <a
+href="http://market.android.com/support/bin/answer.py?answer=113469">Uploading
+applications</a>.</p>
   </div>
 </div>
 
 </div>
 </div>
 
-<p>Publishing an application means testing it, packaging it appropriately, and making 
-it available to users of Android-powered mobile devices for download or sideload.</p>
+<p>If you've followed the steps outlined in <a
+href="{@docRoot}guide/publishing/preparing.html">Preparing to Publish</a>, the result of the process
+is a compiled {@code .apk} file that is signed with your private release key. Your application is
+now ready to be published publicly so users can install it.</p>
 
-<p>If you've followed the steps outlined in 
-<a href="{@docRoot}guide/publishing/preparing.html">Preparing to
-Publish Your Applications</a>, the result of the process is a compiled .apk that
-is signed with your release private key. Inside the .apk, the application is
-properly versioned and any MapView elements reference a Maps API Key that you
-obtained by registering the MD5 fingerprint of the same certificate used to sign
-the .apk. Your application is now ready for publishing. </p>
+<p>You can publish your application and allow users to install it any way you choose, including
+from your own web server. This document provides information about publishing your Android
+application with Android Market.</p>
 
-<p>The sections below provide information about publishing your Android
-application to mobile device users.</p>
 
-<h2 id="overview">Publishing on Android Market</h2>
+<h2 id="overview">About Android Market</h2>
 
-<p>Android Market is a hosted service that makes it easy for users to find and
-download Android applications to their Android-powered devices, and makes it 
-easy for developers to publish their applications to Android users.</p>
+<p>Android Market is a service that makes it easy for users to find and download Android
+applications to their Android-powered devices, either from the Android Market application on their
+device or from the Android Market web site (<a
+href="http://market.android.com">market.android.com</a>). As a developer, you can use Android Market
+to distribute your applications to users on all types of Android-powered devices, all around the
+world.</p>
 
 <p>To publish your application on Android Market, you first need to register
-with the service using your Google account and agree to the terms of service.
+with the service using a Google account and agree to the terms of service.
 Once you are registered, you can upload your application to the service whenever
-you want, as many times as you want, and then publish it when you are ready.
-Once published, users can see your application, download it, and rate it using
-the Market application installed on their Android-powered devices. </p>
+you want, update it as many times as you want, and then publish it when you are ready.
+Once published, users can see your application, download it, and rate it. </p>
 
 <p>To register as an Android Market developer and get started with publishing,
-visit the Android Market: </p>
+visit the Android Market publisher site: </p>
 
 <p style="margin-left:3em;"><a
 href="http://market.android.com/publish">http://market.android.com/publish</a>
@@ -94,22 +96,24 @@
 <code>android:versionName</code> attribute in the
 <a
 href="{@docRoot}guide/topics/manifest/manifest-element.html"><code>&lt;manifest&gt;</code></a>
-element of its manifest. The server uses the <code>android:versionCode</code> as
+element of its manifest file. The server uses the <code>android:versionCode</code> as
 the basis for identifying the application internally and handling updates, and
 it displays the <code>android:versionName</code> to users as the application's
 version.</li>
 <li>Your application must define both an <code>android:icon</code> and an
-<code>android:label</code> attribute in the <code>&lt;application&gt;</code>
-element of its manifest.</li>
+<code>android:label</code> attribute in the <a
+href="{@docRoot}guide/topics/manifest/application-element.html"><code>&lt;application&gt;</code></a>
+element of its manifest file.</li>
 </ol>
 </div>
 
-<h3 id="marketupgrade">Publishing Updates on Android Market</h3>
+
+<h2 id="marketupgrade">Publishing Updates on Android Market</h2>
 
 <p>At any time after publishing an application on Android Market, you can upload
 and publish an update to the same application package. When you publish an
 update to an application, users who have already installed the
-application will automatically receive a notification that an update is
+application may receive a notification that an update is
 available for the application. They can then choose to update the application
 to the latest version.</p>
 
@@ -117,190 +121,231 @@
 the <code>android:versionCode</code> and <code>android:versionName</code>
 attributes in the <a
 href="{@docRoot}guide/topics/manifest/manifest-element.html"><code>&lt;manifest&gt;</code></a>
-element of the manifest file. Also, the package name must be the same and the
-.apk must be signed with the same private key. If the package name and signing
+element of the manifest file. Also, the package name must be the same as the existing version and
+the {@code .apk} file must be signed with the same private key. If the package name and signing
 certificate do <em>not</em> match those of the existing version, Market will
-consider it a new application and will not offer it to users as an update.</p>
+consider it a new application, publish it as such, and will not offer it to existing users as an
+update.</p>
 
 
-<h3 id="marketLicensing">Using Android Market Licensing Service</h3>
+<h2 id="marketLicensing">Using Android Market Licensing Service</h2>
 
 <p>Android Market offers a licensing service that lets you enforce licensing
 policies for paid applications that you publish through Android Market. With
-Android Market Licensing, your applications can query Android Market at run time
-to obtain their licensing status for the current user, then allow or disallow
-further use as appropriate. Using the service, you can apply a flexible
-licensing policy on an application-by-application basis &mdash; each 
+Android Market Licensing, your applications can query Android Market at runtime
+to obtain the licensing status for the current user, then allow or disallow
+further use of the application as appropriate. Using the service, you can apply a flexible
+licensing policy on an application-by-application basis&mdash;each 
 application can enforce its licensing status in the way most appropriate
 for it. </p>
 
 <p>Any application that you publish through Android Market can use the Android
-Market Licensing Service. The service uses no dedicated framework APIs, you can
-add licensing to any legacy application that uses a minimum API level of 3 or
+Market Licensing Service. The service uses no dedicated framework APIs, so you can
+add licensing to any application that uses a minimum API Level of 3 or
 higher.</p>
 
 <p>For complete information about Android Market Licensing Service and how to
-use it in your application, see <a
-href="{@docRoot}guide/publishing/licensing.html">Licensing Your
-Applications</a>.</p>
+use it in your application, read <a
+href="{@docRoot}guide/publishing/licensing.html">Application Licensing</a>.</p>
 
 
-<h3 id="marketintent">Using Intents to Launch the Market Application on 
-a Device</h3>
 
-<p>Android-powered devices include a preinstalled Market application that gives
-users access to the Android Market site. From Market, users can
-browse or search available applications, read ratings and reviews, and
-download/install applications.</p>
+<h2 id="marketintent">Linking to Your Apps on Android Market</h2>
 
-<p>You can launch the Market application from another Android
-application by sending an Intent to the system. You might want to do
-this, for example, to help the user locate and download an update to an
-installed application, or to let the user know about related
-applications that are available for download. </p>
-
-<p>To launch Market, you send an ACTION_VIEW Intent, passing a Market-handled
-URI string as the Intent data. In most cases, your application would call
-startActivity() to send the ACTION_VIEW Intent with the Market-handled URI.</p>
-
-<p>The URI that you supply with the Intent lets the system route the intent
-properly and also expresses the type of action that you want Market to perform
-after launch. Currently, you can have Market take these actions:</p>
+<p>To help users discover your published applications, you can use two special Android Market URIs
+that direct users to your application's details page or perform a search for all of your published
+applications in Android Market. You can use these URIs to do the following:</p>
 
 <ul>
-<li>Initiate a search for applications on Android Market, based on the query
-parameters that you provide, or </li>
-<li>Load the Details page for a specific application on Android Market, based on
-the application's package name.</li>
+  <li>Create a button in your application or a link on a web page that opens one of your
+application's details page in the Android Market application or web site.</li>
+  <li>Create a button in your application or a link on a web page that searches for all your
+published applications in the Android Market application or web site.</li>
 </ul>
 
-<h4>Initiating a search</h4>
+<p>You can launch the Android Market application or web site in the following ways:</p>
+<ul>
+  <li>Initiate an {@link android.content.Intent} from your application that launches the
+Android Market application on the user's device. The intent must use the {@link
+android.content.Intent#ACTION_VIEW} action, and include intent data with the appropriate
+Android Market URI scheme.</li>
+  <li>Provide a hyperlink on a web page that opens the Android Market web site.</li>
+</ul>
 
-<p>Your application can initiate a search on Android Market for applications
-that match the query parameters that you provide. To do so, your application
-sends an ACTION_VIEW Intent that includes a URI and query parameters in this
+<p>In both cases, you need to create a URI that indicates either the application you'd like to view
+in Android Market or the search you'd like to perform. The URI is quite similar whether you want
+to open the application or open the web site. The only difference is the URI prefix.</p>
+
+<p>To open the Android Market application on the device, the prefix for the intent's data URI
+is:</p>
+
+<p style="margin-left:2em"><code>market://</code></p>
+
+<p>To open the Android Market web site, the prefix for the link URI is:</p>
+
+<p style="margin-left:2em"><code>http://market.android.com/</code></p>
+
+<p>To complete each URI, you must append a string that specifies either the
+application for which you want to view or the search to execute. The following sections
+describe how to create a complete URI for each case.</p>
+
+<p class="note"><strong>Note:</strong> If you create a link to open the Android Market web site and
+the user selects it from an Android-powered device, the Android Market application will also resolve
+the link so the user can use the native application instead of the web site. Also, because the
+Android Market application also reads the {@code http://} URIs, you can also use them in an intent,
+but you should usually use the {@code market://} URIs for an intent, so that the native application
+is opened by default. You should use {@code http://} URIs only when creating links from a web
+page.</p>
+
+
+<h3 id="OpeningDetails">Opening an app's details page</h3>
+
+<p>As described above, you can open the details page for a specific application either on the
+Android Market application or the Android Market web site. The details page allows the user to see
+the application description, screenshots, reviews and more, and choose to install it.</p>
+
+<p>The format for the URI that opens the details page is:</p>
+
+<p style="margin-left:2em"><code>&lt;URI_prefix&gt;<b>details?id=</b>&lt;package_name&gt;</code></p>
+
+<p>The <code>&lt;package_name&gt;</code> is a placeholder for the target application's fully
+qualified package name, as declared in the <a
+href="{@docRoot}guide/topics/manifest/manifest-element.html#package">{@code
+package}</a> attribute of the <a href="{@docRoot}guide/topics/manifest/manifest-element.html">{@code
+&lt;manifest&gt;}</a> element in the application's manifest file.</p>
+
+
+<h4>Opening details in the Android Market application</h4>
+
+<p>To open the details page in the Android Market application, create an intent with the
+{@link android.content.Intent#ACTION_VIEW} action and include a data URI in this format:</p>
+
+<p style="margin-left:2em"><code>market://details?id=&lt;package_name&gt;</code></p>
+
+<p>For example, here's how you can create an intent and open an application's details page in the
+Android Market application:</p>
+
+<pre>
+Intent intent = new Intent(Intent.ACTION_VIEW);
+intent.setData(Uri.parse("market://details?id=com.android.example"));
+startActivity(intent);
+</pre>
+
+
+<h4>Opening details on the Android Market web site</h4>
+
+<p>To open the details page on the Android Market web site, create a link with a URI in this
 format:</p>
 
-<p style="margin-left:2em"><code>market://search?q=&lt;paramtype&gt;:&lt;value&gt;</code></p>
+<p style="margin-left:2em">
+  <code>http://market.android.com/details?id=&lt;package_name&gt;</code>
+</p>
 
-<div class="sidebox-wrapper" xstyle="margin-bottom:2em;margin-top:.5em;width:90%;"> 
-  <img id="rule" src="{@docRoot}assets/images/grad-rule-qv.png"> 
-  <div id="qv-sub-rule"> 
-    <img src="{@docRoot}assets/images/icon_market.jpg" style="float:left;margin:0;padding:0;"> 
-    <p style="color:#669999;">Searches on Android Market</p> 
-<p>When you initiate a search, Android Market returns results from matches in
-the public metadata supplied by developers in their Android Market profiles or
-application publishing information, but not from the developer's private account
-or from the certificate used to sign the application. </p>
-  </div> 
-</div>
+<p>For example, here's a link that opens an application's details page on the Android Market web
+site:</p>
 
-<p>Using this URI format, you can search for applications by:</p>
+<pre>
+&lt;a href="http://market.android.com/details?id=com.android.example">App Link&lt;/a>
+</pre>
+
+
+
+<h3 id="PerformingSearch">Performing a search</h3>
+
+<p>To initiate a search in Android Market, the format for the URI is:</p>
+
+<p style="margin-left:2em">
+  <code>&lt;URI_prefix&gt;<b>search?q=</b>&lt;query&gt;</code>
+</p>
+
+<p>The <code>&lt;query&gt;</code> is a placeholder for the search query to execute in Android
+Market. The query can be a raw text string or you can include a parameter that performs a search
+based on the publisher name:</p>
 
 <ul>
-<li>Package name</li>
-<li>Developer name</li>
-<li>String match across application name, developer name, and
-description, or </li>
-<li>Any combination of the above</li>
+  <li>To perform a raw text search, append the query string:
+  <p><code>&lt;URI_prefix&gt;<b>search?q=</b>&lt;search_query&gt;</code></p></li>
+
+  <li>To search based on the publisher name, use the {@code pub:} parameter in the query, followed
+by the publisher name:
+  <p><code>&lt;URI_prefix&gt;<b>search?q=pub:</b>&lt;publisher_name&gt;</code></p>
+  <p>You can use this type of search to show all of your published applications.</p></li>
 </ul>
 
-<p>The table at the bottom of this page specifies the <code>paramtypes</code>
-and <code>values</code> that correspond to each of these types of search. </p>
 
-<p>When you send an intent to initiate a search for applications, Market sends
-the search query to the server and displays the result. To the user, the
-experience is something like this: </p>
+<h4>Searching the Android Market application</h4>
 
-<ol>
-<li>The user presses a link or button in your application.</li>
-<li>The Market application launches and takes control of the screen, displaying
-a progress indicator labeled "Searching" until it receives the search
-results.</li>
-<li>Market receives the search results and displays them. Depending on the query
-parameters, the search results may include a list of one or more applications.
-</li>
-<li>From the results page, the user can select an app to go to its Details page,
-which offers information about the app and lets the user download/purchase the
-app.</li>
-</ol>
+<p>To perform a search in the Android Market application, create an intent with the
+{@link android.content.Intent#ACTION_VIEW} action and include a data URI in this format:</p>
 
-<h4>Loading an application's Details page</h4>
+<p style="margin-left:2em"><code>market://search?q=&lt;query&gt;</code></p>
 
-<p>In Android Market, every application has a Details page that provides an
-overview of the application for users. For example, the page includes a short
-description of the app and screen shots of it in use, if supplied by the
-developer, as well as feedback from users and information about the developer.
-The Details page also includes an "Install" button that lets the user trigger
-the download/purchase of the application.</p>
+<p>The query may include the {@code pub:} parameter described above.</p>
 
-<p>If you want to refer the user to a specific appplication, your application
-can take the user directly to the application's Details page. To do so, your
-application sends an ACTION_VIEW Intent that includes a URI and query parameter
-in this format:</p>
+<p>For example, here's how you can initiate a search in the Android Market application, based on the
+publisher name:</p>
 
-<p style="margin-left:2em"><code>market://details?id=&lt;packagename&gt;</code></p>
+<pre>
+Intent intent = new Intent(Intent.ACTION_VIEW);
+intent.setData(Uri.parse("market://search?q=pub:Your Publisher Name"));
+startActivity(intent);
+</pre>
 
-<p>In this case, the <code>packagename</code> parameter is target application's
-fully qualified package name, as declared in the <code>package</code> attribute
-of the <code>manifest</code> element in the application's manifest file. For example:</p>
+<p>The search result shows all applications published by the publisher and which are compatible with
+the current device.</p>
 
-<p style="margin-left:2em"><code>market://details?id=com.example.android.jetboy</code></p>
 
-<h4>Android Market URIs</h4>
+<h4>Searching the Android Market web site</h4>
 
-<p>The table below provides a list of URIs and actions currently
-supported by the Market application.</p>
+<p>To perform a search on the Android Market web site, create a link with a URI in this
+format:</p>
 
-<p>Note that these URIs work only when passed as Intent data &mdash; you 
-can't currently load the URIs in a web browser, either on a desktop machine or 
-on the device. </p>
+<p style="margin-left:2em">
+  <code>http://market.android.com/search?q=&lt;query&gt;</code>
+</p>
+
+<p>The query may include the {@code pub:} parameter described above.</p>
+
+<p>For example, here's a link that initiates a search on the Android Market web site, based on the
+publisher name:</p>
+
+<pre>
+&lt;a href="http://market.android.com/search?q=pub:Your Publisher Name">Search Link&lt;/a>
+</pre>
+
+<p>The search result shows all applications published by the publisher.</p>
+
+
+
+<h3 id="UriSummary">Summary of URI formats</h3>
+
+<p>The table below provides a summary of the URIs currently supported by the Android Market (both on
+the web and in the Android application), as discussed in the previous sections.</p>
 
 <table>
 <tr>
-<th  width="25%">For this Result</th>
-<th>Pass this URI with the ACTION_VIEW Intent</th>
-<th  width="36%">Comments</th>
-</tr>
-<tr>
-<td>Display the Details screen for a specific application, as identified 
-by the app's fully qualified package name.</td>
-<td><code>http://market.android.com/details?id=&lt;packagename&gt;</code> 
-or<br>
-<code>market://details?id=&lt;packagename&gt;</code></td>
-<td>Note that the package name that you specify is <em>not</em> specific to any 
-version of an application. Therefore, Market always displays the Details page for the 
-latest version of the application.</td>
-</tr>
-<tr>
-<td>Search for an application by its fully qualified Java package name and
-display the result.</td>
-<td><code>http://market.android.com/search?q=pname:&lt;package&gt;</code> or<br>
-<code>market://search?q=pname:&lt;package&gt;</code></td>
-<td>Searches only the Java package name of applications. Returns only exact
-matches.</td>
+<th>For this result</th>
+<th>Use this URI in a web page link</th>
+<th>Or this URI in an {@link android.content.Intent#ACTION_VIEW} intent</th>
 </tr>
 
 <tr>
-<td>Search for applications by developer name and display the results.</td>
-<td><code>http://market.android.com/search?q=pub:&lt;Developer&nbsp;Name&gt;</code>
-or<br> <code>market://search?q=pub:&lt;Developer Name&gt;</code></td>
-<td>Searches only the "Developer Name" fields of Market public profiles. 
-Returns exact matches only. </td>
+<td>Display the details screen for a specific application</td>
+<td><code>http://market.android.com/details?id=&lt;package_name&gt;</code> 
+<td><code>market://details?id=&lt;package_name&gt;</code></td>
 </tr>
 
 <tr>
-<td>Search for applications by substring and display the results.</td>
-<td><code>http://market.android.com/search?q=&lt;substring&gt;</code> or
-<br><code>market://search?q=&lt;substring&gt;</code></td>
-<td>Searches all public fields (application title, developer name, and
-application description) for all applications. Returns exact and partial 
-matches.</td>
+<td>Search for applications using a general string query.</td>
+<td><code>http://market.android.com/search?q=&lt;query&gt;</code></td>
+<td><code>market://search?q=&lt;query&gt;</code></td>
 </tr>
 
 <tr>
-<td>Search using multiple query parameters and display the results.</td>
-<td>Example:<p><code>http://market.android.com/search?q=world pname:com.android.hello pub:Android</code></p></td>
-<td>Returns a list of applications meeting all the supplied parameters. </td>
+<td>Search for applications by publisher name</td>
+<td><nobr><code>http://market.android.com/search?q=pub:&lt;publisher_name&gt;</code></nobr></td>
+<td><nobr><code>market://search?q=pub:&lt;publisher_name&gt;</code></nobr></td>
 </tr>
+
 </table>
+
diff --git a/docs/html/sdk/preview/features.jd b/docs/html/sdk/preview/features.jd
index cd0dea1..d7ecc47 100644
--- a/docs/html/sdk/preview/features.jd
+++ b/docs/html/sdk/preview/features.jd
@@ -1,186 +1,8 @@
-page.title=Introduction to Honeycomb
 @jd:body
 
-<p>Welcome to the Honeycomb preview SDK. Honeycomb is the next major release of the Android
-platform and is optimized for tablet devices. This document provides an introduction to the new
-platform features and APIs available in Honeycomb.</p>
+<script type="text/javascript">
+  document.location=toRoot+"sdk/android-3.0.html"
+</script>
 
-
-<h2>Fragments</h2>
-
-<div class="figure" style="width:400px">
-  <img src="{@docRoot}images/preview_hc/fragments_layout.png" alt="" />
-  <p class="img-caption"><strong>Fragment Layout.</strong> An activity with two
-fragments: one with a list view, on the left, and one that displays selected content on the
-right. This demo is available in the samples package.</p>
-</div>
-
-
-<p>A new framework component that allows you to separate distinct elements of an activity into
-self-contained modules that define their own UI and lifecycle&mdash;defining what may be
-considered "sub-activities".</p>
-<ul>
-  <li>Multiple fragments can be combined in a single activity to build a multi-pane UI in which
-each pane manages its own lifecycle and user inputs</li>
-  <li>Fragments are self-contained and can be reused in multiple activities</li>
-  <li>Fragments can be added, removed, replaced and animated inside the activity</li>
-  <li>Fragment can be added to a back stack managed by the activity, preserving the state of
-fragments as they are changed and allowing the user to navigate backward through the different
-states</li>
-  <li>By <a
-href="{@docRoot}guide/topics/resources/providing-resources.html#AlternativeResources">providing
-alternative resources</a>, you can mix and match fragments, based
-on the screen size and orientation</li>
-  <li>Fragments have direct access to their container activity and can contribute items to the
-activity's Options Menu</li>
-</ul>
-
-<p>For more information, see the <a
-href="{@docRoot}guide/topics/fragments/index.html">Fragments</a> developer guide.</p>
-
-
-<h2>Action Bar</h2>
-
-<p>A replacement for the traditional title bar, which provides users quick access to global
-actions and different navigation modes.</p>
-<ul>
-  <li>Provides quick access to items from the Options Menu ("action items") and interactive
-widgets ("action views")</li>
-  <li>Includes the application logo in the left corner, which can perform actions when tapped
-and can be replaced with a custom logo</li>
-  <li>Provides breadcumbs for navigating backward through fragments</li>
-  <li>Offers built in navigation modes, including tabs and a drop-down list</li>
-  <li>Can be customized with themes and custom backgrounds</li>
-  <li>And more</li>
-</ul>
-
-<img src="{@docRoot}images/preview_hc/actionbar.png" alt="" />
-<p class="img-caption"><strong>Action Bar.</strong> An action bar with a custom logo,
-tabs, and Options Menu. This demo is available in the samples package.</p>
-
-<p>For more information, see the <a
-href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a> developer guide.</p>
-
-
-<h2>System Clipboard</h2>
-
-<p>Applications can copy and paste data (beyond mere text) to and from the system-wide
-clipboard.</p>
-
-<ul>
-  <li>Clipped data can be plain text, a URI, or an intent</li>
-  <li>The new {@link android.content.ClipData} class represents a complex data type for the
-clipboard</li>
-  <li>The new {@link android.content.ClipboardManager} class allows apps to add {@link
-android.content.ClipData} to the clipboard (copy) and read {@link
-android.content.ClipData} from the clipboard (paste)</li>
-  <li>The {@link android.content.ContentProvider} class has been extended to generate byte
-streams based on data types added to the clipboard and point to data hosted in a
-content provider</li>
-</ul>
-
-<p>See {@link android.content.ClipData} and {@link android.content.ClipboardManager}
-for more information. You can also see an example implementation of copy/paste in an updated
-version of the NotePad application (available in the samples package).</p>
-
-
-<h2>Drag and Drop</h2>
-
-<p>New APIs to perform drag and drop operations, leveraging the system clipboard APIs to
-transport data.</p>
-
-<ul>
-  <li>Any {@link android.view.View} can be used for a drag and drop event and a thumbnail of that
-view is generated and used during the drag</li>
-  <li>{@link android.view.ViewGroup}s that can receive the object are notified during hover and drop
-events</li>
-  <li>The new {@link android.view.DragEvent} class describes a drag event relating to a view,
-including the item's current coordinates, the type of action (whether the drag has entered the
-view, exited the view, started, dropped, etc.), and provides access to the {@link
-android.content.ClipData} being carried</li>
-  <li>The new {@link android.view.View.OnDragListener} interface defines a callback that views
-can register in order to be notified of drag events being dispatched to the view; view's can
-register a drag listener with {@link android.view.View#setOnDragListener setOnDragListener()}</li>
-</ul>
-
-<p>See {@link android.view.DragEvent} and {@link android.view.View.OnDragListener} for more
-information.</p>
-
-
-<h2>New Animations</h2>
-
-<p>An all new animation framework.</p>
-
-<ul>
-  <li>A flexible animation system that allows you to animate the properties of any object (View,
-Drawable, Fragment, Object, anything)</li>
-</ul>
-
-<p>See the {@link android.animation} package.</p>
-
-
-<h2>Extended App Widgets</h2>
-
-<p>App widgets can now be more interactive and accept finger gestures.</p>
-
-<ul>
-  <li>The complete list of supported widgets for an app widget is now: {@link
-android.widget.AnalogClock}, {@link android.widget.Button}, {@link android.widget.Chronometer},
-{@link android.widget.ImageButton}, {@link android.widget.ImageView}, {@link
-android.widget.ProgressBar}, {@link android.widget.TextView}, {@link
-android.widget.ViewFlipper}, {@link android.widget.AdapterViewFlipper}, {@link
-android.widget.StackView}, {@link android.widget.ListView}, and {@link
-android.widget.GridView}.</li>
-</ul>
-
-
-<h2>Extended Status Bar Notifications</h2>
-
-<p>The {@link android.app.Notification} class has been extended to support more content-rich
-status bar notifications when on xlarge screens.</p>
-
-<ul>
-  <li>New {@link android.app.Notification.Builder} class helps you easily create new {@link
-android.app.Notification} objects</li>
-  <li>Support for a title in the status bar ticker (in addition to the normal ticker text)</li>
-  <li>Support for a large "sender" icon in the notification&mdash;a second icon intended for
-social applications to show the contact photo of the person who is the source of the
-notification</li>
-  <li>Support for custom layouts in the status bar ticker</li>
-  <li>Support for buttons in the expanded notification that deliver custom intents
-(such as to control ongoing music in the background)</li>
-</ul>
-
-
-<h2>Plus Android 2.3</h2>
-
-<p>Honeycomb includes all platform changes introduced for Android 2.3.</p>
-
-<p>To take full advantage of Honeycomb, you should also be aware of the new features
-and APIs introduced for Android 2.3. To learn more, read the <a
-href="{@docRoot}sdk/android-2.3.html">Android 2.3 release notes</a>.</p>
-
-<!--
-<div class="special">
-<p>To set up your preview SDK and start developing apps for Honeycomb, see the <a
-href="{@docRoot}sdk/preview/installing.html">Getting Started</a> guide.</p>
-</div>
--->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<p>You should have already been redirected by your browser. Please go to the
+<a href="{@docRoot}sdk/android-3.0.html">Android 3.0 Platform</a>.</p>
\ No newline at end of file
diff --git a/docs/html/sdk/preview/index.jd b/docs/html/sdk/preview/index.jd
index edfa02b..ed8f7e0 100644
--- a/docs/html/sdk/preview/index.jd
+++ b/docs/html/sdk/preview/index.jd
@@ -1,183 +1,2 @@
-page.title=Android 3.0 Preview SDK
+sdk.redirect=true
 @jd:body
-
-<p>Android 3.0 is the next major release of the Android platform and is optimized for tablet
-devices. We're offering a Preview SDK so you can get a head-start developing
-applications for it or simply optimize your existing application for upcoming
-tablets.</p>
-
-
-<h3>What is the Preview SDK?</h3>
-
-<p>The Android 3.0 Preview SDK is an early look at the upcoming version of Android 3.0, for
-developers only. </p>
-
-<p>The Preview SDK includes:</p>
-<ul>
-  <li>An early Android 3.0 system image for use in the Android emulator</li>
-  <li>An Android 3.0 library with non-final APIs</li>
-  <li>A new WXGA emulator skin for an extra large Android Virtual Device</li>
-  <li>New documentation for Android 3.0, including a complete API reference, new developer guides,
-and an API differences report between Android 3.0 and 2.3.</li>
-</ul>
-
-<div class="note">
-<p><strong>Be aware that:</strong></p>
-<ul>
-  <li>The APIs in the Preview SDK are <strong>not final</strong>. Some APIs may change in behavior
-or availability when the final SDK is made available.</li>
-  <li>You <strong>cannot</strong> publish an application that's built against the Preview
-SDK&mdash;you can only run an application built against the Preview SDK on the Android
-emulator.</li>
-  <li>The documentation on <a href="http://developer.android.com">developer.android.com</a>
-does <strong>not</strong> include the Android 3.0 documentation&mdash;to read the API reference and
-developer guides for Android 3.0, you must install the Android 3.0 Preview documentation from
-the AVD and SDK Manager.</li>
-</ul>
-</div>
-
-
-<p><b>About emulator performance</b></p>
-
-<p>Because the Android emulator must simulate the ARM instruction set architecture on your
-computer and the WXGA screen is significantly larger than what the emulator
-normally handles, emulator performance is much slower than usual. </p>
-
-<p>In particular, initializing the emulator can be slow and can take several
-minutes, depending on your hardware. When the emulator is booting there is
-limited user feedback, so please be patient and continue waiting until you see
-the home screen appear. </p>
-
-<p>We're working hard to resolve the performance issues in the emulator and it will improve in
-future releases. In the meantime, we wanted to give developers access to new APIs and an basic test
-environment as early as possible. </p>
-
-<p>Keeping in mind that performance on the emulator does not reflect the speed or performance of
-apps on actual devices running Android 3.0, developing and testing on the emulator is still an
-important tool in evaluating your application's appearance and functionality on the new platform. 
-</p>
-
-
-
-
-
-<h3>What can I do with the preview?</h3>
-
-<p>The Preview SDK is intended for testing existing applications on the new platform and
-developing new applications with new Android 3.0 APIs.</p>
-
-<p>If you have an existing Android application, you don't <em>have to</em> do anything. Android
-applications are always forward-compatible. If your application is a good citizen of the Android
-APIs, your app should work fine on devices running Android 3.0 without any additional work. However,
-in order to ensure proper performance and provide users a better experience when running your
-application on an Android 3.0 tablet, we recommend that you perform the following:</p>
-
-<ol>
-  <li><b>Test your application on Android 3.0</b>
-    <p>Simply install the Android 3.0 preview in your Android SDK, create an AVD using the
-Android 3.0 system image, install your application, and run some tests.</p>
-    <p>As mentioned above, your application should perform as expected. You might, however,
-discover that your activity layouts are less than ideal on a large screen or some other aspects
-of your application don't behave the way you expect.</p>
-  </li>
-  <li><b>Inherit the new "Holographic" theme</b>
-    <p>Android 3.0 offers an updated set of UI widgets that are redesigned for use on larger screens
-such as tablets and incorporate the new holographic theme. Your existing application can inherit
-the new design simply by setting the <a
-href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code &lt;uses-sdk&gt;}</a>
-element's {@code android:targetSdkVersion} attribute to {@code "Honeycomb"}.</p>
-    <p>If you do not update the {@code android:targetSdkVersion} attribute and the {@code
-android:minSdkVersion} is set to "9" or lower, then your application uses the widget designs
-from Android 2.3 and does <em>not</em> inherit the holographic theme.</p>
-    <p>In order for your application to match the rest of the system UI, we highly recommend you
-make this change to inherit the new widget styles and system theme. However, beware that doing so
-might conflict with color or text designs you applied to your application based on the previous
-system theme, so you should be sure to inspect your application UI when using the holographic
-theme.</p>
-  </li>
-  <li><b>Provide alternative layouts for extra large screens</b>
-    <p>As discussed in the guide to <a
-href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple Screens</a>, Android
-2.3 and above support the <code>xlarge</code> resource qualifier, which you should use to supply
-alternative layouts for extra large screens.</p>
-    <p>By providing alternative layouts for some of your activities when running on extra large
-screens, you can improve the user experience of your application on a tablet without using any
-new APIs.</p>
-    <p>For example, here are some things to consider when creating a new layout for tables:</p>
-    <ul>
-      <li>Landscape layout: The "normal" orientation for tablets is usually landscape (wide), so
-you should be sure that your activities offer an appropriate layout for such a wide viewing
-area.</li>
-      <li>Button position: Consider whether the position of the most common buttons in your UI are
-easily accessible while holding a tablet with two hands.</li>
-    </ul>
-    <p class="note"><strong>Note:</strong> You can add alternative resources for <em>xlarge</em>
-screens without changing your {@code minSdkVersion}. For example, if you add alternative layouts in
-<code>res/layout-xlarge/</code> and your application is compatible with older versions, such
-as Android 1.5&mdash;which doesn't support <em>xlarge</em> screens&mdash;this layout directory is
-simply ignored by those devices.</p>
-  </li>
-</ol>
-
-
-<p>Otherwise, if you want to develop a new application or upgrade your existing application to
-use APIs added in Android 3.0, we encourage you to get started by developing against the Android
-3.0 preview platform. You can get started the same way as you would for any other version of
-Android.</p>
-
-
-<p>To get started&mdash;whether testing an existing application or creating a new one&mdash;follow
-the procedure in the following section to install the Preview SDK.</p>
-
-
-
-<h3 id="Setup">How do I get it?</h3>
-
-<p>To get the Preview SDK, you can download it using the Android SDK and AVD Manager.</p>
-
-<p>If you're new to Android development, start by <a href="{@docRoot}sdk/index.html">downloading the
-Android SDK starter package</a>.</p>
-
-<p><a href="{@docRoot}sdk/adding-components.html#launching">Launch the Android SDK and AVD
-Manager</a> and install the following:</p>
-<ul>
-  <li>SDK Platform Android Honeycomb Preview</li>
-  <li>Android SDK Tools, revision 9</li>
-  <li>Android SDK Platform-tools, revision 2</li>
-  <li>Documentation for Android 'Honeycomb' Preview</li>
-  <li>Samples for SDK API Honeycomb Preview</li>
-</ul>
-
-<p class="note"><strong>Note:</strong> Be sure to install the documentation component for the
-Honeycomb Preview SDK. The API reference for the Android 3.0 API is <strong>not</strong> available
-online.</p>
-
-<p>Once you have installed these components, open your SDK directory and navigate to {@code
-docs/sdk/} and open {@code index.html} in your browser. </p>
-
-
-
-<h3 id="Issues">Known issues</h3>
-
-<p>The following known issues occur for Android 3.0 AVDs that are loaded in the emulator:</p>
-
-<ul>
-  <li>The emulator displays a rotated portrait screen while in landscape
-orientation. To view the screen correctly in landscape orientation, turn off the auto-rotate setting
-in <strong>Settings > Screen > Auto-rotate screen</strong>. Then use Ctrl-F11 to rotate the
-emulator.</li>
-  <li>You cannot take screenshots of an emulator screen. The Device Screen Capture window displays
-<strong>Screen not available</strong>.</li>
-  <li>GPS emulation is currently not supported.</li>
-  <li>When rotating the emulator screen by pressing Ctrl-F11, the screen turns green momentarily,
-then displays the normal interface.</li>
-  <li>The Dev Tools application sometimes crashes when trying to use the Package Browser
-feature.</li>
-</ul>
-
-
-<div class="special">
- <p>For an overview of new features in Android 3.0, read the <a
-href="{@docRoot}sdk/android-3.0-highlights.html">Platform Highlights</a>.</p>
-</div>
-
diff --git a/docs/html/sdk/preview/installing.jd b/docs/html/sdk/preview/installing.jd
index c835c49..94c6f2f 100644
--- a/docs/html/sdk/preview/installing.jd
+++ b/docs/html/sdk/preview/installing.jd
@@ -1,62 +1,8 @@
-page.title=Getting Started with Honeycomb
 @jd:body
 
-<p>First, you need to set up your development environment with the new SDK Tools and preview
-platform:</p>
+<script type="text/javascript">
+  document.location=toRoot+"sdk/installing.html"
+</script>
 
-<ol>
-  <li>Unpack the SDK Tools r8 package you've received.
-    <p>If you have an existing Android SDK directory, simply replace your existing {@code
-tools/} directory with the one from the new package and add the {@code platform-tools/}
-directory along side it (at the root of the SDK directory).</p></li>
-  <li>Unpack the platform package ({@code android-Froyo}) and place it in your SDK's {@code
-platforms/} directory.</li>
-  <li>If you're using Eclipse, also update your Eclipse plugin using the provided archive file.
-    <ol>
-      <li>Select <strong>Help > Install new software</strong>.</li>
-      <li>Click <strong>Add</strong>.</li>
-      <li>Click <strong>Archive</strong>.</li>
-      <li>Locate and select the archive file. Click <strong>OK</strong>.
-        <p>Developer Tools now appear in the Available Software window and you can proceed
-to install the plugin.</p>
-      </li>
-    </ol>
-  </li>
-</ol>
-
-<p class="note"><strong>Note:</strong> Beginning with SDK Tools r8 (the version you've received),
-the {@code adb} tool is now located in the {@code &lt;sdk&gt;/platform-tools/} directory (instead
-of in {@code &lt;sdk&gt;/tools/}). Be sure to update your {@code PATH} environment variable and any
-build/debugging scripts you have.</p>
-
-
-
-<h2 id="Setup">Set Up Your AVD and Application</h2>
-
-<p>With your SDK now set up, follow these steps to start developing an application for
-Honeycomb.</p>
-
-<ol>
-
-  <li>Create a new AVD targeted to "Android Froyo (Preview)" and with a custom skin resolution of
-1280 x 800.</li>
-
-  <li>Set the build target of your application to "Android Froyo (Preview)".</li>
-  <li>Set your manifest file's {@code &lt;uses-sdk&gt;} element to use {@code
-android:minSdkVersion="Froyo"}. For example:
-<pre>
-&lt;manifest&gt;
-    &lt;uses-sdk android:minSdkVersion="Froyo" /&gt;
-    ...
-&lt;/manifest&gt;
-</pre>
-<p>"Froyo" is a provisional API Level for the Honeycomb release, used only during the preview
-period. When the APIs are
-finalized and the SDK is released publicly, you must update this with the appropriate API Level
-integer.</p>
-<p class="note"><strong>Note:</strong> By providing your {@code &lt;uses-sdk&gt;} element in the
-manifest file <em>before</em> the {@code &lt;application&gt;} element, your application will
-automatically apply the new Holographic theme.</p>
-</li>
-
-</ol>
+<p>You should have already been redirected by your browser. Please go to
+<a href="{@docRoot}sdk/installing.html">Installing the SDK</a>.</p>
\ No newline at end of file
diff --git a/docs/html/sdk/preview/requirements.jd b/docs/html/sdk/preview/requirements.jd
index 1e6b26b..b5aed80 100644
--- a/docs/html/sdk/preview/requirements.jd
+++ b/docs/html/sdk/preview/requirements.jd
@@ -1,5 +1,8 @@
-sdk.redirect=true
-
 @jd:body
 
+<script type="text/javascript">
+  document.location=toRoot+"sdk/requirements.html"
+</script>
 
+<p>You should have already been redirected by your browser. Please go to the
+<a href="{@docRoot}sdk/requirements.html">SDK System Requirements</a>.</p>
\ No newline at end of file
diff --git a/docs/html/sdk/preview/upgrading.jd b/docs/html/sdk/preview/upgrading.jd
index 1e6b26b..1c53bdb 100644
--- a/docs/html/sdk/preview/upgrading.jd
+++ b/docs/html/sdk/preview/upgrading.jd
@@ -1,5 +1,8 @@
-sdk.redirect=true
-
 @jd:body
 
+<script type="text/javascript">
+  document.location=toRoot+"sdk/index.html"
+</script>
 
+<p>You should have already been redirected by your browser. Please go to
+<a href="{@docRoot}sdk/index.html">the Android SDK</a>.</p>
\ No newline at end of file
diff --git a/media/libstagefright/MP3Extractor.cpp b/media/libstagefright/MP3Extractor.cpp
index eb4c68d..03ce202 100644
--- a/media/libstagefright/MP3Extractor.cpp
+++ b/media/libstagefright/MP3Extractor.cpp
@@ -39,10 +39,10 @@
 namespace android {
 
 // Everything must match except for
-// protection, bitrate, padding, private bits, mode extension,
+// protection, bitrate, padding, private bits, mode, mode extension,
 // copyright bit, original bit and emphasis.
 // Yes ... there are things that must indeed match...
-static const uint32_t kMask = 0xfffe0cc0;
+static const uint32_t kMask = 0xfffe0c00;
 
 // static
 bool MP3Extractor::get_mp3_frame_size(
diff --git a/media/libstagefright/codecs/aacenc/AACEncoder.cpp b/media/libstagefright/codecs/aacenc/AACEncoder.cpp
index a8b1292..e4ff128 100644
--- a/media/libstagefright/codecs/aacenc/AACEncoder.cpp
+++ b/media/libstagefright/codecs/aacenc/AACEncoder.cpp
@@ -189,6 +189,9 @@
     delete mApiHandle;
     mApiHandle = NULL;
 
+    delete mMemOperator;
+    mMemOperator = NULL;
+
     mStarted = false;
 
     return OK;
diff --git a/packages/SystemUI/res/drawable-hdpi/notify_panel_clock_bg_pressed.9.png b/packages/SystemUI/res/drawable-hdpi/notify_panel_clock_bg_pressed.9.png
new file mode 100644
index 0000000..0c40c73
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/notify_panel_clock_bg_pressed.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_notify_alarm.png b/packages/SystemUI/res/drawable-hdpi/stat_notify_alarm.png
index 51b4f3f..4ec771a 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_notify_alarm.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_notify_alarm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_notify_more.png b/packages/SystemUI/res/drawable-hdpi/stat_notify_more.png
index 170178c..2ea2609 100755
--- a/packages/SystemUI/res/drawable-hdpi/stat_notify_more.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_notify_more.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_gps_acquiring.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_gps_acquiring.png
index 61f65bf..765cdd7 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_gps_acquiring.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_gps_acquiring.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/notify_panel_clock_bg_pressed.9.png b/packages/SystemUI/res/drawable-mdpi/notify_panel_clock_bg_pressed.9.png
index 4fc6b46..4fb1cf1 100644
--- a/packages/SystemUI/res/drawable-mdpi/notify_panel_clock_bg_pressed.9.png
+++ b/packages/SystemUI/res/drawable-mdpi/notify_panel_clock_bg_pressed.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_notify_alarm.png b/packages/SystemUI/res/drawable-mdpi/stat_notify_alarm.png
index d846afe..3a50987 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_notify_alarm.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_notify_alarm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_notify_more.png b/packages/SystemUI/res/drawable-mdpi/stat_notify_more.png
index 9b28252..5bde4e5 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_notify_more.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_notify_more.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_gps_acquiring.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_gps_acquiring.png
index 3a0fce0..c9da7b9 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_gps_acquiring.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_gps_acquiring.png
Binary files differ
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index 7ec089f..8f477c8 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -19,7 +19,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_label" msgid="7164937344850004466">"Sistema UI"</string>
+    <string name="app_label" msgid="7164937344850004466">"IU del sistema"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Borrar"</string>
     <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"No molestar"</string>
     <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Mostrar notificaciones"</string>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodsPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodsPanel.java
index ce0848b..e9db998 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodsPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodsPanel.java
@@ -89,14 +89,12 @@
         public int compare(InputMethodInfo imi1, InputMethodInfo imi2) {
             if (imi2 == null) return 0;
             if (imi1 == null) return 1;
-            if (mPackageManager != null) {
-                CharSequence imiId1 = imi1.loadLabel(mPackageManager) + "/" + imi1.getId();
-                CharSequence imiId2 = imi2.loadLabel(mPackageManager) + "/" + imi2.getId();
-                if (imiId1 != null && imiId2 != null) {
-                    return imiId1.toString().compareTo(imiId2.toString());
-                }
+            if (mPackageManager == null) {
+                return imi1.getId().compareTo(imi2.getId());
             }
-            return imi1.getId().compareTo(imi2.getId());
+            CharSequence imiId1 = imi1.loadLabel(mPackageManager) + "/" + imi1.getId();
+            CharSequence imiId2 = imi2.loadLabel(mPackageManager) + "/" + imi2.getId();
+            return imiId1.toString().compareTo(imiId2.toString());
         }
     }
 
@@ -267,7 +265,6 @@
 
         Map<InputMethodInfo, List<InputMethodSubtype>> enabledIMIs =
                 getEnabledInputMethodAndSubtypeList();
-        // TODO: Sort by alphabet and mode.
         Set<InputMethodInfo> cachedImiSet = enabledIMIs.keySet();
         for (InputMethodInfo imi: cachedImiSet) {
             List<InputMethodSubtype> subtypes = enabledIMIs.get(imi);
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java
index f2cf942..9c9d406 100644
--- a/services/java/com/android/server/InputMethodManagerService.java
+++ b/services/java/com/android/server/InputMethodManagerService.java
@@ -82,8 +82,8 @@
 import java.io.FileDescriptor;
 import java.io.IOException;
 import java.io.PrintWriter;
-import java.text.Collator;
 import java.util.ArrayList;
+import java.util.Comparator;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
@@ -1750,10 +1750,28 @@
 
             hideInputMethodMenuLocked();
 
-            final Map<CharSequence, Pair<InputMethodInfo, Integer>> imMap =
-                new TreeMap<CharSequence, Pair<InputMethodInfo, Integer>>(Collator.getInstance());
+            final TreeMap<InputMethodInfo, List<InputMethodSubtype>> sortedImmis =
+                    new TreeMap<InputMethodInfo, List<InputMethodSubtype>>(
+                            new Comparator<InputMethodInfo>() {
+                                @Override
+                                public int compare(InputMethodInfo imi1, InputMethodInfo imi2) {
+                                    if (imi2 == null) return 0;
+                                    if (imi1 == null) return 1;
+                                    if (pm == null) {
+                                        return imi1.getId().compareTo(imi2.getId());
+                                    }
+                                    CharSequence imiId1 = imi1.loadLabel(pm) + "/" + imi1.getId();
+                                    CharSequence imiId2 = imi2.loadLabel(pm) + "/" + imi2.getId();
+                                    return imiId1.toString().compareTo(imiId2.toString());
+                                }
+                            });
 
-            for (InputMethodInfo imi: immis.keySet()) {
+            sortedImmis.putAll(immis);
+
+            final ArrayList<Pair<CharSequence, Pair<InputMethodInfo, Integer>>> imList =
+                    new ArrayList<Pair<CharSequence, Pair<InputMethodInfo, Integer>>>();
+
+            for (InputMethodInfo imi : sortedImmis.keySet()) {
                 if (imi == null) continue;
                 List<InputMethodSubtype> explicitlyOrImplicitlyEnabledSubtypeList = immis.get(imi);
                 HashSet<String> enabledSubtypeSet = new HashSet<String>();
@@ -1767,35 +1785,39 @@
                     for (int j = 0; j < subtypeCount; ++j) {
                         InputMethodSubtype subtype = imi.getSubtypeAt(j);
                         if (enabledSubtypeSet.contains(String.valueOf(subtype.hashCode()))) {
-                            CharSequence title;
+                            final CharSequence title;
                             int nameResId = subtype.getNameResId();
                             String mode = subtype.getMode();
                             if (nameResId != 0) {
                                 title = TextUtils.concat(pm.getText(imi.getPackageName(),
                                         nameResId, imi.getServiceInfo().applicationInfo),
-                                        " (", label, ")");
+                                        (TextUtils.isEmpty(label) ? "" : " (" + label + ")"));
                             } else {
                                 CharSequence language = subtype.getLocale();
                                 // TODO: Use more friendly Title and UI
                                 title = label + "," + (mode == null ? "" : mode) + ","
                                         + (language == null ? "" : language);
                             }
-                            imMap.put(title, new Pair<InputMethodInfo, Integer>(imi, j));
+                            imList.add(new Pair<CharSequence, Pair<InputMethodInfo, Integer>>(
+                                    title, new Pair<InputMethodInfo, Integer>(imi, j)));
                         }
                     }
                 } else {
-                    imMap.put(label,
-                            new Pair<InputMethodInfo, Integer>(imi, NOT_A_SUBTYPE_ID));
+                    imList.add(new Pair<CharSequence, Pair<InputMethodInfo, Integer>>(
+                            label, new Pair<InputMethodInfo, Integer>(imi, NOT_A_SUBTYPE_ID)));
                 }
             }
 
-            final int N = imMap.size();
-            mItems = imMap.keySet().toArray(new CharSequence[N]);
+            final int N = imList.size();
+            mItems = new CharSequence[N];
+            for (int i = 0; i < N; ++i) {
+                mItems[i] = imList.get(i).first;
+            }
             mIms = new InputMethodInfo[N];
             mSubtypeIds = new int[N];
             int checkedItem = 0;
             for (int i = 0; i < N; ++i) {
-                Pair<InputMethodInfo, Integer> value = imMap.get(mItems[i]);
+                Pair<InputMethodInfo, Integer> value = imList.get(i).second;
                 mIms[i] = value.first;
                 mSubtypeIds[i] = value.second;
                 if (mIms[i].getId().equals(lastInputMethodId)) {
@@ -1860,8 +1882,10 @@
                         });
             }
             mSwitchingDialog = mDialogBuilder.create();
+            mSwitchingDialog.setCanceledOnTouchOutside(true);
             mSwitchingDialog.getWindow().setType(
                     WindowManager.LayoutParams.TYPE_INPUT_METHOD_DIALOG);
+            mSwitchingDialog.getWindow().getAttributes().setTitle("Select input method");
             mSwitchingDialog.show();
         }
     }
diff --git a/services/java/com/android/server/PackageManagerService.java b/services/java/com/android/server/PackageManagerService.java
index 461a3e5..04f271d 100644
--- a/services/java/com/android/server/PackageManagerService.java
+++ b/services/java/com/android/server/PackageManagerService.java
@@ -2025,10 +2025,10 @@
                 final int M = prefs.size();
                 for (int i=0; i<M; i++) {
                     PreferredActivity pa = prefs.get(i);
-                    if (pa.mMatch != match) {
+                    if (pa.mPref.mMatch != match) {
                         continue;
                     }
-                    ActivityInfo ai = getActivityInfo(pa.mActivity, flags);
+                    ActivityInfo ai = getActivityInfo(pa.mPref.mComponent, flags);
                     if (DEBUG_PREFERRED) {
                         Log.v(TAG, "Got preferred activity:");
                         if (ai != null) {
@@ -2052,7 +2052,7 @@
                             // If the result set is different from when this
                             // was created, we need to clear it and re-ask the
                             // user their preference.
-                            if (!pa.sameSet(query, priority)) {
+                            if (!pa.mPref.sameSet(query, priority)) {
                                 Slog.i(TAG, "Result set changed, dropping preferred activity for "
                                         + intent + " type " + resolvedType);
                                 mSettings.mPreferredActivities.removeFilter(pa);
@@ -6358,7 +6358,7 @@
                 // remove from preferred activities.
                 ArrayList<PreferredActivity> removed = new ArrayList<PreferredActivity>();
                 for (PreferredActivity pa : mSettings.mPreferredActivities.filterSet()) {
-                    if (pa.mActivity.getPackageName().equals(deletedPs.name)) {
+                    if (pa.mPref.mComponent.getPackageName().equals(deletedPs.name)) {
                         removed.add(pa);
                     }
                 }
@@ -6805,7 +6805,7 @@
                 PreferredActivity pa = it.next();
                 if (pa.getAction(0).equals(action) && pa.getCategory(0).equals(category)) {
                     it.remove();
-                    Log.i(TAG, "Removed preferred activity " + pa.mActivity + ":");
+                    Log.i(TAG, "Removed preferred activity " + pa.mPref.mComponent + ":");
                     filter.dump(new LogPrinter(Log.INFO, TAG), "  ");
                 }
             }
@@ -6843,7 +6843,7 @@
         Iterator<PreferredActivity> it = mSettings.mPreferredActivities.filterIterator();
         while (it.hasNext()) {
             PreferredActivity pa = it.next();
-            if (pa.mActivity.getPackageName().equals(packageName)) {
+            if (pa.mPref.mComponent.getPackageName().equals(packageName)) {
                 it.remove();
                 changed = true;
             }
@@ -6860,12 +6860,12 @@
             while (it.hasNext()) {
                 PreferredActivity pa = it.next();
                 if (packageName == null
-                        || pa.mActivity.getPackageName().equals(packageName)) {
+                        || pa.mPref.mComponent.getPackageName().equals(packageName)) {
                     if (outFilters != null) {
                         outFilters.add(new IntentFilter(pa));
                     }
                     if (outActivities != null) {
-                        outActivities.add(pa.mActivity);
+                        outActivities.add(pa.mPref.mComponent);
                     }
                 }
             }
@@ -7717,168 +7717,41 @@
         }
     }
 
-    static class PreferredActivity extends IntentFilter {
-        final int mMatch;
-        final String[] mSetPackages;
-        final String[] mSetClasses;
-        final String[] mSetComponents;
-        final ComponentName mActivity;
-        final String mShortActivity;
-        String mParseError;
+    static class PreferredActivity extends IntentFilter implements PreferredComponent.Callbacks {
+        final PreferredComponent mPref;
 
         PreferredActivity(IntentFilter filter, int match, ComponentName[] set,
                 ComponentName activity) {
             super(filter);
-            mMatch = match&IntentFilter.MATCH_CATEGORY_MASK;
-            mActivity = activity;
-            mShortActivity = activity.flattenToShortString();
-            mParseError = null;
-            if (set != null) {
-                final int N = set.length;
-                String[] myPackages = new String[N];
-                String[] myClasses = new String[N];
-                String[] myComponents = new String[N];
-                for (int i=0; i<N; i++) {
-                    ComponentName cn = set[i];
-                    if (cn == null) {
-                        mSetPackages = null;
-                        mSetClasses = null;
-                        mSetComponents = null;
-                        return;
-                    }
-                    myPackages[i] = cn.getPackageName().intern();
-                    myClasses[i] = cn.getClassName().intern();
-                    myComponents[i] = cn.flattenToShortString().intern();
-                }
-                mSetPackages = myPackages;
-                mSetClasses = myClasses;
-                mSetComponents = myComponents;
-            } else {
-                mSetPackages = null;
-                mSetClasses = null;
-                mSetComponents = null;
-            }
+            mPref = new PreferredComponent(this, match, set, activity);
         }
 
         PreferredActivity(XmlPullParser parser) throws XmlPullParserException,
                 IOException {
-            mShortActivity = parser.getAttributeValue(null, "name");
-            mActivity = ComponentName.unflattenFromString(mShortActivity);
-            if (mActivity == null) {
-                mParseError = "Bad activity name " + mShortActivity;
-            }
-            String matchStr = parser.getAttributeValue(null, "match");
-            mMatch = matchStr != null ? Integer.parseInt(matchStr, 16) : 0;
-            String setCountStr = parser.getAttributeValue(null, "set");
-            int setCount = setCountStr != null ? Integer.parseInt(setCountStr) : 0;
-
-            String[] myPackages = setCount > 0 ? new String[setCount] : null;
-            String[] myClasses = setCount > 0 ? new String[setCount] : null;
-            String[] myComponents = setCount > 0 ? new String[setCount] : null;
-
-            int setPos = 0;
-
-            int outerDepth = parser.getDepth();
-            int type;
-            while ((type=parser.next()) != XmlPullParser.END_DOCUMENT
-                   && (type != XmlPullParser.END_TAG
-                           || parser.getDepth() > outerDepth)) {
-                if (type == XmlPullParser.END_TAG
-                        || type == XmlPullParser.TEXT) {
-                    continue;
-                }
-
-                String tagName = parser.getName();
-                //Log.i(TAG, "Parse outerDepth=" + outerDepth + " depth="
-                //        + parser.getDepth() + " tag=" + tagName);
-                if (tagName.equals("set")) {
-                    String name = parser.getAttributeValue(null, "name");
-                    if (name == null) {
-                        if (mParseError == null) {
-                            mParseError = "No name in set tag in preferred activity "
-                                + mShortActivity;
-                        }
-                    } else if (setPos >= setCount) {
-                        if (mParseError == null) {
-                            mParseError = "Too many set tags in preferred activity "
-                                + mShortActivity;
-                        }
-                    } else {
-                        ComponentName cn = ComponentName.unflattenFromString(name);
-                        if (cn == null) {
-                            if (mParseError == null) {
-                                mParseError = "Bad set name " + name + " in preferred activity "
-                                    + mShortActivity;
-                            }
-                        } else {
-                            myPackages[setPos] = cn.getPackageName();
-                            myClasses[setPos] = cn.getClassName();
-                            myComponents[setPos] = name;
-                            setPos++;
-                        }
-                    }
-                    XmlUtils.skipCurrentTag(parser);
-                } else if (tagName.equals("filter")) {
-                    //Log.i(TAG, "Starting to parse filter...");
-                    readFromXml(parser);
-                    //Log.i(TAG, "Finished filter: outerDepth=" + outerDepth + " depth="
-                    //        + parser.getDepth() + " tag=" + parser.getName());
-                } else {
-                    reportSettingsProblem(Log.WARN,
-                            "Unknown element under <preferred-activities>: "
-                            + parser.getName());
-                    XmlUtils.skipCurrentTag(parser);
-                }
-            }
-
-            if (setPos != setCount) {
-                if (mParseError == null) {
-                    mParseError = "Not enough set tags (expected " + setCount
-                        + " but found " + setPos + ") in " + mShortActivity;
-                }
-            }
-
-            mSetPackages = myPackages;
-            mSetClasses = myClasses;
-            mSetComponents = myComponents;
+            mPref = new PreferredComponent(this, parser);
         }
 
         public void writeToXml(XmlSerializer serializer) throws IOException {
-            final int NS = mSetClasses != null ? mSetClasses.length : 0;
-            serializer.attribute(null, "name", mShortActivity);
-            serializer.attribute(null, "match", Integer.toHexString(mMatch));
-            serializer.attribute(null, "set", Integer.toString(NS));
-            for (int s=0; s<NS; s++) {
-                serializer.startTag(null, "set");
-                serializer.attribute(null, "name", mSetComponents[s]);
-                serializer.endTag(null, "set");
-            }
+            mPref.writeToXml(serializer);
             serializer.startTag(null, "filter");
             super.writeToXml(serializer);
             serializer.endTag(null, "filter");
         }
 
-        boolean sameSet(List<ResolveInfo> query, int priority) {
-            if (mSetPackages == null) return false;
-            final int NQ = query.size();
-            final int NS = mSetPackages.length;
-            int numMatch = 0;
-            for (int i=0; i<NQ; i++) {
-                ResolveInfo ri = query.get(i);
-                if (ri.priority != priority) continue;
-                ActivityInfo ai = ri.activityInfo;
-                boolean good = false;
-                for (int j=0; j<NS; j++) {
-                    if (mSetPackages[j].equals(ai.packageName)
-                            && mSetClasses[j].equals(ai.name)) {
-                        numMatch++;
-                        good = true;
-                        break;
-                    }
-                }
-                if (!good) return false;
+        public boolean onReadTag(String tagName, XmlPullParser parser)
+                throws XmlPullParserException, IOException {
+            if (tagName.equals("filter")) {
+                //Log.i(TAG, "Starting to parse filter...");
+                readFromXml(parser);
+                //Log.i(TAG, "Finished filter: outerDepth=" + outerDepth + " depth="
+                //        + parser.getDepth() + " tag=" + parser.getName());
+            } else {
+                reportSettingsProblem(Log.WARN,
+                        "Unknown element under <preferred-activities>: "
+                        + parser.getName());
+                XmlUtils.skipCurrentTag(parser);
             }
-            return numMatch == NS;
+            return true;
         }
     }
 
@@ -8161,24 +8034,12 @@
                     new IntentResolver<PreferredActivity, PreferredActivity>() {
             @Override
             protected String packageForFilter(PreferredActivity filter) {
-                return filter.mActivity.getPackageName();
+                return filter.mPref.mComponent.getPackageName();
             }
             @Override
             protected void dumpFilter(PrintWriter out, String prefix,
                     PreferredActivity filter) {
-                out.print(prefix); out.print(
-                        Integer.toHexString(System.identityHashCode(filter)));
-                        out.print(' ');
-                        out.print(filter.mActivity.flattenToShortString());
-                        out.print(" match=0x");
-                        out.println( Integer.toHexString(filter.mMatch));
-                if (filter.mSetComponents != null) {
-                    out.print(prefix); out.println("  Selected from:");
-                    for (int i=0; i<filter.mSetComponents.length; i++) {
-                        out.print(prefix); out.print("    ");
-                                out.println(filter.mSetComponents[i]);
-                    }
-                }
+                filter.mPref.dump(out, prefix, filter);
             }
         };
         private final HashMap<String, SharedUserSetting> mSharedUsers =
@@ -10010,12 +9871,12 @@
                 String tagName = parser.getName();
                 if (tagName.equals("item")) {
                     PreferredActivity pa = new PreferredActivity(parser);
-                    if (pa.mParseError == null) {
+                    if (pa.mPref.getParseError() == null) {
                         mPreferredActivities.addFilter(pa);
                     } else {
                         reportSettingsProblem(Log.WARN,
                                 "Error in package manager settings: <preferred-activity> "
-                                + pa.mParseError + " at "
+                                + pa.mPref.getParseError() + " at "
                                 + parser.getPositionDescription());
                     }
                 } else {
diff --git a/services/java/com/android/server/PreferredComponent.java b/services/java/com/android/server/PreferredComponent.java
new file mode 100644
index 0000000..718b05d
--- /dev/null
+++ b/services/java/com/android/server/PreferredComponent.java
@@ -0,0 +1,219 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server;
+
+import com.android.internal.util.XmlUtils;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+import org.xmlpull.v1.XmlSerializer;
+
+import android.content.ComponentName;
+import android.content.IntentFilter;
+import android.content.pm.ActivityInfo;
+import android.content.pm.ResolveInfo;
+import android.util.Slog;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.List;
+
+public class PreferredComponent {
+    public final int mMatch;
+    public final ComponentName mComponent;
+
+    private final String[] mSetPackages;
+    private final String[] mSetClasses;
+    private final String[] mSetComponents;
+    private final String mShortComponent;
+    private String mParseError;
+
+    private final Callbacks mCallbacks;
+
+    public interface Callbacks {
+        public boolean onReadTag(String tagName, XmlPullParser parser)
+                throws XmlPullParserException, IOException;
+    }
+
+    public PreferredComponent(Callbacks callbacks, int match, ComponentName[] set,
+            ComponentName component) {
+        mCallbacks = callbacks;
+        mMatch = match&IntentFilter.MATCH_CATEGORY_MASK;
+        mComponent = component;
+        mShortComponent = component.flattenToShortString();
+        mParseError = null;
+        if (set != null) {
+            final int N = set.length;
+            String[] myPackages = new String[N];
+            String[] myClasses = new String[N];
+            String[] myComponents = new String[N];
+            for (int i=0; i<N; i++) {
+                ComponentName cn = set[i];
+                if (cn == null) {
+                    mSetPackages = null;
+                    mSetClasses = null;
+                    mSetComponents = null;
+                    return;
+                }
+                myPackages[i] = cn.getPackageName().intern();
+                myClasses[i] = cn.getClassName().intern();
+                myComponents[i] = cn.flattenToShortString().intern();
+            }
+            mSetPackages = myPackages;
+            mSetClasses = myClasses;
+            mSetComponents = myComponents;
+        } else {
+            mSetPackages = null;
+            mSetClasses = null;
+            mSetComponents = null;
+        }
+    }
+
+    public PreferredComponent(Callbacks callbacks, XmlPullParser parser)
+            throws XmlPullParserException, IOException {
+        mCallbacks = callbacks;
+        mShortComponent = parser.getAttributeValue(null, "name");
+        mComponent = ComponentName.unflattenFromString(mShortComponent);
+        if (mComponent == null) {
+            mParseError = "Bad activity name " + mShortComponent;
+        }
+        String matchStr = parser.getAttributeValue(null, "match");
+        mMatch = matchStr != null ? Integer.parseInt(matchStr, 16) : 0;
+        String setCountStr = parser.getAttributeValue(null, "set");
+        int setCount = setCountStr != null ? Integer.parseInt(setCountStr) : 0;
+
+        String[] myPackages = setCount > 0 ? new String[setCount] : null;
+        String[] myClasses = setCount > 0 ? new String[setCount] : null;
+        String[] myComponents = setCount > 0 ? new String[setCount] : null;
+
+        int setPos = 0;
+
+        int outerDepth = parser.getDepth();
+        int type;
+        while ((type=parser.next()) != XmlPullParser.END_DOCUMENT
+               && (type != XmlPullParser.END_TAG
+                       || parser.getDepth() > outerDepth)) {
+            if (type == XmlPullParser.END_TAG
+                    || type == XmlPullParser.TEXT) {
+                continue;
+            }
+
+            String tagName = parser.getName();
+            //Log.i(TAG, "Parse outerDepth=" + outerDepth + " depth="
+            //        + parser.getDepth() + " tag=" + tagName);
+            if (tagName.equals("set")) {
+                String name = parser.getAttributeValue(null, "name");
+                if (name == null) {
+                    if (mParseError == null) {
+                        mParseError = "No name in set tag in preferred activity "
+                            + mShortComponent;
+                    }
+                } else if (setPos >= setCount) {
+                    if (mParseError == null) {
+                        mParseError = "Too many set tags in preferred activity "
+                            + mShortComponent;
+                    }
+                } else {
+                    ComponentName cn = ComponentName.unflattenFromString(name);
+                    if (cn == null) {
+                        if (mParseError == null) {
+                            mParseError = "Bad set name " + name + " in preferred activity "
+                                + mShortComponent;
+                        }
+                    } else {
+                        myPackages[setPos] = cn.getPackageName();
+                        myClasses[setPos] = cn.getClassName();
+                        myComponents[setPos] = name;
+                        setPos++;
+                    }
+                }
+                XmlUtils.skipCurrentTag(parser);
+            } else if (!mCallbacks.onReadTag(tagName, parser)) {
+                Slog.w("PreferredComponent", "Unknown element: " + parser.getName());
+                XmlUtils.skipCurrentTag(parser);
+            }
+        }
+
+        if (setPos != setCount) {
+            if (mParseError == null) {
+                mParseError = "Not enough set tags (expected " + setCount
+                    + " but found " + setPos + ") in " + mShortComponent;
+            }
+        }
+
+        mSetPackages = myPackages;
+        mSetClasses = myClasses;
+        mSetComponents = myComponents;
+    }
+
+    public String getParseError() {
+        return mParseError;
+    }
+
+    public void writeToXml(XmlSerializer serializer) throws IOException {
+        final int NS = mSetClasses != null ? mSetClasses.length : 0;
+        serializer.attribute(null, "name", mShortComponent);
+        if (mMatch != 0) {
+            serializer.attribute(null, "match", Integer.toHexString(mMatch));
+        }
+        serializer.attribute(null, "set", Integer.toString(NS));
+        for (int s=0; s<NS; s++) {
+            serializer.startTag(null, "set");
+            serializer.attribute(null, "name", mSetComponents[s]);
+            serializer.endTag(null, "set");
+        }
+    }
+
+    public boolean sameSet(List<ResolveInfo> query, int priority) {
+        if (mSetPackages == null) return false;
+        final int NQ = query.size();
+        final int NS = mSetPackages.length;
+        int numMatch = 0;
+        for (int i=0; i<NQ; i++) {
+            ResolveInfo ri = query.get(i);
+            if (ri.priority != priority) continue;
+            ActivityInfo ai = ri.activityInfo;
+            boolean good = false;
+            for (int j=0; j<NS; j++) {
+                if (mSetPackages[j].equals(ai.packageName)
+                        && mSetClasses[j].equals(ai.name)) {
+                    numMatch++;
+                    good = true;
+                    break;
+                }
+            }
+            if (!good) return false;
+        }
+        return numMatch == NS;
+    }
+
+    public void dump(PrintWriter out, String prefix, Object ident) {
+        out.print(prefix); out.print(
+                Integer.toHexString(System.identityHashCode(ident)));
+                out.print(' ');
+                out.print(mComponent.flattenToShortString());
+                out.print(" match=0x");
+                out.println( Integer.toHexString(mMatch));
+        if (mSetComponents != null) {
+            out.print(prefix); out.println("  Selected from:");
+            for (int i=0; i<mSetComponents.length; i++) {
+                out.print(prefix); out.print("    ");
+                        out.println(mSetComponents[i]);
+            }
+        }
+    }
+}