Merge "Revert "Use a weakreference to prevent the static variable from holding an Activity." Bug was fixed in a different way."
diff --git a/api/current.txt b/api/current.txt
index 08cd44f..c70cea8 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -2853,6 +2853,8 @@
     method public void setMessage(java.lang.CharSequence);
     method public void setView(android.view.View);
     method public void setView(android.view.View, int, int, int, int);
+    field public static final int THEME_DEVICE_DEFAULT_DARK = 4; // 0x4
+    field public static final int THEME_DEVICE_DEFAULT_LIGHT = 5; // 0x5
     field public static final int THEME_HOLO_DARK = 2; // 0x2
     field public static final int THEME_HOLO_LIGHT = 3; // 0x3
     field public static final int THEME_TRADITIONAL = 1; // 0x1
@@ -16391,8 +16393,6 @@
   }
 
   protected static abstract interface ContactsContract.GroupsColumns {
-    field public static final java.lang.String ACTION = "action";
-    field public static final java.lang.String ACTION_URI = "action_uri";
     field public static final java.lang.String AUTO_ADD = "auto_add";
     field public static final java.lang.String DATA_SET = "data_set";
     field public static final java.lang.String DELETED = "deleted";
@@ -16589,12 +16589,14 @@
   }
 
   protected static abstract interface ContactsContract.StreamItemPhotosColumns {
-    field public static final java.lang.String ACTION = "action";
-    field public static final java.lang.String ACTION_URI = "action_uri";
     field public static final java.lang.String PHOTO_FILE_ID = "photo_file_id";
     field public static final java.lang.String PHOTO_URI = "photo_uri";
     field public static final java.lang.String SORT_INDEX = "sort_index";
     field public static final java.lang.String STREAM_ITEM_ID = "stream_item_id";
+    field public static final java.lang.String SYNC1 = "stream_item_photo_sync1";
+    field public static final java.lang.String SYNC2 = "stream_item_photo_sync2";
+    field public static final java.lang.String SYNC3 = "stream_item_photo_sync3";
+    field public static final java.lang.String SYNC4 = "stream_item_photo_sync4";
   }
 
   public static final class ContactsContract.StreamItems implements android.provider.BaseColumns android.provider.ContactsContract.StreamItemsColumns {
@@ -16609,13 +16611,19 @@
   }
 
   protected static abstract interface ContactsContract.StreamItemsColumns {
-    field public static final java.lang.String ACTION = "action";
-    field public static final java.lang.String ACTION_URI = "action_uri";
+    field public static final java.lang.String ACCOUNT_NAME = "account_name";
+    field public static final java.lang.String ACCOUNT_TYPE = "account_type";
     field public static final java.lang.String COMMENTS = "comments";
+    field public static final java.lang.String DATA_SET = "data_set";
     field public static final java.lang.String RAW_CONTACT_ID = "raw_contact_id";
+    field public static final java.lang.String RAW_CONTACT_SOURCE_ID = "raw_contact_source_id";
     field public static final java.lang.String RES_ICON = "icon";
     field public static final java.lang.String RES_LABEL = "label";
     field public static final java.lang.String RES_PACKAGE = "res_package";
+    field public static final java.lang.String SYNC1 = "stream_item_sync1";
+    field public static final java.lang.String SYNC2 = "stream_item_sync2";
+    field public static final java.lang.String SYNC3 = "stream_item_sync3";
+    field public static final java.lang.String SYNC4 = "stream_item_sync4";
     field public static final java.lang.String TEXT = "text";
     field public static final java.lang.String TIMESTAMP = "timestamp";
   }
diff --git a/core/java/android/app/AlertDialog.java b/core/java/android/app/AlertDialog.java
index 491fcfe..c09e87f 100644
--- a/core/java/android/app/AlertDialog.java
+++ b/core/java/android/app/AlertDialog.java
@@ -75,6 +75,18 @@
      * the holographic alert theme with a light background.
      */
     public static final int THEME_HOLO_LIGHT = 3;
+
+    /**
+     * Special theme constant for {@link #AlertDialog(Context, int)}: use
+     * the device's default alert theme with a dark background.
+     */
+    public static final int THEME_DEVICE_DEFAULT_DARK = 4;
+
+    /**
+     * Special theme constant for {@link #AlertDialog(Context, int)}: use
+     * the device's default alert theme with a dark background.
+     */
+    public static final int THEME_DEVICE_DEFAULT_LIGHT = 5;
     
     protected AlertDialog(Context context) {
         this(context, resolveDialogTheme(context, 0), true);
@@ -113,6 +125,10 @@
             return com.android.internal.R.style.Theme_Holo_Dialog_Alert;
         } else if (resid == THEME_HOLO_LIGHT) {
             return com.android.internal.R.style.Theme_Holo_Light_Dialog_Alert;
+        } else if (resid == THEME_DEVICE_DEFAULT_DARK) {
+            return com.android.internal.R.style.Theme_DeviceDefault_Dialog_Alert;
+        } else if (resid == THEME_DEVICE_DEFAULT_LIGHT) {
+            return com.android.internal.R.style.Theme_DeviceDefault_Light_Dialog_Alert;
         } else if (resid >= 0x01000000) {   // start of real resource IDs.
             return resid;
         } else {
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index b4bdb2f..2139704 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -364,7 +364,8 @@
                                 Resources.selectSystemTheme(0,
                                         outerContext.getApplicationInfo().targetSdkVersion,
                                         com.android.internal.R.style.Theme_Dialog,
-                                        com.android.internal.R.style.Theme_Holo_Dialog)),
+                                        com.android.internal.R.style.Theme_Holo_Dialog,
+                                        com.android.internal.R.style.Theme_DeviceDefault_Dialog)),
                         ctx.mMainThread.getHandler());
                 }});
 
