Merge "Move the volume, media, call, camera and search key handling from PhoneWindow to a new PhoneFallbackEventHandler class that is used for all windows, not just ones with decors."
diff --git a/api/current.xml b/api/current.xml
index d7382eb..ef49855 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -1482,6 +1482,17 @@
  visibility="public"
 >
 </constructor>
+<field name="accelerate_cubic_interpolator"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432591"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="accelerate_decelerate_interpolator"
  type="int"
  transient="false"
@@ -1504,6 +1515,17 @@
  visibility="public"
 >
 </field>
+<field name="accelerate_quint_interpolator"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432593"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="animator_fade_in"
  type="int"
  transient="false"
@@ -1570,6 +1592,17 @@
  visibility="public"
 >
 </field>
+<field name="decelerate_cubic_interpolator"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432592"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="decelerate_interpolator"
  type="int"
  transient="false"
@@ -1581,6 +1614,17 @@
  visibility="public"
 >
 </field>
+<field name="decelerate_quint_interpolator"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17432594"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="fade_in"
  type="int"
  transient="false"
@@ -28021,13 +28065,22 @@
 </parameter>
 </method>
 </class>
-<interface name="FragmentManager"
+<class name="FragmentManager"
+ extends="java.lang.Object"
  abstract="true"
  static="false"
  final="false"
  deprecated="not deprecated"
  visibility="public"
 >
+<constructor name="FragmentManager"
+ type="android.app.FragmentManager"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
 <method name="addOnBackStackChangedListener"
  return="void"
  abstract="true"
@@ -28218,7 +28271,7 @@
  visibility="public"
 >
 </field>
-</interface>
+</class>
 <interface name="FragmentManager.BackStackEntry"
  abstract="true"
  static="true"
@@ -28279,13 +28332,22 @@
 >
 </method>
 </interface>
-<interface name="FragmentTransaction"
+<class name="FragmentTransaction"
+ extends="java.lang.Object"
  abstract="true"
  static="false"
  final="false"
  deprecated="not deprecated"
  visibility="public"
 >
+<constructor name="FragmentTransaction"
+ type="android.app.FragmentTransaction"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
 <method name="add"
  return="android.app.FragmentTransaction"
  abstract="true"
@@ -28357,6 +28419,17 @@
  visibility="public"
 >
 </method>
+<method name="commitAllowingStateLoss"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
 <method name="disallowAddToBackStack"
  return="android.app.FragmentTransaction"
  abstract="true"
@@ -28642,7 +28715,7 @@
  visibility="public"
 >
 </field>
-</interface>
+</class>
 <class name="Instrumentation"
  extends="java.lang.Object"
  abstract="false"
@@ -30237,13 +30310,22 @@
 </parameter>
 </method>
 </class>
-<interface name="LoaderManager"
+<class name="LoaderManager"
+ extends="java.lang.Object"
  abstract="true"
  static="false"
  final="false"
  deprecated="not deprecated"
  visibility="public"
 >
+<constructor name="LoaderManager"
+ type="android.app.LoaderManager"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
 <method name="getLoader"
  return="android.content.Loader&lt;D&gt;"
  abstract="true"
@@ -30304,7 +30386,7 @@
 <parameter name="id" type="int">
 </parameter>
 </method>
-</interface>
+</class>
 <interface name="LoaderManager.LoaderCallbacks"
  abstract="true"
  static="true"
@@ -30348,7 +30430,7 @@
  abstract="true"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <implements name="android.content.Loader.OnLoadCompleteListener">
@@ -99177,6 +99259,17 @@
  visibility="public"
 >
 </field>
+<field name="TAG_APERTURE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;FNumber&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="TAG_DATETIME"
  type="java.lang.String"
  transient="false"
@@ -99188,6 +99281,17 @@
  visibility="public"
 >
 </field>
+<field name="TAG_EXPOSURE_TIME"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;ExposureTime&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="TAG_FLASH"
  type="java.lang.String"
  transient="false"
@@ -99331,6 +99435,17 @@
  visibility="public"
 >
 </field>
+<field name="TAG_ISO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;ISOSpeedRatings&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="TAG_MAKE"
  type="java.lang.String"
  transient="false"
@@ -100944,6 +101059,19 @@
 <parameter name="listener" type="android.media.MediaRecorder.OnInfoListener">
 </parameter>
 </method>
+<method name="setOrientationHint"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="degrees" type="int">
+</parameter>
+</method>
 <method name="setOutputFile"
  return="void"
  abstract="false"
@@ -195001,7 +195129,7 @@
  visibility="public"
 >
 </method>
-<method name="isCapsLockLatched"
+<method name="isCapsLockOn"
  return="boolean"
  abstract="false"
  native="false"
@@ -195069,7 +195197,7 @@
 <parameter name="keyCode" type="int">
 </parameter>
 </method>
-<method name="isNumLockLatched"
+<method name="isNumLockOn"
  return="boolean"
  abstract="false"
  native="false"
@@ -195091,7 +195219,7 @@
  visibility="public"
 >
 </method>
-<method name="isScrollLockLatched"
+<method name="isScrollLockOn"
  return="boolean"
  abstract="false"
  native="false"
@@ -197184,7 +197312,7 @@
  visibility="public"
 >
 </field>
-<field name="META_CAPS_LOCK_LATCHED"
+<field name="META_CAPS_LOCK_ON"
  type="int"
  transient="false"
  volatile="false"
@@ -197272,7 +197400,7 @@
  visibility="public"
 >
 </field>
-<field name="META_NUM_LOCK_LATCHED"
+<field name="META_NUM_LOCK_ON"
  type="int"
  transient="false"
  volatile="false"
@@ -197283,7 +197411,7 @@
  visibility="public"
 >
 </field>
-<field name="META_SCROLL_LOCK_LATCHED"
+<field name="META_SCROLL_LOCK_ON"
  type="int"
  transient="false"
  volatile="false"
@@ -245869,7 +245997,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/BackStackRecord.java b/core/java/android/app/BackStackRecord.java
index c75777d..e9b6869 100644
--- a/core/java/android/app/BackStackRecord.java
+++ b/core/java/android/app/BackStackRecord.java
@@ -155,7 +155,7 @@
 /**
  * @hide Entry of an operation on the fragment back stack.
  */
-final class BackStackRecord implements FragmentTransaction,
+final class BackStackRecord extends FragmentTransaction implements
         FragmentManager.BackStackEntry, Runnable {
     static final String TAG = "BackStackEntry";
 
@@ -417,6 +417,14 @@
     }
 
     public int commit() {
+        return commitInternal(false);
+    }
+
+    public int commitAllowingStateLoss() {
+        return commitInternal(true);
+    }
+    
+    int commitInternal(boolean allowStateLoss) {
         if (mCommitted) throw new IllegalStateException("commit already called");
         if (FragmentManagerImpl.DEBUG) Log.v(TAG, "Commit: " + this);
         mCommitted = true;
@@ -425,10 +433,10 @@
         } else {
             mIndex = -1;
         }
-        mManager.enqueueAction(this);
+        mManager.enqueueAction(this, allowStateLoss);
         return mIndex;
     }
-
+    
     public void run() {
         if (FragmentManagerImpl.DEBUG) Log.v(TAG, "Run: " + this);
 
diff --git a/core/java/android/app/DialogFragment.java b/core/java/android/app/DialogFragment.java
index 8e2389b..cbecc21 100644
--- a/core/java/android/app/DialogFragment.java
+++ b/core/java/android/app/DialogFragment.java
@@ -256,6 +256,10 @@
      * the fragment.
      */
     public void dismiss() {
+        dismissInternal(false);
+    }
+
+    void dismissInternal(boolean allowStateLoss) {
         if (mDialog != null) {
             mDialog.dismiss();
             mDialog = null;
@@ -271,7 +275,7 @@
             ft.commit();
         }
     }
-
+    
     public Dialog getDialog() {
         return mDialog;
     }
@@ -353,7 +357,11 @@
 
     public void onDismiss(DialogInterface dialog) {
         if (!mRemoved) {
-            dismiss();
+            // Note: we need to use allowStateLoss, because the dialog
+            // dispatches this asynchronously so we can receive the call
+            // after the activity is paused.  Worst case, when the user comes
+            // back to the activity they see the dialog again.
+            dismissInternal(true);
         }
     }
 
diff --git a/core/java/android/app/DownloadManager.java b/core/java/android/app/DownloadManager.java
index 08ccab6..01414fa 100644
--- a/core/java/android/app/DownloadManager.java
+++ b/core/java/android/app/DownloadManager.java
@@ -352,6 +352,17 @@
         private int mAllowedNetworkTypes = ~0; // default to all network types allowed
         private boolean mIsVisibleInDownloadsUi = true;
         private boolean mScannable = false;
+        /** if a file is designated as a MediaScanner scannable file, the following value is
+         * stored in the database column {@link Downloads.Impl#COLUMN_MEDIA_SCANNED}.
+         */
+        private static final int SCANNABLE_VALUE_YES = 0;
+        // value of 1 is stored in the above column by DownloadProvider after it is scanned by
+        // MediaScanner
+        /** if a file is designated as a file that should not be scanned by MediaScanner,
+         * the following value is stored in the database column
+         * {@link Downloads.Impl#COLUMN_MEDIA_SCANNED}.
+         */
+        private static final int SCANNABLE_VALUE_NO = 2;
 
         /**
          * This download is visible but only shows in the notifications
@@ -605,7 +616,8 @@
                            Downloads.Impl.DESTINATION_CACHE_PARTITION_PURGEABLE);
             }
             // is the file supposed to be media-scannable?
-            values.put(Downloads.Impl.COLUMN_MEDIA_SCANNED, (mScannable) ? 0 : 2);
+            values.put(Downloads.Impl.COLUMN_MEDIA_SCANNED, (mScannable) ? SCANNABLE_VALUE_YES :
+                    SCANNABLE_VALUE_NO);
 
             if (!mRequestHeaders.isEmpty()) {
                 encodeHttpHeaders(values);
@@ -899,7 +911,7 @@
      * by any app to access the downloaded file.
      *
      * @param id the id of the downloaded file.
-     * @return the {@link Uri} for the given downloaded file id, if donload was successful. null
+     * @return the {@link Uri} for the given downloaded file id, if download was successful. null
      * otherwise.
      */
     public Uri getUriForDownloadedFile(long id) {
@@ -919,7 +931,7 @@
                             Downloads.Impl.COLUMN_DESTINATION);
                     int destination = cursor.getInt(indx);
                     // TODO: if we ever add API to DownloadManager to let the caller specify
-                    // non-external storage for a donloaded file, then the following code
+                    // non-external storage for a downloaded file, then the following code
                     // should also check for that destination.
                     if (destination == Downloads.Impl.DESTINATION_CACHE_PARTITION ||
                             destination == Downloads.Impl.DESTINATION_CACHE_PARTITION_NOROAMING ||
diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java
index 512ca16..11de6a6 100644
--- a/core/java/android/app/FragmentManager.java
+++ b/core/java/android/app/FragmentManager.java
@@ -40,7 +40,7 @@
  * Interface for interacting with {@link Fragment} objects inside of an
  * {@link Activity}
  */
-public interface FragmentManager {
+public abstract class FragmentManager {
     /**
      * Representation of an entry on the fragment back stack, as created
      * with {@link FragmentTransaction#addToBackStack(String)
@@ -96,7 +96,7 @@
      * in the state, and if changes are made after the state is saved then they
      * will be lost.</p>
      */
-    public FragmentTransaction openTransaction();
+    public abstract FragmentTransaction openTransaction();
 
     /**
      * Finds a fragment that was identified by the given id either when inflated
@@ -106,7 +106,7 @@
      * on the back stack associated with this ID are searched.
      * @return The fragment if found or null otherwise.
      */
-    public Fragment findFragmentById(int id);
+    public abstract Fragment findFragmentById(int id);
 
     /**
      * Finds a fragment that was identified by the given tag either when inflated
@@ -116,7 +116,7 @@
      * on the back stack are searched.
      * @return The fragment if found or null otherwise.
      */
-    public Fragment findFragmentByTag(String tag);
+    public abstract Fragment findFragmentByTag(String tag);
 
     /**
      * Flag for {@link #popBackStack(String, int)}
@@ -132,7 +132,7 @@
      * Pop the top state off the back stack.  Returns true if there was one
      * to pop, else false.
      */
-    public boolean popBackStack();
+    public abstract boolean popBackStack();
 
     /**
      * Pop the last fragment transition from the manager's fragment
@@ -143,7 +143,7 @@
      * the named state itself is popped. If null, only the top state is popped.
      * @param flags Either 0 or {@link #POP_BACK_STACK_INCLUSIVE}.
      */
-    public boolean popBackStack(String name, int flags);
+    public abstract boolean popBackStack(String name, int flags);
 
     /**
      * Pop all back stack states up to the one with the given identifier.
@@ -155,29 +155,29 @@
      * the named state itself is popped.
      * @param flags Either 0 or {@link #POP_BACK_STACK_INCLUSIVE}.
      */
-    public boolean popBackStack(int id, int flags);
+    public abstract boolean popBackStack(int id, int flags);
 
     /**
      * Return the number of entries currently in the back stack.
      */
-    public int countBackStackEntries();
+    public abstract int countBackStackEntries();
 
     /**
      * Return the BackStackEntry at index <var>index</var> in the back stack;
      * entries start index 0 being the bottom of the stack.
      */
-    public BackStackEntry getBackStackEntry(int index);
+    public abstract BackStackEntry getBackStackEntry(int index);
 
     /**
      * Add a new listener for changes to the fragment back stack.
      */
-    public void addOnBackStackChangedListener(OnBackStackChangedListener listener);
+    public abstract void addOnBackStackChangedListener(OnBackStackChangedListener listener);
 
     /**
      * Remove a listener that was previously added with
      * {@link #addOnBackStackChangedListener(OnBackStackChangedListener)}.
      */
-    public void removeOnBackStackChangedListener(OnBackStackChangedListener listener);
+    public abstract void removeOnBackStackChangedListener(OnBackStackChangedListener listener);
 
     /**
      * Put a reference to a fragment in a Bundle.  This Bundle can be
@@ -189,7 +189,7 @@
      * @param key The name of the entry in the bundle.
      * @param fragment The Fragment whose reference is to be stored.
      */
-    public void putFragment(Bundle bundle, String key, Fragment fragment);
+    public abstract void putFragment(Bundle bundle, String key, Fragment fragment);
 
     /**
      * Retrieve the current Fragment instance for a reference previously
@@ -200,7 +200,7 @@
      * @return Returns the current Fragment instance that is associated with
      * the given reference.
      */
-    public Fragment getFragment(Bundle bundle, String key);
+    public abstract Fragment getFragment(Bundle bundle, String key);
 
     /**
      * Print the FragmentManager's state into the given stream.
@@ -210,7 +210,7 @@
      * @param writer A PrintWriter to which the dump is to be set.
      * @param args additional arguments to the dump request.
      */
-    public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args);
+    public abstract void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args);
 }
 
 final class FragmentManagerState implements Parcelable {
@@ -252,7 +252,7 @@
 /**
  * Container for fragments associated with an activity.
  */
-final class FragmentManagerImpl implements FragmentManager {
+final class FragmentManagerImpl extends FragmentManager {
     static final boolean DEBUG = true;
     static final String TAG = "FragmentManager";
     
@@ -849,8 +849,8 @@
         return null;
     }
     
-    public void enqueueAction(Runnable action) {
-        if (mStateSaved) {
+    public void enqueueAction(Runnable action, boolean allowStateLoss) {
+        if (!allowStateLoss && mStateSaved) {
             throw new IllegalStateException(
                     "Can not perform this action after onSaveInstanceState");
         }
@@ -991,7 +991,7 @@
                     bss.popFromBackStack(true);
                     reportBackStackChanged();
                 }
-            });
+            }, false);
         } else {
             int index = -1;
             if (name != null || id >= 0) {
@@ -1042,7 +1042,7 @@
                     }
                     reportBackStackChanged();
                 }
-            });
+            }, false);
         }
         return true;
     }
diff --git a/core/java/android/app/FragmentTransaction.java b/core/java/android/app/FragmentTransaction.java
index 19da763..dc4acbe 100644
--- a/core/java/android/app/FragmentTransaction.java
+++ b/core/java/android/app/FragmentTransaction.java
@@ -3,16 +3,16 @@
 /**
  * API for performing a set of Fragment operations.
  */
-public interface FragmentTransaction {
+public abstract class FragmentTransaction {
     /**
      * Calls {@link #add(int, Fragment, String)} with a 0 containerViewId.
      */
-    public FragmentTransaction add(Fragment fragment, String tag);
+    public abstract FragmentTransaction add(Fragment fragment, String tag);
     
     /**
      * Calls {@link #add(int, Fragment, String)} with a null tag.
      */
-    public FragmentTransaction add(int containerViewId, Fragment fragment);
+    public abstract FragmentTransaction add(int containerViewId, Fragment fragment);
     
     /**
      * Add a fragment to the activity state.  This fragment may optionally
@@ -29,12 +29,12 @@
      * 
      * @return Returns the same FragmentTransaction instance.
      */
-    public FragmentTransaction add(int containerViewId, Fragment fragment, String tag);
+    public abstract FragmentTransaction add(int containerViewId, Fragment fragment, String tag);
     
     /**
      * Calls {@link #replace(int, Fragment, String)} with a null tag.
      */
-    public FragmentTransaction replace(int containerViewId, Fragment fragment);
+    public abstract FragmentTransaction replace(int containerViewId, Fragment fragment);
     
     /**
      * Replace an existing fragment that was added to a container.  This is
@@ -52,7 +52,7 @@
      * 
      * @return Returns the same FragmentTransaction instance.
      */
-    public FragmentTransaction replace(int containerViewId, Fragment fragment, String tag);
+    public abstract FragmentTransaction replace(int containerViewId, Fragment fragment, String tag);
     
     /**
      * Remove an existing fragment.  If it was added to a container, its view
@@ -62,7 +62,7 @@
      * 
      * @return Returns the same FragmentTransaction instance.
      */
-    public FragmentTransaction remove(Fragment fragment);
+    public abstract FragmentTransaction remove(Fragment fragment);
     
     /**
      * Hides an existing fragment.  This is only relevant for fragments whose
@@ -73,7 +73,7 @@
      * 
      * @return Returns the same FragmentTransaction instance.
      */
-    public FragmentTransaction hide(Fragment fragment);
+    public abstract FragmentTransaction hide(Fragment fragment);
     
     /**
      * Hides a previously hidden fragment.  This is only relevant for fragments whose
@@ -84,55 +84,55 @@
      * 
      * @return Returns the same FragmentTransaction instance.
      */
-    public FragmentTransaction show(Fragment fragment);
+    public abstract FragmentTransaction show(Fragment fragment);
 
     /**
      * @return <code>true</code> if this transaction contains no operations,
      * <code>false</code> otherwise.
      */
-    public boolean isEmpty();
+    public abstract boolean isEmpty();
     
     /**
      * Bit mask that is set for all enter transitions.
      */
-    public final int TRANSIT_ENTER_MASK = 0x1000;
+    public static final int TRANSIT_ENTER_MASK = 0x1000;
     
     /**
      * Bit mask that is set for all exit transitions.
      */
-    public final int TRANSIT_EXIT_MASK = 0x2000;
+    public static final int TRANSIT_EXIT_MASK = 0x2000;
     
     /** Not set up for a transition. */
-    public final int TRANSIT_UNSET = -1;
+    public static final int TRANSIT_UNSET = -1;
     /** No animation for transition. */
-    public final int TRANSIT_NONE = 0;
+    public static final int TRANSIT_NONE = 0;
     /** Fragment is being added onto the stack */
-    public final int TRANSIT_FRAGMENT_OPEN = 1 | TRANSIT_ENTER_MASK;
+    public static final int TRANSIT_FRAGMENT_OPEN = 1 | TRANSIT_ENTER_MASK;
     /** Fragment is being removed from the stack */
-    public final int TRANSIT_FRAGMENT_CLOSE = 2 | TRANSIT_EXIT_MASK;
+    public static final int TRANSIT_FRAGMENT_CLOSE = 2 | TRANSIT_EXIT_MASK;
     /** Fragment is being added in a 'next' operation*/
-    public final int TRANSIT_FRAGMENT_NEXT = 3 | TRANSIT_ENTER_MASK;
+    public static final int TRANSIT_FRAGMENT_NEXT = 3 | TRANSIT_ENTER_MASK;
     /** Fragment is being removed in a 'previous' operation */
-    public final int TRANSIT_FRAGMENT_PREV = 4 | TRANSIT_EXIT_MASK;
+    public static final int TRANSIT_FRAGMENT_PREV = 4 | TRANSIT_EXIT_MASK;
 
     /**
      * Set specific animation resources to run for the fragments that are
      * entering and exiting in this transaction.
      */
-    public FragmentTransaction setCustomAnimations(int enter, int exit);
+    public abstract FragmentTransaction setCustomAnimations(int enter, int exit);
     
     /**
      * Select a standard transition animation for this transaction.  May be
      * one of {@link #TRANSIT_NONE}, {@link #TRANSIT_FRAGMENT_OPEN},
      * or {@link #TRANSIT_FRAGMENT_CLOSE}
      */
-    public FragmentTransaction setTransition(int transit);
+    public abstract FragmentTransaction setTransition(int transit);
 
     /**
      * Set a custom style resource that will be used for resolving transit
      * animations.
      */
-    public FragmentTransaction setTransitionStyle(int styleRes);
+    public abstract FragmentTransaction setTransitionStyle(int styleRes);
     
     /**
      * Add this transaction to the back stack.  This means that the transaction
@@ -141,7 +141,7 @@
      *
      * @param name An optional name for this back stack state, or null.
      */
-    public FragmentTransaction addToBackStack(String name);
+    public abstract FragmentTransaction addToBackStack(String name);
 
     /**
      * Returns true if this FragmentTransaction is allowed to be added to the back
@@ -150,14 +150,14 @@
      *
      * @return True if {@link #addToBackStack(String)} is permitted on this transaction.
      */
-    public boolean isAddToBackStackAllowed();
+    public abstract boolean isAddToBackStackAllowed();
 
     /**
      * Disallow calls to {@link #addToBackStack(String)}. Any future calls to
      * addToBackStack will throw {@link IllegalStateException}. If addToBackStack
      * has already been called, this method will throw IllegalStateException.
      */
-    public FragmentTransaction disallowAddToBackStack();
+    public abstract FragmentTransaction disallowAddToBackStack();
 
     /**
      * Set the full title to show as a bread crumb when this transaction
@@ -165,14 +165,14 @@
      *
      * @param res A string resource containing the title.
      */
-    public FragmentTransaction setBreadCrumbTitle(int res);
+    public abstract FragmentTransaction setBreadCrumbTitle(int res);
 
     /**
      * Like {@link #setBreadCrumbTitle(int)} but taking a raw string; this
      * method is <em>not</em> recommended, as the string can not be changed
      * later if the locale changes.
      */
-    public FragmentTransaction setBreadCrumbTitle(CharSequence text);
+    public abstract FragmentTransaction setBreadCrumbTitle(CharSequence text);
 
     /**
      * Set the short title to show as a bread crumb when this transaction
@@ -180,23 +180,39 @@
      *
      * @param res A string resource containing the title.
      */
-    public FragmentTransaction setBreadCrumbShortTitle(int res);
+    public abstract FragmentTransaction setBreadCrumbShortTitle(int res);
 
     /**
      * Like {@link #setBreadCrumbShortTitle(int)} but taking a raw string; this
      * method is <em>not</em> recommended, as the string can not be changed
      * later if the locale changes.
      */
-    public FragmentTransaction setBreadCrumbShortTitle(CharSequence text);
+    public abstract FragmentTransaction setBreadCrumbShortTitle(CharSequence text);
 
     /**
-     * Schedules a commit of this transaction.  Note that the commit does
+     * Schedules a commit of this transaction.  The commit does
      * not happen immediately; it will be scheduled as work on the main thread
      * to be done the next time that thread is ready.
      *
+     * <p class="note">A transaction can only be committed with this method
+     * prior to its containing activity saving its state.  If the commit is
+     * attempted after that point, an exception will be thrown.  This is
+     * because the state after the commit can be lost if the activity needs to
+     * be restored from its state.  See {@link #commitAllowingStateLoss()} for
+     * situations where it may be okay to lose the commit.</p>
+     * 
      * @return Returns the identifier of this transaction's back stack entry,
      * if {@link #addToBackStack(String)} had been called.  Otherwise, returns
      * a negative number.
      */
-    public int commit();
+    public abstract int commit();
+
+    /**
+     * Like {@link #commit} but allows the commit to be executed after an
+     * activity's state is saved.  This is dangerous because the commit can
+     * be lost if the activity needs to later be restored from its state, so
+     * this should only be used for cases where it is okay for the UI state
+     * to change unexpectedly on the user.
+     */
+    public abstract int commitAllowingStateLoss();
 }
diff --git a/core/java/android/app/LoaderManager.java b/core/java/android/app/LoaderManager.java
index 4d4ea9a..7ae4b95 100644
--- a/core/java/android/app/LoaderManager.java
+++ b/core/java/android/app/LoaderManager.java
@@ -25,7 +25,7 @@
  * Interface associated with an {@link Activity} or {@link Fragment} for managing
  * one or more {@link android.content.Loader} instances associated with it.
  */
-public interface LoaderManager {
+public abstract class LoaderManager {
     /**
      * Callback interface for a client to interact with the manager.
      */
@@ -66,7 +66,7 @@
      * be called immediately (inside of this function), so you must be prepared
      * for this to happen.
      */
-    public <D> Loader<D> initLoader(int id, Bundle args,
+    public abstract <D> Loader<D> initLoader(int id, Bundle args,
             LoaderManager.LoaderCallbacks<D> callback);
 
     /**
@@ -77,22 +77,22 @@
      * its work. The callback will be delivered before the old loader
      * is destroyed.
      */
-    public <D> Loader<D> restartLoader(int id, Bundle args,
+    public abstract <D> Loader<D> restartLoader(int id, Bundle args,
             LoaderManager.LoaderCallbacks<D> callback);
 
     /**
      * Stops and removes the loader with the given ID.
      */
-    public void stopLoader(int id);
+    public abstract void stopLoader(int id);
 
     /**
      * Return the Loader with the given id or null if no matching Loader
      * is found.
      */
-    public <D> Loader<D> getLoader(int id);
+    public abstract <D> Loader<D> getLoader(int id);
 }
 
-class LoaderManagerImpl implements LoaderManager {
+class LoaderManagerImpl extends LoaderManager {
     static final String TAG = "LoaderManagerImpl";
     static final boolean DEBUG = true;
 
diff --git a/core/java/android/app/LoaderManagingFragment.java b/core/java/android/app/LoaderManagingFragment.java
index af71170..f0f5856 100644
--- a/core/java/android/app/LoaderManagingFragment.java
+++ b/core/java/android/app/LoaderManagingFragment.java
@@ -26,7 +26,10 @@
  *
  * @param <D> The type of data returned by the Loader. If you're using multiple Loaders with
  * different return types use Object and case the results.
+ * 
+ * @deprecated This was an old design, it will be removed before Honeycomb ships.
  */
+@Deprecated
 public abstract class LoaderManagingFragment<D> extends Fragment
         implements Loader.OnLoadCompleteListener<D> {
     private boolean mStarted = false;
diff --git a/core/java/android/database/sqlite/SQLiteDatabase.java b/core/java/android/database/sqlite/SQLiteDatabase.java
index 54cdba2..79425d6 100644
--- a/core/java/android/database/sqlite/SQLiteDatabase.java
+++ b/core/java/android/database/sqlite/SQLiteDatabase.java
@@ -2116,26 +2116,27 @@
 
             int maxCacheSz = (mConnectionNum == 0) ? mMaxSqlCacheSize :
                     mParentConnObj.mMaxSqlCacheSize;
-            boolean printWarning =
-                    (mConnectionNum == 0)
-                            ? (!mCacheFullWarning && mCompiledQueries.size() == maxCacheSz)
-                            : (!mParentConnObj.mCacheFullWarning && 
-                                    mParentConnObj.mCompiledQueries.size() == maxCacheSz);
-           if (printWarning) {
-                /*
-                 * cache size of {@link #mMaxSqlCacheSize} is not enough for this app.
-                 * log a warning.
-                 * chances are it is NOT using ? for bindargs - or cachesize is too small.
-                 */
-                Log.w(TAG, "Reached MAX size for compiled-sql statement cache for database " +
-                        getPath() + ". Use setMaxSqlCacheSize() to increase cachesize. ");
-                mCacheFullWarning = true;
-                // STOPSHIP enclose the following warnings with "if (SQLiteDebug.DEBUG_SQL_CACHE)"
-                Log.d(TAG, "Here are the SQL statements in Cache of database: " + mPath);
-                for (String s : mCompiledQueries.keySet()) {
-                    Log.d(TAG, "Sql stament in Cache: " + s);
+            
+            if (SQLiteDebug.DEBUG_SQL_CACHE) {
+                boolean printWarning = (mConnectionNum == 0)
+                        ? (!mCacheFullWarning && mCompiledQueries.size() == maxCacheSz)
+                        : (!mParentConnObj.mCacheFullWarning &&
+                        mParentConnObj.mCompiledQueries.size() == maxCacheSz);
+                if (printWarning) {
+                    /*
+                     * cache size of {@link #mMaxSqlCacheSize} is not enough for this app.
+                     * log a warning.
+                     * chances are it is NOT using ? for bindargs - or cachesize is too small.
+                     */
+                    Log.w(TAG, "Reached MAX size for compiled-sql statement cache for database " +
+                            getPath() + ". Use setMaxSqlCacheSize() to increase cachesize. ");
+                    mCacheFullWarning = true;
+                    Log.d(TAG, "Here are the SQL statements in Cache of database: " + mPath);
+                    for (String s : mCompiledQueries.keySet()) {
+                        Log.d(TAG, "Sql stament in Cache: " + s);
+                    }
                 }
-            } 
+            }
             /* add the given SQLiteCompiledSql compiledStatement to cache.
              * no need to worry about the cache size - because {@link #mCompiledQueries}
              * self-limits its size to {@link #mMaxSqlCacheSize}.
diff --git a/core/java/android/net/SSLCertificateSocketFactory.java b/core/java/android/net/SSLCertificateSocketFactory.java
index b822b27..b8a1113 100644
--- a/core/java/android/net/SSLCertificateSocketFactory.java
+++ b/core/java/android/net/SSLCertificateSocketFactory.java
@@ -16,13 +16,10 @@
 
 package android.net;
 
-import com.android.internal.net.DomainNameValidator;
-
 import android.os.SystemProperties;
 import android.util.Config;
 import android.util.Log;
 
-
 import java.io.IOException;
 import java.net.InetAddress;
 import java.net.Socket;
diff --git a/core/java/android/preference/PreferenceActivity.java b/core/java/android/preference/PreferenceActivity.java
index d3ab844..0ce69ad 100644
--- a/core/java/android/preference/PreferenceActivity.java
+++ b/core/java/android/preference/PreferenceActivity.java
@@ -216,8 +216,6 @@
                         Header mappedHeader = findBestMatchingHeader(mCurHeader, mHeaders);
                         if (mappedHeader != null) {
                             setSelectedHeader(mappedHeader);
-                        } else {
-                            switchToHeader(null);
                         }
                     }
                 } break;
@@ -473,6 +471,9 @@
         } else {
             // If there are no headers, we are in the old "just show a screen
             // of preferences" mode.
+            setContentView(com.android.internal.R.layout.preference_list_content_single);
+            mListFooter = (FrameLayout) findViewById(com.android.internal.R.id.list_footer);
+            mPrefsContainer = findViewById(com.android.internal.R.id.prefs);
             mPreferenceManager = new PreferenceManager(this, FIRST_REQUEST_CODE);
             mPreferenceManager.setOnPreferenceTreeClickListener(this);
         }
diff --git a/core/java/android/util/Xml.java b/core/java/android/util/Xml.java
index a2b69a5..873a218 100644
--- a/core/java/android/util/Xml.java
+++ b/core/java/android/util/Xml.java
@@ -79,15 +79,11 @@
      */
     public static void parse(InputStream in, Encoding encoding,
             ContentHandler contentHandler) throws IOException, SAXException {
-        try {
-            XMLReader reader = new ExpatReader();
-            reader.setContentHandler(contentHandler);
-            InputSource source = new InputSource(in);
-            source.setEncoding(encoding.expatName);
-            reader.parse(source);
-        } catch (IOException e) {
-            throw new AssertionError(e);
-        }
+        XMLReader reader = new ExpatReader();
+        reader.setContentHandler(contentHandler);
+        InputSource source = new InputSource(in);
+        source.setEncoding(encoding.expatName);
+        reader.parse(source);
     }
 
     /**
diff --git a/core/java/android/view/KeyEvent.java b/core/java/android/view/KeyEvent.java
index 04c331f..e7a16a2 100755
--- a/core/java/android/view/KeyEvent.java
+++ b/core/java/android/view/KeyEvent.java
@@ -674,9 +674,9 @@
         "META_META_LEFT_ON",
         "META_META_RIGHT_ON",
         "0x00080000",
-        "META_CAPS_LOCK_LATCHED",
-        "META_NUM_LOCK_LATCHED",
-        "META_SCROLL_LOCK_LATCHED",
+        "META_CAPS_LOCK_ON",
+        "META_NUM_LOCK_ON",
+        "META_SCROLL_LOCK_ON",
         "0x00800000",
         "0x01000000",
         "0x02000000",
@@ -872,31 +872,31 @@
     public static final int META_META_RIGHT_ON = 0x40000;
 
     /**
-     * <p>This mask is used to check whether the CAPS LOCK meta key is latched.</p>
+     * <p>This mask is used to check whether the CAPS LOCK meta key is on.</p>
      *
-     * @see #isCapsLockLatched()
+     * @see #isCapsLockOn()
      * @see #getMetaState()
      * @see #KEYCODE_CAPS_LOCK
      */
-    public static final int META_CAPS_LOCK_LATCHED = 0x100000;
+    public static final int META_CAPS_LOCK_ON = 0x100000;
 
     /**
-     * <p>This mask is used to check whether the NUM LOCK meta key is latched.</p>
+     * <p>This mask is used to check whether the NUM LOCK meta key is on.</p>
      *
-     * @see #isNumLockLatched()
+     * @see #isNumLockOn()
      * @see #getMetaState()
      * @see #KEYCODE_NUM_LOCK
      */
-    public static final int META_NUM_LOCK_LATCHED = 0x200000;
+    public static final int META_NUM_LOCK_ON = 0x200000;
 
     /**
-     * <p>This mask is used to check whether the SCROLL LOCK meta key is latched.</p>
+     * <p>This mask is used to check whether the SCROLL LOCK meta key is on.</p>
      *
-     * @see #isScrollLockLatched()
+     * @see #isScrollLockOn()
      * @see #getMetaState()
      * @see #KEYCODE_SCROLL_LOCK
      */
-    public static final int META_SCROLL_LOCK_LATCHED = 0x400000;
+    public static final int META_SCROLL_LOCK_ON = 0x400000;
 
     /**
      * This mask is set if the device woke because of this key event.
@@ -1411,9 +1411,9 @@
      * @see #isCtrlPressed()
      * @see #isMetaPressed()
      * @see #isFunctionPressed()
-     * @see #isCapsLockLatched()
-     * @see #isNumLockLatched()
-     * @see #isScrollLockLatched()
+     * @see #isCapsLockOn()
+     * @see #isNumLockOn()
+     * @see #isScrollLockOn()
      * @see #META_ALT_ON
      * @see #META_ALT_LEFT_ON
      * @see #META_ALT_RIGHT_ON
@@ -1428,9 +1428,9 @@
      * @see #META_META_ON
      * @see #META_META_LEFT_ON
      * @see #META_META_RIGHT_ON
-     * @see #META_CAPS_LOCK_LATCHED
-     * @see #META_NUM_LOCK_LATCHED
-     * @see #META_SCROLL_LOCK_LATCHED
+     * @see #META_CAPS_LOCK_ON
+     * @see #META_NUM_LOCK_ON
+     * @see #META_SCROLL_LOCK_ON
      */
     public final int getMetaState() {
         return mMetaState;
@@ -1551,39 +1551,39 @@
     }
 
     /**
-     * <p>Returns the latched state of the CAPS LOCK meta key.</p>
+     * <p>Returns the locked state of the CAPS LOCK meta key.</p>
      *
-     * @return true if the CAPS LOCK key is latched, false otherwise
+     * @return true if the CAPS LOCK key is on, false otherwise
      *
      * @see #KEYCODE_CAPS_LOCK
-     * @see #META_CAPS_LOCK_LATCHED
+     * @see #META_CAPS_LOCK_ON
      */
-    public final boolean isCapsLockLatched() {
-        return (mMetaState & META_CAPS_LOCK_LATCHED) != 0;
+    public final boolean isCapsLockOn() {
+        return (mMetaState & META_CAPS_LOCK_ON) != 0;
     }
 
     /**
-     * <p>Returns the latched state of the NUM LOCK meta key.</p>
+     * <p>Returns the locked state of the NUM LOCK meta key.</p>
      *
-     * @return true if the NUM LOCK key is latched, false otherwise
+     * @return true if the NUM LOCK key is on, false otherwise
      *
      * @see #KEYCODE_NUM_LOCK
-     * @see #META_NUM_LOCK_LATCHED
+     * @see #META_NUM_LOCK_ON
      */
-    public final boolean isNumLockLatched() {
-        return (mMetaState & META_NUM_LOCK_LATCHED) != 0;
+    public final boolean isNumLockOn() {
+        return (mMetaState & META_NUM_LOCK_ON) != 0;
     }
 
     /**
-     * <p>Returns the latched state of the SCROLL LOCK meta key.</p>
+     * <p>Returns the locked state of the SCROLL LOCK meta key.</p>
      *
-     * @return true if the SCROLL LOCK key is latched, false otherwise
+     * @return true if the SCROLL LOCK key is on, false otherwise
      *
      * @see #KEYCODE_SCROLL_LOCK
-     * @see #META_SCROLL_LOCK_LATCHED
+     * @see #META_SCROLL_LOCK_ON
      */
-    public final boolean isScrollLockLatched() {
-        return (mMetaState & META_SCROLL_LOCK_LATCHED) != 0;
+    public final boolean isScrollLockOn() {
+        return (mMetaState & META_SCROLL_LOCK_ON) != 0;
     }
 
     /**
diff --git a/core/java/android/webkit/FrameLoader.java b/core/java/android/webkit/FrameLoader.java
index 7fd993a..021b53c 100644
--- a/core/java/android/webkit/FrameLoader.java
+++ b/core/java/android/webkit/FrameLoader.java
@@ -18,6 +18,7 @@
 
 import android.net.http.EventHandler;
 import android.net.http.RequestHandle;
+import android.os.Build;
 import android.util.Log;
 import android.webkit.CacheManager.CacheResult;
 
@@ -35,6 +36,7 @@
     private int mCacheMode;
     private String mReferrer;
     private String mContentType;
+    private final String mUaprofHeader;
 
     private static final int URI_PROTOCOL = 0x100;
 
@@ -57,6 +59,8 @@
         mMethod = method;
         mCacheMode = WebSettings.LOAD_NORMAL;
         mSettings = settings;
+        mUaprofHeader = mListener.getContext().getResources().getString(
+                com.android.internal.R.string.config_useragentprofile_url, Build.MODEL);
     }
 
     public void setReferrer(String ref) {
@@ -356,6 +360,11 @@
         }
         
         mHeaders.put("User-Agent", mSettings.getUserAgentString());
+
+        // Set the x-wap-profile header
+        if (mUaprofHeader != null && mUaprofHeader.length() > 0) {
+            mHeaders.put("x-wap-profile", mUaprofHeader);
+        }
     }
 
     /**
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index c8f2ace..fb760ac7 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -65,6 +65,7 @@
 import android.view.View;
 import android.view.ViewConfiguration;
 import android.view.ViewGroup;
+import android.view.ViewParent;
 import android.view.ViewTreeObserver;
 import android.view.accessibility.AccessibilityManager;
 import android.view.inputmethod.EditorInfo;
@@ -919,6 +920,7 @@
         }
 
         L10nUtils.loadStrings(context);
+        mAutoFillData = new WebViewCore.AutoFillData();
     }
 
     /*
@@ -3570,6 +3572,7 @@
         setUpSelect();
         if (mNativeClass != 0 && nativeWordSelection(x, y)) {
             nativeSetExtendSelection();
+            mDrawSelectionPointer = false;
             return true;
         }
         selectionDone();
@@ -5097,6 +5100,10 @@
                     if (DebugFlags.WEB_VIEW) {
                         Log.v(LOGTAG, "extend=" + contentX + "," + contentY);
                     }
+                    ViewParent parent = getParent();
+                    if (parent != null) {
+                        parent.requestDisallowInterceptTouchEvent(true);
+                    }
                     nativeExtendSelection(contentX, contentY);
                     invalidate();
                     break;
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index d4a26cc..d0ed23f 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -1210,6 +1210,7 @@
         int position;
         int height;
         String filter;
+        boolean inActionMode;
         int checkedItemCount;
         SparseBooleanArray checkState;
         LongSparseArray<Boolean> checkIdState;
@@ -1232,6 +1233,7 @@
             position = in.readInt();
             height = in.readInt();
             filter = in.readString();
+            inActionMode = in.readByte() != 0;
             checkedItemCount = in.readInt();
             checkState = in.readSparseBooleanArray();
             long[] idState = in.createLongArray();
@@ -1251,6 +1253,7 @@
             out.writeInt(position);
             out.writeInt(height);
             out.writeString(filter);
+            out.writeByte((byte) (inActionMode ? 1 : 0));
             out.writeInt(checkedItemCount);
             out.writeSparseBooleanArray(checkState);
             out.writeLongArray(checkIdState != null ? checkIdState.getKeys() : new long[0]);
@@ -1330,6 +1333,8 @@
             }
         }
 
+        ss.inActionMode = mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL && mChoiceActionMode != null;
+
         ss.checkState = mCheckStates;
         ss.checkIdState = mCheckedIdStates;
         ss.checkedItemCount = mCheckedItemCount;
@@ -1376,6 +1381,11 @@
 
         mCheckedItemCount = ss.checkedItemCount;
 
+        if (ss.inActionMode && mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL &&
+                mMultiChoiceModeCallback != null) {
+            mChoiceActionMode = startActionMode(mMultiChoiceModeCallback);
+        }
+
         requestLayout();
     }
 
diff --git a/core/java/android/widget/Adapters.java b/core/java/android/widget/Adapters.java
index 80d8ec1..a71d4ab 100644
--- a/core/java/android/widget/Adapters.java
+++ b/core/java/android/widget/Adapters.java
@@ -53,7 +53,7 @@
  * </ul>
  * <p>The complete XML format definition of each adapter type is available below.</p>
  * 
- * <a name="xml-cursor-adapter" />
+ * <a name="xml-cursor-adapter"></a>
  * <h2>Cursor adapter</h2>
  * <p>A cursor adapter XML definition starts with the
  * <a href="#xml-cursor-adapter-tag"><code>&lt;cursor-adapter /&gt;</code></a>
@@ -63,7 +63,7 @@
  *  <li><a href="#xml-cursor-adapter-bind-tag"><code>&lt;bind /&gt;</code></a></li>
  * </ul>
  * 
- * <a name="xml-cursor-adapter-tag" />
+ * <a name="xml-cursor-adapter-tag"></a>
  * <h3>&lt;cursor-adapter /&gt;</h3>
  * <p>The <code>&lt;cursor-adapter /&gt;</code> element defines the beginning of the
  * document and supports the following attributes:</p>
@@ -89,7 +89,7 @@
  * <a href="#xml-cursor-adapter-bind-tag"><code>&lt;bind /&gt;</code></a> tags as children
  * of <code>&lt;cursor-adapter /&gt;</code>.</p>
  * 
- * <a name="xml-cursor-adapter-select-tag" />
+ * <a name="xml-cursor-adapter-select-tag"></a>
  * <h3>&lt;select /&gt;</h3>
  * <p>The <code>&lt;select /&gt;</code> tag is used to select columns from the cursor
  * when doing the query. This can be very useful when using transformations in the
@@ -105,7 +105,7 @@
  * <p><strong>Note:</strong> The column named <code>_id</code> is always implicitly
  * selected.</p>
  * 
- * <a name="xml-cursor-adapter-bind-tag" />
+ * <a name="xml-cursor-adapter-bind-tag"></a>
  * <h3>&lt;bind /&gt;</h3>
  * <p>The <code>&lt;bind /&gt;</code> tag is used to bind a column from the cursor to
  * a {@link android.view.View}. A column bound using this tag is automatically selected
@@ -134,7 +134,7 @@
  * <a href="#xml-cursor-adapter-bind-data-transformation">data transformations</a> children
  * tags.</p>
  *
- * <a name="xml-cursor-adapter-bind-data-types" />
+ * <a name="xml-cursor-adapter-bind-data-types"></a>
  * <h4>Binding data types</h4>
  * <p>For a binding to occur the data type of the bound column/view pair must be specified.
  * The following data types are currently supported:</p>
@@ -157,7 +157,7 @@
  *  application widget</li>
  * </ul>
  * 
- * <a name="xml-cursor-adapter-bind-transformation" />
+ * <a name="xml-cursor-adapter-bind-transformation"></a>
  * <h4>Binding transformations</h4>
  * <p>When defining a data binding you can specify an optional transformation by using one
  * of the following tags as a child of a <code>&lt;bind /&gt;</code> elements:</p>
@@ -183,7 +183,7 @@
  *  data binding is of type <code>drawable</code>. This attribute is mandatory</li>
  * </ul>
  * 
- * <a name="xml-cursor-adapter-bind-transformation-transform" />
+ * <a name="xml-cursor-adapter-bind-transformation-transform"></a>
  * <p><strong>&lt;transform /&gt;</strong></p>
  * <p>A simple transform that occurs either by calling a specified class or by performing
  * simple text substitution. The following attributes are supported:</p>
diff --git a/core/java/android/widget/ListPopupWindow.java b/core/java/android/widget/ListPopupWindow.java
index 7ab95a9..9c483ee 100644
--- a/core/java/android/widget/ListPopupWindow.java
+++ b/core/java/android/widget/ListPopupWindow.java
@@ -576,6 +576,7 @@
 
             mPopup.setWindowLayoutMode(widthSpec, heightSpec);
             mPopup.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED);
+            mPopup.setClipToScreenEnabled(true);
             
             // use outside touchable to dismiss drop down when touching outside of it, so
             // only set this if the dropdown is not always visible
diff --git a/core/java/android/widget/PopupWindow.java b/core/java/android/widget/PopupWindow.java
index e2a6f7b..95678c6 100644
--- a/core/java/android/widget/PopupWindow.java
+++ b/core/java/android/widget/PopupWindow.java
@@ -27,7 +27,7 @@
 import android.graphics.drawable.StateListDrawable;
 import android.os.IBinder;
 import android.util.AttributeSet;
-import android.util.Log;
+import android.util.DisplayMetrics;
 import android.view.Gravity;
 import android.view.KeyEvent;
 import android.view.MotionEvent;
@@ -89,6 +89,7 @@
     private boolean mClippingEnabled = true;
     private boolean mSplitTouchEnabled;
     private boolean mLayoutInScreen;
+    private boolean mClipToScreen;
 
     private OnTouchListener mTouchInterceptor;
     
@@ -101,7 +102,7 @@
 
     private int mPopupWidth;
     private int mPopupHeight;
-    
+
     private int[] mDrawingLocation = new int[2];
     private int[] mScreenLocation = new int[2];
     private Rect mTempRect = new Rect();
@@ -582,6 +583,17 @@
     }
 
     /**
+     * Clip this popup window to the screen, but not to the containing window.
+     *
+     * @param enabled True to clip to the screen.
+     * @hide
+     */
+    public void setClipToScreenEnabled(boolean enabled) {
+        mClipToScreen = enabled;
+        setClippingEnabled(!enabled);
+    }
+    
+    /**
      * <p>Indicates whether the popup window supports splitting touches.</p>
      * 
      * @return true if the touch splitting is enabled, false otherwise
@@ -775,6 +787,8 @@
         p.gravity = gravity;
         p.x = x;
         p.y = y;
+        if (mHeightMode < 0) p.height = mLastHeight = mHeightMode;
+        if (mWidthMode < 0) p.width = mLastWidth = mWidthMode;
         invokePopup(p);
     }
 
@@ -1059,6 +1073,21 @@
             }
         }
 
+        if (mClipToScreen) {
+            final int displayFrameWidth = displayFrame.right - displayFrame.left;
+
+            int right = p.x + p.width;
+            if (right > displayFrameWidth) {
+                p.x -= right - displayFrameWidth;
+            }
+            if (p.x < displayFrame.left) {
+                p.x = displayFrame.left;
+                p.width = Math.min(p.width, displayFrameWidth);
+            }
+
+            p.y = Math.max(p.y, displayFrame.top);
+        }
+
         p.gravity |= Gravity.DISPLAY_CLIP_VERTICAL;
         
         return onTop;
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index eb5a092..2ebed5f 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -447,7 +447,7 @@
             drawableBottom = null;
         int drawablePadding = 0;
         int ellipsize = -1;
-        boolean singleLine = true;
+        boolean singleLine = false;
         int maxlength = -1;
         CharSequence text = "";
         CharSequence hint = null;
@@ -791,7 +791,10 @@
                     ? inputType : EditorInfo.TYPE_CLASS_TEXT;
         } else if (inputType != EditorInfo.TYPE_NULL) {
             setInputType(inputType, true);
-            singleLine = !isMultilineInputType(inputType);
+            singleLine = (inputType&(EditorInfo.TYPE_MASK_CLASS
+                            | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE)) !=
+                    (EditorInfo.TYPE_CLASS_TEXT
+                            | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE);
         } else if (phone) {
             mInput = DialerKeyListener.getInstance();
             mInputType = inputType = EditorInfo.TYPE_CLASS_PHONE;
@@ -810,6 +813,10 @@
             TextKeyListener.Capitalize cap;
 
             inputType = EditorInfo.TYPE_CLASS_TEXT;
+            if (!singleLine) {
+                inputType |= EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE;
+            }
+
             switch (autocap) {
             case 1:
                 cap = TextKeyListener.Capitalize.SENTENCES;
@@ -836,6 +843,9 @@
         } else if (editable) {
             mInput = TextKeyListener.getInstance();
             mInputType = EditorInfo.TYPE_CLASS_TEXT;
+            if (!singleLine) {
+                mInputType |= EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE;
+            }
         } else {
             mInput = null;
 
@@ -878,9 +888,12 @@
             drawableLeft, drawableTop, drawableRight, drawableBottom);
         setCompoundDrawablePadding(drawablePadding);
 
-        setSingleLine(singleLine);
-        if (singleLine && mInput == null && ellipsize < 0) {
+        if (singleLine) {
+            setSingleLine();
+
+            if (mInput == null && ellipsize < 0) {
                 ellipsize = 3; // END
+            }
         }
 
         switch (ellipsize) {
@@ -1144,7 +1157,14 @@
             } catch (IncompatibleClassChangeError e) {
                 mInputType = EditorInfo.TYPE_CLASS_TEXT;
             }
-            setSingleLine(mSingleLine);
+            if ((mInputType&EditorInfo.TYPE_MASK_CLASS)
+                    == EditorInfo.TYPE_CLASS_TEXT) {
+                if (mSingleLine) {
+                    mInputType &= ~EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE;
+                } else {
+                    mInputType |= EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE;
+                }
+            }
         } else {
             mInputType = EditorInfo.TYPE_NULL;
         }
@@ -2972,11 +2992,6 @@
         return mHint;
     }
 
-    private boolean isMultilineInputType(int type) {
-        return (type & (EditorInfo.TYPE_MASK_CLASS | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE)) ==
-                       (EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE);
-    }
-
     /**
      * Set the type of the content with a constant as defined for
      * {@link EditorInfo#inputType}.  This will take care of changing
@@ -3013,14 +3028,17 @@
             }
         }
         
-        boolean singleLine = !isMultilineInputType(type);
+        boolean multiLine = (type&(EditorInfo.TYPE_MASK_CLASS
+                        | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE)) ==
+                (EditorInfo.TYPE_CLASS_TEXT
+                        | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE);
         
         // We need to update the single line mode if it has changed or we
         // were previously in password mode.
-        if (mSingleLine != singleLine || forceUpdate) {
+        if (mSingleLine == multiLine || forceUpdate) {
             // Change single line mode, but only change the transformation if
             // we are not in password mode.
-            applySingleLine(singleLine, !isPassword);
+            applySingleLine(!multiLine, !isPassword);
         }
         
         InputMethodManager imm = InputMethodManager.peekInstance();
@@ -4728,7 +4746,10 @@
                     outAttrs.imeOptions |= EditorInfo.IME_FLAG_NO_ENTER_ACTION;
                 }
             }
-            if (isMultilineInputType(outAttrs.inputType)) {
+            if ((outAttrs.inputType & (InputType.TYPE_MASK_CLASS
+                    | InputType.TYPE_TEXT_FLAG_MULTI_LINE))
+                    == (InputType.TYPE_CLASS_TEXT
+                            | InputType.TYPE_TEXT_FLAG_MULTI_LINE)) {
                 // Multi-line text editors should always show an enter key.
                 outAttrs.imeOptions |= EditorInfo.IME_FLAG_NO_ENTER_ACTION;
             }
@@ -6071,7 +6092,8 @@
      */
     @android.view.RemotableViewMethod
     public void setSingleLine(boolean singleLine) {
-        if ((mInputType & EditorInfo.TYPE_MASK_CLASS) == EditorInfo.TYPE_CLASS_TEXT) {
+        if ((mInputType&EditorInfo.TYPE_MASK_CLASS)
+                == EditorInfo.TYPE_CLASS_TEXT) {
             if (singleLine) {
                 mInputType &= ~EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE;
             } else {
@@ -6087,7 +6109,8 @@
             setLines(1);
             setHorizontallyScrolling(true);
             if (applyTransformation) {
-                setTransformationMethod(SingleLineTransformationMethod.getInstance());
+                setTransformationMethod(SingleLineTransformationMethod.
+                                        getInstance());
             }
         } else {
             setMaxLines(Integer.MAX_VALUE);
diff --git a/core/java/com/android/internal/app/AlertController.java b/core/java/com/android/internal/app/AlertController.java
index fefdcea..b2810b1 100644
--- a/core/java/com/android/internal/app/AlertController.java
+++ b/core/java/com/android/internal/app/AlertController.java
@@ -30,6 +30,7 @@
 import android.os.Message;
 import android.text.TextUtils;
 import android.util.AttributeSet;
+import android.util.TypedValue;
 import android.view.Gravity;
 import android.view.KeyEvent;
 import android.view.LayoutInflater;
@@ -165,6 +166,13 @@
         }
     }
 
+    private static boolean shouldCenterSingleButton(Context context) {
+        TypedValue outValue = new TypedValue();
+        context.getTheme().resolveAttribute(com.android.internal.R.attr.alertDialogCenterButtons,
+                outValue, true);
+        return outValue.data != 0;
+    }
+
     public AlertController(Context context, DialogInterface di, Window window) {
         mContext = context;
         mDialogInterface = di;
@@ -508,16 +516,18 @@
             whichButtons = whichButtons | BIT_BUTTON_NEUTRAL;
         }
 
-        /*
-         * If we only have 1 button it should be centered on the layout and
-         * expand to fill 50% of the available space.
-         */
-        if (whichButtons == BIT_BUTTON_POSITIVE) {
-            centerButton(mButtonPositive);
-        } else if (whichButtons == BIT_BUTTON_NEGATIVE) {
-            centerButton(mButtonNeutral);
-        } else if (whichButtons == BIT_BUTTON_NEUTRAL) {
-            centerButton(mButtonNeutral);
+        if (shouldCenterSingleButton(mContext)) {
+            /*
+             * If we only have 1 button it should be centered on the layout and
+             * expand to fill 50% of the available space.
+             */
+            if (whichButtons == BIT_BUTTON_POSITIVE) {
+                centerButton(mButtonPositive);
+            } else if (whichButtons == BIT_BUTTON_NEGATIVE) {
+                centerButton(mButtonNeutral);
+            } else if (whichButtons == BIT_BUTTON_NEUTRAL) {
+                centerButton(mButtonNeutral);
+            }
         }
         
         return whichButtons != 0;
diff --git a/core/java/com/android/internal/widget/WaveView.java b/core/java/com/android/internal/widget/WaveView.java
index f91d3d6..81633b1 100644
--- a/core/java/com/android/internal/widget/WaveView.java
+++ b/core/java/com/android/internal/widget/WaveView.java
@@ -269,7 +269,7 @@
                 break;
 
             case STATE_ATTEMPTING:
-                if (DBG) Log.v(TAG, "State ATTEMPTING");
+                if (DBG) Log.v(TAG, "State ATTEMPTING (fingerDown = " + fingerDown + ")");
                 //TweenMax.to(unlockHalo, 0.4, { x:mouseX, y:mouseY, scaleX:1, scaleY:1,
                 // alpha: 1, ease:Quint.easeOut });
                 if (dragDistance > mSnapRadius) {
@@ -282,6 +282,7 @@
                         mUnlockHalo.addAnimTo(0, 0, "scaleY", 1.0f, true);
                         mUnlockHalo.addAnimTo(0, 0, "alpha", 1.0f, true);
                     }  else {
+                        if (DBG) Log.v(TAG, "up detected, moving to STATE_UNLOCK_ATTEMPT");
                         mLockState = STATE_UNLOCK_ATTEMPT;
                     }
                 } else {
@@ -480,9 +481,16 @@
                 break;
 
             case MotionEvent.ACTION_UP:
+                if (DBG) Log.v(TAG, "ACTION_UP");
                 mFingerDown = false;
                 postDelayed(mLockTimerActions, RESET_TIMEOUT);
                 setGrabbedState(OnTriggerListener.NO_HANDLE);
+                // Normally the state machine is driven by user interaction causing redraws.
+                // However, when there's no more user interaction and no running animations,
+                // the state machine stops advancing because onDraw() never gets called.
+                // The following ensures we advance to the next state in this case,
+                // either STATE_UNLOCK_ATTEMPT or STATE_RESET_LOCK.
+                waveUpdateFrame(mMouseX, mMouseY, mFingerDown);
                 handled = true;
                 break;
 
diff --git a/core/res/res/anim/accelerate_cubic_interpolator.xml b/core/res/res/anim/accelerate_cubic_interpolator.xml
new file mode 100644
index 0000000..c736766
--- /dev/null
+++ b/core/res/res/anim/accelerate_cubic_interpolator.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/res/anim/ease_in_interpolator.xml
+**
+** Copyright 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.
+*/
+-->
+
+<accelerateInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
+        android:factor="1.5" />
diff --git a/core/res/res/anim/accelerate_quint_interpolator.xml b/core/res/res/anim/accelerate_quint_interpolator.xml
new file mode 100644
index 0000000..5ab4909
--- /dev/null
+++ b/core/res/res/anim/accelerate_quint_interpolator.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/res/anim/ease_in_interpolator.xml
+**
+** Copyright 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.
+*/
+-->
+
+<accelerateInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
+        android:factor="2.5" />
diff --git a/core/res/res/anim/activity_close_enter.xml b/core/res/res/anim/activity_close_enter.xml
index 155ad00..0674284 100644
--- a/core/res/res/anim/activity_close_enter.xml
+++ b/core/res/res/anim/activity_close_enter.xml
@@ -17,10 +17,8 @@
 */
 -->
 
-<set xmlns:android="http://schemas.android.com/apk/res/android"
-        android:interpolator="@anim/decelerate_interpolator">
+<set xmlns:android="http://schemas.android.com/apk/res/android">
     <!-- Do nothing. -->
     <alpha android:fromAlpha="1.0" android:toAlpha="1.0"
-            android:interpolator="@anim/decelerate_interpolator"
             android:duration="@android:integer/config_mediumAnimTime"/>
 </set>
diff --git a/core/res/res/anim/activity_close_exit.xml b/core/res/res/anim/activity_close_exit.xml
index 77684d9..5e29df4 100644
--- a/core/res/res/anim/activity_close_exit.xml
+++ b/core/res/res/anim/activity_close_exit.xml
@@ -17,13 +17,13 @@
 */
 -->
 
-<set xmlns:android="http://schemas.android.com/apk/res/android"
-        android:interpolator="@anim/decelerate_interpolator">
+<set xmlns:android="http://schemas.android.com/apk/res/android">
     <scale android:fromXScale="1.0" android:toXScale="1.0"
             android:fromYScale="1.0" android:toYScale="0.9"
             android:pivotX="50%p" android:pivotY="50%p"
+            android:interpolator="@anim/decelerate_quint_interpolator"
             android:duration="@android:integer/config_mediumAnimTime" />
     <alpha android:fromAlpha="1.0" android:toAlpha="0"
-            android:interpolator="@anim/decelerate_interpolator"
+            android:interpolator="@anim/decelerate_cubic_interpolator"
             android:duration="@android:integer/config_mediumAnimTime"/>
 </set>
diff --git a/core/res/res/anim/activity_open_enter.xml b/core/res/res/anim/activity_open_enter.xml
index d4140ef..63cc9a5 100644
--- a/core/res/res/anim/activity_open_enter.xml
+++ b/core/res/res/anim/activity_open_enter.xml
@@ -17,13 +17,13 @@
 */
 -->
 
-<set xmlns:android="http://schemas.android.com/apk/res/android"
-        android:interpolator="@anim/decelerate_interpolator">
+<set xmlns:android="http://schemas.android.com/apk/res/android">
     <scale android:fromXScale="1.0" android:toXScale="1.0"
             android:fromYScale="0.9" android:toYScale="1.0"
             android:pivotX="50%p" android:pivotY="50%p"
+            android:interpolator="@anim/decelerate_quint_interpolator"
             android:duration="@android:integer/config_mediumAnimTime" />
     <alpha android:fromAlpha="0" android:toAlpha="1.0"
-            android:interpolator="@anim/accelerate_decelerate_interpolator"
+            android:interpolator="@anim/decelerate_cubic_interpolator"
             android:duration="@android:integer/config_mediumAnimTime"/>
 </set>
diff --git a/core/res/res/anim/activity_open_exit.xml b/core/res/res/anim/activity_open_exit.xml
index 155ad00..0674284 100644
--- a/core/res/res/anim/activity_open_exit.xml
+++ b/core/res/res/anim/activity_open_exit.xml
@@ -17,10 +17,8 @@
 */
 -->
 
-<set xmlns:android="http://schemas.android.com/apk/res/android"
-        android:interpolator="@anim/decelerate_interpolator">
+<set xmlns:android="http://schemas.android.com/apk/res/android">
     <!-- Do nothing. -->
     <alpha android:fromAlpha="1.0" android:toAlpha="1.0"
-            android:interpolator="@anim/decelerate_interpolator"
             android:duration="@android:integer/config_mediumAnimTime"/>
 </set>
diff --git a/core/res/res/anim/decelerate_cubic_interpolator.xml b/core/res/res/anim/decelerate_cubic_interpolator.xml
new file mode 100644
index 0000000..78bdb40
--- /dev/null
+++ b/core/res/res/anim/decelerate_cubic_interpolator.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/res/anim/ease_in_interpolator.xml
+**
+** Copyright 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.
+*/
+-->
+
+<decelerateInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
+        android:factor="1.5" />
diff --git a/core/res/res/anim/decelerate_quint_interpolator.xml b/core/res/res/anim/decelerate_quint_interpolator.xml
new file mode 100644
index 0000000..0e543e6
--- /dev/null
+++ b/core/res/res/anim/decelerate_quint_interpolator.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/res/anim/ease_in_interpolator.xml
+**
+** Copyright 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.
+*/
+-->
+
+<decelerateInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
+        android:factor="2.5" />
diff --git a/core/res/res/anim/wallpaper_close_enter.xml b/core/res/res/anim/wallpaper_close_enter.xml
index ba50d69..38eac97 100644
--- a/core/res/res/anim/wallpaper_close_enter.xml
+++ b/core/res/res/anim/wallpaper_close_enter.xml
@@ -24,12 +24,12 @@
             android:fromYScale=".9" android:toYScale="1.0"
             android:pivotX="50%p" android:pivotY="50%p"
             android:fillEnabled="true" android:fillBefore="true"
-            android:interpolator="@anim/decelerate_interpolator"
+            android:interpolator="@anim/decelerate_quint_interpolator"
             android:startOffset="@android:integer/config_mediumAnimTime"
             android:duration="@android:integer/config_mediumAnimTime" />
     <alpha android:fromAlpha="0" android:toAlpha="1.0"
             android:fillEnabled="true" android:fillBefore="true"
-            android:interpolator="@anim/decelerate_interpolator"
+            android:interpolator="@anim/decelerate_quint_interpolator"
             android:startOffset="@android:integer/config_mediumAnimTime"
             android:duration="@android:integer/config_mediumAnimTime"/>
 </set>
diff --git a/core/res/res/anim/wallpaper_close_exit.xml b/core/res/res/anim/wallpaper_close_exit.xml
index 5af1d11..f8805a2 100644
--- a/core/res/res/anim/wallpaper_close_exit.xml
+++ b/core/res/res/anim/wallpaper_close_exit.xml
@@ -24,16 +24,15 @@
             android:fromYScale="1.0" android:toYScale="0.8"
             android:pivotX="50%p" android:pivotY="50%p"
             android:fillEnabled="true" android:fillAfter="true"
-            android:interpolator="@anim/decelerate_interpolator"
+            android:interpolator="@anim/decelerate_quint_interpolator"
             android:duration="@android:integer/config_mediumAnimTime" />
     <alpha android:fromAlpha="1.0" android:toAlpha="0"
             android:fillEnabled="true" android:fillAfter="true"
-            android:interpolator="@anim/decelerate_interpolator"
+            android:interpolator="@anim/decelerate_cubic_interpolator"
             android:duration="@android:integer/config_mediumAnimTime"/>
     <!-- This is just to keep the animation running for the entire duration. -->
     <alpha android:fromAlpha="1.0" android:toAlpha="1.0"
             android:startOffset="@android:integer/config_mediumAnimTime"
-            android:interpolator="@anim/decelerate_interpolator"
             android:duration="@android:integer/config_mediumAnimTime"/>
 </set>
 
diff --git a/core/res/res/anim/wallpaper_open_enter.xml b/core/res/res/anim/wallpaper_open_enter.xml
index 879d84a..f150900 100644
--- a/core/res/res/anim/wallpaper_open_enter.xml
+++ b/core/res/res/anim/wallpaper_open_enter.xml
@@ -19,15 +19,15 @@
 
 <!-- New holo animation, zooming contents on top of wallpaper back up. -->
 <set xmlns:android="http://schemas.android.com/apk/res/android"
-        android:interpolator="@anim/decelerate_interpolator"
         android:detachWallpaper="true">
     <scale android:fromXScale="0.8" android:toXScale="1.0"
             android:fromYScale="0.8" android:toYScale="1.0"
             android:pivotX="50%p" android:pivotY="50%p"
+            android:interpolator="@anim/decelerate_quint_interpolator"
             android:startOffset="@android:integer/config_mediumAnimTime"
             android:duration="@android:integer/config_mediumAnimTime" />
     <alpha android:fromAlpha="0" android:toAlpha="1.0"
-            android:interpolator="@anim/accelerate_decelerate_interpolator"
+            android:interpolator="@anim/decelerate_cubic_interpolator"
             android:startOffset="@android:integer/config_mediumAnimTime"
             android:duration="@android:integer/config_mediumAnimTime"/>
 </set>
diff --git a/core/res/res/anim/wallpaper_open_exit.xml b/core/res/res/anim/wallpaper_open_exit.xml
index 89fff82..c9d5310 100644
--- a/core/res/res/anim/wallpaper_open_exit.xml
+++ b/core/res/res/anim/wallpaper_open_exit.xml
@@ -23,10 +23,10 @@
     <scale android:fromXScale="1.0" android:toXScale="1.0"
             android:fromYScale="1.0" android:toYScale=".9"
             android:pivotX="50%p" android:pivotY="50%p"
-            android:interpolator="@anim/decelerate_interpolator"
+            android:interpolator="@anim/decelerate_quint_interpolator"
             android:duration="@android:integer/config_mediumAnimTime" />
     <alpha android:fromAlpha="1.0" android:toAlpha="0"
-            android:interpolator="@anim/accelerate_decelerate_interpolator"
+            android:interpolator="@anim/decelerate_quint_interpolator"
             android:duration="@android:integer/config_mediumAnimTime"/>
 </set>
 
diff --git a/core/res/res/drawable-hdpi/ic_aggregated.png b/core/res/res/drawable-hdpi/ic_aggregated.png
new file mode 100644
index 0000000..b9cfc7e
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_aggregated.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_selector_background_focus.9.png b/core/res/res/drawable-hdpi/list_selector_background_focus.9.png
new file mode 100644
index 0000000..94a9fba
--- /dev/null
+++ b/core/res/res/drawable-hdpi/list_selector_background_focus.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/minitab_lt_focus.9.png b/core/res/res/drawable-hdpi/minitab_lt_focus.9.png
new file mode 100644
index 0000000..3ba8376
--- /dev/null
+++ b/core/res/res/drawable-hdpi/minitab_lt_focus.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/minitab_lt_press.9.png b/core/res/res/drawable-hdpi/minitab_lt_press.9.png
new file mode 100644
index 0000000..df226c7
--- /dev/null
+++ b/core/res/res/drawable-hdpi/minitab_lt_press.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/minitab_lt_selected.9.png b/core/res/res/drawable-hdpi/minitab_lt_selected.9.png
new file mode 100644
index 0000000..bb417e6
--- /dev/null
+++ b/core/res/res/drawable-hdpi/minitab_lt_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/minitab_lt_unselected.9.png b/core/res/res/drawable-hdpi/minitab_lt_unselected.9.png
new file mode 100644
index 0000000..d9ef49e
--- /dev/null
+++ b/core/res/res/drawable-hdpi/minitab_lt_unselected.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/minitab_lt_unselected_press.9.png b/core/res/res/drawable-hdpi/minitab_lt_unselected_press.9.png
new file mode 100644
index 0000000..383c4fc
--- /dev/null
+++ b/core/res/res/drawable-hdpi/minitab_lt_unselected_press.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/overscroll_edge.png b/core/res/res/drawable-hdpi/overscroll_edge.png
new file mode 100644
index 0000000..58b4f19
--- /dev/null
+++ b/core/res/res/drawable-hdpi/overscroll_edge.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/overscroll_glow.png b/core/res/res/drawable-hdpi/overscroll_glow.png
new file mode 100644
index 0000000..fa58f1e
--- /dev/null
+++ b/core/res/res/drawable-hdpi/overscroll_glow.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/panel_bg_holo_dark.9.png b/core/res/res/drawable-hdpi/panel_bg_holo_dark.9.png
new file mode 100644
index 0000000..0f883dc
--- /dev/null
+++ b/core/res/res/drawable-hdpi/panel_bg_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/panel_bg_holo_light.9.png b/core/res/res/drawable-hdpi/panel_bg_holo_light.9.png
new file mode 100644
index 0000000..ddd242b
--- /dev/null
+++ b/core/res/res/drawable-hdpi/panel_bg_holo_light.9.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
new file mode 100644
index 0000000..07de4cb
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_email_generic.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
new file mode 100644
index 0000000..1aadf68
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_gmail.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_focused_holo.9.png b/core/res/res/drawable-hdpi/tab_focused_holo.9.png
new file mode 100644
index 0000000..39a8f7a
--- /dev/null
+++ b/core/res/res/drawable-hdpi/tab_focused_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/tab_pressed_holo.9.png b/core/res/res/drawable-hdpi/tab_pressed_holo.9.png
new file mode 100644
index 0000000..b8a569f
--- /dev/null
+++ b/core/res/res/drawable-hdpi/tab_pressed_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/text_edit_paste_window.9.png b/core/res/res/drawable-hdpi/text_edit_paste_window.9.png
new file mode 100644
index 0000000..7cd000b
--- /dev/null
+++ b/core/res/res/drawable-hdpi/text_edit_paste_window.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/btn_lock_normal.9.png b/core/res/res/drawable-land-mdpi/btn_lock_normal.9.png
new file mode 100644
index 0000000..f2482c0
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/btn_lock_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_off_disable_focused_holo_dark.png b/core/res/res/drawable-mdpi/btn_check_off_disable_focused_holo_dark.png
new file mode 100644
index 0000000..44b987b
--- /dev/null
+++ b/core/res/res/drawable-mdpi/btn_check_off_disable_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_off_disable_focused_holo_light.png b/core/res/res/drawable-mdpi/btn_check_off_disable_focused_holo_light.png
new file mode 100644
index 0000000..2a3824b
--- /dev/null
+++ b/core/res/res/drawable-mdpi/btn_check_off_disable_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_off_disable_holo_dark.png b/core/res/res/drawable-mdpi/btn_check_off_disable_holo_dark.png
new file mode 100644
index 0000000..44b987b
--- /dev/null
+++ b/core/res/res/drawable-mdpi/btn_check_off_disable_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_off_disable_holo_light.png b/core/res/res/drawable-mdpi/btn_check_off_disable_holo_light.png
new file mode 100644
index 0000000..2a3824b
--- /dev/null
+++ b/core/res/res/drawable-mdpi/btn_check_off_disable_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_aggregated.png b/core/res/res/drawable-mdpi/ic_aggregated.png
new file mode 100644
index 0000000..ad42071
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_aggregated.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_divider_horizontal_holo_dark.9.png b/core/res/res/drawable-mdpi/list_divider_horizontal_holo_dark.9.png
new file mode 100644
index 0000000..0a4347f
--- /dev/null
+++ b/core/res/res/drawable-mdpi/list_divider_horizontal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_selector_background_focus.9.png b/core/res/res/drawable-mdpi/list_selector_background_focus.9.png
new file mode 100644
index 0000000..421e734
--- /dev/null
+++ b/core/res/res/drawable-mdpi/list_selector_background_focus.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/panel_bg_holo_dark.9.png b/core/res/res/drawable-mdpi/panel_bg_holo_dark.9.png
new file mode 100644
index 0000000..78a86a5
--- /dev/null
+++ b/core/res/res/drawable-mdpi/panel_bg_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/panel_bg_holo_light.9.png b/core/res/res/drawable-mdpi/panel_bg_holo_light.9.png
new file mode 100644
index 0000000..f4a25bc
--- /dev/null
+++ b/core/res/res/drawable-mdpi/panel_bg_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/rate_star_med_half.png b/core/res/res/drawable-mdpi/rate_star_med_half.png
new file mode 100644
index 0000000..65a8671
--- /dev/null
+++ b/core/res/res/drawable-mdpi/rate_star_med_half.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/rate_star_med_off.png b/core/res/res/drawable-mdpi/rate_star_med_off.png
new file mode 100644
index 0000000..fba0ade
--- /dev/null
+++ b/core/res/res/drawable-mdpi/rate_star_med_off.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/rate_star_med_on.png b/core/res/res/drawable-mdpi/rate_star_med_on.png
new file mode 100644
index 0000000..a1941b6
--- /dev/null
+++ b/core/res/res/drawable-mdpi/rate_star_med_on.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
new file mode 100644
index 0000000..5b866bf
--- /dev/null
+++ b/core/res/res/drawable-mdpi/stat_notify_email_generic.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
new file mode 100644
index 0000000..907306d
--- /dev/null
+++ b/core/res/res/drawable-mdpi/stat_notify_gmail.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_0_cdma.png b/core/res/res/drawable-mdpi/stat_sys_signal_0_cdma.png
new file mode 100644
index 0000000..11f9dfe
--- /dev/null
+++ b/core/res/res/drawable-mdpi/stat_sys_signal_0_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_1_cdma.png b/core/res/res/drawable-mdpi/stat_sys_signal_1_cdma.png
new file mode 100644
index 0000000..4ef3dbac
--- /dev/null
+++ b/core/res/res/drawable-mdpi/stat_sys_signal_1_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_2_cdma.png b/core/res/res/drawable-mdpi/stat_sys_signal_2_cdma.png
new file mode 100644
index 0000000..530ed45
--- /dev/null
+++ b/core/res/res/drawable-mdpi/stat_sys_signal_2_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_3_cdma.png b/core/res/res/drawable-mdpi/stat_sys_signal_3_cdma.png
new file mode 100644
index 0000000..60a868a
--- /dev/null
+++ b/core/res/res/drawable-mdpi/stat_sys_signal_3_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_4_cdma.png b/core/res/res/drawable-mdpi/stat_sys_signal_4_cdma.png
new file mode 100644
index 0000000..5f2950e
--- /dev/null
+++ b/core/res/res/drawable-mdpi/stat_sys_signal_4_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_evdo_0.png b/core/res/res/drawable-mdpi/stat_sys_signal_evdo_0.png
new file mode 100644
index 0000000..defc129
--- /dev/null
+++ b/core/res/res/drawable-mdpi/stat_sys_signal_evdo_0.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_evdo_1.png b/core/res/res/drawable-mdpi/stat_sys_signal_evdo_1.png
new file mode 100644
index 0000000..e3a81ed
--- /dev/null
+++ b/core/res/res/drawable-mdpi/stat_sys_signal_evdo_1.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_evdo_2.png b/core/res/res/drawable-mdpi/stat_sys_signal_evdo_2.png
new file mode 100644
index 0000000..68c99a9
--- /dev/null
+++ b/core/res/res/drawable-mdpi/stat_sys_signal_evdo_2.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_evdo_3.png b/core/res/res/drawable-mdpi/stat_sys_signal_evdo_3.png
new file mode 100644
index 0000000..2f6c435
--- /dev/null
+++ b/core/res/res/drawable-mdpi/stat_sys_signal_evdo_3.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_evdo_4.png b/core/res/res/drawable-mdpi/stat_sys_signal_evdo_4.png
new file mode 100644
index 0000000..4c9d4c6
--- /dev/null
+++ b/core/res/res/drawable-mdpi/stat_sys_signal_evdo_4.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-hdpi/unlock_default.png b/core/res/res/drawable-xlarge-hdpi/unlock_default.png
new file mode 100644
index 0000000..67311b9
--- /dev/null
+++ b/core/res/res/drawable-xlarge-hdpi/unlock_default.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-hdpi/unlock_halo.png b/core/res/res/drawable-xlarge-hdpi/unlock_halo.png
new file mode 100644
index 0000000..d841dea
--- /dev/null
+++ b/core/res/res/drawable-xlarge-hdpi/unlock_halo.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-hdpi/unlock_ring.png b/core/res/res/drawable-xlarge-hdpi/unlock_ring.png
new file mode 100644
index 0000000..172efb8
--- /dev/null
+++ b/core/res/res/drawable-xlarge-hdpi/unlock_ring.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-hdpi/unlock_wave.png b/core/res/res/drawable-xlarge-hdpi/unlock_wave.png
new file mode 100644
index 0000000..1ad26c3
--- /dev/null
+++ b/core/res/res/drawable-xlarge-hdpi/unlock_wave.png
Binary files differ
diff --git a/core/res/res/layout-xlarge/preference_list_content_single.xml b/core/res/res/layout-xlarge/preference_list_content_single.xml
new file mode 100644
index 0000000..6899ed0
--- /dev/null
+++ b/core/res/res/layout-xlarge/preference_list_content_single.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 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.
+*/
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent">
+
+    <LinearLayout
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_height="0px"
+        android:layout_weight="1">
+
+        <LinearLayout
+            android:id="@+id/headers"
+            android:orientation="vertical"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_marginRight="@dimen/preference_screen_side_margin"
+            android:layout_marginLeft="@dimen/preference_screen_side_margin"
+            android:layout_marginTop="48dp"
+            android:layout_marginBottom="48dp"
+            android:paddingLeft="32dip"
+            android:paddingRight="32dip"
+            android:paddingTop="32dip"
+            android:paddingBottom="32dip"
+            android:background="?attr/preferencePanelBackground">
+
+            <ListView android:id="@android:id/list"
+                android:layout_width="match_parent"
+                android:layout_height="0px"
+                android:layout_weight="1"
+                android:drawSelectorOnTop="false"
+                android:cacheColorHint="@android:color/transparent"
+                android:listPreferredItemHeight="48dp"
+                android:scrollbarAlwaysDrawVerticalTrack="true" />
+
+            <FrameLayout android:id="@+id/list_footer"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="0" />
+
+        </LinearLayout>
+
+    </LinearLayout>
+
+    <RelativeLayout android:id="@+id/button_bar"
+        android:layout_height="wrap_content"
+        android:layout_width="match_parent"
+        android:layout_weight="0"
+        android:background="@android:drawable/bottom_bar"
+        android:visibility="gone">
+
+        <Button android:id="@+id/back_button"
+            android:layout_width="150dip"
+            android:layout_height="wrap_content"
+            android:layout_margin="5dip"
+            android:layout_alignParentLeft="true"
+            android:drawableLeft="@drawable/ic_btn_back"
+            android:drawablePadding="3dip"
+            android:text="@string/back_button_label"
+        />
+        <LinearLayout
+            android:orientation="horizontal"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentRight="true">
+
+            <Button android:id="@+id/skip_button"
+                android:layout_width="150dip"
+                android:layout_height="wrap_content"
+                android:layout_margin="5dip"
+                android:text="@string/skip_button_label"
+                android:visibility="gone"
+            />
+
+            <Button android:id="@+id/next_button"
+                android:layout_width="150dip"
+                android:layout_height="wrap_content"
+                android:layout_margin="5dip"
+                android:drawableRight="@drawable/ic_btn_next"
+                android:drawablePadding="3dip"
+                android:text="@string/next_button_label"
+            />
+        </LinearLayout>
+    </RelativeLayout>
+</LinearLayout>
diff --git a/core/res/res/layout/preference.xml b/core/res/res/layout/preference.xml
index 9bd6f1b..ba0e225 100644
--- a/core/res/res/layout/preference.xml
+++ b/core/res/res/layout/preference.xml
@@ -4,9 +4,9 @@
      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.
@@ -23,11 +23,14 @@
     android:minHeight="?android:attr/listPreferredItemHeight"
     android:gravity="center_vertical"
     android:paddingRight="?android:attr/scrollbarSize">
-    
+
+    <View
+        android:layout_width="@dimen/preference_widget_width"
+        android:layout_height="match_parent" />
+
     <RelativeLayout
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginLeft="15dip"
         android:layout_marginRight="6dip"
         android:layout_marginTop="6dip"
         android:layout_marginBottom="6dip"
@@ -37,7 +40,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:singleLine="true"
-            android:textAppearance="?android:attr/textAppearanceLarge"
+            android:textAppearance="?android:attr/textAppearanceMedium"
             android:ellipsize="marquee"
             android:fadingEdge="horizontal" />
             
@@ -47,6 +50,7 @@
             android:layout_below="@android:id/title"
             android:layout_alignLeft="@android:id/title"
             android:textAppearance="?android:attr/textAppearanceSmall"
+            android:textColor="?android:attr/textColorSecondary"
             android:maxLines="4" />
 
     </RelativeLayout>
diff --git a/core/res/res/layout/preference_category.xml b/core/res/res/layout/preference_category.xml
index 280d952..7ffdc9a 100644
--- a/core/res/res/layout/preference_category.xml
+++ b/core/res/res/layout/preference_category.xml
@@ -18,4 +18,5 @@
 <TextView xmlns:android="http://schemas.android.com/apk/res/android"
     style="?android:attr/listSeparatorTextViewStyle"
     android:id="@+android:id/title"
+    android:paddingLeft="32dp"
 />
diff --git a/core/res/res/layout/preference_child.xml b/core/res/res/layout/preference_child.xml
index 8975ed6..d6f1182 100644
--- a/core/res/res/layout/preference_child.xml
+++ b/core/res/res/layout/preference_child.xml
@@ -21,21 +21,25 @@
     android:minHeight="?android:attr/listPreferredItemHeight"
     android:gravity="center_vertical"
     android:paddingRight="?android:attr/scrollbarSize">
-    
+
+    <View
+        android:layout_width="@dimen/preference_widget_width"
+        android:layout_height="match_parent" />
+
     <RelativeLayout
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginLeft="20dip"
+        android:layout_marginLeft="16dip"
         android:layout_marginRight="6dip"
         android:layout_marginTop="6dip"
         android:layout_marginBottom="6dip"
         android:layout_weight="1">
-    
+
         <TextView android:id="@+android:id/title"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:singleLine="true"
-            android:textAppearance="?android:attr/textAppearanceLarge"
+            android:textAppearance="?android:attr/textAppearanceMedium"
             android:ellipsize="marquee"
             android:fadingEdge="horizontal" />
             
@@ -45,11 +49,11 @@
             android:layout_below="@android:id/title"
             android:layout_alignLeft="@android:id/title"
             android:textAppearance="?android:attr/textAppearanceSmall"
-            android:maxLines="2"
-            android:textColor="?android:attr/textColorSecondary" />
+            android:textColor="?android:attr/textColorSecondary"
+            android:maxLines="4" />
 
     </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/layout/preference_dialog.xml b/core/res/res/layout/preference_dialog.xml
index 5cf0f6e..035b411 100644
--- a/core/res/res/layout/preference_dialog.xml
+++ b/core/res/res/layout/preference_dialog.xml
@@ -14,13 +14,53 @@
      limitations under the License.
 -->
 
-<!-- Layout used by DialogPreference widgets. This is inflated inside 
-        android.R.layout.preference. -->
-<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="wrap_content"
+<!-- Layout used by DialogPreference in a PreferenceActivity. -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
+    android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:layout_marginRight="4dip"
-    android:layout_gravity="center_vertical"
-    android:background="@drawable/btn_circle"
-    android:src="@drawable/ic_btn_round_more" />
+    android:minHeight="?android:attr/listPreferredItemHeight"
+    android:gravity="center_vertical"
+    android:paddingRight="?android:attr/scrollbarSize">
+    
+    <!-- Preference should place its actual preference widget here. -->
+    <LinearLayout android:id="@+android:id/widget_frame"
+        android:layout_width="@dimen/preference_widget_width"
+        android:layout_height="match_parent"
+        android:gravity="center"
+        android:orientation="horizontal" >
+        <ImageView xmlns:android="http://schemas.android.com/apk/res/android"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:background="@drawable/btn_circle"
+            android:src="@drawable/ic_btn_round_more" />
+    </LinearLayout>
+
+    <RelativeLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginRight="6dip"
+        android:layout_marginTop="6dip"
+        android:layout_marginBottom="6dip"
+        android:layout_weight="1">
+    
+        <TextView android:id="@+android:id/title"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:singleLine="true"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:ellipsize="marquee"
+            android:fadingEdge="horizontal" />
+            
+        <TextView android:id="@+android:id/summary"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@android:id/title"
+            android:layout_alignLeft="@android:id/title"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:textColor="?android:attr/textColorSecondary"
+            android:maxLines="4" />
+
+    </RelativeLayout>
+</LinearLayout>
 
diff --git a/core/res/res/layout/preference_dialog_edittext.xml b/core/res/res/layout/preference_dialog_edittext.xml
index 5be5773..691ee8c 100644
--- a/core/res/res/layout/preference_dialog_edittext.xml
+++ b/core/res/res/layout/preference_dialog_edittext.xml
@@ -17,7 +17,9 @@
 <!-- Layout used as the dialog's content View for EditTextPreference. -->
 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    android:layout_marginTop="48dp"
+    android:layout_marginBottom="48dp">
 
     <LinearLayout
         android:id="@+android:id/edittext_container"
@@ -28,10 +30,11 @@
 
         <TextView android:id="@+android:id/message"
             style="?android:attr/textAppearanceSmall"
+            android:layout_marginBottom="48dp"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:textColor="?android:attr/textColorSecondary" />
-            
+
     </LinearLayout>
 
 </ScrollView>
diff --git a/core/res/res/layout/preference_header_item.xml b/core/res/res/layout/preference_header_item.xml
index f00e7aa..a987de3 100644
--- a/core/res/res/layout/preference_header_item.xml
+++ b/core/res/res/layout/preference_header_item.xml
@@ -44,7 +44,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:singleLine="true"
-            android:textAppearance="?android:attr/textAppearanceLarge"
+            android:textAppearance="?android:attr/textAppearanceMedium"
             android:ellipsize="marquee"
             android:fadingEdge="horizontal" />
 
diff --git a/core/res/res/layout/preference_information.xml b/core/res/res/layout/preference_information.xml
index a5cf31a..9c9b83e 100644
--- a/core/res/res/layout/preference_information.xml
+++ b/core/res/res/layout/preference_information.xml
@@ -23,21 +23,24 @@
     android:minHeight="?android:attr/listPreferredItemHeight"
     android:gravity="center_vertical"
     android:paddingRight="?android:attr/scrollbarSize">
-    
+
+    <View
+        android:layout_width="@dimen/preference_widget_width"
+        android:layout_height="match_parent" />
+
     <RelativeLayout
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginLeft="16sp"
         android:layout_marginRight="6sp"
         android:layout_marginTop="6sp"
         android:layout_marginBottom="6sp"
         android:layout_weight="1">
-    
+
         <TextView android:id="@+android:id/title"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:singleLine="true"
-            android:textAppearance="?android:attr/textAppearanceLarge"
+            android:textAppearance="?android:attr/textAppearanceMedium"
             android:textColor="?android:attr/textColorSecondary" />
             
         <TextView android:id="@+android:id/summary"
diff --git a/core/res/res/layout/preference_list_content.xml b/core/res/res/layout/preference_list_content.xml
index 5b42407..6c0e773 100644
--- a/core/res/res/layout/preference_list_content.xml
+++ b/core/res/res/layout/preference_list_content.xml
@@ -21,8 +21,7 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:orientation="vertical"
     android:layout_height="match_parent"
-    android:layout_width="match_parent"
-    android:background="@android:color/transparent">
+    android:layout_width="match_parent">
 
     <LinearLayout
         android:orientation="horizontal"
@@ -35,9 +34,9 @@
             android:orientation="vertical"
             android:layout_width="0px"
             android:layout_height="match_parent"
-            android:layout_marginLeft="32dp"
+            android:layout_marginRight="0dp"
+            android:layout_marginLeft="@dimen/preference_screen_side_margin"
             android:layout_marginTop="32dp"
-            android:layout_marginRight="16dp"
             android:layout_marginBottom="32dp"
             android:layout_weight="10">
 
@@ -46,7 +45,6 @@
                 android:layout_height="0px"
                 android:layout_weight="1"
                 android:drawSelectorOnTop="false"
-                android:background="#40404040"
                 android:cacheColorHint="@android:color/transparent"
                 android:listPreferredItemHeight="48dp"
                 android:scrollbarAlwaysDrawVerticalTrack="true" />
@@ -61,12 +59,16 @@
         <FrameLayout android:id="@+id/prefs"
                 android:layout_width="0px"
                 android:layout_height="match_parent"
-                android:layout_weight="25"
-                android:layout_marginLeft="16dp"
-                android:layout_marginRight="16dp"
+                android:layout_weight="20"
+                android:layout_marginLeft="-4dp"
+                android:layout_marginRight="@dimen/preference_screen_side_margin"
                 android:layout_marginTop="16dp"
                 android:layout_marginBottom="16dp"
-                android:background="#60202040"
+                android:paddingLeft="32dip"
+                android:paddingRight="32dip"
+                android:paddingTop="48dip"
+                android:paddingBottom="48dip"
+                android:background="?attr/preferencePanelBackground"
                 android:visibility="gone" />
     </LinearLayout>
 
diff --git a/core/res/res/layout/preference_list_content_single.xml b/core/res/res/layout/preference_list_content_single.xml
new file mode 100644
index 0000000..a015761
--- /dev/null
+++ b/core/res/res/layout/preference_list_content_single.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 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.
+*/
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent">
+
+    <LinearLayout
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_height="0px"
+        android:layout_weight="1">
+
+        <LinearLayout
+            android:id="@+id/headers"
+            android:orientation="vertical"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent">
+
+            <ListView android:id="@android:id/list"
+                android:layout_width="match_parent"
+                android:layout_height="0px"
+                android:layout_weight="1"
+                android:drawSelectorOnTop="false"
+                android:cacheColorHint="@android:color/transparent"
+                android:listPreferredItemHeight="48dp"
+                android:scrollbarAlwaysDrawVerticalTrack="true" />
+
+            <FrameLayout android:id="@+id/list_footer"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="0" />
+
+        </LinearLayout>
+
+    </LinearLayout>
+
+    <RelativeLayout android:id="@+id/button_bar"
+        android:layout_height="wrap_content"
+        android:layout_width="match_parent"
+        android:layout_weight="0"
+        android:background="@android:drawable/bottom_bar"
+        android:visibility="gone">
+
+        <Button android:id="@+id/back_button"
+            android:layout_width="150dip"
+            android:layout_height="wrap_content"
+            android:layout_margin="5dip"
+            android:layout_alignParentLeft="true"
+            android:drawableLeft="@drawable/ic_btn_back"
+            android:drawablePadding="3dip"
+            android:text="@string/back_button_label"
+        />
+        <LinearLayout
+            android:orientation="horizontal"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentRight="true">
+
+            <Button android:id="@+id/skip_button"
+                android:layout_width="150dip"
+                android:layout_height="wrap_content"
+                android:layout_margin="5dip"
+                android:text="@string/skip_button_label"
+                android:visibility="gone"
+            />
+
+            <Button android:id="@+id/next_button"
+                android:layout_width="150dip"
+                android:layout_height="wrap_content"
+                android:layout_margin="5dip"
+                android:drawableRight="@drawable/ic_btn_next"
+                android:drawablePadding="3dip"
+                android:text="@string/next_button_label"
+            />
+        </LinearLayout>
+    </RelativeLayout>
+</LinearLayout>
diff --git a/core/res/res/layout/preference_widget_checkbox.xml b/core/res/res/layout/preference_widget_checkbox.xml
index c1ad360..1ca4393 100644
--- a/core/res/res/layout/preference_widget_checkbox.xml
+++ b/core/res/res/layout/preference_widget_checkbox.xml
@@ -16,11 +16,54 @@
 
 <!-- Layout used by CheckBoxPreference for the checkbox style. This is inflated
      inside android.R.layout.preference. -->
-<CheckBox xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+android:id/checkbox" 
-    android:layout_width="wrap_content"
+<!-- Layout used by DialogPreference in a PreferenceActivity. -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
+    android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:layout_marginRight="4dip"
-    android:layout_gravity="center_vertical"
-    android:focusable="false"
-    android:clickable="false" />
+    android:minHeight="?android:attr/listPreferredItemHeight"
+    android:gravity="center_vertical"
+    android:paddingRight="?android:attr/scrollbarSize">
+
+    <!-- Preference should place its actual preference widget here. -->
+    <LinearLayout android:id="@+android:id/widget_frame"
+        android:layout_width="@dimen/preference_widget_width"
+        android:layout_height="match_parent"
+        android:gravity="center"
+        android:orientation="horizontal" >
+        <CheckBox xmlns:android="http://schemas.android.com/apk/res/android"
+            android:id="@+android:id/checkbox" 
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:focusable="false"
+            android:clickable="false" />
+    </LinearLayout>
+
+    <RelativeLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginRight="6dip"
+        android:layout_marginTop="6dip"
+        android:layout_marginBottom="6dip"
+        android:layout_weight="1">
+
+        <TextView android:id="@+android:id/title"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:singleLine="true"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:ellipsize="marquee"
+            android:fadingEdge="horizontal" />
+            
+        <TextView android:id="@+android:id/summary"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@android:id/title"
+            android:layout_alignLeft="@android:id/title"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:textColor="?android:attr/textColorSecondary"
+            android:maxLines="4" />
+
+    </RelativeLayout>
+</LinearLayout>
+
diff --git a/core/res/res/values-land/dimens.xml b/core/res/res/values-land/dimens.xml
index 647a562..d562d96 100644
--- a/core/res/res/values-land/dimens.xml
+++ b/core/res/res/values-land/dimens.xml
@@ -21,4 +21,6 @@
 <resources>
     <dimen name="password_keyboard_key_height">47dip</dimen>
     <dimen name="password_keyboard_spacebar_vertical_correction">2dip</dimen>
+    <dimen name="preference_screen_side_margin">32dp</dimen>
+    <dimen name="preference_widget_width">64dp</dimen>
 </resources>
\ No newline at end of file
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 1083452..2a942b8 100755
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -351,6 +351,7 @@
         <eat-comment />
         <attr name="alertDialogStyle" format="reference" />
         <attr name="alertDialogButtonGroupStyle" format="reference" />
+        <attr name="alertDialogCenterButtons" format="boolean" />
 
         <!-- ============ -->
         <!-- Panel styles -->
@@ -544,6 +545,8 @@
         <attr name="ringtonePreferenceStyle" format="reference" />
         <!-- The preference layout that has the child/tabbed effect. -->
         <attr name="preferenceLayoutChild" format="reference" />
+        <!-- Preference panel background -->
+        <attr name="preferencePanelBackground" format="reference" />
 
         <!-- ============================ -->
         <!-- Text selection handle styles -->
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index 1ee8271..fe6176d 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -89,10 +89,9 @@
     <attr name="manageSpaceActivity" format="string" />
 
     <!-- Option to let applications specify that user data can/cannot be 
-         cleared. Some applications might not want to clear user data. Such
-         applications can explicitly set this value to false. This flag is
-         turned on by default unless explicitly set to false 
-         by applications. -->
+         cleared. This flag is turned on by default.
+         <em>This attribute is usable only by applications
+         included in the system image. Third-party apps cannot use it.</em> -->
     <attr name="allowClearUserData" format="boolean" />
 
     <!-- Option to let applications specify that user data should
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 6c3eaac..eb3cafa 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -451,4 +451,12 @@
     <!-- Number of database connections opened and managed by framework layer
          to handle queries on each database. -->
     <integer name="db_connection_pool_size">1</integer>
+
+    <!-- The URL that should be sent in an x-wap-profile header with an HTTP request,
+         as defined in the Open Mobile Alliance User Agent Profile specification
+         OMA-TS-UAProf-V2_0-20060206-A Section 8.1.1.1. If the URL contains a '%s'
+         format string then that substring will be replaced with the value of
+         Build.MODEL. The format string shall not be escaped. -->
+    <string name="config_useragentprofile_url"></string>
+
 </resources>
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index 0928ce0..2f0dfc1 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -52,4 +52,8 @@
     <dimen name="password_keyboard_key_height_numeric">56dip</dimen>
     <!-- Default correction for the space key in the password keyboard -->
     <dimen name="password_keyboard_spacebar_vertical_correction">4dip</dimen>
+    <!-- Preference activity side margins -->
+    <dimen name="preference_screen_side_margin">0dp</dimen>
+    <!-- Preference widget area width (to the left of the text) -->
+    <dimen name="preference_widget_width">56dp</dimen>
 </resources>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index f8752d3..8772b3a 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -925,7 +925,9 @@
   <public type="anim" name="slide_in_left" id="0x010a0002" />
   <public type="anim" name="slide_out_right" id="0x010a0003" />
   <public type="anim" name="accelerate_decelerate_interpolator" id="0x010a0004" />
+  <!-- Acceleration curve matching Flash's quadratic ease out function. -->
   <public type="anim" name="accelerate_interpolator" id="0x010a0005" />
+  <!-- Acceleration curve matching Flash's quadratic ease in function. -->
   <public type="anim" name="decelerate_interpolator" id="0x010a0006" />
 
 <!-- ===============================================================
@@ -1364,6 +1366,15 @@
   <public type="anim" name="animator_fade_in" />
   <public type="anim" name="animator_fade_out" />
 
+  <!-- Acceleration curve matching Flash's cubic ease out function. -->
+  <public type="anim" name="accelerate_cubic_interpolator" />
+  <!-- Acceleration curve matching Flash's cubic ease in function. -->
+  <public type="anim" name="decelerate_cubic_interpolator" />
+  <!-- Acceleration curve matching Flash's quint ease out function. -->
+  <public type="anim" name="accelerate_quint_interpolator" />
+  <!-- Acceleration curve matching Flash's quint ease in function. -->
+  <public type="anim" name="decelerate_quint_interpolator" />
+  
   <public type="id" name="home" />
   <!-- Context menu ID for the "Select text..." menu item to switch to text
        selection context mode in text views. -->
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index adf1715..1fd2565 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -820,7 +820,7 @@
     </style>
     
     <style name="Preference.CheckBoxPreference">
-        <item name="android:widgetLayout">@android:layout/preference_widget_checkbox</item>
+        <item name="android:layout">@android:layout/preference_widget_checkbox</item>
     </style>
     
     <style name="Preference.PreferenceScreen">
@@ -829,7 +829,7 @@
     <style name="Preference.DialogPreference">
         <item name="android:positiveButtonText">@android:string/ok</item>
         <item name="android:negativeButtonText">@android:string/cancel</item>
-        <item name="android:widgetLayout">@android:layout/preference_dialog</item>
+        <item name="android:layout">@android:layout/preference_dialog</item>
     </style>
     
     <style name="Preference.DialogPreference.YesNoPreference">
@@ -845,7 +845,7 @@
         <item name="android:ringtoneType">ringtone</item>
         <item name="android:showSilent">true</item>
         <item name="android:showDefault">true</item>
-        <item name="android:widgetLayout">@android:layout/preference_dialog</item>
+        <item name="android:layout">@android:layout/preference_dialog</item>
     </style>
 
     <!-- Other Misc Styles -->
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index e92ebba..b4e3c6f 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -143,6 +143,7 @@
         <item name="dialogTheme">@android:style/Theme.Dialog</item>
         <item name="alertDialogTheme">@android:style/Theme.Dialog.Alert</item>
         <item name="alertDialogButtonGroupStyle">?android:attr/buttonGroupStyle</item>
+        <item name="alertDialogCenterButtons">true</item>
         
         <!-- Panel attributes -->
         <item name="panelBackground">@android:drawable/menu_background</item>
@@ -232,6 +233,7 @@
         <item name="editTextPreferenceStyle">@android:style/Preference.DialogPreference.EditTextPreference</item>
         <item name="ringtonePreferenceStyle">@android:style/Preference.RingtonePreference</item>
         <item name="preferenceLayoutChild">@android:layout/preference_child</item>
+        <item name="preferencePanelBackground">@android:drawable/panel_bg_holo_dark</item>
 
         <!-- Search widget styles -->
         <item name="searchWidgetCorpusItemBackground">@android:color/search_widget_corpus_item_background</item>
@@ -590,7 +592,7 @@
     </style>
 
     <!-- @hide -->
-    <style name="Theme.Dialog.AppError">
+    <style name="Theme.Dialog.AppError" parent="Theme.Holo.Dialog">
         <item name="windowFrame">@null</item>
         <item name="windowTitleStyle">@android:style/DialogWindowTitle</item>
         <item name="windowBackground">@android:color/transparent</item>
@@ -754,6 +756,7 @@
         <item name="dialogTheme">@android:style/Theme.Holo.Dialog</item>
         <item name="alertDialogTheme">@android:style/Theme.Holo.Dialog.Alert</item>
         <item name="alertDialogButtonGroupStyle">@android:style/Widget.Holo.ButtonGroup.AlertDialog</item>
+        <item name="alertDialogCenterButtons">false</item>
         
         <!-- Panel attributes -->
         <item name="panelBackground">@android:drawable/menu_background</item>
@@ -841,6 +844,7 @@
         <item name="editTextPreferenceStyle">@android:style/Preference.DialogPreference.EditTextPreference</item>
         <item name="ringtonePreferenceStyle">@android:style/Preference.RingtonePreference</item>
         <item name="preferenceLayoutChild">@android:layout/preference_child</item>
+        <item name="preferencePanelBackground">@android:drawable/panel_bg_holo_dark</item>
 
         <!-- Search widget styles -->
         <item name="searchWidgetCorpusItemBackground">@android:color/search_widget_corpus_item_background</item>
@@ -1075,6 +1079,7 @@
         <item name="editTextPreferenceStyle">@android:style/Preference.DialogPreference.EditTextPreference</item>
         <item name="ringtonePreferenceStyle">@android:style/Preference.RingtonePreference</item>
         <item name="preferenceLayoutChild">@android:layout/preference_child</item>
+        <item name="preferencePanelBackground">@android:drawable/panel_bg_holo_light</item>
 
         <!-- Search widget styles -->
         <item name="searchWidgetCorpusItemBackground">@android:color/search_widget_corpus_item_background</item>
diff --git a/docs/html/guide/developing/tools/proguard.jd b/docs/html/guide/developing/tools/proguard.jd
new file mode 100644
index 0000000..6abbd36
--- /dev/null
+++ b/docs/html/guide/developing/tools/proguard.jd
@@ -0,0 +1,187 @@
+page.title=ProGuard
+@jd:body
+
+ <div id="qv-wrapper">
+    <div id="qv">
+      <h2>In this document</h2>
+
+      <ol>
+        <li><a href="#enabling">Enabling ProGuard</a></li>
+
+        <li><a href="#configuring">Configuring ProGuard</a></li>
+
+        <li>
+          <a href="#decoding">Decoding Obfuscated Stack Traces</a>
+
+          <ol>
+            <li><a href="#considerations">Debugging considerations for published
+            applications</a></li>
+          </ol>
+        </li>
+      </ol>
+
+      <h2>See also</h2>
+
+      <ol>
+        <li><a href="http://proguard.sourceforge.net/manual/introduction.html">ProGuard
+        Manual</a></li>
+
+        <li><a href="http://proguard.sourceforge.net/manual/retrace/introduction.html">ProGuard
+        ReTrace Manual</a></li>
+      </ol>
+    </div>
+  </div>
+
+  <p>The ProGuard tool shrinks, optimizes, and obfuscates your code by removing unused code and
+  renaming classes, fields, and methods with semantically obscure names. The result is a smaller
+  sized <code>.apk</code> file that is more difficult to reverse engineer. Because ProGuard makes your
+  application harder to reverse engineer, it is important that you use it
+  when your application utilizes features that are sensitive to security like when you are
+  <a href="{@docRoot}guide/publishing/licensing.html">Licensing Your Applications</a>.</p>
+
+  <p>ProGuard is integrated into the Android build system, so you do not have to invoke it
+  manually. ProGuard runs only when you build your application in release mode, so you do not 
+  have to deal with obfuscated code when you build your application in debug mode. 
+  Having ProGuard run is completely optional, but highly recommended.</p>
+  
+  <p>This document describes how to enable and configure ProGuard as well as use the
+  <code>retrace</code> tool to decode obfuscated stack traces.</p>
+
+  <h2 id="enabling">Enabling ProGuard</h2>
+
+  <p>When you create an Android project, a <code>proguard.cfg</code> file is automatically
+  generated in the root directory of the project. This file defines how ProGuard optimizes and
+  obfuscates your code, so it is very important that you understand how to customize it for your
+  needs. The default configuration file only covers general cases, so you most likely have to edit
+  it for your own needs. See the following section about <a href="#configuring">Configuring ProGuard</a> for information on 
+  customizing the ProGuard configuration file.</p>
+
+  <p>To enable ProGuard so that it runs as part of an Ant or Eclipse build, set the
+  <code>proguard.config</code> property in the <code>&lt;project_root&gt;/default.properties</code>
+  file. The path can be an absolute path or a path relative to the project's root.</p>
+<p>If you left the <code>proguard.cfg</code> file in its default location (the project's root directory),
+you can specify its location like this:</p>
+<pre class="no-pretty-print">
+proguard.config=proguard.cfg
+</pre>
+<p>
+You can also move the the file to anywhere you want, and specify the absolute path to it:
+</p>
+<pre class="no-pretty-print">
+proguard.config=/path/to/proguard.cfg
+</pre>
+
+
+  <p>When you build your application in release mode, either by running <code>ant release</code> or
+  by using the <em>Export Wizard</em> in Eclipse, the build system automatically checks to see if
+  the <code>proguard.config</code> property is set. If it is, ProGuard automatically processes
+  the application's bytecode before packaging everything into an <code>.apk</code> file. Building in debug mode
+  does not invoke ProGuard, because it makes debugging more cumbersome.</p>
+
+  <p>ProGuard outputs the following files after it runs:</p>
+
+  <dl>
+    <dt><code>dump.txt</code></dt>
+    <dd>Describes the internal structure of all the class files in the <code>.apk</code> file</dd>
+
+    <dt><code>mapping.txt</code></dt>
+    <dd>Lists the mapping between the original and obfuscated class, method, and field names. 
+    This file is important when you receive a bug report from a release build, because it 
+    translates the obfuscated stack trace back to the original class, method, and member names.
+    See <a href="#decoding">Decoding Obfuscated Stack Traces</a> for more information.</dd>
+
+    <dt><code>seeds.txt</code></dt>
+    <dd>Lists the classes and members that are not obfuscated</dd>
+
+    <dt><code>usage.txt</code></dt>
+    <dd>Lists the code that was stripped from the <code>.apk</code></dd>
+  </ul>
+
+  <p>These files are located in the following directories:</p>
+
+  <ul>
+    <li><code>&lt;project_root&gt;/bin/proguard</code> if you are using Ant.</li>
+
+    <li><code>&lt;project_root&gt;/proguard</code> if you are using Eclipse.</li>
+  </ul>
+
+  
+  <p class="caution"><strong>Caution:</strong> Every time you run a build in release mode, these files are
+  overwritten with the latest files generated by ProGuard. Save a copy of them each time you release your
+  application in order to de-obfuscate bug reports from your release builds. 
+  For more information on why saving these files is important, see 
+  <a href="#considerations">Debugging considerations for published applications</a>.
+  </p>
+
+  <h2 id="configuring">Configuring ProGuard</h2>
+
+  <p>For some situations, the default configurations in the <code>proguard.cfg</code> file will
+  suffice. However, many situations are hard for ProGuard to analyze correctly and it might remove code
+  that it thinks is not used, but your application actually needs. Some examples include:</p>
+
+  <ul>
+    <li>a class that is referenced only in the <code>AndroidManifest.xml</code> file</li>
+
+    <li>a method called from JNI</li>
+
+    <li>dynamically referenced fields and methods</li>
+  </ul>
+
+  <p>The default <code>proguard.cfg</code> file tries to cover general cases, but you might
+  encounter exceptions such as <code>ClassNotFoundException</code>, which happens when ProGuard
+  strips away an entire class that your application calls.</p>
+
+  <p>You can fix errors when ProGuard strips away your code by adding a <code>-keep</code> line in
+  the <code>proguard.cfg</code> file. For example:</p>
+  <pre>
+-keep public class &lt;MyClass&gt;
+</pre>
+
+  <p>There are many options and considerations when using the <code>-keep</code> option, so it is
+  highly recommended that you read the <a href="http://proguard.sourceforge.net/manual/introduction.html">ProGuard
+  Manual</a> for more information about customizing your configuration file. The <a href=
+  "http://proguard.sourceforge.net/manual/usage.html#keepoverview">Overview of Keep options</a> and
+  <a href="http://proguard.sourceforge.net/index.html#/manual/examples.html">Examples section</a>
+  are particularly helpful. The <a href=
+  "http://proguard.sourceforge.net/manual/troubleshooting.html">Troubleshooting</a> section of the
+  ProGuard Manual outlines other common problems you might encounter when your code gets stripped
+  away.</p>
+
+  <h2 id="decoding">Decoding Obfuscated Stack Traces</h2>
+
+  <p>When your obfuscated code outputs a stack trace, the method names are obfuscated, which makes
+  debugging hard, if not impossible. Fortunately, whenever ProGuard runs, it outputs a
+  <code>&lt;project_root&gt;/bin/proguard/mapping.txt</code> file, which shows you the original
+  class, method, and field names mapped to their obfuscated names.</p>
+
+  <p>The <code>retrace.bat</code> script on Windows or the <code>retrace.sh</code> script on Linux
+  or Mac OS X can convert an obfuscated stack trace to a readable one. It is located in the
+  <code>&lt;sdk_root&gt;/tools/proguard/</code> directory. The syntax for executing the 
+  <code>retrace</code> tool is:</p>
+  <pre>retrace.bat|retrace.sh [-verbose] mapping.txt [&lt;stacktrace_file&gt;]</pre>
+  <p>For example:</p>
+  
+  <pre>retrace.bat -verbose mapping.txt obfuscated_trace.txt</pre>
+  
+  <p>If you do not specify a value for <em>&lt;stacktrace_file&gt;</em>, the <code>retrace</code> tool reads
+  from standard input.</p>
+
+  <h3 id="considerations">Debugging considerations for published applications</h3>
+
+  <p>Save the <code>mapping.txt</code> file for every release that you publish to your users. 
+  By retaining a copy of the <code>mapping.txt</code> file for each release build, 
+  you ensure that you can debug a problem if a user encounters a bug and submits an obfuscated stack trace.
+  A project's <code>mapping.txt</code> file is overwritten every time you do a release build, so you must be
+  careful about saving the versions that you need.</p>
+
+  <p>For example, say you publish an application and continue developing new features of
+  the application for a new version. You then do a release build using ProGuard soon after. The
+  build overwrites the previous <code>mapping.txt</code> file. A user submits a bug report
+  containing a stack trace from the application that is currently published. You no longer have a way 
+  of debugging the user's stack trace, because the <code>mapping.txt</code> file associated with the version
+  on the user's device is gone. There are other situations where your <code>mapping.txt</code> file can be overwritten, so
+  ensure that you save a copy for every release that you anticipate you have to debug.</p>
+
+  <p>How you save the <code>mapping.txt</code> file is your decision. For example, you can rename them to
+  include a version or build number, or you can version control them along with your source
+  code.</p>
\ No newline at end of file
diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs
index 9c0fcff..545807e 100644
--- a/docs/html/guide/guide_toc.cs
+++ b/docs/html/guide/guide_toc.cs
@@ -375,7 +375,7 @@
               <li><a href="<?cs var:toroot ?>guide/developing/tools/layoutopt.html">layoutopt</a></li>
               <li><a href="<?cs var:toroot ?>guide/developing/tools/othertools.html#mksdcard">mksdcard</a></li>
               <li><a href="<?cs var:toroot ?>guide/developing/tools/monkey.html">Monkey</a></li>
-                            <li class="toggle-list">
+              <li class="toggle-list">
                  <div>
                      <a href="<?cs var:toroot?>guide/developing/tools/monkeyrunner_concepts.html">
                      <span class="en">monkeyrunner</span>
@@ -403,6 +403,7 @@
                     </li>
                   </ul>
               </li>
+              <li><a href="<?cs var:toroot ?>guide/developing/tools/proguard.html">Proguard</a></li>
               <li><a href="<?cs var:toroot ?>guide/developing/tools/adb.html#sqlite">sqlite3</a></li>
               <li><a href="<?cs var:toroot ?>guide/developing/tools/traceview.html" >Traceview</a></li>
               <li><a href="<?cs var:toroot ?>guide/developing/tools/zipalign.html" >zipalign</a></li>
diff --git a/docs/html/guide/topics/manifest/application-element.jd b/docs/html/guide/topics/manifest/application-element.jd
index 786223f..9ac07fd 100644
--- a/docs/html/guide/topics/manifest/application-element.jd
+++ b/docs/html/guide/topics/manifest/application-element.jd
@@ -3,8 +3,7 @@
 
 <dl class="xml">
 <dt>syntax:</dt>
-<dd><pre class="stx">&lt;application android:<a href="#clear">allowClearUserData</a>=["true" | "false"]
-             android:<a href="#reparent">allowTaskReparenting</a>=["true" | "false"]
+<dd><pre class="stx">&lt;application android:<a href="#reparent">allowTaskReparenting</a>=["true" | "false"]
              android:<a href="#agent">backupAgent</a>="<i>string</i>"
              android:<a href="#debug">debuggable</a>=["true" | "false"]
              android:<a href="#desc">description</a>="<i>string resource</i>"
@@ -49,12 +48,6 @@
 <dt>attributes</dt>
 <dd><dl class="attr">
 
-<dt><a name="clear"></a>{@code android:allowClearUserData}</dt>
-<dd>Whether or not users are given the option to remove user data &mdash; 
-"{@code true}" if they are, and "{@code false}" if not.  If the value is 
-"{@code true}", as it is by default, the application manager includes an 
-option that allows users to clear the data.</dd>
-
 <dt><a name="reparent"></a>{@code android:allowTaskReparenting}</dt>
 <dd>Whether or not activities that the application defines can move from 
 the task that started them to the task they have an affinity for when that task 
diff --git a/docs/html/index.jd b/docs/html/index.jd
index 049df62..1302188 100644
--- a/docs/html/index.jd
+++ b/docs/html/index.jd
@@ -22,7 +22,7 @@
                                 </div> <!-- end annoucement -->
                             </div> <!-- end annoucement-block -->
                         </div><!-- end topAnnouncement -->
-                        <div id="carouselMain" style="height:200px"> <!-- this height can be
+                        <div id="carouselMain" style="height:205px"> <!-- this height can be
                                                             adjusted based on the content height -->
                         </div>
                             <div class="clearer"></div>
@@ -129,14 +129,14 @@
     'sdk': {
       'layout':"imgLeft",
       'icon':"sdk-small.png",
-      'name':"Android 2.2",
-      'img':"froyo-android.png",
-      'title':"Get Android 2.2!",
-      'desc': "<p>The Android 2.2 platform is now available for the Android SDK, along with new "
-+ "tools, documentation, and a new NDK. "
-+ "For information about new features and APIs, read the "
-+ "<a href='{@docRoot}sdk/android-2.2.html'>version notes</a>.</p>"
-+ "<p>If you have an existing SDK, add Android 2.2 as an "
+      'name':"Android 2.3",
+      'img':"gingerdroid.png",
+      'title':"Android 2.3 is here!",
+      'desc': "<p>Android 2.3 is now available for the Android SDK. In addition, new "
++ "tools and documentation are available, plus a new NDK that offers more than ever. "
++ "For more information about what's in Android 2.3, read the "
++ "<a href='{@docRoot}sdk/android-2.3.html'>version notes</a>.</p>"
++ "<p>If you have an existing SDK, add Android 2.3 as an "
 + "<a href='{@docRoot}sdk/adding-components.html'>SDK "
 + "component</a>. If you're new to Android, install the "
 + "<a href='{@docRoot}sdk/index.html'>SDK starter package</a>."
diff --git a/docs/html/sdk/ndk/index.jd b/docs/html/sdk/ndk/index.jd
index 9e88d94..11e6642 100644
--- a/docs/html/sdk/ndk/index.jd
+++ b/docs/html/sdk/ndk/index.jd
@@ -60,511 +60,500 @@
 </style>
 
 <div class="toggleable open">
-  <a href="#" onclick="return toggleDiv(this)">
-        <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px" width="9px" />
-Android NDK, Revision 4b</a> <em>(June 2010)</em>
-  <div class="toggleme">
-<dl>
-<dt>NDK r4b notes:</dt>
-<dd><p>Includes fixes for several issues in the NDK build and debugging scripts
-&mdash; if you are using NDK r4, we recommend downloading the NDK r4b build. For
-detailed information the changes in this release, read the CHANGES.TXT document
-included in the downloaded NDK package.</p></dd>
-</dl>
+    <a href="#"
+         onclick="return toggleDiv(this)"><img src="{@docRoot}assets/images/triangle-opened.png"
+         class="toggle-img"
+         height="9px"
+         width="9px" /> Android NDK, Revision 5</a> <em>(November 2010)</em>
 
-<dl>
-<dt>General notes:</dt>
+    <div class="toggleme">
+      <dl>
+        <dt>NDK r5 notes:</dt>
 
-<dd>
-<ul>
-<li>Provides a simplified build system through the new <code>ndk-build</code> build
-command. </li>
-<li>Adds support for easy native debugging of generated machine code on production
-devices through the new <code>ndk-gdb</code> command.</li>
-<li>Adds a new Android-specific ABI for ARM-based CPU architectures,
-<code>armeabi-v7a</code>. The new ABI extends the existing <code>armeabi</code>
-ABI to include these CPU instruction set extensions:
-<ul>
-<li>Thumb-2 instructions</li>
-<li>VFP hardware FPU instructions (VFPv3-D16)</li>
-<li>Optional support for ARM Advanced SIMD (NEON) GCC intrinsics and VFPv3-D32.
-Supported by devices such as Verizon Droid by Motorola, Google Nexus One, and 
-others.</li>
-</ul>
-<li>Adds a new <code>cpufeatures</code> static library (with sources) that lets
-your app detect the host device's CPU features at runtime. Specifically,
-applications can check for ARMv7-A support, as well as VFPv3-D32 and NEON
-support, then provide separate code paths as needed.</li>
-<li>Adds a sample application, <code>hello-neon</code>, that illustrates how to 
-use the <code>cpufeatures</code> library to check CPU features and then provide
-an optimized code path using NEON instrinsics, if 
-supported by the CPU.</li>
-<li>Lets you generate machine code for either or both of the instruction sets
-supported by the NDK. For example, you can build for both ARMv5 and ARMv7-A
-architectures at the same time and have everything stored to your application's
-final <code>.apk</code>.</li>
-<li>To ensure that your applications are available to users only if their
-devices are capable of running them, Android Market now filters applications
-based on the instruction set information included in your application &mdash; no
-action is needed on your part to enable the filtering. Additionally, the Android
-system itself also checks your application at install time and allows the
-installation to continue only if the application provides a library that is
-compiled for the device's CPU architecture.</li>
-<li>Adds support for Android 2.2, including a new stable API for accessing
-the pixel buffers of {@link android.graphics.Bitmap} objects from native
-code.</li>
-</ul>
-</dd>
-</dl>
-</div>
-</div>
+        <dd>
+          <p>The r5 release of the NDK includes many new APIs, many of which are introduced to
+          support native game development and applications that require similar requirements. Most
+          notably, native activities are now supported, which allow you to write an application
+          entirely with native code. For detailed information describing the changes in this
+          release, read the CHANGES.HTML document included in the downloaded NDK package.</p>
+        </dd>
+      </dl>
 
-<div class="toggleable closed">
-  <a href="#" onclick="return toggleDiv(this)">
-        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
-Android NDK, Revision 3</a> <em>(March 2010)</em>
-  <div class="toggleme">
+      <dl>
+        <dt>General notes:</dt>
 
-<dl>
-<dt>General notes:</dt>
+        <dd>
+          <ul>
+            <li>Adds support for native activities, which allows you to write completely native
+            applications.</li>
 
-<dd>
-<ul>
-<li>Adds OpenGL ES 2.0 native library support.</li>
-<li>Adds a sample application,<code>hello-gl2</code>, that illustrates the use of
-OpenGL ES 2.0 vertex and fragment shaders.</li>
-<li>The toolchain binaries have been refreshed for this release with GCC 4.4.0, which should generate slightly more compact and efficient machine code than the previous one (4.2.1). The NDK also still provides the 4.2.1 binaries, which you can optionally use to build your machine code.</li>
-</ul>
-</dd>
-</dl>
-</div>
-</div>
+            <li>Adds an EGL library that lets you create and manage OpenGL ES textures and
+            services.</li>
 
-<div class="toggleable closed">
-  <a href="#" onclick="return toggleDiv(this)">
-        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
-Android NDK, Revision 2</a> <em>(September 2009)</em>
-  <div class="toggleme">
+            <li>Provides an interface that lets you write a native text-to-speech engine.</li>
 
-<p>Originally released as "Android 1.6 NDK, Release 1".</p>
-<dl>
-<dt>General notes:</dt>
-<dd>
-<ul>
-<li>Adds OpenGL ES 1.1 native library support.</li>
-<li>Adds a sample application, <code>san-angeles</code>, that renders 3D 
-graphics through the native OpenGL ES APIs, while managing activity 
-lifecycle with a {@link android.opengl.GLSurfaceView} object.
-</li>
-</ul>
-</dd>
-</dl>
- </div>
-</div>
+            <li>Adds native support for the following:
 
-<div class="toggleable closed">
-  <a href="#" onclick="return toggleDiv(this)">
-        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
-Android NDK, Revision 1</a> <em>(June 2009)</em>
-  <div class="toggleme">
+              <ul>
+                <li>the input subsystem (such as the keyboard and touch screen)</li>
 
-<p>Originally released as "Android 1.5 NDK, Release 1".</p>
-<dl>
-<dt>General notes:</dt>
-<dd>
-<ul>
-<li>Includes compiler support (GCC) for ARMv5TE instructions, including Thumb-1
-instructions. </li>
-<li>Includes system headers for stable native APIs, documentation, and sample
-applications.</li>
-</ul>
-</dd>
+                <li>the window and surface subsystem.</li>
 
-</dl>
- </div>
-</div>
+                <li>audio APIs based on the OpenSL ES standard that support playback and recording
+                as well as control over platform audio effects.</li>
 
+                <li>event loop APIs to wait for things such as input and sensor events.</li>
 
-<h2 id="overview">What is the Android NDK?</h2>
+                <li>accessing assets packaged in an <code>.apk</code> file.</li>
 
-<p>The Android NDK is a toolset that lets you embed components that make use
-of native code in your Android applications.
-</p>
+                <li>accessing sensor data (accelerometer, compass, gyroscope, etc).</li>
 
-<p>Android applications run in the Dalvik virtual machine. The NDK allows 
-you to implement parts of your applications using native-code languages 
-such as C and C++. This can provide benefits to certain classes of applications, 
-in the form of reuse of existing code and in some cases increased speed.</p>
+                <li>provides sample applications, <code>native-plasma</code> and
+                <code>native-activity</code>, to demonstrate how to write a native activity.</li>
+              </ul>
+            </li>
+          </ul>
+        </dd>
+      </dl>
+    </div>
+  </div>
 
-<p>The NDK provides:</p>
+  <div class="toggleable closed">
+    <a href="#"
+         onclick="return toggleDiv(this)"><img src="{@docRoot}assets/images/triangle-closed.png"
+         class="toggle-img"
+         height="9px"
+         width="9px" /> Android NDK, Revision 4b</a> <em>(June 2010)</em>
 
-<ul>
-<li>A set of tools and build files used to generate native code libraries from C
-and C++ sources</li>
-<li>A way to embed the corresponding native libraries into an application package
-file (<code>.apk</code>) that can be deployed on Android devices</li>
-<li>A set of native system headers and libraries that will be supported in all
-future versions of the Android platform, starting from Android 1.5 </li>
-<li>Documentation, samples, and tutorials</li>
-</ul>
+    <div class="toggleme">
+      <dl>
+        <dt>NDK r4b notes:</dt>
 
-<p>The latest release of the NDK supports these ARM instruction sets:</p>
-<ul>
-<li>ARMv5TE (including Thumb-1 instructions)</li>
-<li>ARMv7-A (including Thumb-2 and VFPv3-D16 instructions, with 
-optional support for NEON/VFPv3-D32 instructions)</li>
-</ul>
+        <dd>
+          <p>Includes fixes for several issues in the NDK build and debugging scripts &mdash; if
+          you are using NDK r4, we recommend downloading the NDK r4b build. For detailed
+          information describing the changes in this release, read the CHANGES.TXT document
+          included in the downloaded NDK package.</p>
+        </dd>
+      </dl>
 
-<p>Future releases of the NDK will also support:</p>
+      <dl>
+        <dt>General notes:</dt>
 
-<ul>
-<li>x86 instructions (see CPU-ARCH-ABIS.TXT for more information)</li>
-</ul>
+        <dd>
+          <ul>
+            <li>Provides a simplified build system through the new <code>ndk-build</code> build
+            command.</li>
 
-<p>ARMv5TE machine code will run on all ARM-based Android devices. ARMv7-A will
-run only on devices such as the Verizon Droid or Google Nexus One that have a
-compatible CPU. The main difference between the two instruction sets is that
-ARMv7-A supports hardware FPU, Thumb-2, and NEON instructions. You can target
-either or both of the instruction sets &mdash; ARMv5TE is the default, but
-switching to ARMv7-A is as easy as adding a single line to the application's
-Application.mk file, without needing to change anything else in the file. You
-can also build for both architectures at the same time and have everything
-stored in the final <code>.apk</code>. For complete information is provided in the
-CPU-ARCH-ABIS.TXT in the NDK package. </p>
+            <li>Adds support for easy native debugging of generated machine code on production
+            devices through the new <code>ndk-gdb</code> command.</li>
 
-<p>The NDK provides stable headers for libc (the C library), libm (the Math
-library), OpenGL ES (3D graphics library), the JNI interface, and other
-libraries, as listed in the section below.</p>
+            <li>Adds a new Android-specific ABI for ARM-based CPU architectures,
+            <code>armeabi-v7a</code>. The new ABI extends the existing <code>armeabi</code> ABI to
+            include these CPU instruction set extensions:
 
-<p>The NDK will not benefit most applications. As a developer, you will need 
-to balance its benefits against its drawbacks; notably, using native code does 
-not result in an automatic performance increase, but does always increase 
-application complexity. Typical good candidates for the NDK are self-contained,
-CPU-intensive operations that don't allocate much memory, such as signal processing,
-physics simulation, and so on. Simply re-coding a method to run in C usually does 
-not result in a large performance increase. The NDK can, however, can be 
-an effective way to reuse a large corpus of existing C/C++ code.</p>
+              <ul>
+                <li>Thumb-2 instructions</li>
 
-<p>Please note that the NDK <em>does not</em> enable you to develop native-only
-applications. Android's primary runtime remains the Dalvik virtual machine.</p>
+                <li>VFP hardware FPU instructions (VFPv3-D16)</li>
 
-<h2 id="contents">Contents of the NDK</h2>
+                <li>Optional support for ARM Advanced SIMD (NEON) GCC intrinsics and VFPv3-D32.
+                Supported by devices such as Verizon Droid by Motorola, Google Nexus One, and
+                others.</li>
+              </ul>
+            </li>
 
-<h4>Development tools</h4>
+            <li>Adds a new <code>cpufeatures</code> static library (with sources) that lets your
+            app detect the host device's CPU features at runtime. Specifically, applications can
+            check for ARMv7-A support, as well as VFPv3-D32 and NEON support, then provide separate
+            code paths as needed.</li>
 
-<p>The NDK includes a set of cross-toolchains (compilers, linkers, etc..) that
-can generate native ARM binaries on Linux, OS X, and Windows (with Cygwin)
-platforms.</p>
+            <li>Adds a sample application, <code>hello-neon</code>, that illustrates how to use the
+            <code>cpufeatures</code> library to check CPU features and then provide an optimized
+            code path using NEON instrinsics, if supported by the CPU.</li>
 
-<p>It provides a set of system headers for stable native APIs that are
-guaranteed to be supported in all later releases of the platform:</p>
+            <li>Lets you generate machine code for either or both of the instruction sets supported
+            by the NDK. For example, you can build for both ARMv5 and ARMv7-A architectures at the
+            same time and have everything stored to your application's final
+            <code>.apk</code>.</li>
 
-<ul>
-<li>libc (C library) headers</li>
-<li>libm (math library) headers</li>
-<li>JNI interface headers</li>
-<li>libz (Zlib compression) headers</li>
-<li>liblog (Android logging) header</li>
-<li>OpenGL ES 1.1 and OpenGL ES 2.0 (3D graphics libraries) headers</li>
-<li>libjnigraphics (Pixel buffer access) header (for Android 2.2 and above).</li> 
-<li>A Minimal set of headers for C++ support</li>
-</ul>
+            <li>To ensure that your applications are available to users only if their devices are
+            capable of running them, Android Market now filters applications based on the
+            instruction set information included in your application &mdash; no action is needed on
+            your part to enable the filtering. Additionally, the Android system itself also checks
+            your application at install time and allows the installation to continue only if the
+            application provides a library that is compiled for the device's CPU architecture.</li>
+
+            <li>Adds support for Android 2.2, including a new stable API for accessing the pixel
+            buffers of {@link android.graphics.Bitmap} objects from native code.</li>
+          </ul>
+        </dd>
+      </dl>
+    </div>
+  </div>
+
+  <div class="toggleable closed">
+    <a href="#"
+         onclick="return toggleDiv(this)"><img src="{@docRoot}assets/images/triangle-closed.png"
+         class="toggle-img"
+         height="9px"
+         width="9px" /> Android NDK, Revision 3</a> <em>(March 2010)</em>
+
+    <div class="toggleme">
+      <dl>
+        <dt>General notes:</dt>
+
+        <dd>
+          <ul>
+            <li>Adds OpenGL ES 2.0 native library support.</li>
+
+            <li>Adds a sample application,<code>hello-gl2</code>, that illustrates the use of
+            OpenGL ES 2.0 vertex and fragment shaders.</li>
+
+            <li>The toolchain binaries have been refreshed for this release with GCC 4.4.0, which
+            should generate slightly more compact and efficient machine code than the previous one
+            (4.2.1). The NDK also still provides the 4.2.1 binaries, which you can optionally use
+            to build your machine code.</li>
+          </ul>
+        </dd>
+      </dl>
+    </div>
+  </div>
+
+  <div class="toggleable closed">
+    <a href="#"
+         onclick="return toggleDiv(this)"><img src="{@docRoot}assets/images/triangle-closed.png"
+         class="toggle-img"
+         height="9px"
+         width="9px" /> Android NDK, Revision 2</a> <em>(September 2009)</em>
+
+    <div class="toggleme">
+      <p>Originally released as "Android 1.6 NDK, Release 1".</p>
+
+      <dl>
+        <dt>General notes:</dt>
+
+        <dd>
+          <ul>
+            <li>Adds OpenGL ES 1.1 native library support.</li>
+
+            <li>Adds a sample application, <code>san-angeles</code>, that renders 3D graphics
+            through the native OpenGL ES APIs, while managing activity lifecycle with a {@link
+            android.opengl.GLSurfaceView} object.</li>
+          </ul>
+        </dd>
+      </dl>
+    </div>
+  </div>
+
+  <div class="toggleable closed">
+    <a href="#"
+         onclick="return toggleDiv(this)"><img src="{@docRoot}assets/images/triangle-closed.png"
+         class="toggle-img"
+         height="9px"
+         width="9px" /> Android NDK, Revision 1</a> <em>(June 2009)</em>
+
+    <div class="toggleme">
+      <p>Originally released as "Android 1.5 NDK, Release 1".</p>
+
+      <dl>
+        <dt>General notes:</dt>
+
+        <dd>
+          <ul>
+            <li>Includes compiler support (GCC) for ARMv5TE instructions, including Thumb-1
+            instructions.</li>
+
+            <li>Includes system headers for stable native APIs, documentation, and sample
+            applications.</li>
+          </ul>
+        </dd>
+      </dl>
+    </div>
+  </div>
+  
+  <h2 id="installing">Installing the NDK</h2>
+  <p>Installing the NDK on your development computer is straightforward and involves extracting the
+  NDK from its download package. Unlike previous releases, there is no need to run a host-setup
+  script.</p>
+
+  <p>Before you get started make sure that you have downloaded the latest <a href=
+  "{@docRoot}sdk/index.html">Android SDK</a> and upgraded your applications and environment as
+  needed. The NDK will not work with older versions of the Android SDK. Also, take a moment to
+  review the <a href="{@docRoot}sdk/ndk/reqs.html">System and Software Requirements</a> for the
+  NDK, if you haven't already.</p>
+
+  <p>To install the NDK, follow these steps:</p>
+
+  <ol>
+    <li>From the table at the top of this page, select the NDK package that is appropriate for your
+    development computer and download the package.</li>
+
+    <li>Uncompress the NDK download package using tools available on your computer. When
+    uncompressed, the NDK files are contained in a directory called
+    <code>android-ndk-&lt;version&gt;</code>. You can rename the NDK directory if necessary and you
+    can move it to any location on your computer. This documentation refers to the NDK directory as
+    <code>&lt;ndk&gt;</code>.</li>
+  </ol>
+
+  <p>You are now ready start working with the NDK.</p>
+
+  <h2 id="gettingstarted">Getting Started with the NDK</h2>
+
+  <p>Once you've installed the NDK successfully, take a few minutes to read the documentation
+  included in the NDK. You can find the documentation in the <code>&lt;ndk&gt;/docs/</code>
+  directory. In particular, please read the OVERVIEW.HTML document completely, so that you
+  understand the intent of the NDK and how to use it.</p>
+
+  <p>If you used a previous version of the NDK, take a moment to review the list of NDK changes in
+  the CHANGES.HTML document.</p>
+
+  <p>Here's the general outline of how you work with the NDK tools:</p>
+
+  <ol>
+    <li>Place your native sources under <code>&lt;project&gt;/jni/...</code></li>
+
+    <li>Create <code>&lt;project&gt;/jni/Android.mk</code> to describe your native sources to the
+    NDK build system</li>
+
+    <li>Optional: Create <code>&lt;project&gt;/jni/Application.mk</code>.</li>
+
+    <li>Build your native code by running the 'ndk-build' script from your project's directory. It
+    is located in the top-level NDK directory:
+      <pre class="no-pretty-print">
+cd &lt;project&gt;
+&lt;ndk&gt;/ndk-build
+</pre>
+
+      <p>The build tools copy the stripped, shared libraries needed by your application to the
+      proper location in the application's project directory.</p>
+    </li>
+
+    <li>Finally, compile your application using the SDK tools in the usual way. The SDK build tools
+    will package the shared libraries in the application's deployable <code>.apk</code> file.</li>
+  </ol>
+
+  <p>For complete information on all of the steps listed above, please see the documentation
+  included with the NDK package.</p>
 
-<p>The NDK also provides a build system that lets you work efficiently with your
-sources, without having to handle the toolchain/platform/CPU/ABI details. You
-create very short build files to describe which sources to compile and which
-Android application will use them &mdash; the build system compiles the sources
-and places the shared libraries directly in your application project. </p>
+  <h2 id="samples">Sample Applications</h2>
 
-<p class="caution"><strong>Important:</strong> With the exception of the
-libraries listed above, native system libraries in the Android platform are
-<em>not</em> stable and may change in future platform versions.
-Your applications should <em>only</em> make use of the stable native system
-libraries provided in this NDK. </p>
+  <p>The NDK includes sample applications that illustrate how to use native code in your Android
+  applications:</p>
 
-<h4>Documentation</h4>
+  <ul>
+    <li><code>hello-jni</code> &mdash; a simple application that loads a string from a native
+    method implemented in a shared library and then displays it in the application UI.</li>
 
-<p>The NDK package includes a set of documentation that describes the
-capabilities of the NDK and how to use it to create shared libraries for your
-Android applications. In this release, the documentation is provided only in the
-downloadable NDK package. You can find the documentation in the
-<code>&lt;ndk&gt;/docs/</code> directory. Included are these files:</p>
+    <li><code>two-libs</code> &mdash; a simple application that loads a shared library dynamically
+    and calls a native method provided by the library. In this case, the method is implemented in a
+    static library imported by the shared library.</li>
 
-<ul>
-<li>INSTALL.TXT &mdash; describes how to install the NDK and configure it for
-your host system</li>
-<li>OVERVIEW.TXT &mdash; provides an overview of the NDK capabilities and
-usage</li>
-<li>ANDROID-MK.TXT &mdash; describes the use of the Android.mk file, which
-defines the native sources you want to compile</li>
-<li>APPLICATION-MK.TXT &mdash; describes the use of the Application.mk file,
-which describes the native sources required by your Android application</li>
-<li>HOWTO.TXT &mdash; information about common tasks associated with NDK 
-development.</li>
-<li>SYSTEM-ISSUES.TXT &mdash; known issues in the Android system images 
-that you should be aware of, if you are developing using the NDK. </li>
-<li>STABLE-APIS.TXT &mdash; a complete list of the stable APIs exposed
-by headers in the NDK.</li>
-<li>CPU-ARCH-ABIS.TXT &mdash; a description of supported CPU architectures 
-and how to target them. </li>
-<li>CPU-FEATURES.TXT &mdash; a description of the <code>cpufeatures</code>
-static library that lets your application code detect the target device's 
-CPU family and the optional features at runtime. 	</li>
-<li>CPU-ARM-NEON.TXT &mdash; a description of how to build with optional
-ARM NEON / VFPv3-D32 instructions. </li>
-<li>CHANGES.TXT &mdash; a complete list of changes to the NDK across all 
-releases.</li>
-</ul>
+    <li><code>san-angeles</code> &mdash; a simple application that renders 3D graphics through the
+    native OpenGL ES APIs, while managing activity lifecycle with a {@link
+    android.opengl.GLSurfaceView} object.</li>
 
-<p>Additionally, the package includes detailed information about the "bionic"
-C library provided with the Android platform that you should be aware of, if you
-are developing using the NDK. You can find the documentation in the 
-<code>&lt;ndk&gt;/docs/system/libc/</code> directory:</p>
+    <li><code>hello-gl2</code> &mdash; a simple application that renders a triangle using OpenGL ES
+    2.0 vertex and fragment shaders.</li>
 
-<ul>
-<li>OVERVIEW.TXT &mdash; provides an overview of the "bionic" C library and the 
-features it offers.</li>
-</ul>
+    <li><code>hello-neon</code> &mdash; a simple application that shows how to use the
+    <code>cpufeatures</code> library to check CPU capabilities at runtime, then use NEON intrinsics
+    if supported by the CPU. Specifically, the application implements two versions of a tiny
+    benchmark for a FIR filter loop, a C version and a NEON-optimized version for devices that
+    support it.</li>
 
-<h4>Sample applications</h4>
+    <li><code>bitmap-plasma</code> &mdash; a simple application that demonstrates how to access the
+    pixel buffers of Android {@link android.graphics.Bitmap} objects from native code, and uses
+    this to generate an old-school "plasma" effect.</li>
 
-<p>The NDK includes sample Android applications that illustrate how to use
-native code in your Android applications. For more information, see 
-<a href="#samples">Using the Sample Applications</a>.</p>
+    <li><code>native-activity</code> &mdash; a simple application that demonstrates how to use the
+    native-app-glue static library to create a native activity</li>
 
-<h2 id="requirements">System and Software Requirements</h2>
+    <li><code>native-plasma</code> &mdash; a version of bitmap-plasma implemented with a native
+    activity.</li>
+  </ul>
 
-<p>The sections below describe the system and software requirements for using
-the Android NDK, as well as platform compatibility considerations that affect
-appplications using libraries produced with the NDK. </p>
+  <p>For each sample, the NDK includes the corresponding C source code and the necessary Android.mk
+  and Application.mk files. There are located under <code>&lt;ndk&gt;/samples/&lt;name&gt;/</code>
+  and their source code can be found under <code>&lt;ndk&gt;/samples/&lt;name&gt;/jni/</code>.</p>
 
-<h4>The Android SDK</h4>
-<ul>
-  <li>A complete Android SDK installation (including all dependencies) is
-required.</li>
-  <li>Android 1.5 SDK or later version is required.</li>
-</ul>
+  <p>You can build the shared libraries for the sample apps by going into
+  <code>&lt;ndk&gt;/samples/&lt;name&gt;/</code> then calling the <code>ndk-build</code> command.
+  The generated shared libraries will be located under
+  <code>&lt;ndk&gt;/samples/&lt;name&gt;/libs/armeabi/</code> for (ARMv5TE machine code) and/or
+  <code>&lt;ndk&gt;/samples/&lt;name&gt;/libs/armeabi-v7a/</code> for (ARMv7 machine code).</p>
 
-<h4>Supported operating systems</h4>
-<ul>
-  <li>Windows XP (32-bit) or Vista (32- or 64-bit)</li>
-  <li>Mac OS X 10.4.8 or later (x86 only)</li>
-  <li>Linux (32- or 64-bit, tested on Linux Ubuntu Dapper Drake)</li>
-</ul>
+  <p>Next, build the sample Android applications that use the shared libraries:</p>
 
-<h4>Required development tools</h4>
-<ul>
-  <li>For all development platforms, GNU Make 3.81 or later is required. Earlier
-versions of GNU Make might work but have not been tested.</li>
-  <li>A recent version of awk (either GNU Awk or Nawk) is also required.</li>
-  <li>For Windows, <a
-href="http://www.cygwin.com">Cygwin</a> 1.7 or higher is required. The NDK 
-will <em>not</em> work with Cygwin 1.5 installations.</li>
-</ul>
+  <ul>
+    <li>If you are developing in Eclipse with ADT, use the New Project Wizard to create a new
+    Android project for each sample, using the "Import from Existing Source" option and importing
+    the source from <code>&lt;ndk&gt;/apps/&lt;app_name&gt;/project/</code>. Then, set up an AVD,
+    if necessary, and build/run the application in the emulator. For more information about
+    creating a new Android project in Eclipse, see <a href=
+    "{@docRoot}guide/developing/eclipse-adt.html">Developing in Eclipse</a>.</li>
 
-<h4>Android platform compatibility</h4>
-<ul>
-  <li>The native libraries created by the Android NDK can only be used on
-devices running the Android 1.5 platform version or later. This is due to 
-toolchain and ABI related changes that make the native libraries incompatible
-with 1.0 and 1.1 system images.</li>
-  <li>For this reason, you should use native libraries produced with the NDK in
-applications that are deployable to devices running the Android 1.5 platform
-version or later. </li>
-  <li>To ensure compatibility, an application using a native library
-produced with the NDK <em>must</em> declare a <a
-href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><code>&lt;uses-sdk&gt;</code></a>
-element in its manifest file, with an <code>android:minSdkVersion</code> attribute 
-value of "3" or higher. For example:
+    <li>If you are developing with Ant, use the <code>android</code> tool to create the build file
+    for each of the sample projects at <code>&lt;ndk&gt;/apps/&lt;app_name&gt;/project/</code>.
+    Then set up an AVD, if necessary, build your project in the usual way, and run it in the
+    emulator. For more information, see <a href=
+    "{@docRoot}guide/developing/other-ide.html">Developing in Other IDEs</a>.</li>
+  </ul>
 
-<pre style="margin:1em;">&lt;manifest&gt;
-  ...
-  &lt;uses-sdk android:minSdkVersion="3" /&gt;
-  ...
-&lt;/manifest&gt;</pre>
-</li>
+  <h3 id="hello-jni">Exploring the hello-jni Sample</h3>
 
-<li>If you use this NDK to create a native library that uses the
-OpenGL ES APIs, the application containing the library can be deployed only to
-devices running the minimum platform versions described in the table below.
-To ensure compatibility, make sure that your application declares the proper
-<code>android:minSdkVersion</code></a> attribute value, as given in the table.</p>
+  <p>The hello-jni sample is a simple demonstration on how to use JNI from an Android application.
+  The HelloJni activity receives a string from a simple C function and displays it in a
+  TextView.</p>
 
-<table style="margin:1em;">
-<tr>
-<th>OpenGL ES Version Used</th>
-<th>Compatible Android Platform(s)</th>
-<th>Required uses-sdk Attribute</th>
-</tr>
-<tr><td>OpenGL ES 1.1</td><td>Android 1.6 and higher</td><td><code>android:minSdkVersion="4"</code></td></tr>
-<tr><td>OpenGL ES 2.0</td><td>Android 2.0 and higher</td><td><code>android:minSdkVersion="5"</code></td></tr>
-</table>
+  <p>The main components of the sample include:</p>
 
-<p>For more information about API Level and its relationship to Android
-platform versions, see <a href="{@docRoot}guide/appendix/api-levels.html">
-Android API Levels</a>.</p></li>
+  <ul>
+    <li>The familiar basic structure of an Android application (an <code>AndroidManifest.xml</code>
+    file, a <code>src/</code> and <code>res</code> directories, and a main activity)</li>
 
-<li>Additionally, an application using the OpenGL ES APIs should declare a
-<code>&lt;uses-feature&gt;</code> element in its manifest, with an
-<code>android:glEsVersion</code> attribute that specifies the minimum OpenGl ES
-version required by the application. This ensures that Android Market will show
-your application only to users whose devices are capable of supporting your
-application. For example: 
+    <li>A <code>jni/</code> directory that includes the implemented source file for the native code
+    as well as the Android.mk file</li>
 
-<pre style="margin:1em;">&lt;manifest&gt;
-  ...
-<!-- Declare that the application uses the OpenGL ES 2.0 API and is designed
-     to run only on devices that support OpenGL ES 2.0 or higher. -->
-  &lt;uses-feature android:glEsVersion="0x00020000" /&gt;
-  ...
-&lt;/manifest&gt;</pre>
+    <li>A <code>tests/</code> directory that contains unit test code.</li>
+  </ul>
 
-<p>For more information, see the <a
-href="{@docRoot}guide/topics/manifest/uses-feature-element.html"><code>&lt;uses-feature&gt;</code></a>
-documentation.</p></li>
+  <ol>
+    <li>Create a new project in Eclipse from the existing sample source or use the
+    <code>android</code> tool to update the project so it generates a build.xml file that you can
+    use to build the sample.
 
-<li>If you use this NDK to create a native library that uses the API to access
-Android {@link android.graphics.Bitmap} pixel buffers, the application
-containing the library can be deployed only to devices running Android 2.2 (API
-level 8) or higher. To ensure compatibility, make sure that your application
-declares <code>&lt;uses-sdk android:minSdkVersion="8" /&gt;</code>attribute
-value in its manifest.</li>
-</ul>
+      <ul>
+        <li>In Eclipse:
 
-<h2 id="installing">Installing the NDK</h2>
+          <ol type="a">
+            <li>Click <strong>File &gt; New Android Project...</strong></li>
 
-<p>Installing the NDK on your development computer is straightforward and
-involves extracting the NDK from its download package. Unlike previous releases,
-there is no need to run a host-setup script.</p>
+            <li>Select the <strong>Create project from existing source</strong> radio button.</li>
 
-<p>Before you get started make sure that you have downloaded the latest <a
-href="{@docRoot}sdk/index.html">Android SDK</a> and upgraded your applications
-and environment as needed. The NDK will not work with older versions of the
-Android SDK. Also, take a moment to review the <a href="#requirements">System
-and Software Requirements</a> for the NDK, if you haven't already. </p>
+            <li>Select any API level above Android 1.5.</li>
 
-<p>To install the NDK, follow these steps:</p>
+            <li>In the <strong>Location</strong> field, click <strong>Browse...</strong> and select
+            the <code>&lt;ndk-root&gt;/samples/hello-jni</code> directory.</li>
 
-<ol>
-<li>From the table at the top of this page, select the NDK package that is
-appropriate for your development computer and download the package.</li>
-<li>Uncompress the NDK download package using tools available on your computer.
-When uncompressed, the NDK files are contained in a directory called
-<code>android-ndk-&lt;version&gt;</code>. You can rename the NDK directory if
-necessary and you can move it to any location on your computer. This
-documentation refers to the NDK directory as <code>&lt;ndk&gt;</code>.  </li>
-</ol>
+            <li>Click <strong>Finish</strong>.</li>
+          </ol>
+        </li>
 
-<p>You are now ready start working with the NDK. </p>
+        <li>On the command line:
 
-<h2 id="gettingstarted">Getting Started with the NDK</h2>
+          <ol type="a">
+            <li>Change to the <code>&lt;ndk-root&gt;/samples/hello-jni</code> directory.</li>
 
-<p>Once you've installed the NDK successfully, take a few minutes to read the
-documentation included in the NDK. You can find the documentation in the
-<code>&lt;ndk&gt;/docs/</code> directory. In particular, please read the
-OVERVIEW.TXT document completely, so that you understand the intent of the NDK
-and how to use it.</p>
+            <li>Run the following command to generate a build.xml file:
+              <pre class="no-pretty-print">
+android update project -p . -s
+</pre>
+            </li>
+          </ol>
+        </li>
+      </ul>
+    </li>
 
-<p>If you used a previous version of the NDK, take a moment to review the 
-list of NDK changes in the CHANGES.TXT document. </p>
+    <li>Compile the native code using the <code>ndk-build</code> command.
+      <pre class="no-pretty-print">
+cd &lt;ndk-root&gt;/samples/hello-jni
+&lt;ndk_root&gt;/ndk-build
+</pre>
+    </li>
 
-<p>Here's the general outline of how you work with the NDK tools:</p>
+    <li>Build and install the application as you would a normal Android application. If you are
+    using Eclipse, run the application to build and install it on a device. If you are using Ant,
+    run the following commands from the project directory:
+      <pre class="no-pretty-print">
+ant debug
+adb install bin/HelloJni-debug.apk
+</pre>
+    </li>
+  </ol>
 
-<ol>
-<li>Place your native sources under
-<code>&lt;project&gt;/jni/...</code></li>
-<li>Create <code>&lt;project&gt;/jni/Android.mk</code> to
-describe your native sources to the NDK build system</li>
-<li>Optional: Create <code>&lt;project&gt;/jni/Application.mk</code>.</li>
-<li>Build your native code by running the 'ndk-build' script from your projet's directory.
-It is located in the top-level NDK directory:
+  <p>When you run the application on the device, the string <code>Hello JNI</code> should appear on
+  your device. You can explore the rest of the samples that are located in the
+  <code>&lt;ndk-root&gt;/samples</code> directory for more examples on how to use the JNI.</p>
 
-<p><pre>
-$ cd &lt;project&gt;
-$ &lt;ndk&gt;/ndk-build
-</pre></p>
+  <h3 id="native-activity">Exploring the native-activity Sample Application</h3>
 
-<p>The build tools copy the stripped, shared libraries needed by your
-application to the proper location in the application's project directory.</p>
-</li>
+  <p>The native-activity sample provided with the Android NDK demonstrates how to use the
+  android_native_app_glue static library. This static library makes creating a native activity
+  easier by providing you with an implementation that handles your callbacks in another thread, so
+  you do not have to worry about them blocking your main UI thread. The main parts of the sample
+  are described below:</p>
 
-<li>Finally, compile your application using the SDK tools in the usual way. The
-SDK build tools will package the shared libraries in the application's
-deployable <code>.apk</code> file. </p></li>
+  <ul>
+    <li>The familiar basic structure of an Android application (an <code>AndroidManifest.xml</code>
+    file, a <code>src/</code> and <code>res</code> directories). The AndroidManifest.xml declares
+    that the application is native and specifies the .so file of the native activity. See {@link
+    android.app.NativeActivity} for the source or see the
+    <code>&lt;ndk_root&gt;/platforms/samples/native-activity/AndroidManifest.xml</code> file.</li>
 
-</ol>
+    <li>A <code>jni/</code> directory contains the native activity, main.c, which uses the
+    <code>android_native_app_glue.h</code> interface to implement the activity. The Android.mk that
+    describes the native module to the build system also exists here.</li>
+  </ul>
 
-<p>For complete information on all of the steps listed above, please see the
-documentation included with the NDK package. </p>
+  <p>To build this sample application:</p>
 
+  <ol>
+    <li>Create a new project in Eclipse from the existing sample source or use the
+    <code>android</code> tool to update the project so it generates a build.xml file that you can
+    use to build the sample.
 
-<h2 id="samples">Using the Sample Applications</h2>
+      <ul>
+        <li>In Eclipse:
 
-<p>The NDK includes sample applications that illustrate how to use native
-code in your Android applications:</p>
+          <ol type="a">
+            <li>Click <strong>File &gt; New Android Project...</strong></li>
 
-<ul>
-<li><code>hello-jni</code> &mdash; a simple application that loads a string from
-a native method implemented in a shared library and then displays it in the
-application UI. </li>
-<li><code>two-libs</code> &mdash; a simple application that loads a shared
-library dynamically and calls a native method provided by the library. In this
-case, the method is implemented in a static library imported by the shared
-library. </li>
-<li><code>san-angeles</code> &mdash; a simple application that renders 3D 
-graphics through the native OpenGL ES APIs, while managing activity lifecycle 
-with a {@link android.opengl.GLSurfaceView} object. </li>
-<li><code>hello-gl2</code> &mdash; a simple application that renders a triangle
-using OpenGL ES 2.0 vertex and fragment shaders.</li>
-<li><code>hello-neon</code> &mdash; a simple application that shows how to use
-the <code>cpufeatures</code> library to check CPU capabilities at runtime,
-then use NEON intrinsics if supported by the CPU. Specifically, the 
-application implements two versions of a tiny benchmark for a FIR filter 
-loop, a C version and a NEON-optimized version for devices that support it.</li>
-<li><code>bitmap-plasma</code> &mdash; a simple application that demonstrates
-how to access the pixel buffers of Android {@link android.graphics.Bitmap}
-objects from native code, and uses this to generate an old-school "plasma"
-effect. </li>
-</ul>
+            <li>Select the <strong>Create project from existing source</strong> radio button.</li>
 
-<p>For each sample, the NDK includes the corresponding C source code and the
-necessary Android.mk and Application.mk files. There are  located under 
-<code>&lt;ndk&gt;/samples/&lt;name&gt;/</code> and their source code can be found under
-<code>&lt;ndk&gt;/samples/&lt;name&gt;/jni/</code>. </p>
+            <li>Select any API level above Android 2.3.</li>
 
-<p>You can build the shared libraries for the sample apps by going into <code>&lt;ndk&gt;/samples/&lt;name&gt;/</code>
-then calling the <code>ndk-build</code> command. The generated shared libraries will be located under
-<code>&lt;ndk&gt;/samples/&lt;name&gt;/libs/armeabi/</code> for (ARMv5TE machine code) and/or
-<code>&lt;ndk&gt;/samples/&lt;name&gt;/libs/armeabi-v7a/</code> for (ARMv7 machine code).
-</p>
+            <li>In the <strong>Location</strong> field, click <strong>Browse...</strong> and select
+            the <code>&lt;ndk-root&gt;/samples/native-activity</code> directory.</li>
 
-<p>Next, build the sample Android applications that use the shared
-libraries:</p>
+            <li>Click <strong>Finish</strong>.</li>
+          </ol>
+        </li>
 
-<ul>
-<li>If you are developing in Eclipse with ADT, use the New Project Wizard to
-create a new Android project for each sample, using the "Import from Existing
-Source" option and importing the source from 
-<code>&lt;ndk&gt;/apps/&lt;app_name&gt;/project/</code>. Then, set up an AVD, if
-necessary, and build/run the application in the emulator. For more information
-about creating a new Android project in Eclipse, see <a
-href="{@docRoot}guide/developing/eclipse-adt.html">Developing in
-Eclipse</a>.</li>
-<li>If you are developing with Ant, use the <code>android</code> tool to create
-the build file for each of the sample projects at
-<code>&lt;ndk&gt;/apps/&lt;app_name&gt;/project/</code>. Then set up an AVD, if
-necessary, build your project in the usual way, and run it in the emulator. 
-For more information, see <a
-href="{@docRoot}guide/developing/other-ide.html">Developing in Other
-IDEs</a>.</li>
-</ul>
+        <li>On the command line:
 
-<h2>Discussion Forum and Mailing List</h2>
+          <ol type="a">
+            <li>Change to the <code>&lt;ndk-root&gt;/samples/native-activity</code> directory.</li>
 
-<p>If you have questions about the NDK or would like to read or contribute to
-discussions about it, please visit the <a
-href="http://groups.google.com/group/android-ndk">android-ndk</a> group and 
-mailing list.</p>
+            <li>Run the following command to generate a build.xml file:
+              <pre class="no-pretty-print">
+android update project -p . -s
+</pre>
+            </li>
+          </ol>
+        </li>
+      </ul>
+    </li>
 
+    <li>Compile the native code using the <code>ndk-build</code> command.
+      <pre class="no-pretty-print">
+cd &lt;ndk-root&gt;/platforms/samples/android-9/samples/native-activity
+&lt;ndk_root&gt;/ndk-build
+</pre>
+    </li>
 
+    <li>Build and install the application as you would a normal Android application. If you are
+    using Eclipse, run the application to build and install it on a device. If you are using Ant,
+    run the following commands in the project directory, then run the application on the device:
+      <pre class="no-pretty-print">
+ant debug
+adb install bin/NativeActivity-debug.apk
+</pre>
+    </li>
+  </ol>
+  
+  <h2 id="forum">Discussion Forum and Mailing List</h2>
 
+  <p>If you have questions about the NDK or would like to read or contribute to discussions about
+  it, please visit the <a href="http://groups.google.com/group/android-ndk">android-ndk</a> group
+  and mailing list.</p>
diff --git a/docs/html/sdk/ndk/overview.jd b/docs/html/sdk/ndk/overview.jd
new file mode 100644
index 0000000..a7ec5d4
--- /dev/null
+++ b/docs/html/sdk/ndk/overview.jd
@@ -0,0 +1,334 @@
+page.title=What is the NDK?
+@jd:body
+
+ <div id="qv-wrapper">
+    <div id="qv">
+      <h2>In this document</h2>
+
+      <ol>
+        <li><a href="#choosing">When to Develop in Native Code</a></li>
+
+        <li>
+          <a href="#contents">Contents of the NDK</a>
+
+          <ol>
+            <li><a href="#tools">Development tools</a></li>
+
+            <li><a href="#docs">Documentation</a></li>
+
+            <li><a href="#samples">Sample applications</a></li>
+          </ol>
+        </li>
+
+        <li><a href="#reqs">System and Software Requirements</a></li>
+        
+      </ol>
+    </div>
+  </div>
+
+  <p>The Android NDK is a toolset that lets you embed components that make use of native code in
+  your Android applications.</p>
+
+  <p>Android applications run in the Dalvik virtual machine. The NDK allows you to implement parts
+  of your applications using native-code languages such as C and C++. This can provide benefits to
+  certain classes of applications, in the form of reuse of existing code and in some cases
+  increased speed.</p>
+
+  <p>The NDK provides:</p>
+
+  <ul>
+    <li>A set of tools and build files used to generate native code libraries from C and C++
+    sources</li>
+
+    <li>A way to embed the corresponding native libraries into an application package file
+    (<code>.apk</code>) that can be deployed on Android devices</li>
+
+    <li>A set of native system headers and libraries that will be supported in all future versions
+    of the Android platform, starting from Android 1.5. Applications that use native activities
+    must be run on Android 2.3 or later.</li>
+
+    <li>Documentation, samples, and tutorials</li>
+  </ul>
+
+  <p>The latest release of the NDK supports these ARM instruction sets:</p>
+
+  <ul>
+    <li>ARMv5TE (including Thumb-1 instructions)</li>
+
+    <li>ARMv7-A (including Thumb-2 and VFPv3-D16 instructions, with optional support for
+    NEON/VFPv3-D32 instructions)</li>
+  </ul>
+
+  <p>Future releases of the NDK will also support:</p>
+
+  <ul>
+    <li>x86 instructions (see CPU-ARCH-ABIS.HTML for more information)</li>
+  </ul>
+
+  <p>ARMv5TE machine code will run on all ARM-based Android devices. ARMv7-A will run only on
+  devices such as the Verizon Droid or Google Nexus One that have a compatible CPU. The main
+  difference between the two instruction sets is that ARMv7-A supports hardware FPU, Thumb-2, and
+  NEON instructions. You can target either or both of the instruction sets &mdash; ARMv5TE is the
+  default, but switching to ARMv7-A is as easy as adding a single line to the application's
+  <code>Application.mk</code> file, without needing to change anything else in the file. You can also build for
+  both architectures at the same time and have everything stored in the final <code>.apk</code>.
+  Complete information is provided in the CPU-ARCH-ABIS.HTML in the NDK package.</p>
+
+  <p>The NDK provides stable headers for libc (the C library), libm (the Math library), OpenGL ES
+  (3D graphics library), the JNI interface, and other libraries, as listed in the <a href=
+  "#tools">Development Tools</a> section.</p>
+
+  <h2 id="choosing">When to Develop in Native Code</h2>
+
+  <p>The NDK will not benefit most applications. As a developer, you need to balance its benefits
+  against its drawbacks; notably, using native code does not result in an automatic performance
+  increase, but always increases application complexity. In general, you should only use native
+  code if it is essential to your application, not just because you prefer to program in C/C++.</p>
+
+  <p>Typical good candidates for the NDK are self-contained, CPU-intensive operations that don't
+  allocate much memory, such as signal processing, physics simulation, and so on. Simply re-coding
+  a method to run in C usually does not result in a large performance increase. When examining
+  whether or not you should develop in native code, think about your requirements and see if the
+  Android framework APIs provide the functionality that you need. The NDK can, however, can be an
+  effective way to reuse a large corpus of existing C/C++ code.</p>
+
+  <p>The Android framework provides two ways to use native code:</p>
+
+  <ul>
+    <li>Write your application using the Android framework and use JNI to access the APIs provided
+    by the Android NDK. This technique allows you to take advantage of the convenience of the
+    Android framework, but still allows you to write native code when necessary. You can install
+    applications that use native code through the JNI on devices that run Android 1.5 or
+    later.</li>
+
+    <li>
+      <p>Write a native activity, which allows you to potentially create an application completely in native
+      code, because you can implement the lifecycle callbacks natively. The Android SDK provides
+      the {@link android.app.NativeActivity} class, which is a convenience class that notifies your
+      native code of any activity lifecycle callbacks (<code>onCreate()</code>, <code>onPause()</code>,
+      <code>onResume()</code>, etc). You can implement the callbacks in your native code to handle
+      these events when they occur. Applications that use native activities must be run on Android
+      2.3 (API Level 9) or later.</p>
+
+      <p>You cannot access features such as Services and Content Providers natively, so if you want
+      to use them or any other framework API, you can still write JNI code to do so.</p>
+    </li>
+  </ul>
+
+  <h2 id="contents">Contents of the NDK</h2>The NDK contains the APIs, documentation, and sample
+  applications that help you write your native code.
+
+  <h3 id="tools">Development tools</h3>
+
+  <p>The NDK includes a set of cross-toolchains (compilers, linkers, etc..) that can generate
+  native ARM binaries on Linux, OS X, and Windows (with Cygwin) platforms.</p>
+
+  <p>It provides a set of system headers for stable native APIs that are guaranteed to be supported
+  in all later releases of the platform:</p>
+
+  <ul>
+    <li>libc (C library) headers</li>
+
+    <li>libm (math library) headers</li>
+
+    <li>JNI interface headers</li>
+
+    <li>libz (Zlib compression) headers</li>
+
+    <li>liblog (Android logging) header</li>
+
+    <li>OpenGL ES 1.1 and OpenGL ES 2.0 (3D graphics libraries) headers</li>
+
+    <li>libjnigraphics (Pixel buffer access) header (for Android 2.2 and above).</li>
+
+    <li>A Minimal set of headers for C++ support</li>
+  </ul>
+
+  <p>The NDK also provides a build system that lets you work efficiently with your sources, without
+  having to handle the toolchain/platform/CPU/ABI details. You create very short build files to
+  describe which sources to compile and which Android application will use them &mdash; the build
+  system compiles the sources and places the shared libraries directly in your application
+  project.</p>
+
+  <p class="caution"><strong>Important:</strong> With the exception of the libraries listed above,
+  native system libraries in the Android platform are <em>not</em> stable and may change in future
+  platform versions. Your applications should <em>only</em> make use of the stable native system
+  libraries provided in this NDK.</p>
+
+  <h3 id="docs">Documentation</h3>
+
+  <p>The NDK package includes a set of documentation that describes the capabilities of the NDK and
+  how to use it to create shared libraries for your Android applications. In this release, the
+  documentation is provided only in the downloadable NDK package. You can find the documentation in
+  the <code>&lt;ndk&gt;/docs/</code> directory. Included are these files:</p>
+
+  <ul>
+    <li>INSTALL.HTML &mdash; describes how to install the NDK and configure it for your host
+    system</li>
+
+    <li>OVERVIEW.HTML &mdash; provides an overview of the NDK capabilities and usage</li>
+
+    <li>ANDROID-MK.HTML &mdash; describes the use of the Android.mk file, which defines the native
+    sources you want to compile</li>
+
+    <li>APPLICATION-MK.HTML &mdash; describes the use of the Application.mk file, which describes
+    the native sources required by your Android application</li>
+
+    <li>HOWTO.HTML &mdash; information about common tasks associated with NDK development.</li>
+
+    <li>SYSTEM-ISSUES.HTML &mdash; known issues in the Android system images that you should be
+    aware of, if you are developing using the NDK.</li>
+
+    <li>STABLE-APIS.HTML &mdash; a complete list of the stable APIs exposed by headers in the
+    NDK.</li>
+
+    <li>CPU-ARCH-ABIS.HTML &mdash; a description of supported CPU architectures and how to target
+    them.</li>
+
+    <li>CPU-FEATURES.HTML &mdash; a description of the <code>cpufeatures</code> static library that
+    lets your application code detect the target device's CPU family and the optional features at
+    runtime.</li>
+
+    <li>CPU-ARM-NEON.HTML &mdash; a description of how to build with optional ARM NEON / VFPv3-D32
+    instructions.</li>
+
+    <li>CHANGES.HTML &mdash; a complete list of changes to the NDK across all releases.</li>
+  </ul>
+
+  <p>Additionally, the package includes detailed information about the "bionic" C library provided
+  with the Android platform that you should be aware of, if you are developing using the NDK. You
+  can find the documentation in the <code>&lt;ndk&gt;/docs/system/libc/</code> directory:</p>
+
+  <ul>
+    <li>OVERVIEW.HTML &mdash; provides an overview of the "bionic" C library and the features it
+    offers.</li>
+  </ul>
+
+  <h3 id="samples">Sample applications</h3>
+
+  <p>The NDK includes sample Android applications that illustrate how to use native code in your
+  Android applications. For more information, see <a href=
+  "{@docRoot}sdk/ndk/installing.html#samples">Sample Applications</a>.</p>
+
+  <h2 id="reqs">System and Software Requirements</h2>
+
+  <p>The sections below describe the system and software requirements for using the Android NDK, as
+  well as platform compatibility considerations that affect appplications using libraries produced
+  with the NDK.</p>
+
+  <h4>The Android SDK</h4>
+
+  <ul>
+    <li>A complete Android SDK installation (including all dependencies) is required.</li>
+
+    <li>Android 1.5 SDK or later version is required.</li>
+  </ul>
+
+  <h4>Supported operating systems</h4>
+
+  <ul>
+    <li>Windows XP (32-bit) or Vista (32- or 64-bit)</li>
+
+    <li>Mac OS X 10.4.8 or later (x86 only)</li>
+
+    <li>Linux (32- or 64-bit, tested on Linux Ubuntu Dapper Drake)</li>
+  </ul>
+
+  <h4>Required development tools</h4>
+
+  <ul>
+    <li>For all development platforms, GNU Make 3.81 or later is required. Earlier versions of GNU
+    Make might work but have not been tested.</li>
+
+    <li>A recent version of awk (either GNU Awk or Nawk) is also required.</li>
+
+    <li>For Windows, <a href="http://www.cygwin.com">Cygwin</a> 1.7 or higher is required. The NDK
+    will <em>not</em> work with Cygwin 1.5 installations.</li>
+  </ul>
+
+  <h4>Android platform compatibility</h4>
+
+  <ul>
+    <li>The native libraries created by the Android NDK can only be used on devices running the
+    Android 1.5 platform version or later. This is due to toolchain and ABI related changes that
+    make the native libraries incompatible with 1.0 and 1.1 system images.</li>
+
+    <li>For this reason, you should use native libraries produced with the NDK in applications that
+    are deployable to devices running the Android 1.5 platform version or later.</li>
+
+    <li>To ensure compatibility, an application using a native library produced with the NDK
+    <em>must</em> declare a <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><code>
+      &lt;uses-sdk&gt;</code></a> element in its manifest file, with an
+      <code>android:minSdkVersion</code> attribute value of "3" or higher. For example:
+      <pre style="margin:1em;">
+&lt;manifest&gt;
+  ...
+  &lt;uses-sdk android:minSdkVersion="3" /&gt;
+  ...
+&lt;/manifest&gt;
+</pre>
+    </li>
+
+    <li>If you use this NDK to create a native library that uses the OpenGL ES APIs, the
+    application containing the library can be deployed only to devices running the minimum platform
+    versions described in the table below. To ensure compatibility, make sure that your application
+    declares the proper <code>android:minSdkVersion</code> attribute value, as given in the
+    table.</li>
+
+    <li style="list-style: none; display: inline">
+      <table style="margin:1em;">
+        <tr>
+          <th>OpenGL ES Version Used</th>
+
+          <th>Compatible Android Platform(s)</th>
+
+          <th>Required uses-sdk Attribute</th>
+        </tr>
+
+        <tr>
+          <td>OpenGL ES 1.1</td>
+
+          <td>Android 1.6 and higher</td>
+
+          <td><code>android:minSdkVersion="4"</code></td>
+        </tr>
+
+        <tr>
+          <td>OpenGL ES 2.0</td>
+
+          <td>Android 2.0 and higher</td>
+
+          <td><code>android:minSdkVersion="5"</code></td>
+        </tr>
+      </table>
+
+      <p>For more information about API Level and its relationship to Android platform versions,
+      see <a href="{@docRoot}guide/appendix/api-levels.html">Android API Levels</a>.</p>
+    </li>
+
+    <li>Additionally, an application using the OpenGL ES APIs should declare a
+    <code>&lt;uses-feature&gt;</code> element in its manifest, with an
+    <code>android:glEsVersion</code> attribute that specifies the minimum OpenGl ES version
+    required by the application. This ensures that Android Market will show your application only
+    to users whose devices are capable of supporting your application. For example:
+      <pre style="margin:1em;">
+&lt;manifest&gt;
+  ...
+<!-- Declare that the application uses the OpenGL ES 2.0 API and is designed
+     to run only on devices that support OpenGL ES 2.0 or higher. -->
+  &lt;uses-feature android:glEsVersion="0x00020000" /&gt;
+  ...
+&lt;/manifest&gt;
+</pre>
+
+      <p>For more information, see the <a href=
+      "{@docRoot}guide/topics/manifest/uses-feature-element.html"><code>&lt;uses-feature&gt;</code></a>
+      documentation.</p>
+    </li>
+
+    <li>If you use this NDK to create a native library that uses the API to access Android {@link
+    android.graphics.Bitmap} pixel buffers or utilizes native activities, the application
+    containing the library can be deployed only to devices running Android 2.2 (API level 8) or
+    higher. To ensure compatibility, make sure that your application declares <code>&lt;uses-sdk
+    android:minSdkVersion="8" /&gt;</code> attribute value in its manifest.</li>
+  </ul>
\ No newline at end of file
diff --git a/docs/html/sdk/sdk_toc.cs b/docs/html/sdk/sdk_toc.cs
index 7b9a5a2..ecc69c2 100644
--- a/docs/html/sdk/sdk_toc.cs
+++ b/docs/html/sdk/sdk_toc.cs
@@ -101,7 +101,7 @@
       <span style="display:none" class="ja"></span>
       <span style="display:none" class="zh-CN"></span>
       <span style="display:none" class="zh-TW"></span></a>
-      </li>
+      <span class="new">new!</span></li>
     </ul>
   </li>
   <li>
@@ -115,9 +115,11 @@
       <span style="display:none" class="zh-TW"></span>
     </h2>
     <ul>
-      <li><a href="<?cs var:toroot ?>sdk/ndk/index.html">Android NDK, r4b</a></li>
+      <li><a href="<?cs var:toroot ?>sdk/ndk/index.html">Download the Android NDK, r5</a></li>
+      <li><a href="<?cs var:toroot ?>sdk/ndk/overview.html">What is the NDK?</a></li>
     </ul>
   </li>
+
   <li>
     <h2>
       <span class="en">More Information</span>
diff --git a/include/media/stagefright/MediaDefs.h b/include/media/stagefright/MediaDefs.h
index 92ce068..2d50ca5 100644
--- a/include/media/stagefright/MediaDefs.h
+++ b/include/media/stagefright/MediaDefs.h
@@ -44,6 +44,8 @@
 extern const char *MEDIA_MIMETYPE_CONTAINER_MATROSKA;
 extern const char *MEDIA_MIMETYPE_CONTAINER_MPEG2TS;
 
+extern const char *MEDIA_MIMETYPE_CONTAINER_WVM;
+
 }  // namespace android
 
 #endif  // MEDIA_DEFS_H_
diff --git a/include/media/stagefright/OMXCodec.h b/include/media/stagefright/OMXCodec.h
index b2af9d7..517868c 100644
--- a/include/media/stagefright/OMXCodec.h
+++ b/include/media/stagefright/OMXCodec.h
@@ -44,6 +44,9 @@
         // can not be fullfilled, Create() returns NULL.
         kSoftwareCodecsOnly      = 8,
         kHardwareCodecsOnly      = 16,
+
+        // Store meta data in video buffers
+        kStoreMetaDataInVideoBuffers = 32,
     };
     static sp<MediaSource> Create(
             const sp<IOMX> &omx,
@@ -178,6 +181,8 @@
     List<size_t> mFilledBuffers;
     Condition mBufferFilled;
 
+    bool mIsMetaDataStoredInVideoBuffers;
+
     OMXCodec(const sp<IOMX> &omx, IOMX::node_id node, uint32_t quirks,
              bool isEncoder, const char *mime, const char *componentName,
              const sp<MediaSource> &source,
diff --git a/libs/ui/InputReader.cpp b/libs/ui/InputReader.cpp
index 120222c..b91e93a 100644
--- a/libs/ui/InputReader.cpp
+++ b/libs/ui/InputReader.cpp
@@ -129,11 +129,11 @@
     case AKEYCODE_META_RIGHT:
         return setEphemeralMetaState(AMETA_META_RIGHT_ON, down, oldMetaState);
     case AKEYCODE_CAPS_LOCK:
-        return toggleLockedMetaState(AMETA_CAPS_LOCK_LATCHED, down, oldMetaState);
+        return toggleLockedMetaState(AMETA_CAPS_LOCK_ON, down, oldMetaState);
     case AKEYCODE_NUM_LOCK:
-        return toggleLockedMetaState(AMETA_NUM_LOCK_LATCHED, down, oldMetaState);
+        return toggleLockedMetaState(AMETA_NUM_LOCK_ON, down, oldMetaState);
     case AKEYCODE_SCROLL_LOCK:
-        return toggleLockedMetaState(AMETA_SCROLL_LOCK_LATCHED, down, oldMetaState);
+        return toggleLockedMetaState(AMETA_SCROLL_LOCK_ON, down, oldMetaState);
     default:
         return oldMetaState;
     }
@@ -966,8 +966,8 @@
             // Note: getDisplayInfo is non-reentrant so we can continue holding the lock.
             if (mAssociatedDisplayId >= 0) {
                 int32_t orientation;
-                if (! getPolicy()->getDisplayInfo(mAssociatedDisplayId, NULL, NULL, & orientation)) {
-                    return;
+                if (!getPolicy()->getDisplayInfo(mAssociatedDisplayId, NULL, NULL, & orientation)) {
+                    orientation = InputReaderPolicyInterface::ROTATION_0;
                 }
 
                 keyCode = rotateKeyCode(keyCode, orientation);
@@ -1058,11 +1058,11 @@
 
 void KeyboardInputMapper::updateLedStateLocked(bool reset) {
     updateLedStateForModifierLocked(mLocked.capsLockLedState, LED_CAPSL,
-            AMETA_CAPS_LOCK_LATCHED, reset);
+            AMETA_CAPS_LOCK_ON, reset);
     updateLedStateForModifierLocked(mLocked.numLockLedState, LED_NUML,
-            AMETA_NUM_LOCK_LATCHED, reset);
+            AMETA_NUM_LOCK_ON, reset);
     updateLedStateForModifierLocked(mLocked.scrollLockLedState, LED_SCROLLL,
-            AMETA_SCROLL_LOCK_LATCHED, reset);
+            AMETA_SCROLL_LOCK_ON, reset);
 }
 
 void KeyboardInputMapper::updateLedStateForModifierLocked(LockedState::LedState& ledState,
@@ -1228,7 +1228,7 @@
             // Note: getDisplayInfo is non-reentrant so we can continue holding the lock.
             int32_t orientation;
             if (! getPolicy()->getDisplayInfo(mAssociatedDisplayId, NULL, NULL, & orientation)) {
-                return;
+                orientation = InputReaderPolicyInterface::ROTATION_0;
             }
 
             float temp;
diff --git a/libs/ui/tests/InputReader_test.cpp b/libs/ui/tests/InputReader_test.cpp
index c19147f..ded0225 100644
--- a/libs/ui/tests/InputReader_test.cpp
+++ b/libs/ui/tests/InputReader_test.cpp
@@ -376,6 +376,7 @@
         KeyedVector<int32_t, int32_t> scanCodeStates;
         KeyedVector<int32_t, int32_t> switchStates;
         KeyedVector<int32_t, KeyInfo> keys;
+        KeyedVector<int32_t, bool> leds;
 
         Device(const String8& name, uint32_t classes) :
                 name(name), classes(classes) {
@@ -450,6 +451,16 @@
         device->keys.add(scanCode, info);
     }
 
+    void addLed(int32_t deviceId, int32_t led, bool initialState) {
+        Device* device = getDevice(deviceId);
+        device->leds.add(led, initialState);
+    }
+
+    bool getLedState(int32_t deviceId, int32_t led) {
+        Device* device = getDevice(deviceId);
+        return device->leds.valueFor(led);
+    }
+
     Vector<String8>& getExcludedDevices() {
         return mExcludedDevices;
     }
@@ -584,10 +595,22 @@
     }
 
     virtual bool hasLed(int32_t deviceId, int32_t led) const {
-        return false;
+        Device* device = getDevice(deviceId);
+        return device && device->leds.indexOfKey(led) >= 0;
     }
 
     virtual void setLedState(int32_t deviceId, int32_t led, bool on) {
+        Device* device = getDevice(deviceId);
+        if (device) {
+            ssize_t index = device->leds.indexOfKey(led);
+            if (index >= 0) {
+                device->leds.replaceValueAt(led, on);
+            } else {
+                ADD_FAILURE()
+                        << "Attempted to set the state of an LED that the EventHub declared "
+                        "was not present.  led=" << led;
+            }
+        }
     }
 
     virtual void dump(String8& dump) {
@@ -1703,6 +1726,81 @@
     ASSERT_FALSE(flags[1]);
 }
 
+TEST_F(KeyboardInputMapperTest, Process_LockedKeysShouldToggleMetaStateAndLeds) {
+    mFakeEventHub->addLed(DEVICE_ID, LED_CAPSL, true /*initially on*/);
+    mFakeEventHub->addLed(DEVICE_ID, LED_NUML, false /*initially off*/);
+    mFakeEventHub->addLed(DEVICE_ID, LED_SCROLLL, false /*initially off*/);
+
+    KeyboardInputMapper* mapper = new KeyboardInputMapper(mDevice, -1,
+            AINPUT_SOURCE_KEYBOARD, AINPUT_KEYBOARD_TYPE_ALPHABETIC);
+    addMapperAndConfigure(mapper);
+
+    // Initialization should have turned all of the lights off.
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_CAPSL));
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_NUML));
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_SCROLLL));
+
+    // Toggle caps lock on.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_CAPSLOCK, AKEYCODE_CAPS_LOCK, 1, 0);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_CAPSLOCK, AKEYCODE_CAPS_LOCK, 0, 0);
+    ASSERT_TRUE(mFakeEventHub->getLedState(DEVICE_ID, LED_CAPSL));
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_NUML));
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_SCROLLL));
+    ASSERT_EQ(AMETA_CAPS_LOCK_ON, mapper->getMetaState());
+
+    // Toggle num lock on.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_NUMLOCK, AKEYCODE_NUM_LOCK, 1, 0);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_NUMLOCK, AKEYCODE_NUM_LOCK, 0, 0);
+    ASSERT_TRUE(mFakeEventHub->getLedState(DEVICE_ID, LED_CAPSL));
+    ASSERT_TRUE(mFakeEventHub->getLedState(DEVICE_ID, LED_NUML));
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_SCROLLL));
+    ASSERT_EQ(AMETA_CAPS_LOCK_ON | AMETA_NUM_LOCK_ON, mapper->getMetaState());
+
+    // Toggle caps lock off.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_CAPSLOCK, AKEYCODE_CAPS_LOCK, 1, 0);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_CAPSLOCK, AKEYCODE_CAPS_LOCK, 1, 0);
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_CAPSL));
+    ASSERT_TRUE(mFakeEventHub->getLedState(DEVICE_ID, LED_NUML));
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_SCROLLL));
+    ASSERT_EQ(AMETA_NUM_LOCK_ON, mapper->getMetaState());
+
+    // Toggle scroll lock on.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_SCROLLLOCK, AKEYCODE_SCROLL_LOCK, 1, 0);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_SCROLLLOCK, AKEYCODE_SCROLL_LOCK, 0, 0);
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_CAPSL));
+    ASSERT_TRUE(mFakeEventHub->getLedState(DEVICE_ID, LED_NUML));
+    ASSERT_TRUE(mFakeEventHub->getLedState(DEVICE_ID, LED_SCROLLL));
+    ASSERT_EQ(AMETA_NUM_LOCK_ON | AMETA_SCROLL_LOCK_ON, mapper->getMetaState());
+
+    // Toggle num lock off.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_NUMLOCK, AKEYCODE_NUM_LOCK, 1, 0);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_NUMLOCK, AKEYCODE_NUM_LOCK, 0, 0);
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_CAPSL));
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_NUML));
+    ASSERT_TRUE(mFakeEventHub->getLedState(DEVICE_ID, LED_SCROLLL));
+    ASSERT_EQ(AMETA_SCROLL_LOCK_ON, mapper->getMetaState());
+
+    // Toggle scroll lock off.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_SCROLLLOCK, AKEYCODE_SCROLL_LOCK, 1, 0);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_SCROLLLOCK, AKEYCODE_SCROLL_LOCK, 0, 0);
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_CAPSL));
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_NUML));
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_SCROLLL));
+    ASSERT_EQ(AMETA_NONE, mapper->getMetaState());
+}
+
 
 // --- TrackballInputMapperTest ---
 