diff --git a/core/java/android/app/DialogFragment.java b/core/java/android/app/DialogFragment.java
index cce7cd6..8921578 100644
--- a/core/java/android/app/DialogFragment.java
+++ b/core/java/android/app/DialogFragment.java
@@ -204,7 +204,7 @@
     public void setStyle(int style, int theme) {
         mStyle = style;
         if (mStyle == STYLE_NO_FRAME || mStyle == STYLE_NO_INPUT) {
-            mTheme = com.android.internal.R.style.Theme_Holo_Dialog_NoFrame;
+            mTheme = com.android.internal.R.style.Theme_DeviceDefault_Dialog_NoFrame;
         }
         if (theme != 0) {
             mTheme = theme;
diff --git a/core/java/android/content/res/Resources.java b/core/java/android/content/res/Resources.java
index f526923..24f8319 100755
--- a/core/java/android/content/res/Resources.java
+++ b/core/java/android/content/res/Resources.java
@@ -134,18 +134,24 @@
     /** @hide */
     public static int selectDefaultTheme(int curTheme, int targetSdkVersion) {
         return selectSystemTheme(curTheme, targetSdkVersion,
-                com.android.internal.R.style.Theme, com.android.internal.R.style.Theme_Holo);
+                com.android.internal.R.style.Theme,
+                com.android.internal.R.style.Theme_Holo,
+                com.android.internal.R.style.Theme_DeviceDefault);
     }
     
     /** @hide */
-    public static int selectSystemTheme(int curTheme, int targetSdkVersion, int orig, int holo) {
+    public static int selectSystemTheme(int curTheme, int targetSdkVersion,
+            int orig, int holo, int deviceDefault) {
         if (curTheme != 0) {
             return curTheme;
         }
         if (targetSdkVersion < Build.VERSION_CODES.HONEYCOMB) {
             return orig;
         }
-        return holo;
+        if (targetSdkVersion < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
+            return holo;
+        }
+        return deviceDefault;
     }
     
     /**
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 9481a88..370e22a 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -617,7 +617,9 @@
     @Override public void onCreate() {
         mTheme = Resources.selectSystemTheme(mTheme,
                 getApplicationInfo().targetSdkVersion,
-                android.R.style.Theme_InputMethod, android.R.style.Theme_Holo_InputMethod);
+                android.R.style.Theme_InputMethod,
+                android.R.style.Theme_Holo,
+                android.R.style.Theme_DeviceDefault_InputMethod);
         super.setTheme(mTheme);
         super.onCreate();
         mImm = (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index 6c7c58d..1e9ee7c 100644
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -287,6 +287,15 @@
          * {@link android.R.attr#hardwareAccelerated android:hardwareAccelerated}
          * to turn it off if needed, although this is strongly discouraged since
          * it will result in poor performance on larger screen devices.
+         * <li> The default theme for applications is now the "device default" theme:
+         *      {@link android.R.style#Theme_DeviceDefault}. This may be the
+         *      holo dark theme or a different dark theme defined by the specific device.
+         *      The {@link android.R.style#Theme_Holo} family must not be modified
+         *      for a device to be considered compatible. Applications that explicitly
+         *      request a theme from the Holo family will be guaranteed that these themes
+         *      will not change character within the same platform version. Applications
+         *      that wish to blend in with the device should use a theme from the
+         *      {@link android.R.style#Theme_DeviceDefault} family.
          * </ul>
          */
         public static final int ICE_CREAM_SANDWICH = CUR_DEVELOPMENT;
diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java
index 5765dde..d867e35 100644
--- a/core/java/android/provider/ContactsContract.java
+++ b/core/java/android/provider/ContactsContract.java
@@ -2890,8 +2890,6 @@
      * values.put(StreamItems.TEXT, "Breakfasted at Tiffanys");
      * values.put(StreamItems.TIMESTAMP, timestamp);
      * values.put(StreamItems.COMMENTS, "3 people reshared this");
-     * values.put(StreamItems.ACTION, action);
-     * values.put(StreamItems.ACTION_URI, actionUri);
      * Uri streamItemUri = getContentResolver().insert(
      *     Uri.withAppendedPath(ContentUris.withAppendedId(RawContacts.CONTENT_URI, rawContactId),
      *         RawContacts.StreamItems.CONTENT_DIRECTORY), values);
@@ -2905,8 +2903,6 @@
      * values.put(StreamItems.TEXT, "Breakfasted at Tiffanys");
      * values.put(StreamItems.TIMESTAMP, timestamp);
      * values.put(StreamItems.COMMENTS, "3 people reshared this");
-     * values.put(StreamItems.ACTION, action);
-     * values.put(StreamItems.ACTION_URI, actionUri);
      * Uri streamItemUri = getContentResolver().insert(StreamItems.CONTENT_URI, values);
      * long streamItemId = ContentUris.parseId(streamItemUri);
      * </dd>
@@ -2924,8 +2920,6 @@
      * values.clear();
      * values.put(StreamItemPhotos.SORT_INDEX, 1);
      * values.put(StreamItemPhotos.PHOTO, photoData);
-     * values.put(StreamItemPhotos.ACTION, action);
-     * values.put(StreamItemPhotos.ACTION_URI, actionUri);
      * getContentResolver().insert(Uri.withAppendedPath(
      *     ContentUris.withAppendedId(StreamItems.CONTENT_URI, streamItemId),
      *     StreamItems.StreamItemPhotos.CONTENT_DIRECTORY), values);
@@ -2938,8 +2932,6 @@
      * values.put(StreamItemPhotos.STREAM_ITEM_ID, streamItemId);
      * values.put(StreamItemPhotos.SORT_INDEX, 1);
      * values.put(StreamItemPhotos.PHOTO, photoData);
-     * values.put(StreamItemPhotos.ACTION, action);
-     * values.put(StreamItemPhotos.ACTION_URI, actionUri);
      * getContentResolver().insert(StreamItems.CONTENT_PHOTO_URI, values);
      * </pre>
      * Note that this latter form allows the insertion of a stream item and its
@@ -3081,16 +3073,56 @@
         public static final String RES_PACKAGE = "res_package";
 
         /**
-         * The resource ID of the icon for the source of the stream item.
-         * This resource should be scoped by the {@link #RES_PACKAGE}.
-         * <P>Type: NUMBER</P>
+         * The account type to which the raw_contact of this item is associated. See
+         * {@link RawContacts#ACCOUNT_TYPE}
+         *
+         * <p>TYPE: text</p>
+         * <p>read-only</p>
+         */
+        public static final String ACCOUNT_TYPE = "account_type";
+
+        /**
+         * The account name to which the raw_contact of this item is associated. See
+         * {@link RawContacts#ACCOUNT_NAME}
+         *
+         * <p>TYPE: text</p>
+         * <p>read-only</p>
+         */
+        public static final String ACCOUNT_NAME = "account_name";
+
+        /**
+         * The data set within the account that the raw_contact of this row belongs to. This allows
+         * multiple sync adapters for the same account type to distinguish between
+         * each others' data.
+         * {@link RawContacts#DATA_SET}
+         *
+         * <P>Type: TEXT</P>
+         * <p>read-only</p>
+         */
+        public static final String DATA_SET = "data_set";
+
+        /**
+         * The source_id of the raw_contact that this row belongs to.
+         * {@link RawContacts#SOURCE_ID}
+         *
+         * <P>Type: TEXT</P>
+         * <p>read-only</p>
+         */
+        public static final String RAW_CONTACT_SOURCE_ID = "raw_contact_source_id";
+
+        /**
+         * The resource name of the icon for the source of the stream item.
+         * This resource should be scoped by the {@link #RES_PACKAGE}. As this can only reference
+         * drawables, the "@drawable/" prefix must be omitted.
+         * <P>Type: TEXT</P>
          */
         public static final String RES_ICON = "icon";
 
         /**
-         * The resource ID of the label describing the source of the status update, e.g. "Google
-         * Talk".  This resource should be scoped by the {@link #RES_PACKAGE}.
-         * <p>Type: NUMBER</p>
+         * The resource name of the label describing the source of the status update, e.g. "Google
+         * Talk". This resource should be scoped by the {@link #RES_PACKAGE}. As this can only
+         * reference strings, the "@string/" prefix must be omitted.
+         * <p>Type: TEXT</p>
          */
         public static final String RES_LABEL = "label";
 
@@ -3136,18 +3168,14 @@
          */
         public static final String COMMENTS = "comments";
 
-        /**
-         * The activity action to execute when the item is tapped.
-         * <P>Type: TEXT</P>
-         */
-        public static final String ACTION = "action";
-
-        /**
-         * The URI that is launched when the item is pressed. May be handled by
-         * the source app, but could also reference a website (e.g. YouTube).
-         * <P>Type: TEXT</P>
-         */
-        public static final String ACTION_URI = "action_uri";
+        /** Generic column for use by sync adapters. */
+        public static final String SYNC1 = "stream_item_sync1";
+        /** Generic column for use by sync adapters. */
+        public static final String SYNC2 = "stream_item_sync2";
+        /** Generic column for use by sync adapters. */
+        public static final String SYNC3 = "stream_item_sync3";
+        /** Generic column for use by sync adapters. */
+        public static final String SYNC4 = "stream_item_sync4";
     }
 
     /**
@@ -3171,8 +3199,6 @@
      * ContentValues values = new ContentValues();
      * values.put(StreamItemPhotos.SORT_INDEX, 1);
      * values.put(StreamItemPhotos.PHOTO, photoData);
-     * values.put(StreamItemPhotos.ACTION, action);
-     * values.put(StreamItemPhotos.ACTION_URI, actionUri);
      * Uri photoUri = getContentResolver().insert(Uri.withAppendedPath(
      *     ContentUris.withAppendedId(StreamItems.CONTENT_URI, streamItemId)
      *     StreamItems.StreamItemPhotos#CONTENT_DIRECTORY), values);
@@ -3186,8 +3212,6 @@
      * values.put(StreamItemPhotos.STREAM_ITEM_ID, streamItemId);
      * values.put(StreamItemPhotos.SORT_INDEX, 1);
      * values.put(StreamItemPhotos.PHOTO, photoData);
-     * values.put(StreamItemPhotos.ACTION, action);
-     * values.put(StreamItemPhotos.ACTION_URI, actionUri);
      * Uri photoUri = getContentResolver().insert(StreamItems.CONTENT_PHOTO_URI, values);
      * long photoId = ContentUris.parseId(photoUri);
      * </pre>
@@ -3353,18 +3377,14 @@
          */
         public static final String PHOTO_URI = "photo_uri";
 
-        /**
-         * The activity action to execute when the photo is tapped.
-         * <P>Type: TEXT</P>
-         */
-        public static final String ACTION = "action";
-
-        /**
-         * The URI that is launched when the photo is pressed. May be handled by
-         * the source app, but could also reference a website (e.g. YouTube).
-         * <P>Type: TEXT</P>
-         */
-        public static final String ACTION_URI = "action_uri";
+        /** Generic column for use by sync adapters. */
+        public static final String SYNC1 = "stream_item_photo_sync1";
+        /** Generic column for use by sync adapters. */
+        public static final String SYNC2 = "stream_item_photo_sync2";
+        /** Generic column for use by sync adapters. */
+        public static final String SYNC3 = "stream_item_photo_sync3";
+        /** Generic column for use by sync adapters. */
+        public static final String SYNC4 = "stream_item_photo_sync4";
     }
 
     /**
@@ -6496,28 +6516,6 @@
         public static final String NOTES = "notes";
 
         /**
-         * The Activity action to open the group in the source app (e.g.
-         * {@link Intent#ACTION_VIEW}). Can be NULL if the group does not have a dedicated viewer.
-         * This is used in conjunction with {@link #ACTION_URI}: In order to show an "Open in
-         * (sourceapp)"-button, both of these fields must be set
-         * <p>
-         * Type: TEXT
-         */
-        public static final String ACTION = "action";
-
-
-        /**
-         * Uri to open the group in the source app.
-         * Can be NULL if the group does not have a dedicated viewer.
-         * This is used in conjunction with {@link #ACTION}: In order to show an "Open in
-         * (sourceapp)"-button, both of these fields must be set
-         * <p>
-         * Type: TEXT
-         */
-        public static final String ACTION_URI = "action_uri";
-
-
-        /**
          * The ID of this group if it is a System Group, i.e. a group that has a special meaning
          * to the sync adapter, null otherwise.
          * <P>Type: TEXT</P>
diff --git a/core/java/android/view/InputChannel.java b/core/java/android/view/InputChannel.java
index f2cad2f..523af04 100644
--- a/core/java/android/view/InputChannel.java
+++ b/core/java/android/view/InputChannel.java
@@ -48,8 +48,6 @@
     @SuppressWarnings("unused")
     private int mPtr; // used by native code
     
-    private boolean mDisposeAfterWriteToParcel;
-    
     private static native InputChannel[] nativeOpenInputChannelPair(String name);
     
     private native void nativeDispose(boolean finalized);
@@ -117,13 +115,12 @@
      * as an out parameter in a binder call.
      * @param other The other input channel instance.
      */