diff --git a/media/java/android/media/CamcorderProfile.java b/media/java/android/media/CamcorderProfile.java
index 3e9429d..505a36c 100644
--- a/media/java/android/media/CamcorderProfile.java
+++ b/media/java/android/media/CamcorderProfile.java
@@ -183,7 +183,7 @@
      * @see #get(int, int)
      */
     public static CamcorderProfile get(int quality) {
-        return get(android.hardware.Camera.CAMERA_ID_DEFAULT, quality);
+        return get(0, quality);
     }
 
     /**
@@ -240,7 +240,7 @@
      * @param quality the target quality level for the camcorder profile
      */
     public static boolean hasProfile(int quality) {
-        return hasProfile(android.hardware.Camera.CAMERA_ID_DEFAULT, quality);
+        return hasProfile(0, quality);
     }
 
     /**
diff --git a/media/java/android/media/ExifInterface.java b/media/java/android/media/ExifInterface.java
index 74488c5..11e27a9 100644
--- a/media/java/android/media/ExifInterface.java
+++ b/media/java/android/media/ExifInterface.java
@@ -51,6 +51,12 @@
     public static final String TAG_GPS_LATITUDE_REF = "GPSLatitudeRef";
     /** Type is String. */
     public static final String TAG_GPS_LONGITUDE_REF = "GPSLongitudeRef";
+    /** Type is String. */
+    public static final String TAG_EXPOSURE_TIME = "ExposureTime";
+    /** Type is String. */
+    public static final String TAG_APERTURE = "FNumber";
+    /** Type is String. */
+    public static final String TAG_ISO = "ISOSpeedRatings";
 
     /**
      * The altitude (in meters) based on the reference in TAG_GPS_ALTITUDE_REF.
diff --git a/media/java/android/media/MediaRecorder.java b/media/java/android/media/MediaRecorder.java
index fcf6510..866c853 100644
--- a/media/java/android/media/MediaRecorder.java
+++ b/media/java/android/media/MediaRecorder.java
@@ -314,6 +314,31 @@
     }
 
     /**
+     * Sets the orientation hint for output video playback.
+     * This method should be called before start(). This method will not
+     * trigger the source video frame to rotate during video recording, but to
+     * add a composition matrix containing the rotation angle in the output
+     * video if the output format is OutputFormat.THREE_GPP or
+     * OutputFormat.MPEG_4 so that a video player can choose the proper
+     * orientation for playback. Note that some video players may choose
+     * to ignore the compostion matrix in a video during playback.
+     *
+     * @param degrees the angle to be rotated clockwise in degrees.
+     * The supported angles are 0, 90, 180, and 270 degrees.
+     * @throws IllegalArgumentException if the angle is not supported.
+     *
+     */
+    public void setOrientationHint(int degrees) {
+        if (degrees != 0   &&
+            degrees != 90  &&
+            degrees != 180 &&
+            degrees != 270) {
+            throw new IllegalArgumentException("Unsupported angle: " + degrees);
+        }
+        setParameter(String.format("video-param-rotation-angle-degrees=%d", degrees));
+    }
+
+    /**
      * Sets the format of the output file produced during recording. Call this
      * after setAudioSource()/setVideoSource() but before prepare().
      *
diff --git a/media/java/android/media/MediaScanner.java b/media/java/android/media/MediaScanner.java
index 3f6b7a2..4fe2c43 100644
--- a/media/java/android/media/MediaScanner.java
+++ b/media/java/android/media/MediaScanner.java
@@ -29,6 +29,7 @@
 import android.drm.DrmManagerClient;
 import android.graphics.BitmapFactory;
 import android.net.Uri;
+import android.os.Environment;
 import android.os.Process;
 import android.os.RemoteException;
 import android.os.SystemProperties;
@@ -127,17 +128,6 @@
     private static final int FILES_PRESCAN_FORMAT_COLUMN_INDEX = 2;
     private static final int FILES_PRESCAN_DATE_MODIFIED_COLUMN_INDEX = 3;
 
-    private static final String[] MEDIA_PRESCAN_PROJECTION = new String[] {
-            MediaStore.MediaColumns._ID, // 0
-            MediaStore.MediaColumns.DATA, // 1
-            MediaStore.MediaColumns.DATE_MODIFIED, // 2
-    };
-
-    private static final int MEDIA_PRESCAN_ID_COLUMN_INDEX = 0;
-    private static final int MEDIA_PRESCAN_PATH_COLUMN_INDEX = 1;
-    private static final int MEDIA_PRESCAN_DATE_MODIFIED_COLUMN_INDEX = 2;
-
-
     private static final String[] PLAYLIST_MEMBERS_PROJECTION = new String[] {
             Audio.Playlists.Members.PLAYLIST_ID, // 0
      };
@@ -301,6 +291,9 @@
     private boolean mProcessPlaylists, mProcessGenres;
     private int mMtpObjectHandle;
 
+    private final String mMediaStoragePath;
+    private final String mExternalStoragePath;
+
     // used when scanning the image database so we know whether we have to prune
     // old thumbnail files
     private int mOriginalCount;
@@ -370,6 +363,14 @@
         mBitmapOptions.inJustDecodeBounds = true;
 
         setDefaultRingtoneFileNames();
+
+        String mediaStoragePath = SystemProperties.get("ro.media.storage");
+        if (mediaStoragePath != null &&  mediaStoragePath.length() > 0) {
+            mMediaStoragePath = mediaStoragePath;
+        } else {
+            mMediaStoragePath = null;
+        }
+        mExternalStoragePath = Environment.getExternalStorageDirectory().getAbsolutePath();
     }
 
     private void setDefaultRingtoneFileNames() {
@@ -459,6 +460,11 @@
             }
 
             String key = path;
+            if (mMediaStoragePath != null && key.startsWith(mMediaStoragePath)) {
+                // MediaProvider uses external variant of path for _data, so we need to match
+                // against that path instead.
+                key = mExternalStoragePath + key.substring(mMediaStoragePath.length());
+            }
             if (mCaseInsensitivePaths) {
                 key = path.toLowerCase();
             }
@@ -925,6 +931,12 @@
         }
 
         if (filePath != null) {
+            if (mMediaStoragePath != null && filePath.startsWith(mMediaStoragePath)) {
+                // MediaProvider uses external variant of path for _data, so we need to query
+                // using that path instead.
+                filePath = mExternalStoragePath + filePath.substring(mMediaStoragePath.length());
+            }
+
             // query for only one file
             where = Files.FileColumns.DATA + "=?";
             selectionArgs = new String[] { filePath };
diff --git a/media/java/android/media/videoeditor/VideoEditor.java b/media/java/android/media/videoeditor/VideoEditor.java
index 00143ad..64d3229 100755
--- a/media/java/android/media/videoeditor/VideoEditor.java
+++ b/media/java/android/media/videoeditor/VideoEditor.java
@@ -134,6 +134,43 @@
      * change the contents of the output movie throw an IllegalStateException

      * while an export operation is pending.

      *

+     * The audio and video codecs are automatically selected by the underlying

+     * implementation.

+     *

+     * @param filename The output file name (including the full path)

+     * @param height The height of the output video file. The supported values

+     *            for height are described in the MediaProperties class, for

+     *            example: HEIGHT_480. The width will be automatically computed

+     *            according to the aspect ratio provided by

+     *            {@link #setAspectRatio(int)}

+     * @param bitrate The bitrate of the output video file. This is approximate

+     *            value for the output movie. Supported bitrate values are

+     *            described in the MediaProperties class for example:

+     *            BITRATE_384K

+     * @param listener The listener for progress notifications. Use null if

+     *            export progress notifications are not needed.

+     * @throws IllegalArgumentException if height or bitrate are not supported

+     *             or if the audio or video codecs are not supported

+     * @throws IOException if output file cannot be created

+     * @throws IllegalStateException if a preview or an export is in progress or

+     *             if no MediaItem has been added

+     * @throws CancellationException if export is canceled by calling

+     *             {@link #cancelExport()}

+     * @throws UnsupportOperationException if multiple simultaneous export() are

+     *             not allowed

+     */