-    public void transferToBinderOutParameter(InputChannel outParameter) {
+    public void transferTo(InputChannel outParameter) {
         if (outParameter == null) {
             throw new IllegalArgumentException("outParameter must not be null");
         }
         
         nativeTransferTo(outParameter);
-        outParameter.mDisposeAfterWriteToParcel = true;
     }
 
     public int describeContents() {
@@ -145,7 +142,7 @@
         
         nativeWriteToParcel(out);
         
-        if (mDisposeAfterWriteToParcel) {
+        if ((flags & PARCELABLE_WRITE_RETURN_VALUE) != 0) {
             dispose();
         }
     }
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 5b77cf7..54bd637 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -6249,15 +6249,7 @@
                     }
 
                     // Walk up the hierarchy to determine if we're inside a scrolling container.
-                    boolean isInScrollingContainer = false;
-                    ViewParent p = getParent();
-                    while (p != null && p instanceof ViewGroup) {
-                        if (((ViewGroup) p).shouldDelayChildPressedState()) {
-                            isInScrollingContainer = true;
-                            break;
-                        }
-                        p = p.getParent();
-                    }
+                    boolean isInScrollingContainer = isInScrollingContainer();
 
                     // For views inside a scrolling container, delay the pressed feedback for
                     // a short period in case this is a scroll.
@@ -6307,6 +6299,20 @@
     }
 
     /**
+     * @hide
+     */
+    public boolean isInScrollingContainer() {
+        ViewParent p = getParent();
+        while (p != null && p instanceof ViewGroup) {
+            if (((ViewGroup) p).shouldDelayChildPressedState()) {
+                return true;
+            }
+            p = p.getParent();
+        }
+        return false;
+    }
+
+    /**
      * Remove the longpress detection timer.
      */
     private void removeLongPressCallback() {
@@ -8774,6 +8780,12 @@
      * @see #SCROLLBARS_OUTSIDE_OVERLAY
      * @see #SCROLLBARS_OUTSIDE_INSET
      */
+    @ViewDebug.ExportedProperty(mapping = {
+            @ViewDebug.IntToString(from = SCROLLBARS_INSIDE_OVERLAY, to = "INSIDE_OVERLAY"),
+            @ViewDebug.IntToString(from = SCROLLBARS_INSIDE_INSET, to = "INSIDE_INSET"),
+            @ViewDebug.IntToString(from = SCROLLBARS_OUTSIDE_OVERLAY, to = "OUTSIDE_OVERLAY"),
+            @ViewDebug.IntToString(from = SCROLLBARS_OUTSIDE_INSET, to = "OUTSIDE_INSET")
+    })
     public int getScrollBarStyle() {
         return mViewFlags & SCROLLBARS_STYLE_MASK;
     }
diff --git a/core/java/android/widget/AbsSeekBar.java b/core/java/android/widget/AbsSeekBar.java
index 2621e64..df8eb05 100644
--- a/core/java/android/widget/AbsSeekBar.java
+++ b/core/java/android/widget/AbsSeekBar.java
@@ -24,6 +24,7 @@
 import android.util.AttributeSet;
 import android.view.KeyEvent;
 import android.view.MotionEvent;
+import android.view.ViewConfiguration;
 
 public abstract class AbsSeekBar extends ProgressBar {
     private Drawable mThumb;
@@ -49,6 +50,10 @@
     private static final int NO_ALPHA = 0xFF;
     private float mDisabledAlpha;
     
+    private int mScaledTouchSlop;
+    private float mTouchDownX;
+    private boolean mIsDragging;
+
     public AbsSeekBar(Context context) {
         super(context);
     }
@@ -74,6 +79,8 @@
                 com.android.internal.R.styleable.Theme, 0, 0);
         mDisabledAlpha = a.getFloat(com.android.internal.R.styleable.Theme_disabledAlpha, 0.5f);
         a.recycle();
+
+        mScaledTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
     }
 
     /**
@@ -324,20 +331,42 @@
         
         switch (event.getAction()) {
             case MotionEvent.ACTION_DOWN:
-                setPressed(true);
-                onStartTrackingTouch();
-                trackTouchEvent(event);
+                if (isInScrollingContainer()) {
+                    mTouchDownX = event.getX();
+                } else {
+                    setPressed(true);
+                    onStartTrackingTouch();
+                    trackTouchEvent(event);
+                    attemptClaimDrag();
+                }
                 break;
                 
             case MotionEvent.ACTION_MOVE:
-                trackTouchEvent(event);
-                attemptClaimDrag();
+                if (mIsDragging) {
+                    trackTouchEvent(event);
+                } else {
+                    final float x = event.getX();
+                    if (Math.abs(x - mTouchDownX) > mScaledTouchSlop) {
+                        setPressed(true);
+                        onStartTrackingTouch();
+                        trackTouchEvent(event);
+                        attemptClaimDrag();
+                    }
+                }
                 break;
                 
             case MotionEvent.ACTION_UP:
-                trackTouchEvent(event);
-                onStopTrackingTouch();
-                setPressed(false);
+                if (mIsDragging) {
+                    trackTouchEvent(event);
+                    onStopTrackingTouch();
+                    setPressed(false);
+                } else {
+                    // Touch up when we never crossed the touch slop threshold should
+                    // be interpreted as a tap-seek to that location.
+                    onStartTrackingTouch();
+                    trackTouchEvent(event);
+                    onStopTrackingTouch();
+                }
                 // ProgressBar doesn't know to repaint the thumb drawable
                 // in its inactive state when the touch stops (because the
                 // value has not apparently changed)
@@ -345,8 +374,10 @@
                 break;
                 
             case MotionEvent.ACTION_CANCEL:
-                onStopTrackingTouch();
-                setPressed(false);
+                if (mIsDragging) {
+                    onStopTrackingTouch();
+                    setPressed(false);
+                }
                 invalidate(); // see above explanation
                 break;
         }
@@ -388,6 +419,7 @@
      * This is called when the user has started touching this widget.
      */
     void onStartTrackingTouch() {
+        mIsDragging = true;
     }
 
     /**
@@ -395,6 +427,7 @@
      * canceled.
      */
     void onStopTrackingTouch() {
+        mIsDragging = false;
     }
 
     /**
diff --git a/core/java/android/widget/SeekBar.java b/core/java/android/widget/SeekBar.java
index dfee29b..c76728f 100644
--- a/core/java/android/widget/SeekBar.java
+++ b/core/java/android/widget/SeekBar.java
@@ -104,6 +104,7 @@
     
     @Override
     void onStartTrackingTouch() {
+        super.onStartTrackingTouch();
         if (mOnSeekBarChangeListener != null) {
             mOnSeekBarChangeListener.onStartTrackingTouch(this);
         }
@@ -111,6 +112,7 @@
     
     @Override
     void onStopTrackingTouch() {
+        super.onStopTrackingTouch();
         if (mOnSeekBarChangeListener != null) {
             mOnSeekBarChangeListener.onStopTrackingTouch(this);
         }
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index d78050a9..1ab1a87 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -139,6 +139,11 @@
 
 import org.xmlpull.v1.XmlPullParserException;
 
+import com.android.internal.util.FastMath;
+import com.android.internal.widget.EditableInputConnection;
+
+import org.xmlpull.v1.XmlPullParserException;
+
 import java.io.IOException;
 import java.lang.ref.WeakReference;
 import java.text.BreakIterator;
@@ -220,6 +225,7 @@
  * @attr ref android.R.styleable#TextView_imeActionLabel
  * @attr ref android.R.styleable#TextView_imeActionId
  * @attr ref android.R.styleable#TextView_editorExtras
+ * @attr ref android.R.styleable#TextView_suggestionsEnabled
  */
 @RemoteView
 public class TextView extends View implements ViewTreeObserver.OnPreDrawListener {
@@ -9418,7 +9424,7 @@
     }
 
     void showSuggestions() {
-        if (!mSuggestionsEnabled || !isTextEditable()) return;
+        if (!isSuggestionsEnabled() || !isTextEditable()) return;
 
         if (mSuggestionsPopupWindow == null) {
             mSuggestionsPopupWindow = new SuggestionsPopupWindow();
@@ -9445,18 +9451,41 @@
      * user double taps on these parts of the text. No suggestions are displayed when this value is
      * false. Use {@link #setSuggestionsEnabled(boolean)} to change this value.
      *
+     * Note that suggestions are only enabled for a subset of input types. In addition to setting
+     * this flag to <code>true</code> using {@link #setSuggestionsEnabled(boolean)} or the
+     * <code>android:suggestionsEnabled</code> xml attribute, this method will return
+     * <code>true</code> only if the class of your input type is {@link InputType#TYPE_CLASS_TEXT}.
+     * In addition, the type variation must also be one of
+     * {@link InputType#TYPE_TEXT_VARIATION_NORMAL},
+     * {@link InputType#TYPE_TEXT_VARIATION_EMAIL_SUBJECT},
+     * {@link InputType#TYPE_TEXT_VARIATION_LONG_MESSAGE},
+     * {@link InputType#TYPE_TEXT_VARIATION_SHORT_MESSAGE} or
+     * {@link InputType#TYPE_TEXT_VARIATION_WEB_EDIT_TEXT}.
+     *
      * @return true if the suggestions popup window is enabled.
      *
      * @attr ref android.R.styleable#TextView_suggestionsEnabled
      */
     public boolean isSuggestionsEnabled() {
-        return mSuggestionsEnabled;
+        if (!mSuggestionsEnabled) return false;
+        if ((mInputType & InputType.TYPE_MASK_CLASS) != InputType.TYPE_CLASS_TEXT) return false;
+        final int variation =
+                mInputType & (EditorInfo.TYPE_MASK_CLASS | EditorInfo.TYPE_MASK_VARIATION);
+        if (variation == EditorInfo.TYPE_TEXT_VARIATION_NORMAL ||
+                variation == EditorInfo.TYPE_TEXT_VARIATION_EMAIL_SUBJECT ||
+                variation == EditorInfo.TYPE_TEXT_VARIATION_LONG_MESSAGE ||
+                variation == EditorInfo.TYPE_TEXT_VARIATION_SHORT_MESSAGE ||
+                variation == EditorInfo.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT) return true;
+
+        return false;
     }
 
     /**
      * Enables or disables the suggestion popup. See {@link #isSuggestionsEnabled()}.
      *
      * @param enabled Whether or not suggestions are enabled.
+     *
+     * @attr ref android.R.styleable#TextView_suggestionsEnabled
      */
     public void setSuggestionsEnabled(boolean enabled) {
         mSuggestionsEnabled = enabled;
@@ -9728,10 +9757,12 @@
 
         @Override
         public void show() {
-            mPasteTextView.setVisibility(canPaste() ? View.VISIBLE : View.GONE);
-            mReplaceTextView.setVisibility(mSuggestionsEnabled ? View.VISIBLE : View.GONE);
+            boolean canPaste = canPaste();
+            boolean suggestionsEnabled = isSuggestionsEnabled();
+            mPasteTextView.setVisibility(canPaste ? View.VISIBLE : View.GONE);
+            mReplaceTextView.setVisibility(suggestionsEnabled ? View.VISIBLE : View.GONE);
 
-            if (!canPaste() && !mSuggestionsEnabled) return;
+            if (!canPaste && !suggestionsEnabled) return;
 
             super.show();
         }
diff --git a/core/jni/android_text_format_Time.cpp b/core/jni/android_text_format_Time.cpp
index 69c6021..776733c 100644
--- a/core/jni/android_text_format_Time.cpp
+++ b/core/jni/android_text_format_Time.cpp
@@ -69,7 +69,7 @@
     t->t.tm_yday = env->GetIntField(o, g_ydayField);
     t->t.tm_isdst = env->GetIntField(o, g_isdstField);
     t->t.tm_gmtoff = env->GetLongField(o, g_gmtoffField);
-    bool allDay = env->GetIntField(o, g_allDayField);
+    bool allDay = env->GetBooleanField(o, g_allDayField);
     if (allDay &&
 	((t->t.tm_sec !=0) || (t->t.tm_min != 0) || (t->t.tm_hour != 0))) {
         char msg[100];
@@ -162,7 +162,7 @@
 {
     Time t;
     if (!java2time(env, &t, This)) return env->NewStringUTF("");
-    bool allDay = env->GetIntField(This, g_allDayField);
+    bool allDay = env->GetBooleanField(This, g_allDayField);
     
     if (!allDay) {
         ACQUIRE_TIMEZONE(This, t)
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index dc0106c..b9868db 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -122,6 +122,15 @@
         android:label="@string/permlab_sendSms"
         android:description="@string/permdesc_sendSms" />
 
+    <!-- Allows an application to send SMS messages via the Messaging app with no user
+         input or confirmation.
+         @hide -->
+    <permission android:name="android.permission.SEND_SMS_NO_CONFIRMATION"
+        android:permissionGroup="android.permission-group.COST_MONEY"
+        android:protectionLevel="signatureOrSystem"
+        android:label="@string/permlab_sendSmsNoConfirmation"
+        android:description="@string/permdesc_sendSmsNoConfirmation" />
+
     <!-- Allows an application to initiate a phone call without going through
          the Dialer user interface for the user to confirm the call
          being placed. -->
@@ -1413,7 +1422,7 @@
         android:description="@string/permdesc_modifyNetworkAccounting"
         android:protectionLevel="signatureOrSystem" />
 
-    <!-- C2DM permission. 
+    <!-- C2DM permission.
          @hide Used internally.
      -->
     <permission android:name="android.intent.category.MASTER_CLEAR.permission.C2D_MESSAGE"
diff --git a/core/res/res/layout/preference_category_holo.xml b/core/res/res/layout/preference_category_holo.xml
index a4e20d2..81e595c 100644
--- a/core/res/res/layout/preference_category_holo.xml
+++ b/core/res/res/layout/preference_category_holo.xml
@@ -18,5 +18,5 @@
 <TextView xmlns:android="http://schemas.android.com/apk/res/android"
     style="?android:attr/listSeparatorTextViewStyle"
     android:id="@+android:id/title"
-    android:paddingLeft="16dp"
-/>
+    android:paddingLeft="@dimen/preference_item_padding_side"
+    android:paddingRight="@dimen/preference_item_padding_side" />
diff --git a/core/res/res/layout/preference_child_holo.xml b/core/res/res/layout/preference_child_holo.xml
index 06c846b..3c6a12e 100644
--- a/core/res/res/layout/preference_child_holo.xml
+++ b/core/res/res/layout/preference_child_holo.xml
@@ -20,7 +20,7 @@
     android:layout_height="wrap_content"
     android:minHeight="?android:attr/listPreferredItemHeight"
     android:gravity="center_vertical"
-    android:paddingLeft="16dip"
+    android:paddingLeft="@dimen/preference_child_padding_side"
     android:paddingRight="?android:attr/scrollbarSize">
 
     <LinearLayout
@@ -34,17 +34,16 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center"
-            />
+            android:paddingRight="@dimen/preference_item_padding_inner" />
     </LinearLayout>
 
     <RelativeLayout
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginLeft="32dip"
-        android:layout_marginRight="6dip"
-        android:layout_marginTop="6dip"
-        android:layout_marginBottom="6dip"
-        android:layout_weight="1">
+        android:layout_weight="1"
+        android:paddingRight="@dimen/preference_item_padding_inner"
+        android:paddingTop="6dip"
+        android:paddingBottom="6dip">
 
         <TextView android:id="@+android:id/title"
             android:layout_width="wrap_content"
diff --git a/core/res/res/layout/preference_holo.xml b/core/res/res/layout/preference_holo.xml
index e5ed33c..48f483d 100644
--- a/core/res/res/layout/preference_holo.xml
+++ b/core/res/res/layout/preference_holo.xml
@@ -22,6 +22,7 @@
     android:layout_height="wrap_content"
     android:minHeight="?android:attr/listPreferredItemHeight"
     android:gravity="center_vertical"
+    android:paddingLeft="@dimen/preference_item_padding_side"
     android:paddingRight="?android:attr/scrollbarSize">
 
     <LinearLayout
@@ -36,18 +37,17 @@
             android:layout_height="wrap_content"
             android:layout_gravity="center"
             android:minWidth="48dp"
-            />
+            android:paddingRight="@dimen/preference_item_padding_inner" />
     </LinearLayout>
 
     <RelativeLayout
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginLeft="16dip"
-        android:layout_marginRight="8dip"
-        android:layout_marginTop="6dip"
-        android:layout_marginBottom="6dip"
-        android:layout_weight="1">
-    
+        android:layout_weight="1"
+        android:paddingRight="@dimen/preference_item_padding_inner"
+        android:paddingTop="6dip"
+        android:paddingBottom="6dip">
+
         <TextView android:id="@+android:id/title"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
diff --git a/core/res/res/layout/preference_information_holo.xml b/core/res/res/layout/preference_information_holo.xml
index d15cd7b..e29ed03 100644
--- a/core/res/res/layout/preference_information_holo.xml
+++ b/core/res/res/layout/preference_information_holo.xml
@@ -22,6 +22,7 @@
     android:layout_height="wrap_content"
     android:minHeight="?android:attr/listPreferredItemHeight"
     android:gravity="center_vertical"
+    android:paddingLeft="@dimen/preference_item_padding_side"
     android:paddingRight="?android:attr/scrollbarSize">
 
     <LinearLayout
@@ -35,17 +36,16 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center"
-            />
+            android:paddingRight="@dimen/preference_item_padding_inner" />
     </LinearLayout>
 
     <RelativeLayout
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginLeft="16dip"
-        android:layout_marginRight="6sp"
-        android:layout_marginTop="6sp"
-        android:layout_marginBottom="6sp"
-        android:layout_weight="1">
+        android:layout_weight="1"
+        android:paddingRight="@dimen/preference_item_padding_inner"
+        android:paddingTop="6dip"
+        android:paddingBottom="6dip">
 
         <TextView android:id="@+android:id/title"
             android:layout_width="wrap_content"
@@ -64,7 +64,7 @@
             android:maxLines="2" />
 
     </RelativeLayout>
-    
+
     <!-- Preference should place its actual preference widget here. -->
     <LinearLayout android:id="@+android:id/widget_frame"
         android:layout_width="wrap_content"
diff --git a/core/res/res/values-w720dp/dimens.xml b/core/res/res/values-w720dp/dimens.xml
index ec1195e..3d10103 100644
--- a/core/res/res/values-w720dp/dimens.xml
+++ b/core/res/res/values-w720dp/dimens.xml
@@ -28,5 +28,5 @@
     <!-- Minimum space to allocate to the left of a preference item for an icon.
         This helps in aligning titles when some items have icons and some don't. When space is
         at a premium, we don't pre-allocate any space. -->
-    <dimen name="preference_icon_minWidth">48dp</dimen>
+    <dimen name="preference_icon_minWidth">56dp</dimen>
 </resources>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 73443a0..3f67d1ba 100755
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -89,7 +89,7 @@
 
     <!-- Whether dialogs should close automatically when the user touches outside
          of them.  This should not normally be modified. -->
-    <bool name="config_closeDialogWhenTouchOutside">false</bool>
+    <bool name="config_closeDialogWhenTouchOutside">true</bool>
 
     <!-- The duration (in milliseconds) that the radio will scan for a signal
          when there's no network connection. If the scan doesn't timeout, use zero -->
@@ -396,7 +396,7 @@
          If unlock screen is disabled, the puk should be unlocked through Emergency Dialer -->
     <bool name="config_enable_puk_unlock_screen">false</bool>
 
-    <!-- Control the behavior when the user long presses the power button.
+    <!-- Control the behavior when the user long presses the home button.
             0 - Nothing
             1 - Recent apps dialog
             2 - Recent apps view in SystemUI
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index 829f757..9295388 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -108,6 +108,10 @@
     <!-- Preference activity, vertical padding for the header list -->
     <dimen name="preference_screen_header_vertical_padding">0dp</dimen>
 
+    <dimen name="preference_item_padding_side">8dip</dimen>
+    <dimen name="preference_item_padding_inner">8dip</dimen>
+    <dimen name="preference_child_padding_side">16dip</dimen>
+
     <!-- The platform's desired minimum size for a dialog's width when it
          is along the minor axis (that is the screen is portrait).  This may
          be either a fraction or a dimension. -->
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 6b0c6a3..7d6d25c 100755
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -474,6 +474,13 @@
       messages. Malicious applications may cost you money by sending
       messages without your confirmation.</string>
 
+     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+    <string name="permlab_sendSmsNoConfirmation">send SMS messages with no confirmation</string>
+    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+    <string name="permdesc_sendSmsNoConfirmation">Allows application to send SMS
+      messages. Malicious applications may cost you money by sending
+      messages without your confirmation.</string>
+
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_readSms">read SMS or MMS</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
@@ -933,19 +940,19 @@
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_readCalendar">read calendar events plus confidential information</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_readCalendar" product="tablet">Allows an application to read all calendar 
+    <string name="permdesc_readCalendar" product="tablet">Allows an application to read all calendar
         events stored on your tablet, including those of friends or coworkers. A malicious application with
         this permission can extract personal information from these calendars without the owners\' knowledge.</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_readCalendar" product="default">Allows an application to read all calendar 
+    <string name="permdesc_readCalendar" product="default">Allows an application to read all calendar
         events stored on your phone, including those of friends or coworkers. A malicious application with
         this permission can extract personal information from these calendars without the owners\' knowledge.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_writeCalendar">add or modify calendar events and send email to guests without owners\' knowledge</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_writeCalendar">Allows an application to send event invitations as the calendar owner and add, remove, 
-        change events that you can modify on your device, including those of friends or co-workers. A malicious application with this permission 
+    <string name="permdesc_writeCalendar">Allows an application to send event invitations as the calendar owner and add, remove,
+        change events that you can modify on your device, including those of friends or co-workers. A malicious application with this permission
         can send spam emails that appear to come from calendar owners, modify events without the owners\' knowledge, or add fake events.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
@@ -1291,10 +1298,11 @@
       create network sockets.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permlab_writeApnSettings">write Access Point Name settings</string>
+    <string name="permlab_writeApnSettings">change/intercept network settings and traffic</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_writeApnSettings">Allows an application to modify the APN
-        settings, such as Proxy and Port of any APN.</string>
+    <string name="permdesc_writeApnSettings">Allows an application to change network settings and to intercept and inspect all network traffic, 
+      for example to change the proxy and port of any APN. Malicious applications could monitor, redirect, or modify network 
+      packets without your knowledge.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_changeNetworkState">change network connectivity</string>
diff --git a/core/res/res/values/themes_device_defaults.xml b/core/res/res/values/themes_device_defaults.xml
index bf6329d..94d2c38 100644
--- a/core/res/res/values/themes_device_defaults.xml
+++ b/core/res/res/values/themes_device_defaults.xml
@@ -420,4 +420,8 @@
     <style name="Theme.DeviceDefault.Light.SearchBar" parent="Theme.DeviceDefault.Light.SearchBar">
 
     </style>
+
+    <style name="Theme.DeviceDefault.Dialog.NoFrame" parent="Theme.Holo.Dialog.NoFrame">
+    </style>
+
 </resources>
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index 8ebb07c..5951229 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -2580,6 +2580,7 @@
         public IBinder mSourceRef = null;
         public String mClientId;
         public int mFocusChangeType;
+        public AudioFocusDeathHandler mHandler;
         public String mPackageName;
         public int mCallingUid;
 
@@ -2587,15 +2588,23 @@
         }
 
         public FocusStackEntry(int streamType, int duration,
-                IAudioFocusDispatcher afl, IBinder source, String id, String pn, int uid) {
+                IAudioFocusDispatcher afl, IBinder source, String id, AudioFocusDeathHandler hdlr,
+                String pn, int uid) {
             mStreamType = streamType;
             mFocusDispatcher = afl;
             mSourceRef = source;
             mClientId = id;
             mFocusChangeType = duration;
+            mHandler = hdlr;
             mPackageName = pn;
             mCallingUid = uid;
         }
+
+        public void unlinkToDeath() {
+            if (mSourceRef != null && mHandler != null) {
+                mSourceRef.unlinkToDeath(mHandler, 0);
+            }
+        }
     }
 
     private Stack<FocusStackEntry> mFocusStack = new Stack<FocusStackEntry>();
@@ -2630,7 +2639,8 @@
         if (!mFocusStack.empty() && mFocusStack.peek().mClientId.equals(clientToRemove))
         {
             //Log.i(TAG, "   removeFocusStackEntry() removing top of stack");
-            mFocusStack.pop();
+            FocusStackEntry fse = mFocusStack.pop();
+            fse.unlinkToDeath();
             if (signal) {
                 // notify the new top of the stack it gained focus
                 notifyTopOfAudioFocusStack();
@@ -2649,6 +2659,7 @@
                     Log.i(TAG, " AudioFocus  abandonAudioFocus(): removing entry for "
                             + fse.mClientId);
                     stackIterator.remove();
+                    fse.unlinkToDeath();
                 }
             }
         }
@@ -2738,6 +2749,18 @@
                 return AudioManager.AUDIOFOCUS_REQUEST_FAILED;
             }
 
+            // handle the potential premature death of the new holder of the focus
+            // (premature death == death before abandoning focus)
+            // Register for client death notification
+            AudioFocusDeathHandler afdh = new AudioFocusDeathHandler(cb);
+            try {
+                cb.linkToDeath(afdh, 0);
+            } catch (RemoteException e) {
+                // client has already died!
+                Log.w(TAG, "AudioFocus  requestAudioFocus() could not link to "+cb+" binder death");
+                return AudioManager.AUDIOFOCUS_REQUEST_FAILED;
+            }
+
             if (!mFocusStack.empty() && mFocusStack.peek().mClientId.equals(clientId)) {
                 // if focus is already owned by this client and the reason for acquiring the focus
                 // hasn't changed, don't do anything
@@ -2762,11 +2785,11 @@
             }
 
             // focus requester might already be somewhere below in the stack, remove it
-            removeFocusStackEntry(clientId, false);
+            removeFocusStackEntry(clientId, false /* signal */);
 
             // push focus requester at the top of the audio focus stack
             mFocusStack.push(new FocusStackEntry(mainStreamType, focusChangeHint, fd, cb,
-                    clientId, callingPackageName, Binder.getCallingUid()));
+                    clientId, afdh, callingPackageName, Binder.getCallingUid()));
 
             // there's a new top of the stack, let the remote control know
             synchronized(mRCStack) {
@@ -2774,17 +2797,6 @@
             }
         }//synchronized(mAudioFocusLock)
 
-        // handle the potential premature death of the new holder of the focus
-        // (premature death == death before abandoning focus)
-        // Register for client death notification
-        AudioFocusDeathHandler afdh = new AudioFocusDeathHandler(cb);
-        try {
-            cb.linkToDeath(afdh, 0);
-        } catch (RemoteException e) {
-            // client has already died!
-            Log.w(TAG, "AudioFocus  requestAudioFocus() could not link to "+cb+" binder death");
-        }
-
         return AudioManager.AUDIOFOCUS_REQUEST_GRANTED;
     }
 
diff --git a/media/java/android/media/MediaScanner.java b/media/java/android/media/MediaScanner.java
index 2d1761f..65818a1 100644
--- a/media/java/android/media/MediaScanner.java
+++ b/media/java/android/media/MediaScanner.java
@@ -1122,19 +1122,23 @@
             }
 
             if (fileMissing) {
+                // Clear the file path to prevent the _DELETE_FILE database hook
+                // in the media provider from deleting the file.
+                // If the file is truly gone the delete is unnecessary, and we want to avoid
+                // accidentally deleting files that are really there.
+                ContentValues values = new ContentValues();
+                values.put(Files.FileColumns.DATA, "");
+                values.put(Files.FileColumns.DATE_MODIFIED, 0);
+                mMediaProvider.update(ContentUris.withAppendedId(mFilesUri, entry.mRowId),
+                        values, null, null);
+
                 // do not delete missing playlists, since they may have been modified by the user.
                 // the user can delete them in the media player instead.
                 // instead, clear the path and lastModified fields in the row
                 MediaFile.MediaFileType mediaFileType = MediaFile.getFileType(path);
                 int fileType = (mediaFileType == null ? 0 : mediaFileType.fileType);
 
-                if (MediaFile.isPlayListFileType(fileType)) {
-                    ContentValues values = new ContentValues();
-                    values.put(MediaStore.Audio.Playlists.DATA, "");
-                    values.put(MediaStore.Audio.Playlists.DATE_MODIFIED, 0);
-                    mMediaProvider.update(ContentUris.withAppendedId(mPlaylistsUri, entry.mRowId),
-                            values, null, null);
-                } else {
+                if (!MediaFile.isPlayListFileType(fileType)) {
                     mMediaProvider.delete(ContentUris.withAppendedId(mFilesUri, entry.mRowId),
                             null, null);
                     iterator.remove();
diff --git a/media/jni/mediaeditor/VideoBrowserMain.c b/media/jni/mediaeditor/VideoBrowserMain.c
index 6ef688d..2de55e3 100755
--- a/media/jni/mediaeditor/VideoBrowserMain.c
+++ b/media/jni/mediaeditor/VideoBrowserMain.c
@@ -258,6 +258,7 @@
                     err = pContext->m_pDecoder->m_pFctCreate(
                             &pContext->m_pDecoderCtx,
                             pContext->m_pStreamHandler,
+                            pContext->m_3gpReader,
                             pContext->m_3gpData,
                             &pContext->m_accessUnit,
                             pContext->m_pCodecLoaderContext) ;
@@ -284,6 +285,7 @@
                     err = pContext->m_pDecoder->m_pFctCreate(
                             &pContext->m_pDecoderCtx,
                             pContext->m_pStreamHandler,
+                            pContext->m_3gpReader,
                             pContext->m_3gpData,
                             &pContext->m_accessUnit,
                             pContext->m_pCodecLoaderContext) ;
@@ -435,9 +437,12 @@
 * @param        pContext     (IN) : Video browser context
 * @param        pTime        (IN/OUT) : Pointer on the time to reach. Updated
 *                                       by this function with the reached time
+* @param        tolerance    (IN) :  We may decode an earlier frame within the tolerance.
+*                                    The time difference is specified in milliseconds.
 * @return       M4NO_ERROR / M4ERR_PARAMETER / M4ERR_STATE / M4ERR_ALLOC
 ******************************************************************************/
-M4OSA_ERR videoBrowserPrepareFrame(M4OSA_Context pContext, M4OSA_UInt32* pTime)
+M4OSA_ERR videoBrowserPrepareFrame(M4OSA_Context pContext, M4OSA_UInt32* pTime,
+    M4OSA_UInt32 tolerance)
 {
     VideoBrowserContext* pC = (VideoBrowserContext*)pContext;
     M4OSA_ERR err = M4NO_ERROR;
@@ -481,52 +486,15 @@
         bJumpNeeded = M4OSA_TRUE;
     }
 
-    if (M4OSA_TRUE == bJumpNeeded)
-    {
-        rapTime = targetTime;
-        /*--- Retrieve the previous RAP time ---*/
-        err = pC->m_3gpReader->m_pFctGetPrevRapTime(
-                pC->m_pReaderCtx, pC->m_pStreamHandler, &rapTime);
-
-        CHECK_ERR(videoBrowserPrepareFrame, err);
-
-        jumpTime = rapTime;
-
-        err = pC->m_3gpReader->m_pFctJump(pC->m_pReaderCtx,
-                                          pC->m_pStreamHandler,
-                                          (M4OSA_Int32*)&jumpTime);
-        CHECK_ERR(videoBrowserPrepareFrame, err);
-    }
-
     timeMS = (M4_MediaTime)targetTime;
     err = pC->m_pDecoder->m_pFctDecode(
-        pC->m_pDecoderCtx, &timeMS, bJumpNeeded);
+        pC->m_pDecoderCtx, &timeMS, bJumpNeeded, tolerance);
 
     if ((err != M4NO_ERROR) && (err != M4WAR_NO_MORE_AU))
     {
         return err;
     }
 
-    // FIXME:
-    // Not sure that I understand why we need a second jump logic here
-    if ((timeMS >= pC->m_currentCTS) && (M4OSA_TRUE == isBackward))
-    {
-        jumpTime = rapTime;
-        err = pC->m_3gpReader->m_pFctJump(
-            pC->m_pReaderCtx, pC->m_pStreamHandler, (M4OSA_Int32*)&jumpTime);
-
-        CHECK_ERR(videoBrowserPrepareFrame, err);
-
-        timeMS = (M4_MediaTime)rapTime;
-        err = pC->m_pDecoder->m_pFctDecode(
-            pC->m_pDecoderCtx, &timeMS, M4OSA_TRUE);
-
-        if ((err != M4NO_ERROR) && (err != M4WAR_NO_MORE_AU))
-        {
-            return err;
-        }
-    }
-
     err = pC->m_pDecoder->m_pFctRender(
         pC->m_pDecoderCtx, &timeMS, pC->m_outputPlane, M4OSA_TRUE);
 
diff --git a/media/jni/mediaeditor/VideoBrowserMain.h b/media/jni/mediaeditor/VideoBrowserMain.h
index 5156ebb..00b5e05 100755
--- a/media/jni/mediaeditor/VideoBrowserMain.h
+++ b/media/jni/mediaeditor/VideoBrowserMain.h
@@ -133,7 +133,8 @@
 *                                     this function with the reached time
 * @return       M4NO_ERROR / M4ERR_PARAMETER / M4ERR_STATE / M4ERR_ALLOC
 ******************************************************************************/
-M4OSA_ERR videoBrowserPrepareFrame(M4OSA_Context pContext, M4OSA_UInt32* pTime);
+M4OSA_ERR videoBrowserPrepareFrame(M4OSA_Context pContext, M4OSA_UInt32* pTime,
+        M4OSA_UInt32 tolerance);
 
 /******************************************************************************
 * @brief        This function sets the size and the position of the display.
diff --git a/media/jni/mediaeditor/VideoEditorMain.cpp b/media/jni/mediaeditor/VideoEditorMain.cpp
index c95a0c2..14972a2 100755
--- a/media/jni/mediaeditor/VideoEditorMain.cpp
+++ b/media/jni/mediaeditor/VideoEditorMain.cpp
@@ -763,7 +763,7 @@
             ClipProperties.uiVideoWidth,
             pContext->pEditSettings->pClipList[iCurrentClipIndex]->\
             ClipProperties.uiVideoHeight,
-            &tnTimeMs);
+            &tnTimeMs, 0);
         if (result != M4NO_ERROR) {
             free(pixelArray);
             ThumbnailClose(tnContext);
@@ -991,7 +991,7 @@
 
     result = ThumbnailGetPixels16(tnContext, (M4OSA_Int16 *)pixelArray,
                                                 frameWidth,
-                                                frameHeight, &timeMs);
+                                                frameHeight, &timeMs, 0);
     if (result != M4NO_ERROR) {
         free(pixelArray);
         ThumbnailClose(tnContext);
@@ -2132,7 +2132,7 @@
 
     m_dst32 = env->GetIntArrayElements(pixelArray, NULL);
 
-    err = ThumbnailGetPixels32(mContext, (M4OSA_Int32 *)m_dst32, width,height,&timeMS);
+    err = ThumbnailGetPixels32(mContext, (M4OSA_Int32 *)m_dst32, width,height,&timeMS,0);
     if (err != M4NO_ERROR ) {
         if (env != NULL) {
             jniThrowException(env, "java/lang/RuntimeException",\
@@ -2194,9 +2194,10 @@
 
     m_dst32 = env->GetIntArrayElements(pixelArray, NULL);
 
+    M4OSA_UInt32 tolerance = deltatimeMS / 2;
     do {
         err = ThumbnailGetPixels32(mContext, ((M4OSA_Int32 *)m_dst32 + arrayOffset),
-            width,height,&timeMS);
+            width,height,&timeMS, tolerance);
         if (err != M4NO_ERROR ) {
             if (env != NULL) {
                 jniThrowException(env, "java/lang/RuntimeException",\
diff --git a/media/jni/mediaeditor/VideoEditorThumbnailMain.cpp b/media/jni/mediaeditor/VideoEditorThumbnailMain.cpp
index fe3734f..1508246 100755
--- a/media/jni/mediaeditor/VideoEditorThumbnailMain.cpp
+++ b/media/jni/mediaeditor/VideoEditorThumbnailMain.cpp
@@ -74,7 +74,7 @@
 M4OSA_ERR ThumbnailGetPixels(const M4OSA_Context pContext,
                              M4OSA_Int32* pixelArray,
                              M4OSA_UInt32 width, M4OSA_UInt32 height,
-                             M4OSA_UInt32* pTimeMS);
+                             M4OSA_UInt32* pTimeMS, M4OSA_UInt32 tolerance);
 
 
 /**
@@ -219,7 +219,7 @@
 M4OSA_ERR ThumbnailGetPixels(const M4OSA_Context pContext,
                              M4OSA_Int32* pixelArray,
                              M4OSA_UInt32 width, M4OSA_UInt32 height,
-                             M4OSA_UInt32* pTimeMS)
+                             M4OSA_UInt32* pTimeMS, M4OSA_UInt32 tolerance)
 {
     M4OSA_ERR err;
 
@@ -249,7 +249,7 @@
         pC->m_previousTime = *pTimeMS;
     }
 
-    err = videoBrowserPrepareFrame(pC->m_pVideoBrowser, pTimeMS);
+    err = videoBrowserPrepareFrame(pC->m_pVideoBrowser, pTimeMS, tolerance);
     CHECK_ERR(ThumbnailGetPixels, err);
 
     if (pC->m_bRender != M4OSA_TRUE) {
@@ -264,7 +264,8 @@
 
 M4OSA_ERR ThumbnailGetPixels32(const M4OSA_Context pContext,
                          M4OSA_Int32* pixelArray, M4OSA_UInt32 width,
-                         M4OSA_UInt32 height, M4OSA_UInt32* timeMS)
+                         M4OSA_UInt32 height, M4OSA_UInt32* timeMS,
+                         M4OSA_UInt32 tolerance)
 {
 
     M4OSA_ERR err = M4NO_ERROR;
@@ -277,7 +278,7 @@
     pC->m_dst16 = NULL;
     pC->m_dst32 = pixelArray;
 
-    err = ThumbnailGetPixels(pContext, pixelArray, width, height, timeMS);
+    err = ThumbnailGetPixels(pContext, pixelArray, width, height, timeMS, tolerance);
 
 ThumbnailGetPixels32_cleanUp:
 
@@ -286,7 +287,8 @@
 
 M4OSA_ERR ThumbnailGetPixels16(const M4OSA_Context pContext,
                          M4OSA_Int16* pixelArray, M4OSA_UInt32 width,
-                         M4OSA_UInt32 height, M4OSA_UInt32* timeMS)
+                         M4OSA_UInt32 height, M4OSA_UInt32* timeMS,
+                         M4OSA_UInt32 tolerance)
 {
     M4OSA_ERR err = M4NO_ERROR;
 
@@ -298,7 +300,8 @@
     pC->m_dst16 = pixelArray;
     pC->m_dst32 = NULL;
 
-    err = ThumbnailGetPixels(pContext, (M4OSA_Int32*)pixelArray, width, height, timeMS);
+    err = ThumbnailGetPixels(pContext, (M4OSA_Int32*)pixelArray, width, height,
+            timeMS, tolerance);
 
 ThumbnailGetPixels16_cleanUp:
 
diff --git a/media/jni/mediaeditor/VideoEditorThumbnailMain.h b/media/jni/mediaeditor/VideoEditorThumbnailMain.h
index 14c60dd..0b3b0c8 100755
--- a/media/jni/mediaeditor/VideoEditorThumbnailMain.h
+++ b/media/jni/mediaeditor/VideoEditorThumbnailMain.h
@@ -49,7 +49,8 @@
 */
 M4OSA_ERR ThumbnailGetPixels32(const M4OSA_Context pContext,
                              M4OSA_Int32* pixelArray, M4OSA_UInt32 width,
-                             M4OSA_UInt32 height, M4OSA_UInt32 *timeMS);
+                             M4OSA_UInt32 height, M4OSA_UInt32 *timeMS,
+                             M4OSA_UInt32 tolerance);
 
 /**
  ************************************************************************
@@ -63,7 +64,8 @@
 */
 M4OSA_ERR ThumbnailGetPixels16(const M4OSA_Context pContext,
                              M4OSA_Int16* pixelArray, M4OSA_UInt32 width,
-                             M4OSA_UInt32 height, M4OSA_UInt32 *timeMS);
+                             M4OSA_UInt32 height, M4OSA_UInt32 *timeMS,
+                             M4OSA_UInt32 tolerance);
 
 /**
  ************************************************************************
diff --git a/packages/SystemUI/res/values-bg/donottranslate.xml b/packages/SystemUI/res/values-bg/donottranslate.xml
new file mode 100644
index 0000000..dcf434d
--- /dev/null
+++ b/packages/SystemUI/res/values-bg/donottranslate.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2009, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0 
+ *
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- For formatting day of week and date in DateView.  Day of week precedes date by default,
+         but this may be overridden on a per-locale basis if necessary. -->
+    <string name="status_bar_date_formatter">%2$s\n%1$s</string>
+
+</resources>
diff --git a/packages/SystemUI/res/values-hu/donottranslate.xml b/packages/SystemUI/res/values-hu/donottranslate.xml
new file mode 100644
index 0000000..dcf434d
--- /dev/null
+++ b/packages/SystemUI/res/values-hu/donottranslate.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2009, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0 
+ *
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- For formatting day of week and date in DateView.  Day of week precedes date by default,
+         but this may be overridden on a per-locale basis if necessary. -->
+    <string name="status_bar_date_formatter">%2$s\n%1$s</string>
+
+</resources>
diff --git a/packages/SystemUI/res/values-ja/donottranslate.xml b/packages/SystemUI/res/values-ja/donottranslate.xml
new file mode 100644
index 0000000..dcf434d
--- /dev/null
+++ b/packages/SystemUI/res/values-ja/donottranslate.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2009, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0 
+ *
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- For formatting day of week and date in DateView.  Day of week precedes date by default,
+         but this may be overridden on a per-locale basis if necessary. -->
+    <string name="status_bar_date_formatter">%2$s\n%1$s</string>
+
+</resources>
diff --git a/packages/SystemUI/res/values-ko/donottranslate.xml b/packages/SystemUI/res/values-ko/donottranslate.xml
new file mode 100644
index 0000000..dcf434d
--- /dev/null
+++ b/packages/SystemUI/res/values-ko/donottranslate.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2009, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0 
+ *
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- For formatting day of week and date in DateView.  Day of week precedes date by default,
+         but this may be overridden on a per-locale basis if necessary. -->
+    <string name="status_bar_date_formatter">%2$s\n%1$s</string>
+
+</resources>
diff --git a/packages/SystemUI/res/values-lt/donottranslate.xml b/packages/SystemUI/res/values-lt/donottranslate.xml
new file mode 100644
index 0000000..dcf434d
--- /dev/null
+++ b/packages/SystemUI/res/values-lt/donottranslate.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2009, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0 
+ *
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- For formatting day of week and date in DateView.  Day of week precedes date by default,
+         but this may be overridden on a per-locale basis if necessary. -->
+    <string name="status_bar_date_formatter">%2$s\n%1$s</string>
+
+</resources>
diff --git a/packages/SystemUI/res/values-tr/donottranslate.xml b/packages/SystemUI/res/values-tr/donottranslate.xml
new file mode 100644
index 0000000..dcf434d
--- /dev/null
+++ b/packages/SystemUI/res/values-tr/donottranslate.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2009, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0 
+ *
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- For formatting day of week and date in DateView.  Day of week precedes date by default,
+         but this may be overridden on a per-locale basis if necessary. -->
+    <string name="status_bar_date_formatter">%2$s\n%1$s</string>
+
+</resources>
diff --git a/packages/SystemUI/res/values-zh-rCN/donottranslate.xml b/packages/SystemUI/res/values-zh-rCN/donottranslate.xml
new file mode 100644
index 0000000..dcf434d
--- /dev/null
+++ b/packages/SystemUI/res/values-zh-rCN/donottranslate.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2009, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0 
+ *
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- For formatting day of week and date in DateView.  Day of week precedes date by default,
+         but this may be overridden on a per-locale basis if necessary. -->
+    <string name="status_bar_date_formatter">%2$s\n%1$s</string>
+
+</resources>
diff --git a/packages/SystemUI/res/values-zh-rTW/donottranslate.xml b/packages/SystemUI/res/values-zh-rTW/donottranslate.xml
new file mode 100644
index 0000000..dcf434d
--- /dev/null
+++ b/packages/SystemUI/res/values-zh-rTW/donottranslate.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2009, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0 
+ *
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- For formatting day of week and date in DateView.  Day of week precedes date by default,
+         but this may be overridden on a per-locale basis if necessary. -->
+    <string name="status_bar_date_formatter">%2$s\n%1$s</string>
+
+</resources>
diff --git a/packages/SystemUI/res/values/donottranslate.xml b/packages/SystemUI/res/values/donottranslate.xml
new file mode 100644
index 0000000..c25a5b7
--- /dev/null
+++ b/packages/SystemUI/res/values/donottranslate.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2009, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0 
+ *
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- For formatting day of week and date in DateView.  Day of week precedes date by default,
+         but this may be overridden on a per-locale basis if necessary. -->
+    <string name="status_bar_date_formatter">%1$s\n%2$s</string>
+
+</resources>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 03b82fd..7779703 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -41,10 +41,6 @@
     <!-- Title shown in recents popup for inspecting an application's properties -->
     <string name="status_bar_recent_inspect_item_title">Inspect</string>
 
-    <!-- For formatting day of week and date in DateView.  Day of week precedes date by default,
-         but this may be overridden on a per-locale basis if necessary. -->
-    <string name="status_bar_date_formatter">%1$s\n%2$s</string>
-
     <!-- The label in the bar at the top of the status bar when there are no notifications
          showing.  [CHAR LIMIT=40]-->
     <string name="status_bar_no_notifications_title">No notifications</string>
diff --git a/services/java/com/android/server/am/AppErrorDialog.java b/services/java/com/android/server/am/AppErrorDialog.java
index 917259a..a769c05 100644
--- a/services/java/com/android/server/am/AppErrorDialog.java
+++ b/services/java/com/android/server/am/AppErrorDialog.java
@@ -60,12 +60,12 @@
 
         setCancelable(false);
 
-        setButton(DialogInterface.BUTTON_NEGATIVE,
+        setButton(DialogInterface.BUTTON_POSITIVE,
                 res.getText(com.android.internal.R.string.force_close),
                 mHandler.obtainMessage(FORCE_QUIT));
 
         if (app.errorReportReceiver != null) {
-            setButton(DialogInterface.BUTTON_POSITIVE,
+            setButton(DialogInterface.BUTTON_NEGATIVE,
                     res.getText(com.android.internal.R.string.report),
                     mHandler.obtainMessage(FORCE_QUIT_AND_REPORT));
         }
diff --git a/services/java/com/android/server/am/AppNotRespondingDialog.java b/services/java/com/android/server/am/AppNotRespondingDialog.java
index b40f87a..b546ae7 100644
--- a/services/java/com/android/server/am/AppNotRespondingDialog.java
+++ b/services/java/com/android/server/am/AppNotRespondingDialog.java
@@ -77,15 +77,15 @@
                 ? res.getString(resid, name1.toString(), name2.toString())
                 : res.getString(resid, name1.toString()));
 
-        setButton(DialogInterface.BUTTON_NEGATIVE,
+        setButton(DialogInterface.BUTTON_POSITIVE,
                 res.getText(com.android.internal.R.string.force_close),
                 mHandler.obtainMessage(FORCE_CLOSE));
-        setButton(DialogInterface.BUTTON_NEUTRAL,
+        setButton(DialogInterface.BUTTON_NEGATIVE,
                 res.getText(com.android.internal.R.string.wait),
                 mHandler.obtainMessage(WAIT));
 
         if (app.errorReportReceiver != null) {
-            setButton(DialogInterface.BUTTON_POSITIVE,
+            setButton(DialogInterface.BUTTON_NEUTRAL,
                     res.getText(com.android.internal.R.string.report),
                     mHandler.obtainMessage(WAIT_AND_REPORT));
         }
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 558ba3e..5967428 100644
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -2052,7 +2052,7 @@
                 String name = win.makeInputChannelName();
                 InputChannel[] inputChannels = InputChannel.openInputChannelPair(name);
                 win.mInputChannel = inputChannels[0];
-                inputChannels[1].transferToBinderOutParameter(outInputChannel);
+                inputChannels[1].transferTo(outInputChannel);
                 
                 mInputManager.registerInputChannel(win.mInputChannel, win.mInputWindowHandle);
             }