+    public void export(String filename, int height, int bitrate, ExportProgressListener listener)

+            throws IOException;

+

+    /**

+     * Create the output movie based on all media items added and the applied

+     * storyboard items. This method can take a long time to execute and is

+     * blocking. The application will receive progress notifications via the

+     * ExportProgressListener. Specific implementations may not support multiple

+     * simultaneous export operations. Note that invoking methods which would

+     * change the contents of the output movie throw an IllegalStateException

+     * while an export operation is pending.

+     *

      * @param filename The output file name (including the full path)

      * @param height The height of the output video file. The supported values

      *            for height are described in the MediaProperties class, for

diff --git a/media/java/android/media/videoeditor/VideoEditorTestImpl.java b/media/java/android/media/videoeditor/VideoEditorTestImpl.java
index 60d3f23..40b49a5 100644
--- a/media/java/android/media/videoeditor/VideoEditorTestImpl.java
+++ b/media/java/android/media/videoeditor/VideoEditorTestImpl.java
@@ -750,7 +750,8 @@
         final File file = new File(mProjectPath, PROJECT_FILENAME);
         // Load the metadata
         final XmlPullParser parser = Xml.newPullParser();
-        parser.setInput(new FileInputStream(file), "UTF-8");
+        final FileInputStream fis = new FileInputStream(file);
+        parser.setInput(fis, "UTF-8");
         int eventType = parser.getEventType();
         String name;
         MediaItem currentMediaItem = null;
@@ -860,6 +861,7 @@
             eventType = parser.next();
         }
 
+        fis.close();
         computeTimelineDuration();
     }
 
@@ -1034,6 +1036,13 @@
     /*
      * {@inheritDoc}
      */
+    public void export(String filename, int height, int bitrate, ExportProgressListener listener)
+            throws IOException {
+    }
+
+    /*
+     * {@inheritDoc}
+     */
     public void export(String filename, int height, int bitrate, int audioCodec, int videoCodec,
             ExportProgressListener listener) throws IOException {
     }
diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp
index 913d953..6a25dc5 100644
--- a/media/libmediaplayerservice/StagefrightRecorder.cpp
+++ b/media/libmediaplayerservice/StagefrightRecorder.cpp
@@ -1035,7 +1035,8 @@
     }
 }
 
-status_t StagefrightRecorder::setupCameraSource(sp<CameraSource> *cameraSource) {
+status_t StagefrightRecorder::setupCameraSource(
+        sp<CameraSource> *cameraSource) {
     status_t err = OK;
     if ((err = checkVideoEncoderCapabilities()) != OK) {
         return err;
@@ -1051,7 +1052,8 @@
         *cameraSource = mCameraSourceTimeLapse;
     } else {
         *cameraSource = CameraSource::CreateFromCamera(
-                mCamera, mCameraId, videoSize, mFrameRate, mPreviewSurface);
+                mCamera, mCameraId, videoSize, mFrameRate,
+                mPreviewSurface, true /*storeMetaDataInVideoBuffers*/);
     }
     CHECK(*cameraSource != NULL);
 
@@ -1067,6 +1069,10 @@
     }
 
     CHECK(mFrameRate != -1);
+
+    mIsMetaDataStoredInVideoBuffers =
+        (*cameraSource)->isMetaDataStoredInVideoBuffers();
+
     return OK;
 }
 
@@ -1135,6 +1141,9 @@
 
     // Use software codec for time lapse
     uint32_t encoder_flags = (mCaptureTimeLapse) ? OMXCodec::kPreferSoftwareCodecs : 0;
+    if (mIsMetaDataStoredInVideoBuffers) {
+        encoder_flags |= OMXCodec::kStoreMetaDataInVideoBuffers;
+    }
     sp<MediaSource> encoder = OMXCodec::Create(
             client.interface(), enc_meta,
             true /* createEncoder */, cameraSource,
@@ -1412,6 +1421,7 @@
     mCaptureAuxVideo = false;
     mCameraSourceSplitter = NULL;
     mCameraSourceTimeLapse = NULL;
+    mIsMetaDataStoredInVideoBuffers = false;
     mEncoderProfiles = MediaProfiles::getInstance();
 
     mOutputFd = -1;
diff --git a/media/libmediaplayerservice/StagefrightRecorder.h b/media/libmediaplayerservice/StagefrightRecorder.h
index 7d2549f..d11d7e0 100644
--- a/media/libmediaplayerservice/StagefrightRecorder.h
+++ b/media/libmediaplayerservice/StagefrightRecorder.h
@@ -103,6 +103,7 @@
     String8 mParams;
     int mOutputFd, mOutputFdAux;
 
+    bool mIsMetaDataStoredInVideoBuffers;
     MediaProfiles *mEncoderProfiles;
 
     status_t setupMPEG4Recording(
diff --git a/media/libstagefright/Android.mk b/media/libstagefright/Android.mk
index d1870ee..562eb60 100644
--- a/media/libstagefright/Android.mk
+++ b/media/libstagefright/Android.mk
@@ -45,6 +45,7 @@
         TimedEventQueue.cpp               \
         Utils.cpp                         \
         WAVExtractor.cpp                  \
+        WVMExtractor.cpp                  \
         avc_utils.cpp                     \
         string.cpp
 
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index ca90c0c..4e1969b 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -416,6 +416,7 @@
     if (mDecryptHandle != NULL) {
             mDrmManagerClient->setPlaybackStatus(mDecryptHandle,
                     Playback::STOP, 0);
+            mDrmManagerClient->closeDecryptSession(mDecryptHandle);
             mDecryptHandle = NULL;
             mDrmManagerClient = NULL;
     }
@@ -1667,9 +1668,15 @@
     }
 
     dataSource->getDrmInfo(&mDecryptHandle, &mDrmManagerClient);
-    if (mDecryptHandle != NULL
-            && RightsStatus::RIGHTS_VALID != mDecryptHandle->status) {
-        notifyListener_l(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, ERROR_NO_LICENSE);
+    if (mDecryptHandle != NULL) {
+        if (RightsStatus::RIGHTS_VALID == mDecryptHandle->status) {
+            if (DecryptApiType::WV_BASED == mDecryptHandle->decryptApiType) {
+                LOGD("Setting mCachedSource to NULL for WVM\n");
+                mCachedSource.clear();
+            }
+        } else {
+            notifyListener_l(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, ERROR_NO_LICENSE);
+        }
     }
 
     return setDataSource_l(extractor);
diff --git a/media/libstagefright/DRMExtractor.cpp b/media/libstagefright/DRMExtractor.cpp
index aa9ad23..3c98932 100644
--- a/media/libstagefright/DRMExtractor.cpp
+++ b/media/libstagefright/DRMExtractor.cpp
@@ -280,18 +280,23 @@
         if (gDrmManagerClient == NULL) {
             gDrmManagerClient = new DrmManagerClient();
         }
+
+        if (gDrmManagerClient == NULL) {
+            return false;
+        }
     }
 
     DecryptHandle *decryptHandle = source->DrmInitialization(gDrmManagerClient);
 
     if (decryptHandle != NULL) {
         if (decryptHandle->decryptApiType == DecryptApiType::CONTAINER_BASED) {
-            *mimeType = String8("drm+container_based+");
+            *mimeType = String8("drm+container_based+") + decryptHandle->mimeType;
         } else if (decryptHandle->decryptApiType == DecryptApiType::ELEMENTARY_STREAM_BASED) {
-            *mimeType = String8("drm+es_based+");
+            *mimeType = String8("drm+es_based+") + decryptHandle->mimeType;
+        } else if (decryptHandle->decryptApiType == DecryptApiType::WV_BASED) {
+            *mimeType = MEDIA_MIMETYPE_CONTAINER_WVM;
+            LOGW("SniffWVM: found match\n");
         }
-
-        *mimeType += decryptHandle->mimeType;
         *confidence = 10.0f;
 
         return true;
diff --git a/media/libstagefright/FileSource.cpp b/media/libstagefright/FileSource.cpp
index e4f9a47..1c1a9c5 100644
--- a/media/libstagefright/FileSource.cpp
+++ b/media/libstagefright/FileSource.cpp
@@ -55,9 +55,6 @@
         delete[] mDrmBuf;
         mDrmBuf = NULL;
     }
-    if (mDecryptHandle != NULL) {
-        mDrmManagerClient->closeDecryptSession(mDecryptHandle);
-    }
 }
 
 status_t FileSource::initCheck() const {
@@ -113,7 +110,11 @@
 }
 
 DecryptHandle* FileSource::DrmInitialization(DrmManagerClient* client) {
+    if (client == NULL) {
+        return NULL;
+    }
     mDrmManagerClient = client;
+
     if (mDecryptHandle == NULL) {
         mDecryptHandle = mDrmManagerClient->openDecryptSession(
                 mFd, mOffset, mLength);
diff --git a/media/libstagefright/MediaDefs.cpp b/media/libstagefright/MediaDefs.cpp
index 7648d42..4599fca 100644
--- a/media/libstagefright/MediaDefs.cpp
+++ b/media/libstagefright/MediaDefs.cpp
@@ -42,4 +42,6 @@
 const char *MEDIA_MIMETYPE_CONTAINER_MATROSKA = "video/x-matroska";
 const char *MEDIA_MIMETYPE_CONTAINER_MPEG2TS = "video/mp2ts";
 
+const char *MEDIA_MIMETYPE_CONTAINER_WVM = "video/wvm";
+
 }  // namespace android
diff --git a/media/libstagefright/MediaExtractor.cpp b/media/libstagefright/MediaExtractor.cpp
index 965c370..d12ac64 100644
--- a/media/libstagefright/MediaExtractor.cpp
+++ b/media/libstagefright/MediaExtractor.cpp
@@ -25,6 +25,7 @@
 #include "include/OggExtractor.h"
 #include "include/MPEG2TSExtractor.h"
 #include "include/DRMExtractor.h"
+#include "include/WVMExtractor.h"
 
 #include "matroska/MatroskaExtractor.h"
 
@@ -92,6 +93,8 @@
         return new MatroskaExtractor(source);
     } else if (!strcasecmp(mime, MEDIA_MIMETYPE_CONTAINER_MPEG2TS)) {
         return new MPEG2TSExtractor(source);
+    } else if (!strcasecmp(mime, MEDIA_MIMETYPE_CONTAINER_WVM)) {
+        return new WVMExtractor(source);
     }
 
     return NULL;
diff --git a/media/libstagefright/NuCachedSource2.cpp b/media/libstagefright/NuCachedSource2.cpp
index b67002d..a69c396 100644
--- a/media/libstagefright/NuCachedSource2.cpp
+++ b/media/libstagefright/NuCachedSource2.cpp
@@ -510,5 +510,13 @@
     mSuspended = true;
 }
 
+DecryptHandle* NuCachedSource2::DrmInitialization(DrmManagerClient* client) {
+    return mSource->DrmInitialization(client);
+}
+
+void NuCachedSource2::getDrmInfo(DecryptHandle **handle, DrmManagerClient **client) {
+    mSource->getDrmInfo(handle, client);
+}
+
 }  // namespace android
 
diff --git a/media/libstagefright/NuHTTPDataSource.cpp b/media/libstagefright/NuHTTPDataSource.cpp
index 2743b2f..7aac447 100644
--- a/media/libstagefright/NuHTTPDataSource.cpp
+++ b/media/libstagefright/NuHTTPDataSource.cpp
@@ -67,7 +67,9 @@
       mPort(0),
       mOffset(0),
       mContentLength(0),
-      mContentLengthValid(false) {
+      mContentLengthValid(false),
+      mDecryptHandle(NULL),
+      mDrmManagerClient(NULL) {
 }
 
 NuHTTPDataSource::~NuHTTPDataSource() {
@@ -89,6 +91,9 @@
         off_t offset) {
     String8 host, path;
     unsigned port;
+
+    mUri = uri;
+
     if (!ParseURL(uri, &host, &port, &path)) {
         return ERROR_MALFORMED;
     }
@@ -340,4 +345,30 @@
     }
 }
 
+DecryptHandle* NuHTTPDataSource::DrmInitialization(DrmManagerClient* client) {
+    if (client == NULL) {
+        return NULL;
+    }
+    mDrmManagerClient = client;
+
+    if (mDecryptHandle == NULL) {
+        /* Note if redirect occurs, mUri is the redirect uri instead of the
+         * original one
+         */
+        mDecryptHandle = mDrmManagerClient->openDecryptSession(mUri);
+    }
+
+    if (mDecryptHandle == NULL) {
+        mDrmManagerClient = NULL;
+    }
+
+    return mDecryptHandle;
+}
+
+void NuHTTPDataSource::getDrmInfo(DecryptHandle **handle, DrmManagerClient **client) {
+    *handle = mDecryptHandle;
+
+    *client = mDrmManagerClient;
+}
+
 }  // namespace android
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index e1c06a6..9f9c83a 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -548,6 +548,10 @@
 }
 
 status_t OMXCodec::configureCodec(const sp<MetaData> &meta, uint32_t flags) {
+    mIsMetaDataStoredInVideoBuffers = false;
+    if (flags & kStoreMetaDataInVideoBuffers) {
+        mIsMetaDataStoredInVideoBuffers = true;
+    }
     if (!(flags & kIgnoreCodecSpecificData)) {
         uint32_t type;
         const void *data;
@@ -1616,6 +1620,14 @@
         return err;
     }
 
+    if (mIsMetaDataStoredInVideoBuffers && portIndex == kPortIndexInput) {
+        err = mOMX->storeMetaDataInBuffers(mNode, kPortIndexInput, OMX_TRUE);
+        if (err != OK) {
+            LOGE("Storing meta data in video buffers is not supported");
+            return err;
+        }
+    }
+
     CODEC_LOGI("allocating %lu buffers of size %lu on %s port",
             def.nBufferCountActual, def.nBufferSize,
             portIndex == kPortIndexInput ? "input" : "output");
@@ -1896,7 +1908,14 @@
                      "an EMPTY_BUFFER_DONE.", buffer);
             }
 
-            buffers->editItemAt(i).mOwnedByComponent = false;
+            BufferInfo* info = &buffers->editItemAt(i);
+            info->mOwnedByComponent = false;
+
+            // Buffer could not be released until empty buffer done is called.
+            if (info->mMediaBuffer != NULL) {
+                info->mMediaBuffer->release();
+                info->mMediaBuffer = NULL;
+            }
 
             if (mPortStatus[kPortIndexInput] == DISABLING) {
                 CODEC_LOGV("Port is disabled, freeing buffer %p", buffer);
@@ -2691,11 +2710,19 @@
             break;
         }
 
+        bool releaseBuffer = true;
         if (mIsEncoder && (mQuirks & kAvoidMemcopyInputRecordingFrames)) {
             CHECK(mOMXLivesLocally && offset == 0);
             OMX_BUFFERHEADERTYPE *header = (OMX_BUFFERHEADERTYPE *) info->mBuffer;
             header->pBuffer = (OMX_U8 *) srcBuffer->data() + srcBuffer->range_offset();
+            releaseBuffer = false;
+            info->mMediaBuffer = srcBuffer;
+            // FIXME: we are leaking memory
         } else {
+            if (mIsMetaDataStoredInVideoBuffers) {
+                releaseBuffer = false;
+                info->mMediaBuffer = srcBuffer;
+            }
             memcpy((uint8_t *)info->mData + offset,
                     (const uint8_t *)srcBuffer->data() + srcBuffer->range_offset(),
                     srcBuffer->range_length());
@@ -2711,8 +2738,10 @@
 
         offset += srcBuffer->range_length();
 
-        srcBuffer->release();
-        srcBuffer = NULL;
+        if (releaseBuffer) {
+            srcBuffer->release();
+            srcBuffer = NULL;
+        }
 
         ++n;
 
diff --git a/media/libstagefright/WVMExtractor.cpp b/media/libstagefright/WVMExtractor.cpp
new file mode 100644
index 0000000..7c72852
--- /dev/null
+++ b/media/libstagefright/WVMExtractor.cpp
@@ -0,0 +1,104 @@
+/*
+ * 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.
+ */
+
+#define LOG_TAG "WVMExtractor"
+#include <utils/Log.h>
+
+#include "include/WVMExtractor.h"
+
+#include <arpa/inet.h>
+#include <utils/String8.h>
+#include <media/stagefright/Utils.h>
+#include <media/stagefright/DataSource.h>
+#include <media/stagefright/MediaSource.h>
+#include <media/stagefright/MediaDefs.h>
+#include <media/stagefright/MetaData.h>
+#include <media/stagefright/MediaErrors.h>
+#include <media/stagefright/MediaBuffer.h>
+#include <media/stagefright/MediaDebug.h>
+#include <dlfcn.h>
+
+#include <utils/Errors.h>
+
+/* The extractor lifetime is short - just long enough to get
+ * the media sources constructed - so the shared lib needs to remain open
+ * beyond the lifetime of the extractor.  So keep the handle as a global
+ * rather than a member of the extractor
+ */
+void *gVendorLibHandle = NULL;
+
+namespace android {
+
+static Mutex gWVMutex;
+
+WVMExtractor::WVMExtractor(const sp<DataSource> &source)
+    : mDataSource(source) {
+    {
+        Mutex::Autolock autoLock(gWVMutex);
+        if (gVendorLibHandle == NULL) {
+            gVendorLibHandle = dlopen("libwvm.so", RTLD_NOW);
+        }
+
+        if (gVendorLibHandle == NULL) {
+            LOGE("Failed to open libwvm.so");
+            return;
+        }
+    }
+
+    typedef MediaExtractor *(*GetInstanceFunc)(sp<DataSource>);
+    GetInstanceFunc getInstanceFunc =
+        (GetInstanceFunc) dlsym(gVendorLibHandle,
+                "_ZN7android11GetInstanceENS_2spINS_10DataSourceEEE");
+
+    if (getInstanceFunc) {
+        LOGD("Calling GetInstanceFunc");
+        mImpl = (*getInstanceFunc)(source);
+        CHECK(mImpl != NULL);
+    } else {
+        LOGE("Failed to locate GetInstance in libwvm.so");
+    }
+}
+
+WVMExtractor::~WVMExtractor() {
+}
+
+size_t WVMExtractor::countTracks() {
+    return (mImpl != NULL) ? mImpl->countTracks() : 0;
+}
+
+sp<MediaSource> WVMExtractor::getTrack(size_t index) {
+    if (mImpl == NULL) {
+        return NULL;
+    }
+    return mImpl->getTrack(index);
+}
+
+sp<MetaData> WVMExtractor::getTrackMetaData(size_t index, uint32_t flags) {
+    if (mImpl == NULL) {
+        return NULL;
+    }
+    return mImpl->getTrackMetaData(index, flags);
+}
+
+sp<MetaData> WVMExtractor::getMetaData() {
+    if (mImpl == NULL) {
+        return NULL;
+    }
+    return mImpl->getMetaData();
+}
+
+} //namespace android
+
diff --git a/media/libstagefright/include/NuCachedSource2.h b/media/libstagefright/include/NuCachedSource2.h
index 1fb2088..4067585 100644
--- a/media/libstagefright/include/NuCachedSource2.h
+++ b/media/libstagefright/include/NuCachedSource2.h
@@ -37,6 +37,8 @@
     virtual status_t getSize(off_t *size);
     virtual uint32_t flags();
 
+    virtual DecryptHandle* DrmInitialization(DrmManagerClient *client);
+    virtual void getDrmInfo(DecryptHandle **handle, DrmManagerClient **client);
     ////////////////////////////////////////////////////////////////////////////
 
     size_t cachedSize();
diff --git a/media/libstagefright/include/NuHTTPDataSource.h b/media/libstagefright/include/NuHTTPDataSource.h
index 8593a91..93b7a76 100644
--- a/media/libstagefright/include/NuHTTPDataSource.h
+++ b/media/libstagefright/include/NuHTTPDataSource.h
@@ -26,6 +26,9 @@
     virtual status_t getSize(off_t *size);
     virtual uint32_t flags();
 
+    virtual DecryptHandle* DrmInitialization(DrmManagerClient *client);
+    virtual void getDrmInfo(DecryptHandle **handle, DrmManagerClient **client);
+
 protected:
     virtual ~NuHTTPDataSource();
 
@@ -44,12 +47,16 @@
     unsigned mPort;
     String8 mPath;
     String8 mHeaders;
+    String8 mUri;
 
     HTTPStream mHTTP;
     off_t mOffset;
     off_t mContentLength;
     bool mContentLengthValid;
 
+    DecryptHandle *mDecryptHandle;
+    DrmManagerClient *mDrmManagerClient;
+
     status_t connect(
             const char *uri, const String8 &headers, off_t offset);
 
diff --git a/media/libstagefright/include/WVMExtractor.h b/media/libstagefright/include/WVMExtractor.h
new file mode 100644
index 0000000..0da45a8
--- /dev/null
+++ b/media/libstagefright/include/WVMExtractor.h
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+#ifndef WVM_EXTRACTOR_H_
+
+#define WVM_EXTRACTOR_H_
+
+#include <media/stagefright/MediaExtractor.h>
+
+namespace android {
+
+class DataSource;
+
+class WVMExtractor : public MediaExtractor {
+public:
+    WVMExtractor(const sp<DataSource> &source);
+
+    virtual size_t countTracks();
+    virtual sp<MediaSource> getTrack(size_t index);
+    virtual sp<MetaData> getTrackMetaData(size_t index, uint32_t flags);
+    virtual sp<MetaData> getMetaData();
+
+protected:
+    virtual ~WVMExtractor();
+
+private:
+    sp<DataSource> mDataSource;
+    sp<MediaExtractor> mImpl;
+
+    WVMExtractor(const WVMExtractor &);
+    WVMExtractor &operator=(const WVMExtractor &);
+
+};
+
+}  // namespace android
+
+#endif  // DRM_EXTRACTOR_H_
+
diff --git a/media/libwvm/Android.mk b/media/libwvm/Android.mk
new file mode 100644
index 0000000..7c75c0f
--- /dev/null
+++ b/media/libwvm/Android.mk
@@ -0,0 +1,10 @@
+# create an empty mk for libwvm
+# for integration purpose
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libwvm
+
+LOCAL_MODULE_TAGS := optional
+include $(BUILD_SHARED_LIBRARY)
diff --git a/native/include/android/input.h b/native/include/android/input.h
index 729dd2e..861ec8b 100644
--- a/native/include/android/input.h
+++ b/native/include/android/input.h
@@ -116,14 +116,14 @@
     /* This mask is used to check whether the right META meta key is pressed. */
     AMETA_META_RIGHT_ON = 0x40000,
 
-    /* This mask is used to check whether the CAPS LOCK meta key is latched. */
-    AMETA_CAPS_LOCK_LATCHED = 0x100000,
+    /* This mask is used to check whether the CAPS LOCK meta key is on. */
+    AMETA_CAPS_LOCK_ON = 0x100000,
 
-    /* This mask is used to check whether the NUM LOCK meta key is latched. */
-    AMETA_NUM_LOCK_LATCHED = 0x200000,
+    /* This mask is used to check whether the NUM LOCK meta key is on. */
+    AMETA_NUM_LOCK_ON = 0x200000,
 
-    /* This mask is used to check whether the SCROLL LOCK meta key is latched. */
-    AMETA_SCROLL_LOCK_LATCHED = 0x400000,
+    /* This mask is used to check whether the SCROLL LOCK meta key is on. */
+    AMETA_SCROLL_LOCK_ON = 0x400000,
 };
 
 /*
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index 593edc8..6c84afd 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -61,7 +61,7 @@
     // database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion'
     // is properly propagated through your change.  Not doing so will result in a loss of user
     // settings.
-    private static final int DATABASE_VERSION = 60;
+    private static final int DATABASE_VERSION = 61;
 
     private Context mContext;
 
@@ -792,6 +792,23 @@
             upgradeVersion = 60;
         }
 
+        if (upgradeVersion == 60) {
+            // Increase screen timeout for tablet
+            db.beginTransaction();
+            SQLiteStatement stmt = null;
+            try {
+                stmt = db.compileStatement("INSERT OR REPLACE INTO system(name,value)"
+                        + " VALUES(?,?);");
+                loadIntegerSetting(stmt, Settings.System.SCREEN_OFF_TIMEOUT,
+                        R.integer.def_screen_off_timeout); 
+                db.setTransactionSuccessful();
+            } finally {
+                db.endTransaction();
+                if (stmt != null) stmt.close();
+            }
+            upgradeVersion = 61;
+        }
+
         // *** Remember to update DATABASE_VERSION above!
 
         if (upgradeVersion != currentVersion) {
diff --git a/packages/SystemUI/res/anim/lights_out_in.xml b/packages/SystemUI/res/anim/lights_out_in.xml
index 8154ec0..f76a452 100644
--- a/packages/SystemUI/res/anim/lights_out_in.xml
+++ b/packages/SystemUI/res/anim/lights_out_in.xml
@@ -16,11 +16,11 @@
 
 <set xmlns:android="http://schemas.android.com/apk/res/android"
     >
-    <translate android:fromYDelta="100%p" android:toYDelta="0"
+    <translate android:fromYDelta="-100%p" android:toYDelta="0"
         android:duration="@android:integer/config_mediumAnimTime" 
         android:interpolator="@anim/hydraulic_brake_interpolator"
         />
-    <alpha android:fromAlpha="0.0" android:toAlpha="1.0"
+    <alpha android:fromAlpha="0.5" android:toAlpha="1.0"
         android:duration="@android:integer/config_longAnimTime" 
         />
 </set>
diff --git a/packages/SystemUI/res/anim/lights_out_out.xml b/packages/SystemUI/res/anim/lights_out_out.xml
index b4bc55a..610ac7a 100644
--- a/packages/SystemUI/res/anim/lights_out_out.xml
+++ b/packages/SystemUI/res/anim/lights_out_out.xml
@@ -16,11 +16,11 @@
 
 <set xmlns:android="http://schemas.android.com/apk/res/android"
     >
-    <translate android:toYDelta="100%p" android:fromYDelta="0" 
+    <translate android:toYDelta="-100%p" android:fromYDelta="0" 
         android:duration="@android:integer/config_mediumAnimTime" 
         android:interpolator="@anim/hydraulic_brake_interpolator"
         />
-    <alpha android:toAlpha="0.0" android:fromAlpha="1.0"
+    <alpha android:toAlpha="0.5" android:fromAlpha="1.0"
         android:duration="@android:integer/config_longAnimTime" 
         />
 </set>
diff --git a/packages/SystemUI/res/anim/status_bar_in.xml b/packages/SystemUI/res/anim/status_bar_in.xml
index 460fe50..79fe5f1 100644
--- a/packages/SystemUI/res/anim/status_bar_in.xml
+++ b/packages/SystemUI/res/anim/status_bar_in.xml
@@ -16,11 +16,11 @@
 
 <set xmlns:android="http://schemas.android.com/apk/res/android"
     >
-    <translate android:fromYDelta="-100%p" android:toYDelta="0"
+    <translate android:fromYDelta="100%p" android:toYDelta="0"
         android:duration="@android:integer/config_longAnimTime" 
         android:interpolator="@anim/hydraulic_brake_interpolator"
         />
-    <alpha android:fromAlpha="0.0" android:toAlpha="1.0"
+    <alpha android:fromAlpha="0.5" android:toAlpha="1.0"
         android:duration="@android:integer/config_longAnimTime" 
         />
 </set>
diff --git a/packages/SystemUI/res/anim/status_bar_out.xml b/packages/SystemUI/res/anim/status_bar_out.xml
index 6572ab4..80863cf 100644
--- a/packages/SystemUI/res/anim/status_bar_out.xml
+++ b/packages/SystemUI/res/anim/status_bar_out.xml
@@ -16,11 +16,11 @@
 
 <set xmlns:android="http://schemas.android.com/apk/res/android"
     >
-    <translate android:toYDelta="-100%p" android:fromYDelta="0"
+    <translate android:toYDelta="100%p" android:fromYDelta="0"
         android:duration="@android:integer/config_longAnimTime" 
         android:interpolator="@anim/hydraulic_brake_interpolator"
         />
-    <alpha android:toAlpha="0.0" android:fromAlpha="1.0"
+    <alpha android:toAlpha="0.5" android:fromAlpha="1.0"
         android:duration="@android:integer/config_longAnimTime" 
         />
 </set>
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_airplane_off.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_airplane_off.png
new file mode 100644
index 0000000..c7578f1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_airplane_off.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_airplane_on.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_airplane_on.png
new file mode 100644
index 0000000..b76c366
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_airplane_on.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_back.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_back.png
new file mode 100644
index 0000000..7f96b03
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_back.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_battery_mini.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_battery_mini.png
new file mode 100644
index 0000000..c541c7c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_battery_mini.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_battery_on.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_battery_on.png
new file mode 100644
index 0000000..1e55c88
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_battery_on.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_bluetooth_off.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_bluetooth_off.png
new file mode 100644
index 0000000..8045e96
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_bluetooth_off.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_bluetooth_on.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_bluetooth_on.png
new file mode 100644
index 0000000..858a191
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_bluetooth_on.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_brightness.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_brightness.png
new file mode 100644
index 0000000..6e8995e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_brightness.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_brightness_auto.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_brightness_auto.png
new file mode 100644
index 0000000..35d9425ed
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_brightness_auto.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_brightness_low.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_brightness_low.png
new file mode 100644
index 0000000..808af5c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_brightness_low.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_close.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_close.png
new file mode 100644
index 0000000..0ae98d6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_close.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_default_bg.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_default_bg.png
new file mode 100644
index 0000000..4272f32
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_default_bg.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_gps_off.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_gps_off.png
new file mode 100644
index 0000000..8a4932b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_gps_off.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_gps_on.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_gps_on.png
new file mode 100644
index 0000000..029ea22
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_gps_on.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_home.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_home.png
new file mode 100644
index 0000000..c43a019
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_home.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_ime_default.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_ime_default.png
new file mode 100644
index 0000000..499244b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_ime_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_lightsout.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_lightsout.png
new file mode 100644
index 0000000..97897b9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_lightsout.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_menu.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_menu.png
new file mode 100644
index 0000000..7af5454
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_menu.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_avail.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_avail.png
new file mode 100644
index 0000000..1a2af70
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_avail.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_avail_open.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_avail_open.png
new file mode 100644
index 0000000..cdeadb8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_avail_open.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_dnd.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_dnd.png
new file mode 100644
index 0000000..2bccff0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_dnd.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_none.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_none.png
new file mode 100644
index 0000000..5417216
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_none.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_none_open.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_none_open.png
new file mode 100644
index 0000000..544e6ba
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_none_open.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_open.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_open.png
new file mode 100644
index 0000000..5813a34
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_open.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_pocket.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_pocket.png
new file mode 100644
index 0000000..12b6cea
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_pocket.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_pocket_drag.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_pocket_drag.png
new file mode 100644
index 0000000..28590bc
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_pocket_drag.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_pocket_hidden.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_pocket_hidden.png
new file mode 100644
index 0000000..c66ad77
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_pocket_hidden.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_pocket_holding.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_pocket_holding.png
new file mode 100644
index 0000000..6416969
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_pocket_holding.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_press_bg.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_press_bg.png
new file mode 100644
index 0000000..513f2a2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_press_bg.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_recent.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_recent.png
new file mode 100644
index 0000000..2d80bb9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_recent.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off.png
new file mode 100644
index 0000000..cf5174a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_on.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_on.png
new file mode 100644
index 0000000..9acd6f4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_on.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_sound_off.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_sound_off.png
new file mode 100644
index 0000000..efdf566
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_sound_off.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_sound_on.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_sound_on.png
new file mode 100644
index 0000000..a1d5a2d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_sound_on.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_wifi_mini.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_wifi_mini.png
new file mode 100644
index 0000000..2475eb1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_wifi_mini.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_wifi_off.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_wifi_off.png
new file mode 100644
index 0000000..fd747a1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_wifi_off.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_wifi_on.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_wifi_on.png
new file mode 100644
index 0000000..7c889356
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_wifi_on.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_recent_default.png b/packages/SystemUI/res/drawable-hdpi/status_bar_recent_default.png
new file mode 100644
index 0000000..dc4cb51
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/status_bar_recent_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_recent_pressed.png b/packages/SystemUI/res/drawable-hdpi/status_bar_recent_pressed.png
new file mode 100644
index 0000000..dc4cb51
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/status_bar_recent_pressed.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_battery_0.png b/packages/SystemUI/res/drawable-hdpi/sysbar_battery_0.png
new file mode 100644
index 0000000..35b765f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_battery_0.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_battery_10.png b/packages/SystemUI/res/drawable-hdpi/sysbar_battery_10.png
new file mode 100644
index 0000000..39eeb06
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_battery_10.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_battery_100.png b/packages/SystemUI/res/drawable-hdpi/sysbar_battery_100.png
new file mode 100644
index 0000000..b5787aa
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_battery_100.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_battery_20.png b/packages/SystemUI/res/drawable-hdpi/sysbar_battery_20.png
new file mode 100644
index 0000000..3fc2852
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_battery_20.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_battery_30.png b/packages/SystemUI/res/drawable-hdpi/sysbar_battery_30.png
new file mode 100644
index 0000000..6ba6da3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_battery_30.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_battery_40.png b/packages/SystemUI/res/drawable-hdpi/sysbar_battery_40.png
new file mode 100644
index 0000000..f5ac131
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_battery_40.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_battery_50.png b/packages/SystemUI/res/drawable-hdpi/sysbar_battery_50.png
new file mode 100644
index 0000000..fffb701
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_battery_50.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_battery_60.png b/packages/SystemUI/res/drawable-hdpi/sysbar_battery_60.png
new file mode 100644
index 0000000..7b4fa44
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_battery_60.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_battery_70.png b/packages/SystemUI/res/drawable-hdpi/sysbar_battery_70.png
new file mode 100644
index 0000000..3c9eeb1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_battery_70.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_battery_80.png b/packages/SystemUI/res/drawable-hdpi/sysbar_battery_80.png
new file mode 100644
index 0000000..3945188
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_battery_80.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_battery_90.png b/packages/SystemUI/res/drawable-hdpi/sysbar_battery_90.png
new file mode 100644
index 0000000..8a9241c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_battery_90.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_batterymini_100.png b/packages/SystemUI/res/drawable-hdpi/sysbar_batterymini_100.png
new file mode 100644
index 0000000..67591fe
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_batterymini_100.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_batterymini_red.png b/packages/SystemUI/res/drawable-hdpi/sysbar_batterymini_red.png
new file mode 100644
index 0000000..697044b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_batterymini_red.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_hidenotification_handle.png b/packages/SystemUI/res/drawable-hdpi/sysbar_hidenotification_handle.png
new file mode 100644
index 0000000..64945d4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_hidenotification_handle.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_minimeter_bg.png b/packages/SystemUI/res/drawable-hdpi/sysbar_minimeter_bg.png
new file mode 100644
index 0000000..b59bf1d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_minimeter_bg.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_panel_bg.9.png b/packages/SystemUI/res/drawable-hdpi/sysbar_panel_bg.9.png
new file mode 100644
index 0000000..2d5ccfa
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_panel_bg.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_panel_recents_bg.9.png b/packages/SystemUI/res/drawable-hdpi/sysbar_panel_recents_bg.9.png
new file mode 100644
index 0000000..cd8120b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_panel_recents_bg.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_0.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_0.png
new file mode 100644
index 0000000..8811252
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_0.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_10.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_10.png
new file mode 100644
index 0000000..9c6d641
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_10.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_100.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_100.png
new file mode 100644
index 0000000..58f0129
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_100.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_20.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_20.png
new file mode 100644
index 0000000..440bd50
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_20.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_30.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_30.png
new file mode 100644
index 0000000..cc17a9f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_30.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_40.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_40.png
new file mode 100644
index 0000000..87537f7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_40.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_50.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_50.png
new file mode 100644
index 0000000..2aa5967
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_50.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_60.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_60.png
new file mode 100644
index 0000000..bedb646
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_60.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_70.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_70.png
new file mode 100644
index 0000000..9b4a966
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_70.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_80.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_80.png
new file mode 100644
index 0000000..73ed185
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_80.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_90.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_90.png
new file mode 100644
index 0000000..8e0c706
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_90.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signalmini_100.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signalmini_100.png
new file mode 100644
index 0000000..8bec533
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_signalmini_100.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_toggle_bg_off.9.png b/packages/SystemUI/res/drawable-hdpi/sysbar_toggle_bg_off.9.png
new file mode 100644
index 0000000..9dc0390
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_toggle_bg_off.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_toggle_bg_on.9.png b/packages/SystemUI/res/drawable-hdpi/sysbar_toggle_bg_on.9.png
new file mode 100644
index 0000000..08fe94f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_toggle_bg_on.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-land-hdpi/ic_sysbar_rotate_off.png b/packages/SystemUI/res/drawable-land-hdpi/ic_sysbar_rotate_off.png
new file mode 100644
index 0000000..66f299c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-land-hdpi/ic_sysbar_rotate_off.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/battery_0.png b/packages/SystemUI/res/drawable-mdpi/battery_0.png
new file mode 100644
index 0000000..00fb261
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/battery_0.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/battery_100.png b/packages/SystemUI/res/drawable-mdpi/battery_100.png
new file mode 100644
index 0000000..600da18
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/battery_100.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/battery_20.png b/packages/SystemUI/res/drawable-mdpi/battery_20.png
new file mode 100644
index 0000000..5545cdb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/battery_20.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/battery_40.png b/packages/SystemUI/res/drawable-mdpi/battery_40.png
new file mode 100644
index 0000000..f57ce03
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/battery_40.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/battery_60.png b/packages/SystemUI/res/drawable-mdpi/battery_60.png
new file mode 100644
index 0000000..c8affe2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/battery_60.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/battery_80.png b/packages/SystemUI/res/drawable-mdpi/battery_80.png
new file mode 100644
index 0000000..d877fe1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/battery_80.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/signal_0.png b/packages/SystemUI/res/drawable-mdpi/signal_0.png
new file mode 100644
index 0000000..00fb261
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/signal_0.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/signal_100.png b/packages/SystemUI/res/drawable-mdpi/signal_100.png
new file mode 100644
index 0000000..59df547
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/signal_100.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/signal_20.png b/packages/SystemUI/res/drawable-mdpi/signal_20.png
new file mode 100644
index 0000000..3bce724
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/signal_20.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/signal_40.png b/packages/SystemUI/res/drawable-mdpi/signal_40.png
new file mode 100644
index 0000000..570069c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/signal_40.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/signal_60.png b/packages/SystemUI/res/drawable-mdpi/signal_60.png
new file mode 100644
index 0000000..0cfc7a6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/signal_60.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/signal_80.png b/packages/SystemUI/res/drawable-mdpi/signal_80.png
new file mode 100644
index 0000000..66201d0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/signal_80.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_bluetooth.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_bluetooth.png
new file mode 100644
index 0000000..3ddf728
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_bluetooth.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_1x.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_1x.png
new file mode 100644
index 0000000..f8b6f11
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_3g.png
new file mode 100644
index 0000000..3198abc
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_e.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_e.png
new file mode 100644
index 0000000..16e3b0b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_g.png
new file mode 100644
index 0000000..91db8e8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_h.png
new file mode 100644
index 0000000..44ab1ec
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_connected_1x.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_connected_1x.png
new file mode 100644
index 0000000..c9d6719
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_connected_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_connected_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_connected_3g.png
new file mode 100644
index 0000000..e0a39cf
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_connected_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_connected_e.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_connected_e.png
new file mode 100644
index 0000000..93b8f94
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_connected_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_connected_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_connected_g.png
new file mode 100644
index 0000000..5561011
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_connected_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_connected_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_connected_h.png
new file mode 100644
index 0000000..697b908
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_connected_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_in_1x.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_in_1x.png
new file mode 100644
index 0000000..4cced10
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_in_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_in_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_in_3g.png
new file mode 100644
index 0000000..6f2f058
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_in_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_in_e.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_in_e.png
new file mode 100644
index 0000000..b523d64
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_in_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_in_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_in_g.png
new file mode 100644
index 0000000..c9bbf6c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_in_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_in_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_in_h.png
new file mode 100644
index 0000000..6bc637a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_in_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_inandout_1x.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_inandout_1x.png
new file mode 100644
index 0000000..6e47d43
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_inandout_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_inandout_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_inandout_3g.png
new file mode 100644
index 0000000..a20e5bf
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_inandout_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_inandout_e.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_inandout_e.png
new file mode 100644
index 0000000..8f135a5
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_inandout_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_inandout_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_inandout_g.png
new file mode 100644
index 0000000..cecf2c6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_inandout_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_inandout_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_inandout_h.png
new file mode 100644
index 0000000..3f86741
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_inandout_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_out_1x.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_out_1x.png
new file mode 100644
index 0000000..4740b9f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_out_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_out_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_out_3g.png
new file mode 100644
index 0000000..5d0ac29
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_out_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_out_e.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_out_e.png
new file mode 100644
index 0000000..768eac6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_out_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_out_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_out_g.png
new file mode 100644
index 0000000..49d6279
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_out_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_out_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_out_h.png
new file mode 100644
index 0000000..4d7df96
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_out_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_1x.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_1x.png
new file mode 100644
index 0000000..3045a57
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_3g.png
new file mode 100644
index 0000000..661eccc
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_e.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_e.png
new file mode 100644
index 0000000..401cb55
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_g.png
new file mode 100644
index 0000000..cc4e26f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_h.png
new file mode 100644
index 0000000..a000da2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_in_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_1x.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_1x.png
new file mode 100644
index 0000000..32c547e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_3g.png
new file mode 100644
index 0000000..d769174
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_e.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_e.png
new file mode 100644
index 0000000..c895aeb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_g.png
new file mode 100644
index 0000000..c201350
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_h.png
new file mode 100644
index 0000000..df2aa30
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_inandout_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_1x.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_1x.png
new file mode 100644
index 0000000..6b1a914
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_3g.png
new file mode 100644
index 0000000..5edc35a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_e.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_e.png
new file mode 100644
index 0000000..c94c001
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_g.png
new file mode 100644
index 0000000..16c3d6b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_h.png
new file mode 100644
index 0000000..7daf6af
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_out_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0.png
new file mode 100644
index 0000000..8f5b3ef
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully.png
new file mode 100644
index 0000000..8f5b3ef
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1.png
new file mode 100644
index 0000000..960c0e2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully.png
new file mode 100644
index 0000000..960c0e2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2.png
new file mode 100644
index 0000000..a115a23
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully.png
new file mode 100644
index 0000000..a115a23
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3.png
new file mode 100644
index 0000000..0ef34df
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully.png
new file mode 100644
index 0000000..0ef34df
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4.png
new file mode 100644
index 0000000..648599b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully.png
new file mode 100644
index 0000000..648599b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0.png
new file mode 100644
index 0000000..e81cd7c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully.png
new file mode 100644
index 0000000..e81cd7c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1.png
new file mode 100644
index 0000000..c56ae8a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully.png
new file mode 100644
index 0000000..bf720cbb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2.png
new file mode 100644
index 0000000..38e3b24
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully.png
new file mode 100644
index 0000000..3559497
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3.png
new file mode 100644
index 0000000..6f98e72
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully.png
new file mode 100644
index 0000000..8b932a6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4.png
new file mode 100644
index 0000000..759631c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully.png
new file mode 100644
index 0000000..45c4509
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_flightmode.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_flightmode.png
new file mode 100644
index 0000000..da5b02c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_flightmode.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_null.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_null.png
new file mode 100644
index 0000000..cf13c79
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_null.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_0.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_0.png
new file mode 100644
index 0000000..2989939
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_0.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_1.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_1.png
new file mode 100644
index 0000000..6f40cb4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_1_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_1_fully.png
new file mode 100644
index 0000000..60e3794a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_1_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_2.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_2.png
new file mode 100644
index 0000000..ab1b0c67
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_2_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_2_fully.png
new file mode 100644
index 0000000..eb25919
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_2_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_3.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_3.png
new file mode 100644
index 0000000..b574115
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_3_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_3_fully.png
new file mode 100644
index 0000000..14cd8fa
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_3_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_4.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_4.png
new file mode 100644
index 0000000..3b81ceb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_4_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_4_fully.png
new file mode 100644
index 0000000..ef72980
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_4_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-port-hdpi/ic_sysbar_rotate_off.png b/packages/SystemUI/res/drawable-port-hdpi/ic_sysbar_rotate_off.png
new file mode 100644
index 0000000..fcdda31
--- /dev/null
+++ b/packages/SystemUI/res/drawable-port-hdpi/ic_sysbar_rotate_off.png
Binary files differ
diff --git a/packages/SystemUI/res/layout-xlarge/sysbar_panel_system.xml b/packages/SystemUI/res/layout-xlarge/sysbar_panel_system.xml
index 7e469f7..e6ec9f4 100644
--- a/packages/SystemUI/res/layout-xlarge/sysbar_panel_system.xml
+++ b/packages/SystemUI/res/layout-xlarge/sysbar_panel_system.xml
@@ -172,37 +172,44 @@
         android:layout_width="match_parent"
         android:layout_height="48dip"
         >
-        <LinearLayout
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_alignParentLeft="true"
-            android:orientation="horizontal"
-            >
-            <!-- TODO: alarm -->
-            <!-- TODO: sync -->
-            <TextView android:id="@+id/date"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                />
-        </LinearLayout>
-
         <TextView android:id="@+id/settings_button"
             style="@style/TextAppearance.StatusBar.TextButton"
             android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
+            android:layout_height="match_parent"
             android:layout_alignParentRight="true"
-            android:layout_centerVertical="true"
             android:paddingRight="32dip"
             android:paddingLeft="32dip"
             android:textSize="20sp"
+            android:gravity="center"
             android:text="@string/system_panel_settings_button"
             />
         <View
+            android:id="@+id/settings_left_divider"
             android:layout_height="match_parent"
             android:layout_width="1sp"
             android:layout_toLeftOf="@id/settings_button"
             android:background="@*android:drawable/divider_vertical_dark"
             />
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_alignParentLeft="true"
+            android:layout_toLeftOf="@id/settings_left_divider"
+            android:orientation="horizontal"
+            android:gravity="left|center_vertical"
+            >
+            <!-- TODO: alarm -->
+            <!-- TODO: sync -->
+            <com.android.systemui.statusbar.DateView
+                android:id="@+id/date"
+                style="@style/TextAppearance.StatusBar.SystemPanel"
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:singleLine="true"
+                android:gravity="center"
+                />
+        </LinearLayout>
+
 
     </RelativeLayout>
 </com.android.systemui.statusbar.tablet.SystemPanel>
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index f592703..5aefb02 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -30,7 +30,7 @@
         parent="@android:style/TextAppearance.StatusBar">
         <item name="android:textAppearance">?android:attr/textAppearance</item>
         <item name="android:textStyle">normal</item>
-        <item name="android:textColor">#50FFFFFF</item>
+        <item name="android:textColor">#FF808080</item>
     </style>
 
     <style name="TextAppearance.StatusBar.TextButton"
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/DateView.java b/packages/SystemUI/src/com/android/systemui/statusbar/DateView.java
index e6d3a7e..e127038 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/DateView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/DateView.java
@@ -70,7 +70,7 @@
         setText(DateFormat.getDateInstance(DateFormat.LONG).format(now));
     }
 
-    void setUpdates(boolean update) {
+    public void setUpdates(boolean update) {
         if (update != mUpdating) {
             mUpdating = update;
             if (update) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/SystemPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/SystemPanel.java
index b4a9d76..c9a8d56 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/SystemPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/SystemPanel.java
@@ -431,6 +431,9 @@
     }
 
     public void onAttachedToWindow() {
+        DateView date = (DateView)findViewById(R.id.date);
+        date.setUpdates(true);
+
         TextView settingsButton = (TextView)findViewById(R.id.settings_button);
         settingsButton.setOnClickListener(new View.OnClickListener() {
             public void onClick(View v) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarService.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarService.java
index abcfec8..29f0fe2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarService.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarService.java
@@ -75,6 +75,8 @@
     public static final int MSG_CLOSE_SYSTEM_PANEL = 1011;
     public static final int MSG_OPEN_RECENTS_PANEL = 1020;
     public static final int MSG_CLOSE_RECENTS_PANEL = 1021;
+    public static final int MSG_LIGHTS_ON = 1030;
+    public static final int MSG_LIGHTS_OUT = 1031;
 
     private static final int MAX_IMAGE_LEVEL = 10000;
     private static final boolean USE_2D_RECENTS = true;
@@ -263,8 +265,6 @@
         mSystemInfo = sb.findViewById(R.id.systemInfo);
         mRecentButton = sb.findViewById(R.id.recent_apps);
 
-//        mSystemInfo.setOnClickListener(mOnClickListener);
-        mSystemInfo.setOnLongClickListener(new SetLightsOnListener(false));
         mSystemInfo.setOnTouchListener(new ClockTouchListener());
 
         mRecentButton = sb.findViewById(R.id.recent_apps);
@@ -422,6 +422,15 @@
                     if (DEBUG) Slog.d(TAG, "closing recents panel");
                     if (mRecentsPanel != null) mRecentsPanel.setVisibility(View.GONE);
                     break;
+                case MSG_LIGHTS_ON:
+                    setViewVisibility(mCurtains, View.GONE, R.anim.lights_out_out);
+                    setViewVisibility(mBarContents, View.VISIBLE, R.anim.status_bar_in);
+                    break;
+                case MSG_LIGHTS_OUT:
+                    animateCollapse();
+                    setViewVisibility(mCurtains, View.VISIBLE, R.anim.lights_out_in);
+                    setViewVisibility(mBarContents, View.GONE, R.anim.status_bar_out);
+                    break;
             }
         }
     }
@@ -675,15 +684,12 @@
         mHandler.sendEmptyMessage(MSG_CLOSE_RECENTS_PANEL);
     }
 
+    // called by StatusBarService
+    @Override
     public void setLightsOn(boolean on) {
-        if (on) {
-            setViewVisibility(mCurtains, View.GONE, R.anim.lights_out_out);
-            setViewVisibility(mBarContents, View.VISIBLE, R.anim.status_bar_in);
-        } else {
-            animateCollapse();
-            setViewVisibility(mCurtains, View.VISIBLE, R.anim.lights_out_in);
-            setViewVisibility(mBarContents, View.GONE, R.anim.status_bar_out);
-        }
+        mHandler.removeMessages(MSG_LIGHTS_OUT);
+        mHandler.removeMessages(MSG_LIGHTS_ON);
+        mHandler.sendEmptyMessage(on ? MSG_LIGHTS_ON : MSG_LIGHTS_OUT);
     }
 
     public void setMenuKeyVisible(boolean visible) {
@@ -750,26 +756,41 @@
     }
 
     private class ClockTouchListener implements View.OnTouchListener {
-        VelocityTracker mVT;
+        VelocityTracker mVT = null;
+        int mInitX, mInitY;
         public boolean onTouch (View v, MotionEvent event) {
+            final int x = (int) event.getX();
+            final int y = (int) event.getY();
             switch (event.getAction()) {
                 case MotionEvent.ACTION_DOWN:
                     mVT = VelocityTracker.obtain();
-                    // fall through
+                    mInitX = x;
+                    mInitY = y;
+                    mHandler.sendEmptyMessageDelayed(MSG_LIGHTS_OUT,
+                            ViewConfiguration.getLongPressTimeout());
+                    break;
                 case MotionEvent.ACTION_OUTSIDE:
                 case MotionEvent.ACTION_MOVE:
+                    final Rect r = new Rect();
+                    final float radius = mSystemInfo.getHeight() / 2;
+                    if (Math.abs(x - mInitX) > radius || Math.abs(y - mInitY) > radius) {
+                        mHandler.removeMessages(MSG_LIGHTS_OUT);
+                    }
                     if (mVT == null) break;
                     mVT.addMovement(event);
                     mVT.computeCurrentVelocity(1000);
                     if (mVT.getYVelocity() < -200 && mSystemPanel.getVisibility() == View.GONE) {
                         mHandler.removeMessages(MSG_OPEN_SYSTEM_PANEL);
                         mHandler.sendEmptyMessage(MSG_OPEN_SYSTEM_PANEL);
+                    } else if (mVT.getYVelocity() > 200) {
+                        mHandler.sendEmptyMessage(MSG_LIGHTS_OUT);
                     }
                     return true;
                 case MotionEvent.ACTION_UP:
                 case MotionEvent.ACTION_CANCEL:
                     mVT.recycle();
                     mVT = null;
+                    mHandler.removeMessages(MSG_LIGHTS_OUT);
                     return true;
             }
             return false;
@@ -784,8 +805,6 @@
                 onClickDoNotDisturb();
             } else if (v == mNotificationTrigger) {
                 onClickNotificationTrigger();
-            } else if (v == mSystemInfo) {
-                onClickSystemInfo();
             } else if (v == mRecentButton) {
                 onClickRecentButton();
             }
@@ -1172,19 +1191,11 @@
         }
 
         public void onClick(View v) {
-            try {
-                mBarService.setLightsOn(mOn);
-            } catch (RemoteException ex) {
-                // system process
-            }
+            setLightsOn(mOn);
         }
 
         public boolean onLongClick(View v) {
-            try {
-                mBarService.setLightsOn(mOn);
-            } catch (RemoteException ex) {
-                // system process
-            }
+            setLightsOn(mOn);
             return true;
         }
 
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 2f2f943..30aab47 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -117,6 +117,7 @@
 import android.media.IAudioService;
 import android.media.AudioManager;
 
+import java.io.File;
 import java.util.ArrayList;
 
 /**
@@ -686,7 +687,7 @@
                     Settings.System.ACCELEROMETER_ROTATION, DEFAULT_ACCELEROMETER_ROTATION);
             
             // set up rotation lock state
-            mUserRotationMode = (mAccelerometerDefault == 0)
+            mUserRotationMode = (accelerometerDefault == 0)
                 ? WindowManagerPolicy.USER_ROTATION_LOCKED
                 : WindowManagerPolicy.USER_ROTATION_FREE;
             mUserRotation = Settings.System.getInt(resolver,
@@ -2284,8 +2285,12 @@
                     return getCurrentPortraitRotation(lastRotation);
             }
 
-            mOrientationListener.setAllow180Rotation(
-                    orientation == ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR);
+            if (new File("/system/etc/allow_all_orientations").exists()) {
+                mOrientationListener.setAllow180Rotation(true);
+            } else {
+                mOrientationListener.setAllow180Rotation(
+                        orientation == ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR);
+            }
 
             // case for nosensor meaning ignore sensor and consider only lid
             // or orientation sensor disabled
diff --git a/preloaded-classes b/preloaded-classes
index da872b1..6d5144f 100644
--- a/preloaded-classes
+++ b/preloaded-classes
@@ -1271,7 +1271,6 @@
 java.util.concurrent.ConcurrentLinkedQueue
 java.util.concurrent.ConcurrentLinkedQueue$Node
 java.util.concurrent.CopyOnWriteArrayList
-java.util.concurrent.CopyOnWriteArrayList$COWIterator
 java.util.concurrent.CountDownLatch
 java.util.concurrent.CountDownLatch$Sync
 java.util.concurrent.Executor
diff --git a/services/java/com/android/server/DevicePolicyManagerService.java b/services/java/com/android/server/DevicePolicyManagerService.java
index 081bd30..68aa8e3 100644
--- a/services/java/com/android/server/DevicePolicyManagerService.java
+++ b/services/java/com/android/server/DevicePolicyManagerService.java
@@ -175,7 +175,7 @@
                     out.endTag(null, "min-password-nonletter");
                 }
             }
-            if (maximumTimeToUnlock != DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED) {
+            if (maximumTimeToUnlock != 0) {
                 out.startTag(null, "max-time-to-unlock");
                 out.attribute(null, "value", Long.toString(maximumTimeToUnlock));
                 out.endTag(null, "max-time-to-unlock");
diff --git a/services/java/com/android/server/PowerManagerService.java b/services/java/com/android/server/PowerManagerService.java
index e9a2ebf..41cbbf4 100644
--- a/services/java/com/android/server/PowerManagerService.java
+++ b/services/java/com/android/server/PowerManagerService.java
@@ -1613,7 +1613,7 @@
         if (err == 0) {
             mLastScreenOnTime = (on ? SystemClock.elapsedRealtime() : 0);
             if (mUseSoftwareAutoBrightness) {
-                enableLightSensor(on);
+                enableLightSensorLocked(on);
                 if (!on) {
                     // make sure button and key backlights are off too
                     mButtonLight.turnOff();
@@ -2576,16 +2576,12 @@
     }
 
     private void setScreenBrightnessMode(int mode) {
-        boolean enabled = (mode == SCREEN_BRIGHTNESS_MODE_AUTOMATIC);
-        if (mUseSoftwareAutoBrightness && mAutoBrightessEnabled != enabled) {
-            mAutoBrightessEnabled = enabled;
-            if (isScreenOn()) {
-                // force recompute of backlight values
-                if (mLightSensorValue >= 0) {
-                    int value = (int)mLightSensorValue;
-                    mLightSensorValue = -1;
-                    lightSensorChangedLocked(value);
-                }
+        synchronized (mLocks) {
+            boolean enabled = (mode == SCREEN_BRIGHTNESS_MODE_AUTOMATIC);
+            if (mUseSoftwareAutoBrightness && mAutoBrightessEnabled != enabled) {
+                mAutoBrightessEnabled = enabled;
+                // This will get us a new value
+                enableLightSensorLocked(mAutoBrightessEnabled && isScreenOn());
             }
         }
     }
@@ -2737,7 +2733,6 @@
         // don't bother with the light sensor if auto brightness is handled in hardware
         if (mUseSoftwareAutoBrightness) {
             mLightSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_LIGHT);
-            enableLightSensor(true);
         }
 
         // wait until sensors are enabled before turning on screen.
@@ -2755,6 +2750,8 @@
             Slog.d(TAG, "system ready!");
             mDoneBooting = true;
 
+            enableLightSensorLocked(mUseSoftwareAutoBrightness && mAutoBrightessEnabled);
+
             long identity = Binder.clearCallingIdentity();
             try {
                 mBatteryStats.noteScreenBrightness(getPreferredBrightness());
@@ -2909,9 +2906,13 @@
         }
     }
 
-    private void enableLightSensor(boolean enable) {
+    private void enableLightSensorLocked(boolean enable) {
         if (mDebugLightSensor) {
-            Slog.d(TAG, "enableLightSensor " + enable);
+            Slog.d(TAG, "enableLightSensorLocked enable=" + enable
+                    + " mAutoBrightessEnabled=" + mAutoBrightessEnabled);
+        }
+        if (!mAutoBrightessEnabled) {
+            enable = false;
         }
         if (mSensorManager != null && mLightSensorEnabled != enable) {
             mLightSensorEnabled = enable;
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java
index 817f0b2..90cdb4b 100644
--- a/services/java/com/android/server/WindowManagerService.java
+++ b/services/java/com/android/server/WindowManagerService.java
@@ -65,6 +65,7 @@
 import android.graphics.Matrix;
 import android.graphics.Paint;
 import android.graphics.PixelFormat;
+import android.graphics.PorterDuff;
 import android.graphics.Rect;
 import android.graphics.Region;
 import android.graphics.Typeface;
@@ -10709,7 +10710,7 @@
         return val;
     }
 
-    class Watermark {
+    static class Watermark {
         final String[] mTokens;
         final String mText;
         final Paint mTextPaint;
@@ -10725,9 +10726,9 @@
         int mLastDH;
         boolean mDrawNeeded;
 
-        Watermark(SurfaceSession session, String[] tokens) {
+        Watermark(Display display, SurfaceSession session, String[] tokens) {
             final DisplayMetrics dm = new DisplayMetrics();
-            mDisplay.getMetrics(dm);
+            display.getMetrics(dm);
 
             if (false) {
                 Log.i(TAG, "*********************** WATERMARK");
@@ -10821,6 +10822,8 @@
                 } catch (OutOfResourcesException e) {
                 }
                 if (c != null) {
+                    c.drawColor(0, PorterDuff.Mode.CLEAR);
+                    
                     int deltaX = mDeltaX;
                     int deltaY = mDeltaY;
 
@@ -10863,7 +10866,7 @@
             if (line != null) {
                 String[] toks = line.split("%");
                 if (toks != null && toks.length > 0) {
-                    mWatermark = new Watermark(mFxSession, toks);
+                    mWatermark = new Watermark(mDisplay, mFxSession, toks);
                 }
             }
         } catch (FileNotFoundException e) {
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp
index e9833c9..16fa95a 100644
--- a/tools/aapt/Command.cpp
+++ b/tools/aapt/Command.cpp
@@ -1142,8 +1142,8 @@
                 largeScreen = targetSdk >= 4 ? -1 : 0;
             }
             if (xlargeScreen > 0) {
-                // Introduced in Honeycomb.
-                xlargeScreen = targetSdk >= 10 ? -1 : 0;
+                // Introduced in Gingerbread.
+                xlargeScreen = targetSdk >= 9 ? -1 : 0;
             }
             if (anyDensity > 0) {
                 anyDensity = targetSdk >= 4 ? -1 : 0;
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp
index 1d6b18d..a77042a 100644
--- a/tools/aapt/ResourceTable.cpp
+++ b/tools/aapt/ResourceTable.cpp
@@ -1724,13 +1724,6 @@
     
     // If a parent is explicitly specified, set it.
     if (bagParent.size() > 0) {
-        String16 curPar = e->getParent();
-        if (curPar.size() > 0 && curPar != bagParent) {
-            sourcePos.error("Conflicting parents specified, was '%s', now '%s'\n",
-                            String8(e->getParent()).string(),
-                            String8(bagParent).string());
-            return UNKNOWN_ERROR;
-        }
         e->setParent(bagParent);
     }
 
@@ -1778,13 +1771,6 @@
 
     // If a parent is explicitly specified, set it.
     if (bagParent.size() > 0) {
-        String16 curPar = e->getParent();
-        if (curPar.size() > 0 && curPar != bagParent) {
-            sourcePos.error("Conflicting parents specified, was '%s', now '%s'\n",
-                    String8(e->getParent()).string(),
-                    String8(bagParent).string());
-            return UNKNOWN_ERROR;
-        }
         e->setParent(bagParent);
     }