Merge "Visualizer: Fix the conversion from 8-bit sample to 16-bit sample." into gingerbread
diff --git a/Android.mk b/Android.mk
index 941cf85..6147022 100644
--- a/Android.mk
+++ b/Android.mk
@@ -388,8 +388,12 @@
 # (see development/build/sdk.atree)
 web_docs_sample_code_flags := \
 		-hdf android.hasSamples 1 \
+		-samplecode $(sample_dir)/AccessibilityService \
+		            resources/samples/AccessibilityService "Accessibility Service" \
 		-samplecode $(sample_dir)/ApiDemos \
 		            resources/samples/ApiDemos "API Demos" \
+		-samplecode $(sample_dir)/AccelerometerPlay \
+		            resources/samples/AccelerometerPlay "Accelerometer Play" \
 		-samplecode $(sample_dir)/BackupRestore \
 		            resources/samples/BackupRestore "Backup and Restore" \
 		-samplecode $(sample_dir)/BluetoothChat \
@@ -402,8 +406,6 @@
                             resources/samples/CubeLiveWallpaper "Live Wallpaper" \
 		-samplecode $(sample_dir)/Home \
 		            resources/samples/Home "Home" \
-		-samplecode $(sample_dir)/HeavyWeight \
-		            resources/samples/HeavyWeight "Heavy Weight App" \
 		-samplecode $(sample_dir)/JetBoy \
 		            resources/samples/JetBoy "JetBoy" \
 		-samplecode $(sample_dir)/LunarLander \
@@ -416,6 +418,8 @@
 		            resources/samples/SampleSyncAdapter "Sample Sync Adapter" \
 		-samplecode $(sample_dir)/SearchableDictionary \
 		            resources/samples/SearchableDictionary "Searchable Dictionary v2" \
+		-samplecode $(sample_dir)/SipDemo \
+		            resources/samples/SipDemo "SIP Demo" \
 		-samplecode $(sample_dir)/Snake \
 		            resources/samples/Snake "Snake" \
 		-samplecode $(sample_dir)/SoftKeyboard \
@@ -433,11 +437,13 @@
 		-samplecode $(sample_dir)/WiktionarySimple \
 		            resources/samples/WiktionarySimple "Wiktionary (Simplified)" \
 		-samplecode $(sample_dir)/VoiceRecognitionService \
-		            resources/samples/VoiceRecognitionService "Voice Recognition Service"
+		            resources/samples/VoiceRecognitionService "Voice Recognition Service" \
+		-samplecode $(sample_dir)/NFCDemo \
+		            resources/samples/NFCDemo "NFC Demo"
 
 ## SDK version identifiers used in the published docs
   # major[.minor] version for current SDK. (full releases only)
-framework_docs_SDK_VERSION:=2.2
+framework_docs_SDK_VERSION:=2.3
   # release version (ie "Release x")  (full releases only)
 framework_docs_SDK_REL_ID:=1
   # flag to build offline docs for a preview release
diff --git a/api/9.xml b/api/9.xml
index 3056e47..3b9ab1a 100644
--- a/api/9.xml
+++ b/api/9.xml
@@ -73399,16 +73399,6 @@
  visibility="public"
 >
 </field>
-<field name="CAMERA_ID_DEFAULT"
- type="int"
- transient="false"
- volatile="false"
- static="true"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
 </class>
 <interface name="Camera.AutoFocusCallback"
  abstract="true"
@@ -86967,6 +86957,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"
@@ -93860,7 +93863,7 @@
  type="android.net.SSLCertificateSocketFactory"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="handshakeTimeoutMillis" type="int">
@@ -95960,7 +95963,7 @@
  type="android.net.http.SslCertificate"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="issuedTo" type="java.lang.String">
@@ -96027,7 +96030,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -96049,7 +96052,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -172461,7 +172464,7 @@
  abstract="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <constructor name="EventLogTags"
@@ -202792,7 +202795,7 @@
  synchronized="true"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -203338,7 +203341,7 @@
  synchronized="true"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="flag" type="boolean">
@@ -205463,7 +205466,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="view" type="android.webkit.WebView">
@@ -213996,7 +213999,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -224570,7 +224573,7 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<parameter name="t" type="T">
+<parameter name="arg0" type="T">
 </parameter>
 </method>
 </interface>
@@ -326643,7 +326646,7 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<parameter name="toCopyIn" type="E[]">
+<parameter name="array" type="E[]">
 </parameter>
 </constructor>
 <method name="add"
@@ -326671,7 +326674,7 @@
 >
 <parameter name="index" type="int">
 </parameter>
-<parameter name="element" type="E">
+<parameter name="e" type="E">
 </parameter>
 </method>
 <method name="addAll"
@@ -326799,7 +326802,9 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<parameter name="o" type="java.lang.Object">
+<parameter name="e" type="E">
+</parameter>
+<parameter name="index" type="int">
 </parameter>
 </method>
 <method name="indexOf"
@@ -326812,9 +326817,7 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<parameter name="e" type="E">
-</parameter>
-<parameter name="index" type="int">
+<parameter name="o" type="java.lang.Object">
 </parameter>
 </method>
 <method name="isEmpty"
@@ -326849,7 +326852,9 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<parameter name="o" type="java.lang.Object">
+<parameter name="e" type="E">
+</parameter>
+<parameter name="index" type="int">
 </parameter>
 </method>
 <method name="lastIndexOf"
@@ -326862,9 +326867,7 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<parameter name="e" type="E">
-</parameter>
-<parameter name="index" type="int">
+<parameter name="o" type="java.lang.Object">
 </parameter>
 </method>
 <method name="listIterator"
@@ -326955,7 +326958,7 @@
 >
 <parameter name="index" type="int">
 </parameter>
-<parameter name="element" type="E">
+<parameter name="e" type="E">
 </parameter>
 </method>
 <method name="size"
@@ -411701,7 +411704,7 @@
  abstract="true"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <method name="getLength"
@@ -412190,7 +412193,7 @@
  abstract="true"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <method name="characters"
@@ -412405,7 +412408,7 @@
  abstract="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <implements name="org.xml.sax.DTDHandler">
@@ -412872,7 +412875,7 @@
  abstract="true"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <method name="parse"
@@ -414304,7 +414307,7 @@
  abstract="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <implements name="org.xml.sax.AttributeList">
@@ -415793,7 +415796,7 @@
  abstract="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <method name="makeParser"
diff --git a/api/current.xml b/api/current.xml
index 3056e47..3b9ab1a 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -73399,16 +73399,6 @@
  visibility="public"
 >
 </field>
-<field name="CAMERA_ID_DEFAULT"
- type="int"
- transient="false"
- volatile="false"
- static="true"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
 </class>
 <interface name="Camera.AutoFocusCallback"
  abstract="true"
@@ -86967,6 +86957,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"
@@ -93860,7 +93863,7 @@
  type="android.net.SSLCertificateSocketFactory"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="handshakeTimeoutMillis" type="int">
@@ -95960,7 +95963,7 @@
  type="android.net.http.SslCertificate"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="issuedTo" type="java.lang.String">
@@ -96027,7 +96030,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -96049,7 +96052,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -172461,7 +172464,7 @@
  abstract="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <constructor name="EventLogTags"
@@ -202792,7 +202795,7 @@
  synchronized="true"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -203338,7 +203341,7 @@
  synchronized="true"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="flag" type="boolean">
@@ -205463,7 +205466,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="view" type="android.webkit.WebView">
@@ -213996,7 +213999,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -224570,7 +224573,7 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<parameter name="t" type="T">
+<parameter name="arg0" type="T">
 </parameter>
 </method>
 </interface>
@@ -326643,7 +326646,7 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<parameter name="toCopyIn" type="E[]">
+<parameter name="array" type="E[]">
 </parameter>
 </constructor>
 <method name="add"
@@ -326671,7 +326674,7 @@
 >
 <parameter name="index" type="int">
 </parameter>
-<parameter name="element" type="E">
+<parameter name="e" type="E">
 </parameter>
 </method>
 <method name="addAll"
@@ -326799,7 +326802,9 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<parameter name="o" type="java.lang.Object">
+<parameter name="e" type="E">
+</parameter>
+<parameter name="index" type="int">
 </parameter>
 </method>
 <method name="indexOf"
@@ -326812,9 +326817,7 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<parameter name="e" type="E">
-</parameter>
-<parameter name="index" type="int">
+<parameter name="o" type="java.lang.Object">
 </parameter>
 </method>
 <method name="isEmpty"
@@ -326849,7 +326852,9 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<parameter name="o" type="java.lang.Object">
+<parameter name="e" type="E">
+</parameter>
+<parameter name="index" type="int">
 </parameter>
 </method>
 <method name="lastIndexOf"
@@ -326862,9 +326867,7 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<parameter name="e" type="E">
-</parameter>
-<parameter name="index" type="int">
+<parameter name="o" type="java.lang.Object">
 </parameter>
 </method>
 <method name="listIterator"
@@ -326955,7 +326958,7 @@
 >
 <parameter name="index" type="int">
 </parameter>
-<parameter name="element" type="E">
+<parameter name="e" type="E">
 </parameter>
 </method>
 <method name="size"
@@ -411701,7 +411704,7 @@
  abstract="true"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <method name="getLength"
@@ -412190,7 +412193,7 @@
  abstract="true"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <method name="characters"
@@ -412405,7 +412408,7 @@
  abstract="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <implements name="org.xml.sax.DTDHandler">
@@ -412872,7 +412875,7 @@
  abstract="true"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <method name="parse"
@@ -414304,7 +414307,7 @@
  abstract="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <implements name="org.xml.sax.AttributeList">
@@ -415793,7 +415796,7 @@
  abstract="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <method name="makeParser"
diff --git a/core/java/android/app/Application.java b/core/java/android/app/Application.java
index 45ce860..b9ac848 100644
--- a/core/java/android/app/Application.java
+++ b/core/java/android/app/Application.java
@@ -27,6 +27,14 @@
  * AndroidManifest.xml's &lt;application&gt; tag, which will cause that class
  * to be instantiated for you when the process for your application/package is
  * created.
+ * 
+ * <p class="note">There is normally no need to subclass Application.  In
+ * most situation, static singletons can provide the same functionality in a
+ * more modular way.  If your singleton needs a global context (for example
+ * to register broadcast receivers), the function to retrieve it can be
+ * given a {@link android.content.Context} which internally uses
+ * {@link android.content.Context#getApplicationContext() Context.getApplicationContext()}
+ * when first constructing the singleton.</p>
  */
 public class Application extends ContextWrapper implements ComponentCallbacks {
     
@@ -46,12 +54,10 @@
     }
 
     /**
-     * Called when the application is stopping.  There are no more application
-     * objects running and the process will exit.  <em>Note: never depend on
-     * this method being called; in many cases an unneeded application process
-     * will simply be killed by the kernel without executing any application
-     * code.</em>
-     * If you override this method, be sure to call super.onTerminate().
+     * This method is for use in emulated process environments.  It will
+     * never be called on a production Android device, where processes are
+     * removed by simply killing them; no user code (including this callback)
+     * is executed when doing so.
      */
     public void onTerminate() {
     }
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index 275e2eb..f3b2c81 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -211,8 +211,7 @@
      * blocking the main application UI thread.
      *
      * @param cameraId the hardware camera to access, between 0 and
-     *     {@link #getNumberOfCameras()}-1.  Use {@link #CAMERA_ID_DEFAULT}
-     *     to access the default camera.
+     *     {@link #getNumberOfCameras()}-1.
      * @return a new Camera object, connected, locked and ready for use.
      * @throws RuntimeException if connection to the camera service fails (for
      *     example, if the camera is in use by another process).
@@ -222,18 +221,21 @@
     }
 
     /**
-     * The id for the default camera.
-     * @see #open(int)
-     */
-    public static int CAMERA_ID_DEFAULT = 0;
-
-    /**
-     * Equivalent to Camera.open(Camera.CAMERA_ID_DEFAULT).
-     * Creates a new Camera object to access the default camera.
+     * Creates a new Camera object to access the first back-facing camera on the
+     * device. If the device does not have a back-facing camera, this returns
+     * null.
      * @see #open(int)
      */
     public static Camera open() {
-        return new Camera(CAMERA_ID_DEFAULT);
+        int numberOfCameras = getNumberOfCameras();
+        CameraInfo cameraInfo = new CameraInfo();
+        for (int i = 0; i < numberOfCameras; i++) {
+            getCameraInfo(i, cameraInfo);
+            if (cameraInfo.facing == CameraInfo.CAMERA_FACING_BACK) {
+                return new Camera(i);
+            }
+        }
+        return null;
     }
 
     Camera(int cameraId) {
@@ -904,6 +906,7 @@
      * Changes the settings for this Camera service.
      *
      * @param params the Parameters to use for this Camera service
+     * @throws RuntimeException if any parameter is invalid or not supported.
      * @see #getParameters()
      */
     public void setParameters(Parameters params) {
diff --git a/core/java/android/hardware/SensorEvent.java b/core/java/android/hardware/SensorEvent.java
index 98bf632..32ff3b3 100644
--- a/core/java/android/hardware/SensorEvent.java
+++ b/core/java/android/hardware/SensorEvent.java
@@ -111,6 +111,27 @@
      * This can be achieved by applying a <i>high-pass</i> filter. Conversely, a
      * <i>low-pass</i> filter can be used to isolate the force of gravity.
      * </p>
+     *
+     * <pre class="prettyprint">
+     *
+     *     public void onSensorChanged(SensorEvent event)
+     *     {
+     *          // alpha is calculated as t / (t + dT)
+     *          // with t, the low-pass filter's time-constant
+     *          // and dT, the event delivery rate
+     *
+     *          final float alpha = 0.8;
+     *
+     *          gravity[0] = alpha * gravity[0] + (1 - alpha) * event.data[0];
+     *          gravity[1] = alpha * gravity[1] + (1 - alpha) * event.data[1];
+     *          gravity[2] = alpha * gravity[2] + (1 - alpha) * event.data[2];
+     *
+     *          linear_acceleration[0] = event.data[0] - gravity[0];
+     *          linear_acceleration[1] = event.data[1] - gravity[1];
+     *          linear_acceleration[2] = event.data[2] - gravity[2];
+     *     }
+     * </pre>
+     *
      * <p>
      * <u>Examples</u>:
      * <ul>
@@ -143,8 +164,41 @@
      *  standard mathematical definition of positive rotation and does not agree with the
      *  definition of roll given earlier.
      *
+     * <ul>
+     * <p>
+     * values[0]: Angular speed around the x-axis
+     * </p>
+     * <p>
+     * values[1]: Angular speed around the y-axis
+     * </p>
+     * <p>
+     * values[2]: Angular speed around the z-axis
+     * </p>
+     * </ul>
+     * <p>
+     * Typically the output of the gyroscope is integrated over time to calculate
+     * an angle, for example:
+     * </p>
+     * <pre class="prettyprint">
+     *     private static final float NS2S = 1.0f / 1000000000.0f;
+     *     private float timestamp;
+     *     public void onSensorChanged(SensorEvent event)
+     *     {
+     *          if (timestamp != 0) {
+     *              final float dT = (event.timestamp - timestamp) * NS2S;
+     *              angle[0] += event.data[0] * dT;
+     *              angle[1] += event.data[1] * dT;
+     *              angle[2] += event.data[2] * dT;
+     *          }
+     *          timestamp = event.timestamp;
+     *     }
+     * </pre>
+     *
+     * <p>In practice, the gyroscope noise and offset will introduce some errors which need
+     * to be compensated for. This is usually done using the information from other
+     * sensors, but is beyond the scope of this document.</p>
+     *
      * <h4>{@link android.hardware.Sensor#TYPE_LIGHT Sensor.TYPE_LIGHT}:</h4>
-     * 
      * <ul>
      * <p>
      * values[0]: Ambient light level in SI lux units
diff --git a/core/java/android/hardware/SensorManager.java b/core/java/android/hardware/SensorManager.java
index a271075..c178aee 100644
--- a/core/java/android/hardware/SensorManager.java
+++ b/core/java/android/hardware/SensorManager.java
@@ -1158,7 +1158,7 @@
      *
      * <p>
      * <center><img src="../../../images/axis_globe.png"
-     * alt="Sensors coordinate-system diagram." border="0" /></center>
+     * alt="World coordinate-system diagram." border="0" /></center>
      * </p>
      *
      * <p>
@@ -1521,9 +1521,19 @@
      * <li>values[1]: <i>pitch</i>, rotation around the X axis.</li>
      * <li>values[2]: <i>roll</i>, rotation around the Y axis.</li>
      * </ul>
+     * <p>The reference coordinate-system used is different from the world
+     * coordinate-system defined for the rotation matrix:</p>
+     * <ul>
+     * <li>X is defined as the vector product <b>Y.Z</b> (It is tangential to
+     * the ground at the device's current location and roughly points West).</li>
+     * <li>Y is tangential to the ground at the device's current location and
+     * points towards the magnetic North Pole.</li>
+     * <li>Z points towards the center of the Earth and is perpendicular to the ground.</li>
+     * </ul>
+     *
      * <p>
-     * <center><img src="../../../images/axis_device.png"
-     * alt="Sensors coordinate-system diagram." border="0" /></center>
+     * <center><img src="../../../images/axis_device_inverted.png"
+     * alt="Inverted world coordinate-system diagram." border="0" /></center>
      * </p>
      * <p>
      * All three angles above are in <b>radians</b> and <b>positive</b> in the
@@ -1872,25 +1882,25 @@
         }
 
         if(prevR.length == 9) {
-            pri0 = R[0];
-            pri1 = R[1];
-            pri2 = R[2];
-            pri3 = R[3];
-            pri4 = R[4];
-            pri5 = R[5];
-            pri6 = R[6];
-            pri7 = R[7];
-            pri8 = R[8];
+            pri0 = prevR[0];
+            pri1 = prevR[1];
+            pri2 = prevR[2];
+            pri3 = prevR[3];
+            pri4 = prevR[4];
+            pri5 = prevR[5];
+            pri6 = prevR[6];
+            pri7 = prevR[7];
+            pri8 = prevR[8];
         } else if(prevR.length == 16) {
-            pri0 = R[0];
-            pri1 = R[1];
-            pri2 = R[2];
-            pri3 = R[4];
-            pri4 = R[5];
-            pri5 = R[6];
-            pri6 = R[8];
-            pri7 = R[9];
-            pri8 = R[10];
+            pri0 = prevR[0];
+            pri1 = prevR[1];
+            pri2 = prevR[2];
+            pri3 = prevR[4];
+            pri4 = prevR[5];
+            pri5 = prevR[6];
+            pri6 = prevR[8];
+            pri7 = prevR[9];
+            pri8 = prevR[10];
         }
 
         // calculate the parts of the rotation difference matrix we need
diff --git a/core/java/android/net/SSLCertificateSocketFactory.java b/core/java/android/net/SSLCertificateSocketFactory.java
index b822b27..63ac21f 100644
--- a/core/java/android/net/SSLCertificateSocketFactory.java
+++ b/core/java/android/net/SSLCertificateSocketFactory.java
@@ -102,6 +102,7 @@
     private final boolean mSecure;
 
     /** @deprecated Use {@link #getDefault(int)} instead. */
+    @Deprecated
     public SSLCertificateSocketFactory(int handshakeTimeoutMillis) {
         this(handshakeTimeoutMillis, null, true);
     }
diff --git a/core/java/android/net/http/SslCertificate.java b/core/java/android/net/http/SslCertificate.java
index c29926c..30f25a2 100644
--- a/core/java/android/net/http/SslCertificate.java
+++ b/core/java/android/net/http/SslCertificate.java
@@ -112,6 +112,7 @@
      * @param validNotAfter The not-after date from the certificate validity period in ISO 8601 format
      * @deprecated Use {@link #SslCertificate(String, String, Date, Date)}
      */
+    @Deprecated
     public SslCertificate(
             String issuedTo, String issuedBy, String validNotBefore, String validNotAfter) {
         this(issuedTo, issuedBy, parseDate(validNotBefore), parseDate(validNotAfter));
@@ -157,6 +158,7 @@
      *
      * @deprecated Use {@link #getValidNotBeforeDate()}
      */
+    @Deprecated
     public String getValidNotBefore() {
         return formatDate(mValidNotBefore);
     }
@@ -175,6 +177,7 @@
      *
      * @deprecated Use {@link #getValidNotAfterDate()}
      */
+    @Deprecated
     public String getValidNotAfter() {
         return formatDate(mValidNotAfter);
     }
diff --git a/core/java/android/nfc/ILlcpServiceSocket.aidl b/core/java/android/nfc/ILlcpServiceSocket.aidl
index c3108dc..581c21d 100644
--- a/core/java/android/nfc/ILlcpServiceSocket.aidl
+++ b/core/java/android/nfc/ILlcpServiceSocket.aidl
@@ -23,6 +23,4 @@
 {
     int accept(int nativeHandle);
     void close(int nativeHandle);
-    int getAcceptTimeout(int nativeHandle);
-    void setAcceptTimeout(int nativeHandle, int timeout);
 }
diff --git a/core/java/android/nfc/ILlcpSocket.aidl b/core/java/android/nfc/ILlcpSocket.aidl
index dda5628..3166e72 100644
--- a/core/java/android/nfc/ILlcpSocket.aidl
+++ b/core/java/android/nfc/ILlcpSocket.aidl
@@ -24,7 +24,6 @@
     int close(int nativeHandle);
     int connect(int nativeHandle, int sap);
     int connectByName(int nativeHandle, String sn);
-    int getConnectTimeout(int nativeHandle);
     int getLocalSap(int nativeHandle);
     int getLocalSocketMiu(int nativeHandle);
     int getLocalSocketRw(int nativeHandle);
@@ -32,5 +31,4 @@
     int getRemoteSocketRw(int nativeHandle);
     int receive(int nativeHandle, out byte[] receiveBuffer);
     int send(int nativeHandle, in byte[] data);
-    void setConnectTimeout(int nativeHandle, int timeout);
 }
\ No newline at end of file
diff --git a/core/java/android/nfc/INfcAdapter.aidl b/core/java/android/nfc/INfcAdapter.aidl
index 7743ceb..cd08e33 100644
--- a/core/java/android/nfc/INfcAdapter.aidl
+++ b/core/java/android/nfc/INfcAdapter.aidl
@@ -39,8 +39,6 @@
 
     // NfcAdapter-class related methods
     boolean isEnabled();
-    NdefMessage localGet();
-    void localSet(in NdefMessage message);
     void openTagConnection(in Tag tag);
 
     // Non-public methods
diff --git a/core/java/android/nfc/NdefMessage.java b/core/java/android/nfc/NdefMessage.java
index d107b54..c79fabf 100644
--- a/core/java/android/nfc/NdefMessage.java
+++ b/core/java/android/nfc/NdefMessage.java
@@ -16,7 +16,6 @@
 
 package android.nfc;
 
-import android.nfc.NdefRecord;
 import android.os.Parcel;
 import android.os.Parcelable;
 
@@ -69,11 +68,10 @@
      * Returns a byte array representation of this entire NDEF message.
      */
     public byte[] toByteArray() {
-        //TODO: do not return null
         //TODO: allocate the byte array once, copy each record once
         //TODO: process MB and ME flags outside loop
         if ((mRecords == null) || (mRecords.length == 0))
-            return null;
+            return new byte[0];
 
         byte[] msg = {};
 
@@ -104,10 +102,12 @@
         return msg;
     }
 
+    @Override
     public int describeContents() {
         return 0;
     }
 
+    @Override
     public void writeToParcel(Parcel dest, int flags) {
         dest.writeInt(mRecords.length);
         dest.writeTypedArray(mRecords, flags);
@@ -115,12 +115,14 @@
 
     public static final Parcelable.Creator<NdefMessage> CREATOR =
             new Parcelable.Creator<NdefMessage>() {
+        @Override
         public NdefMessage createFromParcel(Parcel in) {
             int recordsLength = in.readInt();
             NdefRecord[] records = new NdefRecord[recordsLength];
             in.readTypedArray(records, NdefRecord.CREATOR);
             return new NdefMessage(records);
         }
+        @Override
         public NdefMessage[] newArray(int size) {
             return new NdefMessage[size];
         }
diff --git a/core/java/android/nfc/NfcAdapter.java b/core/java/android/nfc/NfcAdapter.java
index cf80faf..88b6ea4 100644
--- a/core/java/android/nfc/NfcAdapter.java
+++ b/core/java/android/nfc/NfcAdapter.java
@@ -301,48 +301,6 @@
     }
 
     /**
-     * Set the NDEF Message that this NFC adapter should appear as to Tag
-     * readers.
-     * <p>
-     * Any Tag reader can read the contents of the local tag when it is in
-     * proximity, without any further user confirmation.
-     * <p>
-     * The implementation of this method must either
-     * <ul>
-     * <li>act as a passive tag containing this NDEF message
-     * <li>provide the NDEF message on over LLCP to peer NFC adapters
-     * </ul>
-     * The NDEF message is preserved across reboot.
-     * <p>Requires {@link android.Manifest.permission#NFC} permission.
-     *
-     * @param message NDEF message to make public
-     * @hide
-     */
-    public void setLocalNdefMessage(NdefMessage message) {
-        try {
-            mService.localSet(message);
-        } catch (RemoteException e) {
-            attemptDeadServiceRecovery(e);
-        }
-    }
-
-    /**
-     * Get the NDEF Message that this adapter appears as to Tag readers.
-     * <p>Requires {@link android.Manifest.permission#NFC} permission.
-     *
-     * @return NDEF Message that is publicly readable
-     * @hide
-     */
-    public NdefMessage getLocalNdefMessage() {
-        try {
-            return mService.localGet();
-        } catch (RemoteException e) {
-            attemptDeadServiceRecovery(e);
-            return null;
-        }
-    }
-
-    /**
      * Create a raw tag connection to the default Target
      * <p>Requires {@link android.Manifest.permission#NFC} permission.
      * @hide
diff --git a/core/java/android/util/EventLogTags.java b/core/java/android/util/EventLogTags.java
index 5cf5332..8c18417 100644
--- a/core/java/android/util/EventLogTags.java
+++ b/core/java/android/util/EventLogTags.java
@@ -29,6 +29,7 @@
  * @deprecated This class is no longer functional.
  * Use {@link android.util.EventLog} instead.
  */
+@Deprecated
 public class EventLogTags {
     public static class Description {
         public final int mTag;
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index acda3e1..6590497 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -6533,11 +6533,11 @@
 
             final int drawingCacheBackgroundColor = mDrawingCacheBackgroundColor;
             final boolean opaque = drawingCacheBackgroundColor != 0 || isOpaque();
-            final boolean translucentWindow = attachInfo != null && attachInfo.mTranslucentWindow;
+            final boolean use32BitCache = attachInfo != null && attachInfo.mUse32BitDrawingCache;
 
             if (width <= 0 || height <= 0 ||
                      // Projected bitmap size in bytes
-                    (width * height * (opaque && !translucentWindow ? 2 : 4) >
+                    (width * height * (opaque && !use32BitCache ? 2 : 4) >
                             ViewConfiguration.get(mContext).getScaledMaximumDrawingCacheSize())) {
                 destroyDrawingCache();
                 return;
@@ -6567,7 +6567,7 @@
                 } else {
                     // Optimization for translucent windows
                     // If the window is translucent, use a 32 bits bitmap to benefit from memcpy()
-                    quality = translucentWindow ? Bitmap.Config.ARGB_8888 : Bitmap.Config.RGB_565;
+                    quality = use32BitCache ? Bitmap.Config.ARGB_8888 : Bitmap.Config.RGB_565;
                 }
 
                 // Try to cleanup memory
@@ -6581,7 +6581,7 @@
                     } else {
                         mUnscaledDrawingCache = new SoftReference<Bitmap>(bitmap);
                     }
-                    if (opaque && translucentWindow) bitmap.setHasAlpha(false);
+                    if (opaque && use32BitCache) bitmap.setHasAlpha(false);
                 } catch (OutOfMemoryError e) {
                     // If there is not enough memory to create the bitmap cache, just
                     // ignore the issue as bitmap caches are not required to draw the
@@ -9315,9 +9315,9 @@
         int mWindowTop;
 
         /**
-         * Indicates whether the window is translucent/transparent
+         * Indicates whether views need to use 32-bit drawing caches
          */
-        boolean mTranslucentWindow;        
+        boolean mUse32BitDrawingCache;
 
         /**
          * For windows that are full-screen but using insets to layout inside
diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java
index 9c249ce..c58207e 100644
--- a/core/java/android/view/ViewRoot.java
+++ b/core/java/android/view/ViewRoot.java
@@ -754,7 +754,8 @@
             // object is not initialized to its backing store, but soon it
             // will be (assuming the window is visible).
             attachInfo.mSurface = mSurface;
-            attachInfo.mTranslucentWindow = PixelFormat.formatHasAlpha(lp.format);
+            attachInfo.mUse32BitDrawingCache = PixelFormat.formatHasAlpha(lp.format) ||
+                    lp.format == PixelFormat.RGBX_8888;
             attachInfo.mHasWindowFocus = false;
             attachInfo.mWindowVisibility = viewVisibility;
             attachInfo.mRecomputeGlobalAttributes = false;
@@ -1301,6 +1302,7 @@
             // Need to make sure we re-evaluate the window attributes next
             // time around, to ensure the window has the correct format.
             mWindowAttributesChanged = true;
+            requestLayout();
         }
     }
 
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index da0c61b..4d70e7c 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -1029,6 +1029,7 @@
      * @deprecated This method has been deprecated in favor of
      *             {@link #setPluginState}
      */
+    @Deprecated
     public synchronized void setPluginsEnabled(boolean flag) {
         setPluginState(PluginState.ON);
     }
@@ -1211,6 +1212,7 @@
      * @return True if plugins are enabled.
      * @deprecated This method has been replaced by {@link #getPluginState}
      */
+    @Deprecated
     public synchronized boolean getPluginsEnabled() {
         return mPluginState == PluginState.ON;
     }
diff --git a/core/java/android/webkit/WebTextView.java b/core/java/android/webkit/WebTextView.java
index 4f192b3..1a9ccea 100644
--- a/core/java/android/webkit/WebTextView.java
+++ b/core/java/android/webkit/WebTextView.java
@@ -334,6 +334,10 @@
         }
     }
 
+    public void onDrawSubstitute() {
+      updateCursorControllerPositions();
+    }
+
     @Override
     public void onEditorAction(int actionCode) {
         switch (actionCode) {
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 9098639..bcd0332 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -3531,6 +3531,9 @@
         if (AUTO_REDRAW_HACK && mAutoRedraw) {
             invalidate();
         }
+        if (inEditingMode()) {
+            mWebTextView.onDrawSubstitute();
+        }
         mWebViewCore.signalRepaintDone();
     }
 
diff --git a/core/java/android/webkit/WebViewClient.java b/core/java/android/webkit/WebViewClient.java
index 02c7210..1f8eeba 100644
--- a/core/java/android/webkit/WebViewClient.java
+++ b/core/java/android/webkit/WebViewClient.java
@@ -89,6 +89,7 @@
      * @deprecated This method is no longer called. When the WebView encounters
      *             a redirect loop, it will cancel the load.
      */
+    @Deprecated
     public void onTooManyRedirects(WebView view, Message cancelMsg,
             Message continueMsg) {
         cancelMsg.sendToTarget();
diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java
index 82b7c4f..e1a1894 100644
--- a/core/java/android/widget/ListView.java
+++ b/core/java/android/widget/ListView.java
@@ -3626,6 +3626,7 @@
      *         
      * @deprecated Use {@link #getCheckedItemIds()} instead.
      */
+    @Deprecated
     public long[] getCheckItemIds() {
         // Use new behavior that correctly handles stable ID mapping.
         if (mAdapter != null && mAdapter.hasStableIds()) {
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index d719783..41c9736 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -3758,7 +3758,7 @@
         // - ExtractEditText does not call onFocus when it is displayed. Fixing this issue would
         //   allow to test for hasSelection in onFocusChanged, which would trigger a
         //   startTextSelectionMode here. TODO
-        if (selectionController != null && hasSelection()) {
+        if (this instanceof ExtractEditText && selectionController != null && hasSelection()) {
             startTextSelectionMode();
         }
 
@@ -4162,6 +4162,15 @@
 
         canvas.restore();
 
+        updateCursorControllerPositions();
+    }
+
+    /**
+     * Update the positions of the CursorControllers.  Needed by WebTextView,
+     * which does not draw.
+     * @hide
+     */
+    protected void updateCursorControllerPositions() {
         if (mInsertionPointCursorController != null &&
                 mInsertionPointCursorController.isShowing()) {
             mInsertionPointCursorController.updatePosition();
@@ -4810,6 +4819,7 @@
     }
 
     public void beginBatchEdit() {
+        mInBatchEditControllers = true;
         final InputMethodState ims = mInputMethodState;
         if (ims != null) {
             int nesting = ++ims.mBatchEditNesting;
@@ -4832,6 +4842,7 @@
     }
     
     public void endBatchEdit() {
+        mInBatchEditControllers = false;
         final InputMethodState ims = mInputMethodState;
         if (ims != null) {
             int nesting = --ims.mBatchEditNesting;
@@ -6738,10 +6749,9 @@
                 // Restore previous selection
                 Selection.setSelection((Spannable)mText, prevStart, prevEnd);
 
-                if (mSelectionModifierCursorController != null &&
-                        !mSelectionModifierCursorController.isShowing()) {
+                if (hasSelectionController() && !getSelectionController().isShowing()) {
                     // If the anchors aren't showing, revive them.
-                    mSelectionModifierCursorController.show();
+                    getSelectionController().show();
                 } else {
                     // Tapping inside the selection displays the cut/copy/paste context menu
                     // as long as the anchors are already showing.
@@ -6752,12 +6762,12 @@
                 // Tapping outside stops selection mode, if any
                 stopTextSelectionMode();
 
-                if (mInsertionPointCursorController != null && mText.length() > 0) {
-                    mInsertionPointCursorController.show();
+                if (hasInsertionController() && mText.length() > 0) {
+                    getInsertionController().show();
                 }
             }
-        } else if (hasSelection() && mSelectionModifierCursorController != null) {
-            mSelectionModifierCursorController.show();
+        } else if (hasSelection() && hasSelectionController()) {
+            getSelectionController().show();
         }
     }
 
@@ -6791,11 +6801,11 @@
     public boolean onTouchEvent(MotionEvent event) {
         final int action = event.getActionMasked();
         if (action == MotionEvent.ACTION_DOWN) {
-            if (mInsertionPointCursorController != null) {
-                mInsertionPointCursorController.onTouchEvent(event);
+            if (hasInsertionController()) {
+                getInsertionController().onTouchEvent(event);
             }
-            if (mSelectionModifierCursorController != null) {
-                mSelectionModifierCursorController.onTouchEvent(event);
+            if (hasSelectionController()) {
+                getSelectionController().onTouchEvent(event);
             }
 
             // Reset this state; it will be re-set if super.onTouchEvent
@@ -6817,11 +6827,11 @@
         }
 
         if ((mMovement != null || onCheckIsTextEditor()) && mText instanceof Spannable && mLayout != null) {
-            if (mInsertionPointCursorController != null) {
-                mInsertionPointCursorController.onTouchEvent(event);
+            if (hasInsertionController()) {
+                getInsertionController().onTouchEvent(event);
             }
-            if (mSelectionModifierCursorController != null) {
-                mSelectionModifierCursorController.onTouchEvent(event);
+            if (hasSelectionController()) {
+                getSelectionController().onTouchEvent(event);
             }
 
             boolean handled = false;
@@ -6883,19 +6893,15 @@
         }
 
         // TODO Add an extra android:cursorController flag to disable the controller?
-        if (windowSupportsHandles && mCursorVisible && mLayout != null) {
-            if (mInsertionPointCursorController == null) {
-                mInsertionPointCursorController = new InsertionPointCursorController();
-            }
-        } else {
+        mInsertionControllerEnabled = windowSupportsHandles && mCursorVisible && mLayout != null;
+        mSelectionControllerEnabled = windowSupportsHandles && textCanBeSelected() &&
+                mLayout != null;
+
+        if (!mInsertionControllerEnabled) {
             mInsertionPointCursorController = null;
         }
 
-        if (windowSupportsHandles && textCanBeSelected() && mLayout != null) {
-            if (mSelectionModifierCursorController == null) {
-                mSelectionModifierCursorController = new SelectionModifierCursorController();
-            }
-        } else {
+        if (!mSelectionControllerEnabled) {
             // Stop selection mode if the controller becomes unavailable.
             stopTextSelectionMode();
             mSelectionModifierCursorController = null;
@@ -7526,10 +7532,12 @@
             case ID_SELECT_ALL:
                 Selection.setSelection((Spannable) mText, 0, mText.length());
                 startTextSelectionMode();
+                getSelectionController().show();
                 return true;
 
             case ID_START_SELECTING_TEXT:
                 startTextSelectionMode();
+                getSelectionController().show();
                 return true;
 
             case ID_CUT:                
@@ -7639,7 +7647,7 @@
 
     private void startTextSelectionMode() {
         if (!mIsInTextSelectionMode) {
-            if (mSelectionModifierCursorController == null) {
+            if (!hasSelectionController()) {
                 Log.w(LOG_TAG, "TextView has no selection controller. Action mode cancelled.");
                 return;
             }
@@ -7649,7 +7657,6 @@
             }
 
             selectCurrentWord();
-            mSelectionModifierCursorController.show();
             mIsInTextSelectionMode = true;
         }
     }
@@ -7828,6 +7835,10 @@
                 return true;
             }
 
+            if (isInBatchEditMode()) {
+                return false;
+            }
+
             final int extendedPaddingTop = getExtendedPaddingTop();
             final int extendedPaddingBottom = getExtendedPaddingBottom();
             final int compoundPaddingLeft = getCompoundPaddingLeft();
@@ -7867,7 +7878,7 @@
             mPositionY = y - TextView.this.mScrollY;
             if (isPositionVisible()) {
                 int[] coords = null;
-                if (mContainer.isShowing()){
+                if (mContainer.isShowing()) {
                     coords = mTempCoords;
                     TextView.this.getLocationInWindow(coords);
                     mContainer.update(coords[0] + mPositionX, coords[1] + mPositionY,
@@ -8056,6 +8067,10 @@
         }
 
         public void show() {
+            if (isInBatchEditMode()) {
+                return;
+            }
+
             mIsShowing = true;
             updatePosition();
             mStartHandle.show();
@@ -8119,6 +8134,10 @@
         }
 
         public void updatePosition() {
+            if (!isShowing()) {
+                return;
+            }
+
             final int selectionStart = getSelectionStart();
             final int selectionEnd = getSelectionEnd();
 
@@ -8279,6 +8298,62 @@
         return getOffsetForHorizontal(line, x);
     }
 
+    /**
+     * @return True if this view supports insertion handles.
+     */
+    boolean hasInsertionController() {
+        return mInsertionControllerEnabled;
+    }
+
+    /**
+     * @return True if this view supports selection handles.
+     */
+    boolean hasSelectionController() {
+        return mSelectionControllerEnabled;
+    }
+
+    CursorController getInsertionController() {
+        if (!mInsertionControllerEnabled) {
+            return null;
+        }
+
+        if (mInsertionPointCursorController == null) {
+            mInsertionPointCursorController = new InsertionPointCursorController();
+
+            final ViewTreeObserver observer = getViewTreeObserver();
+            if (observer != null) {
+                observer.addOnTouchModeChangeListener(mInsertionPointCursorController);
+            }
+        }
+
+        return mInsertionPointCursorController;
+    }
+
+    CursorController getSelectionController() {
+        if (!mSelectionControllerEnabled) {
+            return null;
+        }
+
+        if (mSelectionModifierCursorController == null) {
+            mSelectionModifierCursorController = new SelectionModifierCursorController();
+
+            final ViewTreeObserver observer = getViewTreeObserver();
+            if (observer != null) {
+                observer.addOnTouchModeChangeListener(mSelectionModifierCursorController);
+            }
+        }
+
+        return mSelectionModifierCursorController;
+    }
+
+    boolean isInBatchEditMode() {
+        final InputMethodState ims = mInputMethodState;
+        if (ims != null) {
+            return ims.mBatchEditNesting > 0;
+        }
+        return mInBatchEditControllers;
+    }
+
     @ViewDebug.ExportedProperty
     private CharSequence            mText;
     private CharSequence            mTransformed;
@@ -8310,6 +8385,9 @@
     // Cursor Controllers. Null when disabled.
     private CursorController        mInsertionPointCursorController;
     private CursorController        mSelectionModifierCursorController;
+    private boolean                 mInsertionControllerEnabled;
+    private boolean                 mSelectionControllerEnabled;
+    private boolean                 mInBatchEditControllers;
     private boolean                 mIsInTextSelectionMode = false;
     // These are needed to desambiguate a long click. If the long click comes from ones of these, we
     // select from the current cursor position. Otherwise, select from long pressed position.
diff --git a/core/java/android/widget/VideoView.java b/core/java/android/widget/VideoView.java
index 531d9fe..b169c93 100644
--- a/core/java/android/widget/VideoView.java
+++ b/core/java/android/widget/VideoView.java
@@ -27,7 +27,6 @@
 import android.media.MediaPlayer.OnCompletionListener;
 import android.media.MediaPlayer.OnErrorListener;
 import android.net.Uri;
-import android.os.PowerManager;
 import android.util.AttributeSet;
 import android.util.Log;
 import android.view.KeyEvent;
@@ -35,7 +34,7 @@
 import android.view.SurfaceHolder;
 import android.view.SurfaceView;
 import android.view.View;
-import android.widget.MediaController.*;
+import android.widget.MediaController.MediaPlayerControl;
 
 import java.io.IOException;
 import java.util.Map;
@@ -462,6 +461,10 @@
                 }
                 start();
                 if (mMediaController != null) {
+                    if (mMediaController.isShowing()) {
+                        // ensure the controller will get repositioned later
+                        mMediaController.hide();
+                    }
                     mMediaController.show();
                 }
             }
diff --git a/core/java/com/android/internal/nfc/LlcpServiceSocket.java b/core/java/com/android/internal/nfc/LlcpServiceSocket.java
index 318982b..d616860 100644
--- a/core/java/com/android/internal/nfc/LlcpServiceSocket.java
+++ b/core/java/com/android/internal/nfc/LlcpServiceSocket.java
@@ -122,34 +122,6 @@
 	}
 
 	/**
-	 * Set the timeout for the accept request
-	 *
-	 * @param timeout
-	 *            value of the timeout for the accept request
-	 */
-	public void setAcceptTimeout(int timeout) {
-		try {
-			mService.setAcceptTimeout(mHandle, timeout);
-		} catch (RemoteException e) {
-			Log.e(TAG, "RemoteException in setAcceptTimeout(): ", e);
-		}
-	}
-
-	/**
-	 * Get the timeout value of the accept request
-	 *
-	 * @return mTimeout
-	 */
-	public int getAcceptTimeout() {
-		try {
-			return mService.getAcceptTimeout(mHandle);
-		} catch (RemoteException e) {
-			Log.e(TAG, "RemoteException in getAcceptTimeout(): ", e);
-			return 0;
-		}
-	}
-
-	/**
 	 * Close the created Llcp Service socket
 	 */
 	public void close() {
diff --git a/core/java/com/android/internal/nfc/LlcpSocket.java b/core/java/com/android/internal/nfc/LlcpSocket.java
index b1b1320..73c09259 100644
--- a/core/java/com/android/internal/nfc/LlcpSocket.java
+++ b/core/java/com/android/internal/nfc/LlcpSocket.java
@@ -140,34 +140,6 @@
 	}
 
 	/**
-	 * Set the timeout for the connect request
-	 *
-	 * @param timeout
-	 *            timeout value for the connect request
-	 */
-	public void setConnectTimeout(int timeout) {
-		try {
-			mService.setConnectTimeout(mHandle, timeout);
-		} catch (RemoteException e) {
-			Log.e(TAG, "RemoteException in setConnectTimeout(): ", e);
-		}
-	}
-
-	/**
-	 * Get the timeout value of the connect request
-	 *
-	 * @return mTimeout
-	 */
-	public int getConnectTimeout() {
-		try {
-			return mService.getConnectTimeout(mHandle);
-		} catch (RemoteException e) {
-			Log.e(TAG, "RemoteException in getConnectTimeout(): ", e);
-			return 0;
-		}
-	}
-
-	/**
 	 * Disconnect request to the connected LLCP socket and close the created
 	 * socket.
 	 *
diff --git a/core/java/com/android/internal/os/PowerProfile.java b/core/java/com/android/internal/os/PowerProfile.java
index 127ed68..99a6843 100644
--- a/core/java/com/android/internal/os/PowerProfile.java
+++ b/core/java/com/android/internal/os/PowerProfile.java
@@ -47,6 +47,15 @@
     public static final String POWER_CPU_IDLE = "cpu.idle";
 
     /**
+     * Power consumption when CPU is awake (when a wake lock is held).  This
+     * should be 0 on devices that can go into full CPU power collapse even
+     * when a wake lock is held.  Otherwise, this is the power consumption in
+     * addition to POWERR_CPU_IDLE due to a wake lock being held but with no
+     * CPU activity.
+     */
+    public static final String POWER_CPU_AWAKE = "cpu.awake";
+
+    /**
      * Power consumption when CPU is in power collapse mode.
      */
     public static final String POWER_CPU_ACTIVE = "cpu.active";
diff --git a/core/jni/android_app_NativeActivity.cpp b/core/jni/android_app_NativeActivity.cpp
index 45fd5a0..ec172bb 100644
--- a/core/jni/android_app_NativeActivity.cpp
+++ b/core/jni/android_app_NativeActivity.cpp
@@ -580,6 +580,7 @@
                 code->env->CallVoidMethod(code->clazz,
                         gNativeActivityClassInfo.dispatchUnhandledKeyEvent, inputEventObj);
                 checkAndClearExceptionFromCallback(code->env, "dispatchUnhandledKeyEvent");
+                code->env->DeleteLocalRef(inputEventObj);
                 code->nativeInputQueue->finishEvent(keyEvent, true);
             }
             int seq;
@@ -589,6 +590,7 @@
                 code->env->CallVoidMethod(code->clazz,
                         gNativeActivityClassInfo.preDispatchKeyEvent, inputEventObj, seq);
                 checkAndClearExceptionFromCallback(code->env, "preDispatchKeyEvent");
+                code->env->DeleteLocalRef(inputEventObj);
             }
         } break;
         case CMD_FINISH: {
diff --git a/core/jni/android_nfc.h b/core/jni/android_nfc.h
index df660f2..de0ddde 100644
--- a/core/jni/android_nfc.h
+++ b/core/jni/android_nfc.h
@@ -22,8 +22,17 @@
 #ifndef __ANDROID_NFC_H__
 #define __ANDROID_NFC_H__
 
+#define LOG_TAG "NdefMessage"
+#include <utils/Log.h>
+
 extern "C" {
 
+#if 0
+  #define TRACE(...) LOG(LOG_DEBUG, "NdefMessage", __VA_ARGS__)
+#else
+  #define TRACE(...)
+#endif
+
 typedef struct phFriNfc_NdefRecord {
     uint8_t                 Flags;
     uint8_t                 Tnf;
diff --git a/core/jni/android_nfc_NdefMessage.cpp b/core/jni/android_nfc_NdefMessage.cpp
index eaf989d..9beef2a 100644
--- a/core/jni/android_nfc_NdefMessage.cpp
+++ b/core/jni/android_nfc_NdefMessage.cpp
@@ -14,8 +14,6 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "NdefMessage"
-
 #include <stdlib.h>
 
 #include "jni.h"
@@ -23,8 +21,6 @@
 
 #include "android_nfc.h"
 
-#include <utils/Log.h>
-
 namespace android {
 
 static jint android_nfc_NdefMessage_parseNdefMessage(JNIEnv *e, jobject o,
@@ -53,7 +49,7 @@
         return -1;
 
     /* Get the number of records in the message so we can allocate buffers */
-    LOGD("phFriNfc_NdefRecord_GetRecords(NULL)");
+    TRACE("phFriNfc_NdefRecord_GetRecords(NULL)");
 
     status = phFriNfc_NdefRecord_GetRecords((uint8_t *)raw_msg,
             (uint32_t)raw_msg_size, NULL, NULL, &num_of_records);
@@ -62,9 +58,7 @@
         LOGE("phFriNfc_NdefRecord_GetRecords(NULL) returned 0x%04x", status);
         goto end;
     }
-    LOGD("phFriNfc_NdefRecord_GetRecords(NULL) returned 0x%04x", status);
-
-    LOGD("found %d records in message", num_of_records);
+    TRACE("phFriNfc_NdefRecord_GetRecords(NULL) returned 0x%04x, with %d records", status, num_of_records);
 
     is_chunked = (uint8_t*)malloc(num_of_records);
     if (is_chunked == NULL)
@@ -74,7 +68,7 @@
         goto end;
 
     /* Now, actually retrieve records position in message */
-    LOGD("phFriNfc_NdefRecord_GetRecords()");
+    TRACE("phFriNfc_NdefRecord_GetRecords()");
 
     status = phFriNfc_NdefRecord_GetRecords((uint8_t *)raw_msg,
             (uint32_t)raw_msg_size, records, is_chunked, &num_of_records);
@@ -83,7 +77,7 @@
         LOGE("phFriNfc_NdefRecord_GetRecords() returned 0x%04x", status);
         goto end;
     }
-    LOGD("phFriNfc_NdefRecord_GetRecords() returned 0x%04x", status);
+    TRACE("phFriNfc_NdefRecord_GetRecords() returned 0x%04x, with %d records", status, num_of_records);
 
     /* Build NDEF records array */
     record_cls = e->FindClass("android/nfc/NdefRecord");
@@ -94,13 +88,11 @@
 
     ctor = e->GetMethodID(record_cls, "<init>", "(S[B[B[B)V");
 
-    LOGD("NFC_Number of records = %d\n", num_of_records);
-
     for (i = 0; i < num_of_records; i++) {
         jbyteArray type, id, payload;
         jobject new_record;
 
-        LOGD("phFriNfc_NdefRecord_Parse()");
+        TRACE("phFriNfc_NdefRecord_Parse()");
 
         status = phFriNfc_NdefRecord_Parse(&record, records[i]);
 
@@ -108,7 +100,7 @@
             LOGE("phFriNfc_NdefRecord_Parse() returned 0x%04x", status);
             goto end;
         }
-        LOGD("phFriNfc_NdefRecord_Parse() returned 0x%04x", status);
+        TRACE("phFriNfc_NdefRecord_Parse() returned 0x%04x", status);
 
         type = e->NewByteArray(record.TypeLength);
         if (type == NULL) {
diff --git a/core/jni/android_nfc_NdefRecord.cpp b/core/jni/android_nfc_NdefRecord.cpp
index 0a3a519..a7a80c8 100644
--- a/core/jni/android_nfc_NdefRecord.cpp
+++ b/core/jni/android_nfc_NdefRecord.cpp
@@ -54,7 +54,7 @@
     if (buf == NULL)
         goto end;
 
-    LOGD("phFriNfc_NdefRecord_Generate()");
+    TRACE("phFriNfc_NdefRecord_Generate()");
 
     status = phFriNfc_NdefRecord_Generate(&record, buf, buf_size,
             &record_size);
@@ -63,7 +63,7 @@
         LOGE("phFriNfc_NdefRecord_Generate() returned 0x%04x", status);
         goto end;
     }
-    LOGD("phFriNfc_NdefRecord_Generate() returned 0x%04x", status);
+    TRACE("phFriNfc_NdefRecord_Generate() returned 0x%04x", status);
 
     result = e->NewByteArray(record_size);
     if (result == NULL)
@@ -104,13 +104,13 @@
         goto clean_and_return;
     }
 
-    LOGD("phFriNfc_NdefRecord_Parse()");
+    TRACE("phFriNfc_NdefRecord_Parse()");
     status = phFriNfc_NdefRecord_Parse(&record, (uint8_t *)raw_record);
     if (status) {
         LOGE("phFriNfc_NdefRecord_Parse() returned 0x%04x", status);
         goto clean_and_return;
     }
-    LOGD("phFriNfc_NdefRecord_Parse() returned 0x%04x", status);
+    TRACE("phFriNfc_NdefRecord_Parse() returned 0x%04x", status);
 
     /* Set TNF field */
     mTnf = e->GetFieldID(record_cls, "mTnf", "S");
diff --git a/core/res/res/drawable-en-ldpi/sym_keyboard_delete.png b/core/res/res/drawable-en-ldpi/sym_keyboard_delete.png
new file mode 100644
index 0000000..d9d5653
--- /dev/null
+++ b/core/res/res/drawable-en-ldpi/sym_keyboard_delete.png
Binary files differ
diff --git a/core/res/res/drawable-en-ldpi/sym_keyboard_feedback_delete.png b/core/res/res/drawable-en-ldpi/sym_keyboard_feedback_delete.png
new file mode 100644
index 0000000..8922bf9
--- /dev/null
+++ b/core/res/res/drawable-en-ldpi/sym_keyboard_feedback_delete.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/textfield_pressed.9.png b/core/res/res/drawable-hdpi/textfield_pressed.9.png
old mode 100755
new mode 100644
index 296d3da..6537be0
--- a/core/res/res/drawable-hdpi/textfield_pressed.9.png
+++ b/core/res/res/drawable-hdpi/textfield_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/bottombar_565.png b/core/res/res/drawable-land-ldpi/bottombar_565.png
new file mode 100644
index 0000000..112c17d
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/bottombar_565.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/btn_lock_normal.9.png b/core/res/res/drawable-land-ldpi/btn_lock_normal.9.png
new file mode 100644
index 0000000..e685adc
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/btn_lock_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/ic_jog_dial_sound_off.png b/core/res/res/drawable-land-ldpi/ic_jog_dial_sound_off.png
new file mode 100644
index 0000000..a4e3edf
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/ic_jog_dial_sound_off.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/ic_jog_dial_sound_on.png b/core/res/res/drawable-land-ldpi/ic_jog_dial_sound_on.png
new file mode 100644
index 0000000..f8190b56
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/ic_jog_dial_sound_on.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/ic_jog_dial_unlock.png b/core/res/res/drawable-land-ldpi/ic_jog_dial_unlock.png
new file mode 100644
index 0000000..16fa0db
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/ic_jog_dial_unlock.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_bar_left_end_confirm_gray.9.png b/core/res/res/drawable-land-ldpi/jog_tab_bar_left_end_confirm_gray.9.png
new file mode 100644
index 0000000..e16e9f6
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_bar_left_end_confirm_gray.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_bar_left_end_confirm_green.9.png b/core/res/res/drawable-land-ldpi/jog_tab_bar_left_end_confirm_green.9.png
new file mode 100644
index 0000000..90211df
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_bar_left_end_confirm_green.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_bar_left_end_confirm_red.9.png b/core/res/res/drawable-land-ldpi/jog_tab_bar_left_end_confirm_red.9.png
new file mode 100644
index 0000000..154ae8e
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_bar_left_end_confirm_red.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_bar_left_end_confirm_yellow.9.png b/core/res/res/drawable-land-ldpi/jog_tab_bar_left_end_confirm_yellow.9.png
new file mode 100644
index 0000000..1e69e4d
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_bar_left_end_confirm_yellow.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_bar_left_end_normal.9.png b/core/res/res/drawable-land-ldpi/jog_tab_bar_left_end_normal.9.png
new file mode 100644
index 0000000..09710a5
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_bar_left_end_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_bar_left_end_pressed.9.png b/core/res/res/drawable-land-ldpi/jog_tab_bar_left_end_pressed.9.png
new file mode 100644
index 0000000..158ce85
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_bar_left_end_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_bar_right_end_confirm_gray.9.png b/core/res/res/drawable-land-ldpi/jog_tab_bar_right_end_confirm_gray.9.png
new file mode 100644
index 0000000..1be54d4
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_bar_right_end_confirm_gray.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_bar_right_end_confirm_green.9.png b/core/res/res/drawable-land-ldpi/jog_tab_bar_right_end_confirm_green.9.png
new file mode 100644
index 0000000..4ef4d69
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_bar_right_end_confirm_green.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_bar_right_end_confirm_red.9.png b/core/res/res/drawable-land-ldpi/jog_tab_bar_right_end_confirm_red.9.png
new file mode 100644
index 0000000..dad283e
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_bar_right_end_confirm_red.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_bar_right_end_confirm_yellow.9.png b/core/res/res/drawable-land-ldpi/jog_tab_bar_right_end_confirm_yellow.9.png
new file mode 100644
index 0000000..f7aa85a
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_bar_right_end_confirm_yellow.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_bar_right_end_normal.9.png b/core/res/res/drawable-land-ldpi/jog_tab_bar_right_end_normal.9.png
new file mode 100644
index 0000000..23860ce
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_bar_right_end_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_bar_right_end_pressed.9.png b/core/res/res/drawable-land-ldpi/jog_tab_bar_right_end_pressed.9.png
new file mode 100644
index 0000000..1105fe5
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_bar_right_end_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_left_confirm_gray.png b/core/res/res/drawable-land-ldpi/jog_tab_left_confirm_gray.png
new file mode 100644
index 0000000..945851d
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_left_confirm_gray.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_left_confirm_green.png b/core/res/res/drawable-land-ldpi/jog_tab_left_confirm_green.png
new file mode 100644
index 0000000..0702927
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_left_confirm_green.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_left_confirm_red.png b/core/res/res/drawable-land-ldpi/jog_tab_left_confirm_red.png
new file mode 100644
index 0000000..d79f46c
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_left_confirm_red.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_left_confirm_yellow.png b/core/res/res/drawable-land-ldpi/jog_tab_left_confirm_yellow.png
new file mode 100644
index 0000000..8e4ef9a
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_left_confirm_yellow.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_left_normal.png b/core/res/res/drawable-land-ldpi/jog_tab_left_normal.png
new file mode 100644
index 0000000..ee6d98c
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_left_normal.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_left_pressed.png b/core/res/res/drawable-land-ldpi/jog_tab_left_pressed.png
new file mode 100644
index 0000000..727fdbb
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_left_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_right_confirm_gray.png b/core/res/res/drawable-land-ldpi/jog_tab_right_confirm_gray.png
new file mode 100644
index 0000000..93d0bf4
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_right_confirm_gray.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_right_confirm_green.png b/core/res/res/drawable-land-ldpi/jog_tab_right_confirm_green.png
new file mode 100644
index 0000000..d49c831
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_right_confirm_green.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_right_confirm_red.png b/core/res/res/drawable-land-ldpi/jog_tab_right_confirm_red.png
new file mode 100644
index 0000000..29bddcf
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_right_confirm_red.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_right_confirm_yellow.png b/core/res/res/drawable-land-ldpi/jog_tab_right_confirm_yellow.png
new file mode 100644
index 0000000..4cefb0c
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_right_confirm_yellow.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_right_normal.png b/core/res/res/drawable-land-ldpi/jog_tab_right_normal.png
new file mode 100644
index 0000000..30fa002
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_right_normal.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_right_pressed.png b/core/res/res/drawable-land-ldpi/jog_tab_right_pressed.png
new file mode 100644
index 0000000..f2d358b
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_right_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_target_gray.png b/core/res/res/drawable-land-ldpi/jog_tab_target_gray.png
new file mode 100644
index 0000000..1e76bc1
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_target_gray.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_target_green.png b/core/res/res/drawable-land-ldpi/jog_tab_target_green.png
new file mode 100644
index 0000000..917769e
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_target_green.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_target_red.png b/core/res/res/drawable-land-ldpi/jog_tab_target_red.png
new file mode 100644
index 0000000..3501ba38
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_target_red.png
Binary files differ
diff --git a/core/res/res/drawable-land-ldpi/jog_tab_target_yellow.png b/core/res/res/drawable-land-ldpi/jog_tab_target_yellow.png
new file mode 100644
index 0000000..ee795a3
--- /dev/null
+++ b/core/res/res/drawable-land-ldpi/jog_tab_target_yellow.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-land-mdpi/ic_jog_dial_sound_off.png b/core/res/res/drawable-land-mdpi/ic_jog_dial_sound_off.png
new file mode 100644
index 0000000..ed54da6
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/ic_jog_dial_sound_off.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/ic_jog_dial_sound_on.png b/core/res/res/drawable-land-mdpi/ic_jog_dial_sound_on.png
new file mode 100644
index 0000000..9994b9f
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/ic_jog_dial_sound_on.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/ic_jog_dial_unlock.png b/core/res/res/drawable-land-mdpi/ic_jog_dial_unlock.png
new file mode 100644
index 0000000..ae8188b
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/ic_jog_dial_unlock.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_target_gray.png b/core/res/res/drawable-land-mdpi/jog_tab_target_gray.png
new file mode 100644
index 0000000..7fd415d
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_target_gray.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_target_green.png b/core/res/res/drawable-land-mdpi/jog_tab_target_green.png
new file mode 100644
index 0000000..6f512fa
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_target_green.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_target_red.png b/core/res/res/drawable-land-mdpi/jog_tab_target_red.png
new file mode 100644
index 0000000..3e2293a
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_target_red.png
Binary files differ
diff --git a/core/res/res/drawable-land-mdpi/jog_tab_target_yellow.png b/core/res/res/drawable-land-mdpi/jog_tab_target_yellow.png
new file mode 100644
index 0000000..67df9d9
--- /dev/null
+++ b/core/res/res/drawable-land-mdpi/jog_tab_target_yellow.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/activity_title_bar.9.png b/core/res/res/drawable-ldpi/activity_title_bar.9.png
new file mode 100644
index 0000000..8aaa7d1
--- /dev/null
+++ b/core/res/res/drawable-ldpi/activity_title_bar.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/arrow_down_float.png b/core/res/res/drawable-ldpi/arrow_down_float.png
new file mode 100644
index 0000000..c41340d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/arrow_down_float.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/arrow_up_float.png b/core/res/res/drawable-ldpi/arrow_up_float.png
new file mode 100644
index 0000000..8b60f12
--- /dev/null
+++ b/core/res/res/drawable-ldpi/arrow_up_float.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/battery_charge_background.png b/core/res/res/drawable-ldpi/battery_charge_background.png
new file mode 100644
index 0000000..503c4f9f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/battery_charge_background.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/bottom_bar.png b/core/res/res/drawable-ldpi/bottom_bar.png
new file mode 100644
index 0000000..c80fd4a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/bottom_bar.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_check_buttonless_off.png b/core/res/res/drawable-ldpi/btn_check_buttonless_off.png
new file mode 100644
index 0000000..327d2c6
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_check_buttonless_off.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_check_buttonless_on.png b/core/res/res/drawable-ldpi/btn_check_buttonless_on.png
new file mode 100644
index 0000000..4d0ab2a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_check_buttonless_on.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_check_label_background.9.png b/core/res/res/drawable-ldpi/btn_check_label_background.9.png
new file mode 100644
index 0000000..5b08367
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_check_label_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_check_off.png b/core/res/res/drawable-ldpi/btn_check_off.png
new file mode 100644
index 0000000..f333117
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_check_off.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_check_off_disable.png b/core/res/res/drawable-ldpi/btn_check_off_disable.png
new file mode 100644
index 0000000..c4d7cd9
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_check_off_disable.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_check_off_disable_focused.png b/core/res/res/drawable-ldpi/btn_check_off_disable_focused.png
new file mode 100644
index 0000000..2bc5899
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_check_off_disable_focused.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_check_off_pressed.png b/core/res/res/drawable-ldpi/btn_check_off_pressed.png
new file mode 100644
index 0000000..fe77b08
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_check_off_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_check_off_selected.png b/core/res/res/drawable-ldpi/btn_check_off_selected.png
new file mode 100644
index 0000000..58542c4
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_check_off_selected.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_check_on.png b/core/res/res/drawable-ldpi/btn_check_on.png
new file mode 100644
index 0000000..f4d777a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_check_on.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_check_on_disable.png b/core/res/res/drawable-ldpi/btn_check_on_disable.png
new file mode 100644
index 0000000..57513ca
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_check_on_disable.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_check_on_disable_focused.png b/core/res/res/drawable-ldpi/btn_check_on_disable_focused.png
new file mode 100644
index 0000000..798835e
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_check_on_disable_focused.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_check_on_pressed.png b/core/res/res/drawable-ldpi/btn_check_on_pressed.png
new file mode 100644
index 0000000..0f00d17
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_check_on_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_check_on_selected.png b/core/res/res/drawable-ldpi/btn_check_on_selected.png
new file mode 100644
index 0000000..51b3566
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_check_on_selected.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_circle_disable.png b/core/res/res/drawable-ldpi/btn_circle_disable.png
new file mode 100644
index 0000000..87a51c5
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_circle_disable.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_circle_disable_focused.png b/core/res/res/drawable-ldpi/btn_circle_disable_focused.png
new file mode 100644
index 0000000..cc28e3b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_circle_disable_focused.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_circle_normal.png b/core/res/res/drawable-ldpi/btn_circle_normal.png
new file mode 100644
index 0000000..b25ad81
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_circle_normal.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_circle_pressed.png b/core/res/res/drawable-ldpi/btn_circle_pressed.png
new file mode 100644
index 0000000..abeedad
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_circle_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_circle_selected.png b/core/res/res/drawable-ldpi/btn_circle_selected.png
new file mode 100644
index 0000000..e3e8d13
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_circle_selected.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_close_normal.png b/core/res/res/drawable-ldpi/btn_close_normal.png
new file mode 100644
index 0000000..e4de088
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_close_normal.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_close_pressed.png b/core/res/res/drawable-ldpi/btn_close_pressed.png
new file mode 100644
index 0000000..5d946bd
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_close_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_close_selected.png b/core/res/res/drawable-ldpi/btn_close_selected.png
new file mode 100644
index 0000000..c1ee5a8
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_close_selected.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_code_lock_default.png b/core/res/res/drawable-ldpi/btn_code_lock_default.png
new file mode 100644
index 0000000..149da9b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_code_lock_default.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_code_lock_touched.png b/core/res/res/drawable-ldpi/btn_code_lock_touched.png
new file mode 100644
index 0000000..ad9a313
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_code_lock_touched.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_default_normal.9.png b/core/res/res/drawable-ldpi/btn_default_normal.9.png
new file mode 100644
index 0000000..198da17
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_default_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_default_normal_disable.9.png b/core/res/res/drawable-ldpi/btn_default_normal_disable.9.png
new file mode 100644
index 0000000..2e61b50
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_default_normal_disable.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_default_normal_disable_focused.9.png b/core/res/res/drawable-ldpi/btn_default_normal_disable_focused.9.png
new file mode 100644
index 0000000..9fab12e
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_default_normal_disable_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_default_pressed.9.png b/core/res/res/drawable-ldpi/btn_default_pressed.9.png
new file mode 100644
index 0000000..f5a21b2
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_default_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_default_selected.9.png b/core/res/res/drawable-ldpi/btn_default_selected.9.png
new file mode 100644
index 0000000..a09da00
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_default_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_default_small_normal.9.png b/core/res/res/drawable-ldpi/btn_default_small_normal.9.png
new file mode 100644
index 0000000..4e69058
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_default_small_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_default_small_normal_disable.9.png b/core/res/res/drawable-ldpi/btn_default_small_normal_disable.9.png
new file mode 100644
index 0000000..64fce657
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_default_small_normal_disable.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_default_small_normal_disable_focused.9.png b/core/res/res/drawable-ldpi/btn_default_small_normal_disable_focused.9.png
new file mode 100644
index 0000000..528b5e1
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_default_small_normal_disable_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_default_small_pressed.9.png b/core/res/res/drawable-ldpi/btn_default_small_pressed.9.png
new file mode 100644
index 0000000..bf70128
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_default_small_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_default_small_selected.9.png b/core/res/res/drawable-ldpi/btn_default_small_selected.9.png
new file mode 100644
index 0000000..71938d0
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_default_small_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_default_transparent_normal.9.png b/core/res/res/drawable-ldpi/btn_default_transparent_normal.9.png
new file mode 100644
index 0000000..2c7249e
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_default_transparent_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_dialog_disable.png b/core/res/res/drawable-ldpi/btn_dialog_disable.png
new file mode 100644
index 0000000..82d13f2
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_dialog_disable.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_dialog_normal.png b/core/res/res/drawable-ldpi/btn_dialog_normal.png
new file mode 100644
index 0000000..e4de088
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_dialog_normal.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_dialog_pressed.png b/core/res/res/drawable-ldpi/btn_dialog_pressed.png
new file mode 100644
index 0000000..557c13a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_dialog_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_dialog_selected.png b/core/res/res/drawable-ldpi/btn_dialog_selected.png
new file mode 100644
index 0000000..f63ce27
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_dialog_selected.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_dropdown_disabled.9.png b/core/res/res/drawable-ldpi/btn_dropdown_disabled.9.png
new file mode 100644
index 0000000..27cb8f5
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_dropdown_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_dropdown_disabled_focused.9.png b/core/res/res/drawable-ldpi/btn_dropdown_disabled_focused.9.png
new file mode 100644
index 0000000..a0231c5
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_dropdown_disabled_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_dropdown_normal.9.png b/core/res/res/drawable-ldpi/btn_dropdown_normal.9.png
new file mode 100644
index 0000000..b23e10ffa
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_dropdown_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_dropdown_pressed.9.png b/core/res/res/drawable-ldpi/btn_dropdown_pressed.9.png
new file mode 100644
index 0000000..c3c08e4
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_dropdown_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_dropdown_selected.9.png b/core/res/res/drawable-ldpi/btn_dropdown_selected.9.png
new file mode 100644
index 0000000..2660e43
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_dropdown_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_erase_default.9.png b/core/res/res/drawable-ldpi/btn_erase_default.9.png
new file mode 100644
index 0000000..dc592ca
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_erase_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_erase_pressed.9.png b/core/res/res/drawable-ldpi/btn_erase_pressed.9.png
new file mode 100644
index 0000000..48c0570
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_erase_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_erase_selected.9.png b/core/res/res/drawable-ldpi/btn_erase_selected.9.png
new file mode 100644
index 0000000..51f7b86
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_erase_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_global_search_normal.9.png b/core/res/res/drawable-ldpi/btn_global_search_normal.9.png
new file mode 100644
index 0000000..60bd3ce
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_global_search_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_keyboard_key_fulltrans_normal.9.png b/core/res/res/drawable-ldpi/btn_keyboard_key_fulltrans_normal.9.png
new file mode 100644
index 0000000..8cf50b8
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_keyboard_key_fulltrans_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_keyboard_key_fulltrans_normal_off.9.png b/core/res/res/drawable-ldpi/btn_keyboard_key_fulltrans_normal_off.9.png
new file mode 100644
index 0000000..d853bf1
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_keyboard_key_fulltrans_normal_off.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_keyboard_key_fulltrans_normal_on.9.png b/core/res/res/drawable-ldpi/btn_keyboard_key_fulltrans_normal_on.9.png
new file mode 100644
index 0000000..f54e948
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_keyboard_key_fulltrans_normal_on.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_keyboard_key_fulltrans_pressed.9.png b/core/res/res/drawable-ldpi/btn_keyboard_key_fulltrans_pressed.9.png
new file mode 100644
index 0000000..ad7c951
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_keyboard_key_fulltrans_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_keyboard_key_fulltrans_pressed_off.9.png b/core/res/res/drawable-ldpi/btn_keyboard_key_fulltrans_pressed_off.9.png
new file mode 100644
index 0000000..1a075d29
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_keyboard_key_fulltrans_pressed_off.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_keyboard_key_fulltrans_pressed_on.9.png b/core/res/res/drawable-ldpi/btn_keyboard_key_fulltrans_pressed_on.9.png
new file mode 100644
index 0000000..5933f61
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_keyboard_key_fulltrans_pressed_on.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_keyboard_key_normal.9.png b/core/res/res/drawable-ldpi/btn_keyboard_key_normal.9.png
new file mode 100644
index 0000000..69db65f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_keyboard_key_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_keyboard_key_normal_off.9.png b/core/res/res/drawable-ldpi/btn_keyboard_key_normal_off.9.png
new file mode 100644
index 0000000..37c5fed
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_keyboard_key_normal_off.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_keyboard_key_normal_on.9.png b/core/res/res/drawable-ldpi/btn_keyboard_key_normal_on.9.png
new file mode 100644
index 0000000..019e6f7
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_keyboard_key_normal_on.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_keyboard_key_pressed.9.png b/core/res/res/drawable-ldpi/btn_keyboard_key_pressed.9.png
new file mode 100644
index 0000000..d3827f0
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_keyboard_key_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_keyboard_key_pressed_off.9.png b/core/res/res/drawable-ldpi/btn_keyboard_key_pressed_off.9.png
new file mode 100644
index 0000000..2bef004
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_keyboard_key_pressed_off.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_keyboard_key_pressed_on.9.png b/core/res/res/drawable-ldpi/btn_keyboard_key_pressed_on.9.png
new file mode 100644
index 0000000..25daabe
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_keyboard_key_pressed_on.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_keyboard_key_trans_normal.9.png b/core/res/res/drawable-ldpi/btn_keyboard_key_trans_normal.9.png
new file mode 100644
index 0000000..9d026c4
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_keyboard_key_trans_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_keyboard_key_trans_normal_off.9.png b/core/res/res/drawable-ldpi/btn_keyboard_key_trans_normal_off.9.png
new file mode 100644
index 0000000..6ededbe
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_keyboard_key_trans_normal_off.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_keyboard_key_trans_normal_on.9.png b/core/res/res/drawable-ldpi/btn_keyboard_key_trans_normal_on.9.png
new file mode 100644
index 0000000..987014f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_keyboard_key_trans_normal_on.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_keyboard_key_trans_pressed.9.png b/core/res/res/drawable-ldpi/btn_keyboard_key_trans_pressed.9.png
new file mode 100644
index 0000000..d19a0fcc
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_keyboard_key_trans_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_keyboard_key_trans_pressed_off.9.png b/core/res/res/drawable-ldpi/btn_keyboard_key_trans_pressed_off.9.png
new file mode 100644
index 0000000..978ff4c
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_keyboard_key_trans_pressed_off.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_keyboard_key_trans_pressed_on.9.png b/core/res/res/drawable-ldpi/btn_keyboard_key_trans_pressed_on.9.png
new file mode 100644
index 0000000..8355c7d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_keyboard_key_trans_pressed_on.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_keyboard_key_trans_selected.9.png b/core/res/res/drawable-ldpi/btn_keyboard_key_trans_selected.9.png
new file mode 100644
index 0000000..8afb908
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_keyboard_key_trans_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_media_player.9.png b/core/res/res/drawable-ldpi/btn_media_player.9.png
new file mode 100644
index 0000000..7096dbc
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_media_player.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_media_player_disabled.9.png b/core/res/res/drawable-ldpi/btn_media_player_disabled.9.png
new file mode 100644
index 0000000..83b1059
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_media_player_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_media_player_disabled_selected.9.png b/core/res/res/drawable-ldpi/btn_media_player_disabled_selected.9.png
new file mode 100644
index 0000000..f55ac21
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_media_player_disabled_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_media_player_pressed.9.png b/core/res/res/drawable-ldpi/btn_media_player_pressed.9.png
new file mode 100644
index 0000000..de58ee2
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_media_player_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_media_player_selected.9.png b/core/res/res/drawable-ldpi/btn_media_player_selected.9.png
new file mode 100644
index 0000000..5443580
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_media_player_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_minus_default.png b/core/res/res/drawable-ldpi/btn_minus_default.png
new file mode 100644
index 0000000..19c66e0
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_minus_default.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_minus_disable.png b/core/res/res/drawable-ldpi/btn_minus_disable.png
new file mode 100644
index 0000000..7b91ea6
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_minus_disable.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_minus_disable_focused.png b/core/res/res/drawable-ldpi/btn_minus_disable_focused.png
new file mode 100644
index 0000000..a347e34
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_minus_disable_focused.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_minus_pressed.png b/core/res/res/drawable-ldpi/btn_minus_pressed.png
new file mode 100644
index 0000000..aaa9746
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_minus_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_minus_selected.png b/core/res/res/drawable-ldpi/btn_minus_selected.png
new file mode 100644
index 0000000..29c69626
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_minus_selected.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_plus_default.png b/core/res/res/drawable-ldpi/btn_plus_default.png
new file mode 100644
index 0000000..8a5c600
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_plus_default.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_plus_disable.png b/core/res/res/drawable-ldpi/btn_plus_disable.png
new file mode 100644
index 0000000..1903ffa
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_plus_disable.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_plus_disable_focused.png b/core/res/res/drawable-ldpi/btn_plus_disable_focused.png
new file mode 100644
index 0000000..92f228a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_plus_disable_focused.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_plus_pressed.png b/core/res/res/drawable-ldpi/btn_plus_pressed.png
new file mode 100644
index 0000000..28f4e02
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_plus_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_plus_selected.png b/core/res/res/drawable-ldpi/btn_plus_selected.png
new file mode 100644
index 0000000..c6fab19
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_plus_selected.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_radio_label_background.9.png b/core/res/res/drawable-ldpi/btn_radio_label_background.9.png
new file mode 100644
index 0000000..d04c41f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_radio_label_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_radio_off.png b/core/res/res/drawable-ldpi/btn_radio_off.png
new file mode 100644
index 0000000..6df3b0d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_radio_off.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_radio_off_pressed.png b/core/res/res/drawable-ldpi/btn_radio_off_pressed.png
new file mode 100644
index 0000000..4848ff0
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_radio_off_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_radio_off_selected.png b/core/res/res/drawable-ldpi/btn_radio_off_selected.png
new file mode 100644
index 0000000..9336722
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_radio_off_selected.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_radio_on.png b/core/res/res/drawable-ldpi/btn_radio_on.png
new file mode 100644
index 0000000..65e5791
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_radio_on.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_radio_on_pressed.png b/core/res/res/drawable-ldpi/btn_radio_on_pressed.png
new file mode 100644
index 0000000..4856c32
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_radio_on_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_radio_on_selected.png b/core/res/res/drawable-ldpi/btn_radio_on_selected.png
new file mode 100644
index 0000000..8b19dc7
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_radio_on_selected.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_rating_star_off_normal.png b/core/res/res/drawable-ldpi/btn_rating_star_off_normal.png
new file mode 100644
index 0000000..5967bd3
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_rating_star_off_normal.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_rating_star_off_pressed.png b/core/res/res/drawable-ldpi/btn_rating_star_off_pressed.png
new file mode 100644
index 0000000..209e6a4
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_rating_star_off_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_rating_star_off_selected.png b/core/res/res/drawable-ldpi/btn_rating_star_off_selected.png
new file mode 100644
index 0000000..c095f7f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_rating_star_off_selected.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_rating_star_on_normal.png b/core/res/res/drawable-ldpi/btn_rating_star_on_normal.png
new file mode 100644
index 0000000..89d26129
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_rating_star_on_normal.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_rating_star_on_pressed.png b/core/res/res/drawable-ldpi/btn_rating_star_on_pressed.png
new file mode 100644
index 0000000..6386eaa
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_rating_star_on_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_rating_star_on_selected.png b/core/res/res/drawable-ldpi/btn_rating_star_on_selected.png
new file mode 100644
index 0000000..e1edf4e
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_rating_star_on_selected.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_search_dialog_default.9.png b/core/res/res/drawable-ldpi/btn_search_dialog_default.9.png
new file mode 100644
index 0000000..35111b7
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_search_dialog_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_search_dialog_pressed.9.png b/core/res/res/drawable-ldpi/btn_search_dialog_pressed.9.png
new file mode 100644
index 0000000..8ca4c65
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_search_dialog_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_search_dialog_selected.9.png b/core/res/res/drawable-ldpi/btn_search_dialog_selected.9.png
new file mode 100644
index 0000000..0bee0b7
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_search_dialog_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_search_dialog_voice_default.9.png b/core/res/res/drawable-ldpi/btn_search_dialog_voice_default.9.png
new file mode 100644
index 0000000..f9e7298
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_search_dialog_voice_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_search_dialog_voice_pressed.9.png b/core/res/res/drawable-ldpi/btn_search_dialog_voice_pressed.9.png
new file mode 100644
index 0000000..a130f65
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_search_dialog_voice_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_search_dialog_voice_selected.9.png b/core/res/res/drawable-ldpi/btn_search_dialog_voice_selected.9.png
new file mode 100644
index 0000000..c055bfe
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_search_dialog_voice_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_square_overlay_disabled.png b/core/res/res/drawable-ldpi/btn_square_overlay_disabled.png
new file mode 100644
index 0000000..3b60946
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_square_overlay_disabled.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_square_overlay_disabled_focused.png b/core/res/res/drawable-ldpi/btn_square_overlay_disabled_focused.png
new file mode 100644
index 0000000..a36a9dd
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_square_overlay_disabled_focused.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_square_overlay_normal.png b/core/res/res/drawable-ldpi/btn_square_overlay_normal.png
new file mode 100644
index 0000000..4537623
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_square_overlay_normal.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_square_overlay_pressed.png b/core/res/res/drawable-ldpi/btn_square_overlay_pressed.png
new file mode 100644
index 0000000..62f2246
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_square_overlay_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_square_overlay_selected.png b/core/res/res/drawable-ldpi/btn_square_overlay_selected.png
new file mode 100644
index 0000000..264d3fa
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_square_overlay_selected.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_star_big_off.png b/core/res/res/drawable-ldpi/btn_star_big_off.png
new file mode 100644
index 0000000..f0f1eb8
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_star_big_off.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_star_big_off_disable.png b/core/res/res/drawable-ldpi/btn_star_big_off_disable.png
new file mode 100644
index 0000000..c6f2e20
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_star_big_off_disable.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_star_big_off_disable_focused.png b/core/res/res/drawable-ldpi/btn_star_big_off_disable_focused.png
new file mode 100644
index 0000000..228a84e
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_star_big_off_disable_focused.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_star_big_off_pressed.png b/core/res/res/drawable-ldpi/btn_star_big_off_pressed.png
new file mode 100644
index 0000000..041f81a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_star_big_off_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_star_big_off_selected.png b/core/res/res/drawable-ldpi/btn_star_big_off_selected.png
new file mode 100644
index 0000000..adc8151
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_star_big_off_selected.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_star_big_on.png b/core/res/res/drawable-ldpi/btn_star_big_on.png
new file mode 100644
index 0000000..cf5ed35
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_star_big_on.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_star_big_on_disable.png b/core/res/res/drawable-ldpi/btn_star_big_on_disable.png
new file mode 100644
index 0000000..53e6c65
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_star_big_on_disable.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_star_big_on_disable_focused.png b/core/res/res/drawable-ldpi/btn_star_big_on_disable_focused.png
new file mode 100644
index 0000000..8535013
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_star_big_on_disable_focused.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_star_big_on_pressed.png b/core/res/res/drawable-ldpi/btn_star_big_on_pressed.png
new file mode 100644
index 0000000..272787f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_star_big_on_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_star_big_on_selected.png b/core/res/res/drawable-ldpi/btn_star_big_on_selected.png
new file mode 100644
index 0000000..938d743
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_star_big_on_selected.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_star_label_background.9.png b/core/res/res/drawable-ldpi/btn_star_label_background.9.png
new file mode 100644
index 0000000..3bc13c8
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_star_label_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_toggle_off.9.png b/core/res/res/drawable-ldpi/btn_toggle_off.9.png
new file mode 100644
index 0000000..d0245ff
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_toggle_off.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_toggle_on.9.png b/core/res/res/drawable-ldpi/btn_toggle_on.9.png
new file mode 100644
index 0000000..0987759
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_toggle_on.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_zoom_down_disabled.9.png b/core/res/res/drawable-ldpi/btn_zoom_down_disabled.9.png
new file mode 100644
index 0000000..0346abc
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_zoom_down_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_zoom_down_disabled_focused.9.png b/core/res/res/drawable-ldpi/btn_zoom_down_disabled_focused.9.png
new file mode 100644
index 0000000..b03aa1b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_zoom_down_disabled_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_zoom_down_normal.9.png b/core/res/res/drawable-ldpi/btn_zoom_down_normal.9.png
new file mode 100644
index 0000000..aa2464c
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_zoom_down_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_zoom_down_pressed.9.png b/core/res/res/drawable-ldpi/btn_zoom_down_pressed.9.png
new file mode 100644
index 0000000..caa4d30
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_zoom_down_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_zoom_down_selected.9.png b/core/res/res/drawable-ldpi/btn_zoom_down_selected.9.png
new file mode 100644
index 0000000..b814785
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_zoom_down_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_zoom_page_normal.png b/core/res/res/drawable-ldpi/btn_zoom_page_normal.png
new file mode 100644
index 0000000..453bf40
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_zoom_page_normal.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_zoom_page_press.png b/core/res/res/drawable-ldpi/btn_zoom_page_press.png
new file mode 100644
index 0000000..82c29c8
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_zoom_page_press.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_zoom_up_disabled.9.png b/core/res/res/drawable-ldpi/btn_zoom_up_disabled.9.png
new file mode 100644
index 0000000..e64f178
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_zoom_up_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_zoom_up_disabled_focused.9.png b/core/res/res/drawable-ldpi/btn_zoom_up_disabled_focused.9.png
new file mode 100644
index 0000000..3b21d0a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_zoom_up_disabled_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_zoom_up_normal.9.png b/core/res/res/drawable-ldpi/btn_zoom_up_normal.9.png
new file mode 100644
index 0000000..f4b56d5
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_zoom_up_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_zoom_up_pressed.9.png b/core/res/res/drawable-ldpi/btn_zoom_up_pressed.9.png
new file mode 100644
index 0000000..45c668c
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_zoom_up_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/btn_zoom_up_selected.9.png b/core/res/res/drawable-ldpi/btn_zoom_up_selected.9.png
new file mode 100644
index 0000000..1a07a52
--- /dev/null
+++ b/core/res/res/drawable-ldpi/btn_zoom_up_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/button_onoff_indicator_off.png b/core/res/res/drawable-ldpi/button_onoff_indicator_off.png
new file mode 100644
index 0000000..7946356
--- /dev/null
+++ b/core/res/res/drawable-ldpi/button_onoff_indicator_off.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/button_onoff_indicator_on.png b/core/res/res/drawable-ldpi/button_onoff_indicator_on.png
new file mode 100644
index 0000000..6b817d5
--- /dev/null
+++ b/core/res/res/drawable-ldpi/button_onoff_indicator_on.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/call_contact.png b/core/res/res/drawable-ldpi/call_contact.png
new file mode 100644
index 0000000..bee1d20
--- /dev/null
+++ b/core/res/res/drawable-ldpi/call_contact.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/checkbox_off_background.png b/core/res/res/drawable-ldpi/checkbox_off_background.png
new file mode 100644
index 0000000..ab77983
--- /dev/null
+++ b/core/res/res/drawable-ldpi/checkbox_off_background.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/checkbox_on_background.png b/core/res/res/drawable-ldpi/checkbox_on_background.png
new file mode 100644
index 0000000..dd92a4c
--- /dev/null
+++ b/core/res/res/drawable-ldpi/checkbox_on_background.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/clock_dial.png b/core/res/res/drawable-ldpi/clock_dial.png
new file mode 100644
index 0000000..cbc9961
--- /dev/null
+++ b/core/res/res/drawable-ldpi/clock_dial.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/clock_hand_hour.png b/core/res/res/drawable-ldpi/clock_hand_hour.png
new file mode 100644
index 0000000..3362fd0
--- /dev/null
+++ b/core/res/res/drawable-ldpi/clock_hand_hour.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/clock_hand_minute.png b/core/res/res/drawable-ldpi/clock_hand_minute.png
new file mode 100644
index 0000000..5c73d45
--- /dev/null
+++ b/core/res/res/drawable-ldpi/clock_hand_minute.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/code_lock_bottom.9.png b/core/res/res/drawable-ldpi/code_lock_bottom.9.png
new file mode 100644
index 0000000..dddac51
--- /dev/null
+++ b/core/res/res/drawable-ldpi/code_lock_bottom.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/code_lock_left.9.png b/core/res/res/drawable-ldpi/code_lock_left.9.png
new file mode 100644
index 0000000..8834f74
--- /dev/null
+++ b/core/res/res/drawable-ldpi/code_lock_left.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/code_lock_top.9.png b/core/res/res/drawable-ldpi/code_lock_top.9.png
new file mode 100644
index 0000000..2a5e353
--- /dev/null
+++ b/core/res/res/drawable-ldpi/code_lock_top.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/compass_arrow.png b/core/res/res/drawable-ldpi/compass_arrow.png
new file mode 100644
index 0000000..f59015c
--- /dev/null
+++ b/core/res/res/drawable-ldpi/compass_arrow.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/compass_base.png b/core/res/res/drawable-ldpi/compass_base.png
new file mode 100644
index 0000000..a2eeb07
--- /dev/null
+++ b/core/res/res/drawable-ldpi/compass_base.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/contact_header_bg.9.png b/core/res/res/drawable-ldpi/contact_header_bg.9.png
new file mode 100644
index 0000000..20f0cd3
--- /dev/null
+++ b/core/res/res/drawable-ldpi/contact_header_bg.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/create_contact.png b/core/res/res/drawable-ldpi/create_contact.png
new file mode 100644
index 0000000..c920ef4
--- /dev/null
+++ b/core/res/res/drawable-ldpi/create_contact.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/dark_header.9.png b/core/res/res/drawable-ldpi/dark_header.9.png
new file mode 100644
index 0000000..88fa160
--- /dev/null
+++ b/core/res/res/drawable-ldpi/dark_header.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/dialog_divider_horizontal_light.9.png b/core/res/res/drawable-ldpi/dialog_divider_horizontal_light.9.png
new file mode 100644
index 0000000..75a1534
--- /dev/null
+++ b/core/res/res/drawable-ldpi/dialog_divider_horizontal_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/divider_horizontal_bright.9.png b/core/res/res/drawable-ldpi/divider_horizontal_bright.9.png
new file mode 100644
index 0000000..24f2a3f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/divider_horizontal_bright.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/divider_horizontal_bright_opaque.9.png b/core/res/res/drawable-ldpi/divider_horizontal_bright_opaque.9.png
new file mode 100644
index 0000000..24f2a3f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/divider_horizontal_bright_opaque.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/divider_horizontal_dark.9.png b/core/res/res/drawable-ldpi/divider_horizontal_dark.9.png
new file mode 100644
index 0000000..470be26
--- /dev/null
+++ b/core/res/res/drawable-ldpi/divider_horizontal_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/divider_horizontal_dark_opaque.9.png b/core/res/res/drawable-ldpi/divider_horizontal_dark_opaque.9.png
new file mode 100644
index 0000000..24f2a3f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/divider_horizontal_dark_opaque.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/divider_horizontal_dim_dark.9.png b/core/res/res/drawable-ldpi/divider_horizontal_dim_dark.9.png
new file mode 100644
index 0000000..e04b49d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/divider_horizontal_dim_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/divider_horizontal_textfield.9.png b/core/res/res/drawable-ldpi/divider_horizontal_textfield.9.png
new file mode 100644
index 0000000..547b180
--- /dev/null
+++ b/core/res/res/drawable-ldpi/divider_horizontal_textfield.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/divider_vertical_bright.9.png b/core/res/res/drawable-ldpi/divider_vertical_bright.9.png
new file mode 100644
index 0000000..c85f7ab
--- /dev/null
+++ b/core/res/res/drawable-ldpi/divider_vertical_bright.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/divider_vertical_bright_opaque.9.png b/core/res/res/drawable-ldpi/divider_vertical_bright_opaque.9.png
new file mode 100644
index 0000000..662e033
--- /dev/null
+++ b/core/res/res/drawable-ldpi/divider_vertical_bright_opaque.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/divider_vertical_dark.9.png b/core/res/res/drawable-ldpi/divider_vertical_dark.9.png
new file mode 100644
index 0000000..470be26
--- /dev/null
+++ b/core/res/res/drawable-ldpi/divider_vertical_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/divider_vertical_dark_opaque.9.png b/core/res/res/drawable-ldpi/divider_vertical_dark_opaque.9.png
new file mode 100644
index 0000000..94d2fda
--- /dev/null
+++ b/core/res/res/drawable-ldpi/divider_vertical_dark_opaque.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/editbox_background_focus_yellow.9.png b/core/res/res/drawable-ldpi/editbox_background_focus_yellow.9.png
new file mode 100644
index 0000000..f8d65bc
--- /dev/null
+++ b/core/res/res/drawable-ldpi/editbox_background_focus_yellow.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/editbox_background_normal.9.png b/core/res/res/drawable-ldpi/editbox_background_normal.9.png
new file mode 100644
index 0000000..f8fb178
--- /dev/null
+++ b/core/res/res/drawable-ldpi/editbox_background_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/editbox_dropdown_background.9.png b/core/res/res/drawable-ldpi/editbox_dropdown_background.9.png
new file mode 100644
index 0000000..8717d34
--- /dev/null
+++ b/core/res/res/drawable-ldpi/editbox_dropdown_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/editbox_dropdown_background_dark.9.png b/core/res/res/drawable-ldpi/editbox_dropdown_background_dark.9.png
new file mode 100644
index 0000000..18885fc
--- /dev/null
+++ b/core/res/res/drawable-ldpi/editbox_dropdown_background_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/emo_im_angel.png b/core/res/res/drawable-ldpi/emo_im_angel.png
new file mode 100644
index 0000000..eb74cb3
--- /dev/null
+++ b/core/res/res/drawable-ldpi/emo_im_angel.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/emo_im_cool.png b/core/res/res/drawable-ldpi/emo_im_cool.png
new file mode 100644
index 0000000..657de3b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/emo_im_cool.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/emo_im_crying.png b/core/res/res/drawable-ldpi/emo_im_crying.png
new file mode 100644
index 0000000..292cf0c
--- /dev/null
+++ b/core/res/res/drawable-ldpi/emo_im_crying.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/emo_im_foot_in_mouth.png b/core/res/res/drawable-ldpi/emo_im_foot_in_mouth.png
new file mode 100644
index 0000000..b1d9983
--- /dev/null
+++ b/core/res/res/drawable-ldpi/emo_im_foot_in_mouth.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/emo_im_happy.png b/core/res/res/drawable-ldpi/emo_im_happy.png
new file mode 100644
index 0000000..b34a54b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/emo_im_happy.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/emo_im_kissing.png b/core/res/res/drawable-ldpi/emo_im_kissing.png
new file mode 100644
index 0000000..d8aaf11
--- /dev/null
+++ b/core/res/res/drawable-ldpi/emo_im_kissing.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/emo_im_laughing.png b/core/res/res/drawable-ldpi/emo_im_laughing.png
new file mode 100644
index 0000000..41ddb6f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/emo_im_laughing.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/emo_im_lips_are_sealed.png b/core/res/res/drawable-ldpi/emo_im_lips_are_sealed.png
new file mode 100644
index 0000000..85d0c42
--- /dev/null
+++ b/core/res/res/drawable-ldpi/emo_im_lips_are_sealed.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/emo_im_money_mouth.png b/core/res/res/drawable-ldpi/emo_im_money_mouth.png
new file mode 100644
index 0000000..b04a56c
--- /dev/null
+++ b/core/res/res/drawable-ldpi/emo_im_money_mouth.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/emo_im_sad.png b/core/res/res/drawable-ldpi/emo_im_sad.png
new file mode 100644
index 0000000..e978231
--- /dev/null
+++ b/core/res/res/drawable-ldpi/emo_im_sad.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/emo_im_surprised.png b/core/res/res/drawable-ldpi/emo_im_surprised.png
new file mode 100644
index 0000000..6f9c8d9
--- /dev/null
+++ b/core/res/res/drawable-ldpi/emo_im_surprised.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/emo_im_tongue_sticking_out.png b/core/res/res/drawable-ldpi/emo_im_tongue_sticking_out.png
new file mode 100644
index 0000000..c62447cb
--- /dev/null
+++ b/core/res/res/drawable-ldpi/emo_im_tongue_sticking_out.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/emo_im_undecided.png b/core/res/res/drawable-ldpi/emo_im_undecided.png
new file mode 100644
index 0000000..27c4ca3
--- /dev/null
+++ b/core/res/res/drawable-ldpi/emo_im_undecided.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/emo_im_winking.png b/core/res/res/drawable-ldpi/emo_im_winking.png
new file mode 100644
index 0000000..97b180f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/emo_im_winking.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/emo_im_wtf.png b/core/res/res/drawable-ldpi/emo_im_wtf.png
new file mode 100644
index 0000000..8d6a307
--- /dev/null
+++ b/core/res/res/drawable-ldpi/emo_im_wtf.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/emo_im_yelling.png b/core/res/res/drawable-ldpi/emo_im_yelling.png
new file mode 100644
index 0000000..ce74375
--- /dev/null
+++ b/core/res/res/drawable-ldpi/emo_im_yelling.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/expander_ic_maximized.9.png b/core/res/res/drawable-ldpi/expander_ic_maximized.9.png
new file mode 100644
index 0000000..732a6f5
--- /dev/null
+++ b/core/res/res/drawable-ldpi/expander_ic_maximized.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/expander_ic_minimized.9.png b/core/res/res/drawable-ldpi/expander_ic_minimized.9.png
new file mode 100644
index 0000000..054e3a4
--- /dev/null
+++ b/core/res/res/drawable-ldpi/expander_ic_minimized.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/focused_application_background_static.png b/core/res/res/drawable-ldpi/focused_application_background_static.png
new file mode 100644
index 0000000..8738bad
--- /dev/null
+++ b/core/res/res/drawable-ldpi/focused_application_background_static.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/frame_gallery_thumb.9.png b/core/res/res/drawable-ldpi/frame_gallery_thumb.9.png
new file mode 100644
index 0000000..d686b77
--- /dev/null
+++ b/core/res/res/drawable-ldpi/frame_gallery_thumb.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/frame_gallery_thumb_pressed.9.png b/core/res/res/drawable-ldpi/frame_gallery_thumb_pressed.9.png
new file mode 100644
index 0000000..c33048a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/frame_gallery_thumb_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/frame_gallery_thumb_selected.9.png b/core/res/res/drawable-ldpi/frame_gallery_thumb_selected.9.png
new file mode 100644
index 0000000..8c4adbc
--- /dev/null
+++ b/core/res/res/drawable-ldpi/frame_gallery_thumb_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/gallery_selected_default.9.png b/core/res/res/drawable-ldpi/gallery_selected_default.9.png
new file mode 100644
index 0000000..3d55225b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/gallery_selected_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/gallery_selected_focused.9.png b/core/res/res/drawable-ldpi/gallery_selected_focused.9.png
new file mode 100644
index 0000000..31aabc2
--- /dev/null
+++ b/core/res/res/drawable-ldpi/gallery_selected_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/gallery_selected_pressed.9.png b/core/res/res/drawable-ldpi/gallery_selected_pressed.9.png
new file mode 100644
index 0000000..d05a36f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/gallery_selected_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/gallery_unselected_default.9.png b/core/res/res/drawable-ldpi/gallery_unselected_default.9.png
new file mode 100644
index 0000000..179c32c
--- /dev/null
+++ b/core/res/res/drawable-ldpi/gallery_unselected_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/gallery_unselected_pressed.9.png b/core/res/res/drawable-ldpi/gallery_unselected_pressed.9.png
new file mode 100644
index 0000000..0e3f652
--- /dev/null
+++ b/core/res/res/drawable-ldpi/gallery_unselected_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/grid_selector_background_focus.9.png b/core/res/res/drawable-ldpi/grid_selector_background_focus.9.png
new file mode 100644
index 0000000..87d47ca
--- /dev/null
+++ b/core/res/res/drawable-ldpi/grid_selector_background_focus.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/grid_selector_background_pressed.9.png b/core/res/res/drawable-ldpi/grid_selector_background_pressed.9.png
new file mode 100644
index 0000000..f2cc507
--- /dev/null
+++ b/core/res/res/drawable-ldpi/grid_selector_background_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/highlight_disabled.9.png b/core/res/res/drawable-ldpi/highlight_disabled.9.png
new file mode 100644
index 0000000..473bdf6
--- /dev/null
+++ b/core/res/res/drawable-ldpi/highlight_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/highlight_pressed.9.png b/core/res/res/drawable-ldpi/highlight_pressed.9.png
new file mode 100644
index 0000000..0ebfbde
--- /dev/null
+++ b/core/res/res/drawable-ldpi/highlight_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/highlight_selected.9.png b/core/res/res/drawable-ldpi/highlight_selected.9.png
new file mode 100644
index 0000000..a4df027
--- /dev/null
+++ b/core/res/res/drawable-ldpi/highlight_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_aggregated.png b/core/res/res/drawable-ldpi/ic_aggregated.png
new file mode 100644
index 0000000..fdb2e90
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_aggregated.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_btn_round_more_disabled.png b/core/res/res/drawable-ldpi/ic_btn_round_more_disabled.png
new file mode 100644
index 0000000..99c7a2f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_btn_round_more_disabled.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_btn_round_more_normal.png b/core/res/res/drawable-ldpi/ic_btn_round_more_normal.png
new file mode 100644
index 0000000..a8cb6d5
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_btn_round_more_normal.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_btn_search.png b/core/res/res/drawable-ldpi/ic_btn_search.png
new file mode 100644
index 0000000..bdefbf5
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_btn_search.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_btn_search_go.png b/core/res/res/drawable-ldpi/ic_btn_search_go.png
new file mode 100644
index 0000000..94e5555
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_btn_search_go.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_btn_speak_now.png b/core/res/res/drawable-ldpi/ic_btn_speak_now.png
new file mode 100644
index 0000000..106e8e6
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_btn_speak_now.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_btn_square_browser_zoom_fit_page_disabled.png b/core/res/res/drawable-ldpi/ic_btn_square_browser_zoom_fit_page_disabled.png
new file mode 100644
index 0000000..ef71e6c
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_btn_square_browser_zoom_fit_page_disabled.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_btn_square_browser_zoom_fit_page_normal.png b/core/res/res/drawable-ldpi/ic_btn_square_browser_zoom_fit_page_normal.png
new file mode 100644
index 0000000..fc1531c
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_btn_square_browser_zoom_fit_page_normal.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_btn_square_browser_zoom_page_overview_disabled.png b/core/res/res/drawable-ldpi/ic_btn_square_browser_zoom_page_overview_disabled.png
new file mode 100644
index 0000000..84fcf0a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_btn_square_browser_zoom_page_overview_disabled.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_btn_square_browser_zoom_page_overview_normal.png b/core/res/res/drawable-ldpi/ic_btn_square_browser_zoom_page_overview_normal.png
new file mode 100644
index 0000000..70fc818
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_btn_square_browser_zoom_page_overview_normal.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_bullet_key_permission.png b/core/res/res/drawable-ldpi/ic_bullet_key_permission.png
new file mode 100644
index 0000000..016c0f0
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_bullet_key_permission.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_contact_picture.png b/core/res/res/drawable-ldpi/ic_contact_picture.png
new file mode 100644
index 0000000..a0444e4
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_contact_picture.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_contact_picture_2.png b/core/res/res/drawable-ldpi/ic_contact_picture_2.png
new file mode 100644
index 0000000..42e8d86
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_contact_picture_2.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_contact_picture_3.png b/core/res/res/drawable-ldpi/ic_contact_picture_3.png
new file mode 100644
index 0000000..c9c0a65
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_contact_picture_3.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_delete.png b/core/res/res/drawable-ldpi/ic_delete.png
new file mode 100644
index 0000000..a4cefa8
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_delete.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_dialog_alert.png b/core/res/res/drawable-ldpi/ic_dialog_alert.png
new file mode 100644
index 0000000..6c3c624
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_dialog_alert.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_dialog_dialer.png b/core/res/res/drawable-ldpi/ic_dialog_dialer.png
new file mode 100644
index 0000000..066efef
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_dialog_dialer.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_dialog_email.png b/core/res/res/drawable-ldpi/ic_dialog_email.png
new file mode 100644
index 0000000..194222e
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_dialog_email.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_dialog_info.png b/core/res/res/drawable-ldpi/ic_dialog_info.png
new file mode 100644
index 0000000..a1dcc5a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_dialog_info.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_dialog_map.png b/core/res/res/drawable-ldpi/ic_dialog_map.png
new file mode 100644
index 0000000..9b04476
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_dialog_map.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_dialog_time.png b/core/res/res/drawable-ldpi/ic_dialog_time.png
new file mode 100644
index 0000000..5b8722b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_dialog_time.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_dialog_usb.png b/core/res/res/drawable-ldpi/ic_dialog_usb.png
new file mode 100644
index 0000000..eeef46e
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_dialog_usb.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_emergency.png b/core/res/res/drawable-ldpi/ic_emergency.png
new file mode 100644
index 0000000..5c4ed5d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_emergency.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_input_add.png b/core/res/res/drawable-ldpi/ic_input_add.png
new file mode 100644
index 0000000..04cc27a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_input_add.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_input_delete.png b/core/res/res/drawable-ldpi/ic_input_delete.png
new file mode 100644
index 0000000..d7eff17
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_input_delete.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_input_get.png b/core/res/res/drawable-ldpi/ic_input_get.png
new file mode 100644
index 0000000..4452993
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_input_get.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_jog_dial_answer.png b/core/res/res/drawable-ldpi/ic_jog_dial_answer.png
new file mode 100644
index 0000000..9c5800a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_jog_dial_answer.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_jog_dial_answer_and_end.png b/core/res/res/drawable-ldpi/ic_jog_dial_answer_and_end.png
new file mode 100644
index 0000000..117c6d8
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_jog_dial_answer_and_end.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_jog_dial_answer_and_hold.png b/core/res/res/drawable-ldpi/ic_jog_dial_answer_and_hold.png
new file mode 100644
index 0000000..08280e3
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_jog_dial_answer_and_hold.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_jog_dial_decline.png b/core/res/res/drawable-ldpi/ic_jog_dial_decline.png
new file mode 100644
index 0000000..7ccc1ca
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_jog_dial_decline.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_jog_dial_sound_off.png b/core/res/res/drawable-ldpi/ic_jog_dial_sound_off.png
new file mode 100644
index 0000000..a4e3edf
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_jog_dial_sound_off.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_jog_dial_sound_on.png b/core/res/res/drawable-ldpi/ic_jog_dial_sound_on.png
new file mode 100644
index 0000000..f8190b56
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_jog_dial_sound_on.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_jog_dial_unlock.png b/core/res/res/drawable-ldpi/ic_jog_dial_unlock.png
new file mode 100644
index 0000000..16fa0db
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_jog_dial_unlock.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_jog_dial_vibrate_on.png b/core/res/res/drawable-ldpi/ic_jog_dial_vibrate_on.png
new file mode 100644
index 0000000..ac5a9b9
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_jog_dial_vibrate_on.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_launcher_android.png b/core/res/res/drawable-ldpi/ic_launcher_android.png
new file mode 100644
index 0000000..628a8de
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_launcher_android.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_lock_airplane_mode.png b/core/res/res/drawable-ldpi/ic_lock_airplane_mode.png
new file mode 100644
index 0000000..65a101b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_lock_airplane_mode.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_lock_airplane_mode_off.png b/core/res/res/drawable-ldpi/ic_lock_airplane_mode_off.png
new file mode 100644
index 0000000..11adeb8
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_lock_airplane_mode_off.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_lock_idle_alarm.png b/core/res/res/drawable-ldpi/ic_lock_idle_alarm.png
new file mode 100644
index 0000000..dc133c5
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_lock_idle_alarm.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_lock_idle_charging.png b/core/res/res/drawable-ldpi/ic_lock_idle_charging.png
new file mode 100644
index 0000000..c943b67
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_lock_idle_charging.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_lock_idle_lock.png b/core/res/res/drawable-ldpi/ic_lock_idle_lock.png
new file mode 100644
index 0000000..bc4adfd
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_lock_idle_lock.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_lock_idle_low_battery.png b/core/res/res/drawable-ldpi/ic_lock_idle_low_battery.png
new file mode 100644
index 0000000..df7cb22
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_lock_idle_low_battery.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_lock_lock.png b/core/res/res/drawable-ldpi/ic_lock_lock.png
new file mode 100644
index 0000000..bde40f6
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_lock_lock.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_lock_power_off.png b/core/res/res/drawable-ldpi/ic_lock_power_off.png
new file mode 100644
index 0000000..074d6d0
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_lock_power_off.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_lock_ringer_off.png b/core/res/res/drawable-ldpi/ic_lock_ringer_off.png
new file mode 100644
index 0000000..50ff3de
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_lock_ringer_off.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_lock_ringer_on.png b/core/res/res/drawable-ldpi/ic_lock_ringer_on.png
new file mode 100644
index 0000000..7232728
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_lock_ringer_on.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_lock_silent_mode.png b/core/res/res/drawable-ldpi/ic_lock_silent_mode.png
new file mode 100644
index 0000000..8004f9d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_lock_silent_mode.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_lock_silent_mode_off.png b/core/res/res/drawable-ldpi/ic_lock_silent_mode_off.png
new file mode 100644
index 0000000..81b7a8d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_lock_silent_mode_off.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_lock_silent_mode_vibrate.png b/core/res/res/drawable-ldpi/ic_lock_silent_mode_vibrate.png
new file mode 100644
index 0000000..5f54f6f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_lock_silent_mode_vibrate.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_maps_indicator_current_position.png b/core/res/res/drawable-ldpi/ic_maps_indicator_current_position.png
new file mode 100644
index 0000000..697b0656
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_maps_indicator_current_position.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_maps_indicator_current_position_anim1.png b/core/res/res/drawable-ldpi/ic_maps_indicator_current_position_anim1.png
new file mode 100644
index 0000000..15a8a08
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_maps_indicator_current_position_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_maps_indicator_current_position_anim2.png b/core/res/res/drawable-ldpi/ic_maps_indicator_current_position_anim2.png
new file mode 100644
index 0000000..f8b8de2
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_maps_indicator_current_position_anim2.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_maps_indicator_current_position_anim3.png b/core/res/res/drawable-ldpi/ic_maps_indicator_current_position_anim3.png
new file mode 100644
index 0000000..02f7547
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_maps_indicator_current_position_anim3.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_media_ff.png b/core/res/res/drawable-ldpi/ic_media_ff.png
new file mode 100644
index 0000000..1b4d9db
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_media_ff.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_media_next.png b/core/res/res/drawable-ldpi/ic_media_next.png
new file mode 100644
index 0000000..99927fd
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_media_next.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_media_pause.png b/core/res/res/drawable-ldpi/ic_media_pause.png
new file mode 100644
index 0000000..3b98d66
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_media_pause.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_media_play.png b/core/res/res/drawable-ldpi/ic_media_play.png
new file mode 100644
index 0000000..e7c1972
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_media_play.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_media_previous.png b/core/res/res/drawable-ldpi/ic_media_previous.png
new file mode 100644
index 0000000..df04322
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_media_previous.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_media_rew.png b/core/res/res/drawable-ldpi/ic_media_rew.png
new file mode 100644
index 0000000..28843f9
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_media_rew.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_account_list.png b/core/res/res/drawable-ldpi/ic_menu_account_list.png
new file mode 100644
index 0000000..04ededd38
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_account_list.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_add.png b/core/res/res/drawable-ldpi/ic_menu_add.png
new file mode 100644
index 0000000..89620af
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_add.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_agenda.png b/core/res/res/drawable-ldpi/ic_menu_agenda.png
new file mode 100644
index 0000000..9abcc68
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_agenda.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_allfriends.png b/core/res/res/drawable-ldpi/ic_menu_allfriends.png
new file mode 100644
index 0000000..462d078
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_allfriends.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_always_landscape_portrait.png b/core/res/res/drawable-ldpi/ic_menu_always_landscape_portrait.png
new file mode 100644
index 0000000..2c779ca
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_always_landscape_portrait.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_archive.png b/core/res/res/drawable-ldpi/ic_menu_archive.png
new file mode 100644
index 0000000..719ecd8
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_archive.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_attachment.png b/core/res/res/drawable-ldpi/ic_menu_attachment.png
new file mode 100644
index 0000000..8fc2211
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_attachment.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_back.png b/core/res/res/drawable-ldpi/ic_menu_back.png
new file mode 100644
index 0000000..71eb533
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_back.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_block.png b/core/res/res/drawable-ldpi/ic_menu_block.png
new file mode 100644
index 0000000..c8d80cd
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_block.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_blocked_user.png b/core/res/res/drawable-ldpi/ic_menu_blocked_user.png
new file mode 100644
index 0000000..c6407b5
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_blocked_user.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_call.png b/core/res/res/drawable-ldpi/ic_menu_call.png
new file mode 100644
index 0000000..39d4b10
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_call.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_camera.png b/core/res/res/drawable-ldpi/ic_menu_camera.png
new file mode 100644
index 0000000..4d3a6a5
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_camera.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_cc.png b/core/res/res/drawable-ldpi/ic_menu_cc.png
new file mode 100644
index 0000000..d90d70d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_cc.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_chat_dashboard.png b/core/res/res/drawable-ldpi/ic_menu_chat_dashboard.png
new file mode 100644
index 0000000..c417faa
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_chat_dashboard.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_clear_playlist.png b/core/res/res/drawable-ldpi/ic_menu_clear_playlist.png
new file mode 100644
index 0000000..f3e6b51c
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_clear_playlist.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_close_clear_cancel.png b/core/res/res/drawable-ldpi/ic_menu_close_clear_cancel.png
new file mode 100644
index 0000000..760b925
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_close_clear_cancel.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_compass.png b/core/res/res/drawable-ldpi/ic_menu_compass.png
new file mode 100644
index 0000000..bf1724b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_compass.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_compose.png b/core/res/res/drawable-ldpi/ic_menu_compose.png
new file mode 100644
index 0000000..1e6767b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_compose.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_crop.png b/core/res/res/drawable-ldpi/ic_menu_crop.png
new file mode 100644
index 0000000..97c9182
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_crop.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_day.png b/core/res/res/drawable-ldpi/ic_menu_day.png
new file mode 100644
index 0000000..f0d661b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_day.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_delete.png b/core/res/res/drawable-ldpi/ic_menu_delete.png
new file mode 100644
index 0000000..dbad3dd
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_delete.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_directions.png b/core/res/res/drawable-ldpi/ic_menu_directions.png
new file mode 100644
index 0000000..5d89d46
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_directions.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_edit.png b/core/res/res/drawable-ldpi/ic_menu_edit.png
new file mode 100644
index 0000000..9bb66e3
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_edit.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_emoticons.png b/core/res/res/drawable-ldpi/ic_menu_emoticons.png
new file mode 100644
index 0000000..a97db87
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_emoticons.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_end_conversation.png b/core/res/res/drawable-ldpi/ic_menu_end_conversation.png
new file mode 100644
index 0000000..dd2005e
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_end_conversation.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_forward.png b/core/res/res/drawable-ldpi/ic_menu_forward.png
new file mode 100644
index 0000000..554cfb7
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_forward.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_friendslist.png b/core/res/res/drawable-ldpi/ic_menu_friendslist.png
new file mode 100644
index 0000000..62950da
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_friendslist.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_gallery.png b/core/res/res/drawable-ldpi/ic_menu_gallery.png
new file mode 100644
index 0000000..d57b284
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_gallery.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_goto.png b/core/res/res/drawable-ldpi/ic_menu_goto.png
new file mode 100644
index 0000000..d15ea3d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_goto.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_help.png b/core/res/res/drawable-ldpi/ic_menu_help.png
new file mode 100644
index 0000000..f93a4e6
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_help.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_home.png b/core/res/res/drawable-ldpi/ic_menu_home.png
new file mode 100644
index 0000000..fd6f453
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_home.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_info_details.png b/core/res/res/drawable-ldpi/ic_menu_info_details.png
new file mode 100644
index 0000000..55c57d5
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_info_details.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_invite.png b/core/res/res/drawable-ldpi/ic_menu_invite.png
new file mode 100644
index 0000000..16de8fe1
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_invite.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_login.png b/core/res/res/drawable-ldpi/ic_menu_login.png
new file mode 100644
index 0000000..d4181de
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_login.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_manage.png b/core/res/res/drawable-ldpi/ic_menu_manage.png
new file mode 100644
index 0000000..b137b8c
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_manage.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_mapmode.png b/core/res/res/drawable-ldpi/ic_menu_mapmode.png
new file mode 100644
index 0000000..8851005
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_mapmode.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_mark.png b/core/res/res/drawable-ldpi/ic_menu_mark.png
new file mode 100644
index 0000000..1d44027
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_mark.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_month.png b/core/res/res/drawable-ldpi/ic_menu_month.png
new file mode 100644
index 0000000..a3462f6
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_month.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_more.png b/core/res/res/drawable-ldpi/ic_menu_more.png
new file mode 100644
index 0000000..9296554
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_more.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_my_calendar.png b/core/res/res/drawable-ldpi/ic_menu_my_calendar.png
new file mode 100644
index 0000000..db3a8b5
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_my_calendar.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_mylocation.png b/core/res/res/drawable-ldpi/ic_menu_mylocation.png
new file mode 100644
index 0000000..2db7867
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_mylocation.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_myplaces.png b/core/res/res/drawable-ldpi/ic_menu_myplaces.png
new file mode 100644
index 0000000..9d2e8dc
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_myplaces.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_notifications.png b/core/res/res/drawable-ldpi/ic_menu_notifications.png
new file mode 100644
index 0000000..0a22b32
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_notifications.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_play_clip.png b/core/res/res/drawable-ldpi/ic_menu_play_clip.png
new file mode 100644
index 0000000..7d0f11e
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_play_clip.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_preferences.png b/core/res/res/drawable-ldpi/ic_menu_preferences.png
new file mode 100644
index 0000000..efc2f3e
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_preferences.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_recent_history.png b/core/res/res/drawable-ldpi/ic_menu_recent_history.png
new file mode 100644
index 0000000..c75f6e3
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_recent_history.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_refresh.png b/core/res/res/drawable-ldpi/ic_menu_refresh.png
new file mode 100644
index 0000000..b25dc06
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_refresh.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_report_image.png b/core/res/res/drawable-ldpi/ic_menu_report_image.png
new file mode 100644
index 0000000..f2c3a90
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_report_image.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_revert.png b/core/res/res/drawable-ldpi/ic_menu_revert.png
new file mode 100644
index 0000000..b0f2c60
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_revert.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_rotate.png b/core/res/res/drawable-ldpi/ic_menu_rotate.png
new file mode 100644
index 0000000..34dcbce
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_rotate.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_save.png b/core/res/res/drawable-ldpi/ic_menu_save.png
new file mode 100644
index 0000000..ac053b4
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_save.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_search.png b/core/res/res/drawable-ldpi/ic_menu_search.png
new file mode 100644
index 0000000..1d95408
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_search.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_send.png b/core/res/res/drawable-ldpi/ic_menu_send.png
new file mode 100644
index 0000000..9043c11
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_send.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_set_as.png b/core/res/res/drawable-ldpi/ic_menu_set_as.png
new file mode 100644
index 0000000..d1997d3
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_set_as.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_share.png b/core/res/res/drawable-ldpi/ic_menu_share.png
new file mode 100644
index 0000000..f58d231
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_share.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_slideshow.png b/core/res/res/drawable-ldpi/ic_menu_slideshow.png
new file mode 100644
index 0000000..a0625c4
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_slideshow.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_sort_alphabetically.png b/core/res/res/drawable-ldpi/ic_menu_sort_alphabetically.png
new file mode 100644
index 0000000..438e854
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_sort_alphabetically.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_sort_by_size.png b/core/res/res/drawable-ldpi/ic_menu_sort_by_size.png
new file mode 100644
index 0000000..bb95da7
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_sort_by_size.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_star.png b/core/res/res/drawable-ldpi/ic_menu_star.png
new file mode 100644
index 0000000..b88f010
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_star.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_start_conversation.png b/core/res/res/drawable-ldpi/ic_menu_start_conversation.png
new file mode 100644
index 0000000..1e39928
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_start_conversation.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_stop.png b/core/res/res/drawable-ldpi/ic_menu_stop.png
new file mode 100644
index 0000000..d185ae2
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_stop.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_today.png b/core/res/res/drawable-ldpi/ic_menu_today.png
new file mode 100644
index 0000000..2bff751
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_today.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_upload.png b/core/res/res/drawable-ldpi/ic_menu_upload.png
new file mode 100644
index 0000000..fd64fe1
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_upload.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_upload_you_tube.png b/core/res/res/drawable-ldpi/ic_menu_upload_you_tube.png
new file mode 100644
index 0000000..8fa7005
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_upload_you_tube.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_view.png b/core/res/res/drawable-ldpi/ic_menu_view.png
new file mode 100644
index 0000000..f1acb3d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_view.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_week.png b/core/res/res/drawable-ldpi/ic_menu_week.png
new file mode 100644
index 0000000..0af314b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_week.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_menu_zoom.png b/core/res/res/drawable-ldpi/ic_menu_zoom.png
new file mode 100644
index 0000000..ff29184
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_menu_zoom.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_notification_clear_all.png b/core/res/res/drawable-ldpi/ic_notification_clear_all.png
new file mode 100644
index 0000000..e779740
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_notification_clear_all.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_notification_overlay.9.png b/core/res/res/drawable-ldpi/ic_notification_overlay.9.png
new file mode 100644
index 0000000..771fa73
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_notification_overlay.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_partial_secure.png b/core/res/res/drawable-ldpi/ic_partial_secure.png
new file mode 100644
index 0000000..a9c05b1
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_partial_secure.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_popup_disk_full.png b/core/res/res/drawable-ldpi/ic_popup_disk_full.png
new file mode 100644
index 0000000..f613f38
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_popup_disk_full.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_popup_reminder.png b/core/res/res/drawable-ldpi/ic_popup_reminder.png
new file mode 100644
index 0000000..332daef5
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_popup_reminder.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_popup_sync_1.png b/core/res/res/drawable-ldpi/ic_popup_sync_1.png
new file mode 100644
index 0000000..407e8de
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_popup_sync_1.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_popup_sync_2.png b/core/res/res/drawable-ldpi/ic_popup_sync_2.png
new file mode 100644
index 0000000..a867aa7
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_popup_sync_2.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_popup_sync_3.png b/core/res/res/drawable-ldpi/ic_popup_sync_3.png
new file mode 100644
index 0000000..77bd3d7
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_popup_sync_3.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_popup_sync_4.png b/core/res/res/drawable-ldpi/ic_popup_sync_4.png
new file mode 100644
index 0000000..131486b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_popup_sync_4.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_popup_sync_5.png b/core/res/res/drawable-ldpi/ic_popup_sync_5.png
new file mode 100644
index 0000000..33fded8
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_popup_sync_5.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_popup_sync_6.png b/core/res/res/drawable-ldpi/ic_popup_sync_6.png
new file mode 100644
index 0000000..489dd56
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_popup_sync_6.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_search_category_default.png b/core/res/res/drawable-ldpi/ic_search_category_default.png
new file mode 100644
index 0000000..1d95408
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_search_category_default.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_secure.png b/core/res/res/drawable-ldpi/ic_secure.png
new file mode 100644
index 0000000..02d74d1
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_secure.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_text_dot.png b/core/res/res/drawable-ldpi/ic_text_dot.png
new file mode 100644
index 0000000..4aff20c
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_text_dot.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_vibrate.png b/core/res/res/drawable-ldpi/ic_vibrate.png
new file mode 100644
index 0000000..726e9dc
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_vibrate.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_vibrate_small.png b/core/res/res/drawable-ldpi/ic_vibrate_small.png
new file mode 100644
index 0000000..06bfbb51
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_vibrate_small.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_volume.png b/core/res/res/drawable-ldpi/ic_volume.png
new file mode 100644
index 0000000..b8a3561
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_volume.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_volume_bluetooth_ad2p.png b/core/res/res/drawable-ldpi/ic_volume_bluetooth_ad2p.png
new file mode 100644
index 0000000..facfa4c
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_volume_bluetooth_ad2p.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_volume_bluetooth_in_call.png b/core/res/res/drawable-ldpi/ic_volume_bluetooth_in_call.png
new file mode 100644
index 0000000..298ce6b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_volume_bluetooth_in_call.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_volume_off.png b/core/res/res/drawable-ldpi/ic_volume_off.png
new file mode 100644
index 0000000..bad1a68
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_volume_off.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_volume_off_small.png b/core/res/res/drawable-ldpi/ic_volume_off_small.png
new file mode 100644
index 0000000..5623911
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_volume_off_small.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ic_volume_small.png b/core/res/res/drawable-ldpi/ic_volume_small.png
new file mode 100644
index 0000000..530f6b4
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ic_volume_small.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/icon_highlight_rectangle.9.png b/core/res/res/drawable-ldpi/icon_highlight_rectangle.9.png
new file mode 100644
index 0000000..27519b2
--- /dev/null
+++ b/core/res/res/drawable-ldpi/icon_highlight_rectangle.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/icon_highlight_square.9.png b/core/res/res/drawable-ldpi/icon_highlight_square.9.png
new file mode 100644
index 0000000..228ef23
--- /dev/null
+++ b/core/res/res/drawable-ldpi/icon_highlight_square.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/ime_qwerty.png b/core/res/res/drawable-ldpi/ime_qwerty.png
new file mode 100644
index 0000000..11e26db
--- /dev/null
+++ b/core/res/res/drawable-ldpi/ime_qwerty.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/indicator_code_lock_drag_direction_green_up.png b/core/res/res/drawable-ldpi/indicator_code_lock_drag_direction_green_up.png
new file mode 100644
index 0000000..9c8610f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/indicator_code_lock_drag_direction_green_up.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/indicator_code_lock_drag_direction_red_up.png b/core/res/res/drawable-ldpi/indicator_code_lock_drag_direction_red_up.png
new file mode 100644
index 0000000..ac8e42a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/indicator_code_lock_drag_direction_red_up.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/indicator_code_lock_point_area_default.png b/core/res/res/drawable-ldpi/indicator_code_lock_point_area_default.png
new file mode 100644
index 0000000..5b77b9f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/indicator_code_lock_point_area_default.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/indicator_code_lock_point_area_green.png b/core/res/res/drawable-ldpi/indicator_code_lock_point_area_green.png
new file mode 100644
index 0000000..c7c0b9a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/indicator_code_lock_point_area_green.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/indicator_code_lock_point_area_red.png b/core/res/res/drawable-ldpi/indicator_code_lock_point_area_red.png
new file mode 100644
index 0000000..ac02dc4
--- /dev/null
+++ b/core/res/res/drawable-ldpi/indicator_code_lock_point_area_red.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/indicator_input_error.png b/core/res/res/drawable-ldpi/indicator_input_error.png
new file mode 100644
index 0000000..f1a804a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/indicator_input_error.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_dial_arrow_long_left_green.png b/core/res/res/drawable-ldpi/jog_dial_arrow_long_left_green.png
new file mode 100644
index 0000000..cb30024
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_dial_arrow_long_left_green.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_dial_arrow_long_left_yellow.png b/core/res/res/drawable-ldpi/jog_dial_arrow_long_left_yellow.png
new file mode 100644
index 0000000..f63e737
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_dial_arrow_long_left_yellow.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_dial_arrow_long_middle_yellow.png b/core/res/res/drawable-ldpi/jog_dial_arrow_long_middle_yellow.png
new file mode 100644
index 0000000..249d53d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_dial_arrow_long_middle_yellow.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_dial_arrow_long_right_red.png b/core/res/res/drawable-ldpi/jog_dial_arrow_long_right_red.png
new file mode 100644
index 0000000..6a338fe
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_dial_arrow_long_right_red.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_dial_arrow_long_right_yellow.png b/core/res/res/drawable-ldpi/jog_dial_arrow_long_right_yellow.png
new file mode 100644
index 0000000..50f5c47
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_dial_arrow_long_right_yellow.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_dial_arrow_short_left.png b/core/res/res/drawable-ldpi/jog_dial_arrow_short_left.png
new file mode 100644
index 0000000..a8ed6987
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_dial_arrow_short_left.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_dial_arrow_short_left_and_right.png b/core/res/res/drawable-ldpi/jog_dial_arrow_short_left_and_right.png
new file mode 100644
index 0000000..bfd6c4e
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_dial_arrow_short_left_and_right.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_dial_arrow_short_right.png b/core/res/res/drawable-ldpi/jog_dial_arrow_short_right.png
new file mode 100644
index 0000000..d22d508
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_dial_arrow_short_right.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_dial_bg.png b/core/res/res/drawable-ldpi/jog_dial_bg.png
new file mode 100644
index 0000000..263188b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_dial_bg.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_dial_dimple.png b/core/res/res/drawable-ldpi/jog_dial_dimple.png
new file mode 100644
index 0000000..c6f52ef
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_dial_dimple.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_dial_dimple_dim.png b/core/res/res/drawable-ldpi/jog_dial_dimple_dim.png
new file mode 100644
index 0000000..b85db4e
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_dial_dimple_dim.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_bar_left_end_confirm_gray.9.png b/core/res/res/drawable-ldpi/jog_tab_bar_left_end_confirm_gray.9.png
new file mode 100644
index 0000000..be9edd1
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_bar_left_end_confirm_gray.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_bar_left_end_confirm_green.9.png b/core/res/res/drawable-ldpi/jog_tab_bar_left_end_confirm_green.9.png
new file mode 100644
index 0000000..8b445fb
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_bar_left_end_confirm_green.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_bar_left_end_confirm_red.9.png b/core/res/res/drawable-ldpi/jog_tab_bar_left_end_confirm_red.9.png
new file mode 100644
index 0000000..f9b07f8
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_bar_left_end_confirm_red.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_bar_left_end_confirm_yellow.9.png b/core/res/res/drawable-ldpi/jog_tab_bar_left_end_confirm_yellow.9.png
new file mode 100644
index 0000000..473fcb0
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_bar_left_end_confirm_yellow.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_bar_left_end_normal.9.png b/core/res/res/drawable-ldpi/jog_tab_bar_left_end_normal.9.png
new file mode 100644
index 0000000..b8ecac7
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_bar_left_end_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_bar_left_end_pressed.9.png b/core/res/res/drawable-ldpi/jog_tab_bar_left_end_pressed.9.png
new file mode 100644
index 0000000..95b4f4b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_bar_left_end_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_bar_right_end_confirm_gray.9.png b/core/res/res/drawable-ldpi/jog_tab_bar_right_end_confirm_gray.9.png
new file mode 100644
index 0000000..2bec09e
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_bar_right_end_confirm_gray.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_bar_right_end_confirm_green.9.png b/core/res/res/drawable-ldpi/jog_tab_bar_right_end_confirm_green.9.png
new file mode 100644
index 0000000..8f8109e
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_bar_right_end_confirm_green.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_bar_right_end_confirm_red.9.png b/core/res/res/drawable-ldpi/jog_tab_bar_right_end_confirm_red.9.png
new file mode 100644
index 0000000..a453ac3
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_bar_right_end_confirm_red.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_bar_right_end_confirm_yellow.9.png b/core/res/res/drawable-ldpi/jog_tab_bar_right_end_confirm_yellow.9.png
new file mode 100644
index 0000000..f7ef794
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_bar_right_end_confirm_yellow.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_bar_right_end_normal.9.png b/core/res/res/drawable-ldpi/jog_tab_bar_right_end_normal.9.png
new file mode 100644
index 0000000..74b769b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_bar_right_end_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_bar_right_end_pressed.9.png b/core/res/res/drawable-ldpi/jog_tab_bar_right_end_pressed.9.png
new file mode 100644
index 0000000..d12058d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_bar_right_end_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_left_confirm_gray.png b/core/res/res/drawable-ldpi/jog_tab_left_confirm_gray.png
new file mode 100644
index 0000000..92c4a2e
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_left_confirm_gray.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_left_confirm_green.png b/core/res/res/drawable-ldpi/jog_tab_left_confirm_green.png
new file mode 100644
index 0000000..13b7c63
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_left_confirm_green.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_left_confirm_red.png b/core/res/res/drawable-ldpi/jog_tab_left_confirm_red.png
new file mode 100644
index 0000000..414c07b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_left_confirm_red.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_left_confirm_yellow.png b/core/res/res/drawable-ldpi/jog_tab_left_confirm_yellow.png
new file mode 100644
index 0000000..afccc39
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_left_confirm_yellow.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_left_normal.png b/core/res/res/drawable-ldpi/jog_tab_left_normal.png
new file mode 100644
index 0000000..6ba6479
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_left_normal.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_left_pressed.png b/core/res/res/drawable-ldpi/jog_tab_left_pressed.png
new file mode 100644
index 0000000..3dc9c47
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_left_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_right_confirm_gray.png b/core/res/res/drawable-ldpi/jog_tab_right_confirm_gray.png
new file mode 100644
index 0000000..ec1020d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_right_confirm_gray.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_right_confirm_green.png b/core/res/res/drawable-ldpi/jog_tab_right_confirm_green.png
new file mode 100644
index 0000000..5b600c9
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_right_confirm_green.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_right_confirm_red.png b/core/res/res/drawable-ldpi/jog_tab_right_confirm_red.png
new file mode 100644
index 0000000..b640578
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_right_confirm_red.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_right_confirm_yellow.png b/core/res/res/drawable-ldpi/jog_tab_right_confirm_yellow.png
new file mode 100644
index 0000000..c4490bc
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_right_confirm_yellow.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_right_normal.png b/core/res/res/drawable-ldpi/jog_tab_right_normal.png
new file mode 100644
index 0000000..024d409
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_right_normal.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_right_pressed.png b/core/res/res/drawable-ldpi/jog_tab_right_pressed.png
new file mode 100644
index 0000000..22acd25
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_right_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_target_gray.png b/core/res/res/drawable-ldpi/jog_tab_target_gray.png
new file mode 100644
index 0000000..7921676
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_target_gray.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_target_green.png b/core/res/res/drawable-ldpi/jog_tab_target_green.png
new file mode 100644
index 0000000..df5c273
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_target_green.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_target_red.png b/core/res/res/drawable-ldpi/jog_tab_target_red.png
new file mode 100644
index 0000000..2bb6df9
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_target_red.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/jog_tab_target_yellow.png b/core/res/res/drawable-ldpi/jog_tab_target_yellow.png
new file mode 100644
index 0000000..e7e4347
--- /dev/null
+++ b/core/res/res/drawable-ldpi/jog_tab_target_yellow.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/keyboard_accessory_bg_landscape.9.png b/core/res/res/drawable-ldpi/keyboard_accessory_bg_landscape.9.png
new file mode 100644
index 0000000..4ab1dd0
--- /dev/null
+++ b/core/res/res/drawable-ldpi/keyboard_accessory_bg_landscape.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/keyboard_background.9.png b/core/res/res/drawable-ldpi/keyboard_background.9.png
new file mode 100644
index 0000000..06d42c0
--- /dev/null
+++ b/core/res/res/drawable-ldpi/keyboard_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/keyboard_key_feedback_background.9.png b/core/res/res/drawable-ldpi/keyboard_key_feedback_background.9.png
new file mode 100644
index 0000000..6f936f1
--- /dev/null
+++ b/core/res/res/drawable-ldpi/keyboard_key_feedback_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/keyboard_key_feedback_more_background.9.png b/core/res/res/drawable-ldpi/keyboard_key_feedback_more_background.9.png
new file mode 100644
index 0000000..7e81c3d4
--- /dev/null
+++ b/core/res/res/drawable-ldpi/keyboard_key_feedback_more_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/keyboard_popup_panel_background.9.png b/core/res/res/drawable-ldpi/keyboard_popup_panel_background.9.png
new file mode 100644
index 0000000..955fecc
--- /dev/null
+++ b/core/res/res/drawable-ldpi/keyboard_popup_panel_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/keyboard_popup_panel_trans_background.9.png b/core/res/res/drawable-ldpi/keyboard_popup_panel_trans_background.9.png
new file mode 100644
index 0000000..78ac46d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/keyboard_popup_panel_trans_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/keyboard_textfield_selected.9.png b/core/res/res/drawable-ldpi/keyboard_textfield_selected.9.png
new file mode 100644
index 0000000..d6478fb
--- /dev/null
+++ b/core/res/res/drawable-ldpi/keyboard_textfield_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/light_header.9.png b/core/res/res/drawable-ldpi/light_header.9.png
new file mode 100644
index 0000000..4318252
--- /dev/null
+++ b/core/res/res/drawable-ldpi/light_header.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/list_selector_background_disabled.9.png b/core/res/res/drawable-ldpi/list_selector_background_disabled.9.png
new file mode 100644
index 0000000..b94396b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/list_selector_background_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/list_selector_background_focus.9.png b/core/res/res/drawable-ldpi/list_selector_background_focus.9.png
new file mode 100644
index 0000000..f2887a9
--- /dev/null
+++ b/core/res/res/drawable-ldpi/list_selector_background_focus.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/list_selector_background_longpress.9.png b/core/res/res/drawable-ldpi/list_selector_background_longpress.9.png
new file mode 100644
index 0000000..1fb46bb
--- /dev/null
+++ b/core/res/res/drawable-ldpi/list_selector_background_longpress.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/list_selector_background_pressed.9.png b/core/res/res/drawable-ldpi/list_selector_background_pressed.9.png
new file mode 100644
index 0000000..4980eab
--- /dev/null
+++ b/core/res/res/drawable-ldpi/list_selector_background_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/maps_google_logo.png b/core/res/res/drawable-ldpi/maps_google_logo.png
new file mode 100644
index 0000000..84cc523
--- /dev/null
+++ b/core/res/res/drawable-ldpi/maps_google_logo.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/menu_background.9.png b/core/res/res/drawable-ldpi/menu_background.9.png
new file mode 100644
index 0000000..18c1f40
--- /dev/null
+++ b/core/res/res/drawable-ldpi/menu_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/menu_background_fill_parent_width.9.png b/core/res/res/drawable-ldpi/menu_background_fill_parent_width.9.png
new file mode 100644
index 0000000..02de323
--- /dev/null
+++ b/core/res/res/drawable-ldpi/menu_background_fill_parent_width.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/menu_separator.9.png b/core/res/res/drawable-ldpi/menu_separator.9.png
new file mode 100644
index 0000000..9e2dd7f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/menu_separator.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/menu_submenu_background.9.png b/core/res/res/drawable-ldpi/menu_submenu_background.9.png
new file mode 100644
index 0000000..25b27d4
--- /dev/null
+++ b/core/res/res/drawable-ldpi/menu_submenu_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/menuitem_background_focus.9.png b/core/res/res/drawable-ldpi/menuitem_background_focus.9.png
new file mode 100644
index 0000000..072b665
--- /dev/null
+++ b/core/res/res/drawable-ldpi/menuitem_background_focus.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/menuitem_background_pressed.9.png b/core/res/res/drawable-ldpi/menuitem_background_pressed.9.png
new file mode 100644
index 0000000..1def2a1
--- /dev/null
+++ b/core/res/res/drawable-ldpi/menuitem_background_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/menuitem_background_solid_focused.9.png b/core/res/res/drawable-ldpi/menuitem_background_solid_focused.9.png
new file mode 100644
index 0000000..671e756
--- /dev/null
+++ b/core/res/res/drawable-ldpi/menuitem_background_solid_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/menuitem_background_solid_pressed.9.png b/core/res/res/drawable-ldpi/menuitem_background_solid_pressed.9.png
new file mode 100644
index 0000000..5f334d8
--- /dev/null
+++ b/core/res/res/drawable-ldpi/menuitem_background_solid_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/menuitem_checkbox_on.png b/core/res/res/drawable-ldpi/menuitem_checkbox_on.png
new file mode 100644
index 0000000..61a4843
--- /dev/null
+++ b/core/res/res/drawable-ldpi/menuitem_checkbox_on.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/overscroll_edge.png b/core/res/res/drawable-ldpi/overscroll_edge.png
new file mode 100644
index 0000000..b11f7d2
--- /dev/null
+++ b/core/res/res/drawable-ldpi/overscroll_edge.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/overscroll_glow.png b/core/res/res/drawable-ldpi/overscroll_glow.png
new file mode 100644
index 0000000..029296a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/overscroll_glow.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/panel_background.9.png b/core/res/res/drawable-ldpi/panel_background.9.png
new file mode 100644
index 0000000..7ea328d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/panel_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/panel_picture_frame_bg_focus_blue.9.png b/core/res/res/drawable-ldpi/panel_picture_frame_bg_focus_blue.9.png
new file mode 100644
index 0000000..14eb7f7
--- /dev/null
+++ b/core/res/res/drawable-ldpi/panel_picture_frame_bg_focus_blue.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/panel_picture_frame_bg_normal.9.png b/core/res/res/drawable-ldpi/panel_picture_frame_bg_normal.9.png
new file mode 100644
index 0000000..c8cd101
--- /dev/null
+++ b/core/res/res/drawable-ldpi/panel_picture_frame_bg_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/panel_picture_frame_bg_pressed_blue.9.png b/core/res/res/drawable-ldpi/panel_picture_frame_bg_pressed_blue.9.png
new file mode 100644
index 0000000..0badf2b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/panel_picture_frame_bg_pressed_blue.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/password_field_default.9.png b/core/res/res/drawable-ldpi/password_field_default.9.png
new file mode 100644
index 0000000..a84abf2
--- /dev/null
+++ b/core/res/res/drawable-ldpi/password_field_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/picture_emergency.png b/core/res/res/drawable-ldpi/picture_emergency.png
new file mode 100644
index 0000000..dbb738f9
--- /dev/null
+++ b/core/res/res/drawable-ldpi/picture_emergency.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/picture_frame.9.png b/core/res/res/drawable-ldpi/picture_frame.9.png
new file mode 100644
index 0000000..f302bf3
--- /dev/null
+++ b/core/res/res/drawable-ldpi/picture_frame.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/popup_bottom_bright.9.png b/core/res/res/drawable-ldpi/popup_bottom_bright.9.png
new file mode 100644
index 0000000..a8d52a2
--- /dev/null
+++ b/core/res/res/drawable-ldpi/popup_bottom_bright.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/popup_bottom_dark.9.png b/core/res/res/drawable-ldpi/popup_bottom_dark.9.png
new file mode 100644
index 0000000..b0b64df
--- /dev/null
+++ b/core/res/res/drawable-ldpi/popup_bottom_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/popup_bottom_medium.9.png b/core/res/res/drawable-ldpi/popup_bottom_medium.9.png
new file mode 100644
index 0000000..7bdef97
--- /dev/null
+++ b/core/res/res/drawable-ldpi/popup_bottom_medium.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/popup_center_bright.9.png b/core/res/res/drawable-ldpi/popup_center_bright.9.png
new file mode 100644
index 0000000..0bfe6ba
--- /dev/null
+++ b/core/res/res/drawable-ldpi/popup_center_bright.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/popup_center_dark.9.png b/core/res/res/drawable-ldpi/popup_center_dark.9.png
new file mode 100644
index 0000000..e76a452
--- /dev/null
+++ b/core/res/res/drawable-ldpi/popup_center_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/popup_center_medium.9.png b/core/res/res/drawable-ldpi/popup_center_medium.9.png
new file mode 100644
index 0000000..a8de187
--- /dev/null
+++ b/core/res/res/drawable-ldpi/popup_center_medium.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/popup_full_bright.9.png b/core/res/res/drawable-ldpi/popup_full_bright.9.png
new file mode 100644
index 0000000..b6bbacd
--- /dev/null
+++ b/core/res/res/drawable-ldpi/popup_full_bright.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/popup_full_dark.9.png b/core/res/res/drawable-ldpi/popup_full_dark.9.png
new file mode 100644
index 0000000..ed36fce
--- /dev/null
+++ b/core/res/res/drawable-ldpi/popup_full_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/popup_inline_error.9.png b/core/res/res/drawable-ldpi/popup_inline_error.9.png
new file mode 100644
index 0000000..cdc66ff
--- /dev/null
+++ b/core/res/res/drawable-ldpi/popup_inline_error.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/popup_inline_error_above.9.png b/core/res/res/drawable-ldpi/popup_inline_error_above.9.png
new file mode 100644
index 0000000..673685d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/popup_inline_error_above.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/popup_top_bright.9.png b/core/res/res/drawable-ldpi/popup_top_bright.9.png
new file mode 100644
index 0000000..51f1f0f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/popup_top_bright.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/popup_top_dark.9.png b/core/res/res/drawable-ldpi/popup_top_dark.9.png
new file mode 100644
index 0000000..81e1918
--- /dev/null
+++ b/core/res/res/drawable-ldpi/popup_top_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/presence_audio_away.png b/core/res/res/drawable-ldpi/presence_audio_away.png
new file mode 100644
index 0000000..73ad0da
--- /dev/null
+++ b/core/res/res/drawable-ldpi/presence_audio_away.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/presence_audio_busy.png b/core/res/res/drawable-ldpi/presence_audio_busy.png
new file mode 100644
index 0000000..8b64d45
--- /dev/null
+++ b/core/res/res/drawable-ldpi/presence_audio_busy.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/presence_audio_online.png b/core/res/res/drawable-ldpi/presence_audio_online.png
new file mode 100644
index 0000000..455db0528
--- /dev/null
+++ b/core/res/res/drawable-ldpi/presence_audio_online.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/presence_away.png b/core/res/res/drawable-ldpi/presence_away.png
new file mode 100644
index 0000000..5228a4b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/presence_away.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/presence_busy.png b/core/res/res/drawable-ldpi/presence_busy.png
new file mode 100644
index 0000000..79fddf7
--- /dev/null
+++ b/core/res/res/drawable-ldpi/presence_busy.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/presence_invisible.png b/core/res/res/drawable-ldpi/presence_invisible.png
new file mode 100644
index 0000000..fb1654b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/presence_invisible.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/presence_offline.png b/core/res/res/drawable-ldpi/presence_offline.png
new file mode 100644
index 0000000..4546799
--- /dev/null
+++ b/core/res/res/drawable-ldpi/presence_offline.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/presence_online.png b/core/res/res/drawable-ldpi/presence_online.png
new file mode 100644
index 0000000..c400a18
--- /dev/null
+++ b/core/res/res/drawable-ldpi/presence_online.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/presence_video_away.png b/core/res/res/drawable-ldpi/presence_video_away.png
new file mode 100644
index 0000000..3695a0e
--- /dev/null
+++ b/core/res/res/drawable-ldpi/presence_video_away.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/presence_video_busy.png b/core/res/res/drawable-ldpi/presence_video_busy.png
new file mode 100644
index 0000000..c4b0728
--- /dev/null
+++ b/core/res/res/drawable-ldpi/presence_video_busy.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/presence_video_online.png b/core/res/res/drawable-ldpi/presence_video_online.png
new file mode 100644
index 0000000..786d0e6
--- /dev/null
+++ b/core/res/res/drawable-ldpi/presence_video_online.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/pressed_application_background_static.png b/core/res/res/drawable-ldpi/pressed_application_background_static.png
new file mode 100644
index 0000000..d0fd302
--- /dev/null
+++ b/core/res/res/drawable-ldpi/pressed_application_background_static.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/progressbar_indeterminate1.png b/core/res/res/drawable-ldpi/progressbar_indeterminate1.png
new file mode 100644
index 0000000..92a1aee
--- /dev/null
+++ b/core/res/res/drawable-ldpi/progressbar_indeterminate1.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/progressbar_indeterminate2.png b/core/res/res/drawable-ldpi/progressbar_indeterminate2.png
new file mode 100644
index 0000000..1fd2f37
--- /dev/null
+++ b/core/res/res/drawable-ldpi/progressbar_indeterminate2.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/progressbar_indeterminate3.png b/core/res/res/drawable-ldpi/progressbar_indeterminate3.png
new file mode 100644
index 0000000..adb8022
--- /dev/null
+++ b/core/res/res/drawable-ldpi/progressbar_indeterminate3.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/quickcontact_badge_pressed.9.png b/core/res/res/drawable-ldpi/quickcontact_badge_pressed.9.png
new file mode 100644
index 0000000..ff43fed
--- /dev/null
+++ b/core/res/res/drawable-ldpi/quickcontact_badge_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/quickcontact_badge_small_pressed.9.png b/core/res/res/drawable-ldpi/quickcontact_badge_small_pressed.9.png
new file mode 100644
index 0000000..5aedb70
--- /dev/null
+++ b/core/res/res/drawable-ldpi/quickcontact_badge_small_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/quickcontact_badge_small_unpressed.9.png b/core/res/res/drawable-ldpi/quickcontact_badge_small_unpressed.9.png
new file mode 100644
index 0000000..6e212b6
--- /dev/null
+++ b/core/res/res/drawable-ldpi/quickcontact_badge_small_unpressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/quickcontact_badge_unpressed.9.png b/core/res/res/drawable-ldpi/quickcontact_badge_unpressed.9.png
new file mode 100644
index 0000000..417c11b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/quickcontact_badge_unpressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/radiobutton_off_background.png b/core/res/res/drawable-ldpi/radiobutton_off_background.png
new file mode 100644
index 0000000..d8023c9
--- /dev/null
+++ b/core/res/res/drawable-ldpi/radiobutton_off_background.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/radiobutton_on_background.png b/core/res/res/drawable-ldpi/radiobutton_on_background.png
new file mode 100644
index 0000000..4014d4b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/radiobutton_on_background.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/rate_star_big_half.png b/core/res/res/drawable-ldpi/rate_star_big_half.png
new file mode 100644
index 0000000..0b4dc17
--- /dev/null
+++ b/core/res/res/drawable-ldpi/rate_star_big_half.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/rate_star_big_off.png b/core/res/res/drawable-ldpi/rate_star_big_off.png
new file mode 100644
index 0000000..1d8eef6
--- /dev/null
+++ b/core/res/res/drawable-ldpi/rate_star_big_off.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/rate_star_big_on.png b/core/res/res/drawable-ldpi/rate_star_big_on.png
new file mode 100644
index 0000000..b6d4d89
--- /dev/null
+++ b/core/res/res/drawable-ldpi/rate_star_big_on.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/rate_star_med_half.png b/core/res/res/drawable-ldpi/rate_star_med_half.png
new file mode 100644
index 0000000..f9bcc5c
--- /dev/null
+++ b/core/res/res/drawable-ldpi/rate_star_med_half.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/rate_star_med_off.png b/core/res/res/drawable-ldpi/rate_star_med_off.png
new file mode 100644
index 0000000..eec4ae5
--- /dev/null
+++ b/core/res/res/drawable-ldpi/rate_star_med_off.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/rate_star_med_on.png b/core/res/res/drawable-ldpi/rate_star_med_on.png
new file mode 100644
index 0000000..03a4cff
--- /dev/null
+++ b/core/res/res/drawable-ldpi/rate_star_med_on.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/rate_star_small_half.png b/core/res/res/drawable-ldpi/rate_star_small_half.png
new file mode 100644
index 0000000..3e2b99b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/rate_star_small_half.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/rate_star_small_off.png b/core/res/res/drawable-ldpi/rate_star_small_off.png
new file mode 100644
index 0000000..19db372
--- /dev/null
+++ b/core/res/res/drawable-ldpi/rate_star_small_off.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/rate_star_small_on.png b/core/res/res/drawable-ldpi/rate_star_small_on.png
new file mode 100644
index 0000000..b3b9a84
--- /dev/null
+++ b/core/res/res/drawable-ldpi/rate_star_small_on.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/recent_dialog_background.9.png b/core/res/res/drawable-ldpi/recent_dialog_background.9.png
new file mode 100644
index 0000000..ab8d87d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/recent_dialog_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/reticle.png b/core/res/res/drawable-ldpi/reticle.png
new file mode 100644
index 0000000..daaee11
--- /dev/null
+++ b/core/res/res/drawable-ldpi/reticle.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/scrollbar_handle_accelerated_anim2.9.png b/core/res/res/drawable-ldpi/scrollbar_handle_accelerated_anim2.9.png
new file mode 100644
index 0000000..0562c03
--- /dev/null
+++ b/core/res/res/drawable-ldpi/scrollbar_handle_accelerated_anim2.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/scrollbar_handle_horizontal.9.png b/core/res/res/drawable-ldpi/scrollbar_handle_horizontal.9.png
new file mode 100644
index 0000000..b3c10cf
--- /dev/null
+++ b/core/res/res/drawable-ldpi/scrollbar_handle_horizontal.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/scrollbar_handle_vertical.9.png b/core/res/res/drawable-ldpi/scrollbar_handle_vertical.9.png
new file mode 100644
index 0000000..a04e632
--- /dev/null
+++ b/core/res/res/drawable-ldpi/scrollbar_handle_vertical.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/search_dropdown_background.9.png b/core/res/res/drawable-ldpi/search_dropdown_background.9.png
new file mode 100644
index 0000000..b695dcb
--- /dev/null
+++ b/core/res/res/drawable-ldpi/search_dropdown_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/search_plate.9.png b/core/res/res/drawable-ldpi/search_plate.9.png
new file mode 100644
index 0000000..40a351f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/search_plate.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/search_plate_global.9.png b/core/res/res/drawable-ldpi/search_plate_global.9.png
new file mode 100644
index 0000000..2fa2129
--- /dev/null
+++ b/core/res/res/drawable-ldpi/search_plate_global.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/seek_thumb_normal.png b/core/res/res/drawable-ldpi/seek_thumb_normal.png
new file mode 100644
index 0000000..9c2d90d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/seek_thumb_normal.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/seek_thumb_pressed.png b/core/res/res/drawable-ldpi/seek_thumb_pressed.png
new file mode 100644
index 0000000..555cde8
--- /dev/null
+++ b/core/res/res/drawable-ldpi/seek_thumb_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/seek_thumb_selected.png b/core/res/res/drawable-ldpi/seek_thumb_selected.png
new file mode 100644
index 0000000..4f11818
--- /dev/null
+++ b/core/res/res/drawable-ldpi/seek_thumb_selected.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/settings_header_raw.9.png b/core/res/res/drawable-ldpi/settings_header_raw.9.png
new file mode 100644
index 0000000..142d8c2
--- /dev/null
+++ b/core/res/res/drawable-ldpi/settings_header_raw.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/spinner_black_16.png b/core/res/res/drawable-ldpi/spinner_black_16.png
new file mode 100644
index 0000000..c876d8a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/spinner_black_16.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/spinner_black_20.png b/core/res/res/drawable-ldpi/spinner_black_20.png
new file mode 100644
index 0000000..7751f9a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/spinner_black_20.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/spinner_black_48.png b/core/res/res/drawable-ldpi/spinner_black_48.png
new file mode 100644
index 0000000..c7aa517
--- /dev/null
+++ b/core/res/res/drawable-ldpi/spinner_black_48.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/spinner_black_76.png b/core/res/res/drawable-ldpi/spinner_black_76.png
new file mode 100644
index 0000000..44f559c
--- /dev/null
+++ b/core/res/res/drawable-ldpi/spinner_black_76.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/spinner_dropdown_background_down.9.png b/core/res/res/drawable-ldpi/spinner_dropdown_background_down.9.png
new file mode 100644
index 0000000..f9c4610
--- /dev/null
+++ b/core/res/res/drawable-ldpi/spinner_dropdown_background_down.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/spinner_dropdown_background_up.9.png b/core/res/res/drawable-ldpi/spinner_dropdown_background_up.9.png
new file mode 100644
index 0000000..f458ad4
--- /dev/null
+++ b/core/res/res/drawable-ldpi/spinner_dropdown_background_up.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/spinner_normal.9.png b/core/res/res/drawable-ldpi/spinner_normal.9.png
new file mode 100644
index 0000000..151c2e6
--- /dev/null
+++ b/core/res/res/drawable-ldpi/spinner_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/spinner_press.9.png b/core/res/res/drawable-ldpi/spinner_press.9.png
new file mode 100644
index 0000000..f3be1fc
--- /dev/null
+++ b/core/res/res/drawable-ldpi/spinner_press.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/spinner_select.9.png b/core/res/res/drawable-ldpi/spinner_select.9.png
new file mode 100644
index 0000000..092168b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/spinner_select.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/spinner_white_16.png b/core/res/res/drawable-ldpi/spinner_white_16.png
new file mode 100644
index 0000000..0ad9eb0
--- /dev/null
+++ b/core/res/res/drawable-ldpi/spinner_white_16.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/spinner_white_48.png b/core/res/res/drawable-ldpi/spinner_white_48.png
new file mode 100644
index 0000000..f0f0827
--- /dev/null
+++ b/core/res/res/drawable-ldpi/spinner_white_48.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/spinner_white_76.png b/core/res/res/drawable-ldpi/spinner_white_76.png
new file mode 100644
index 0000000..8be8f26
--- /dev/null
+++ b/core/res/res/drawable-ldpi/spinner_white_76.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/star_big_off.png b/core/res/res/drawable-ldpi/star_big_off.png
new file mode 100644
index 0000000..d91c3a4
--- /dev/null
+++ b/core/res/res/drawable-ldpi/star_big_off.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/star_big_on.png b/core/res/res/drawable-ldpi/star_big_on.png
new file mode 100644
index 0000000..69d92a2
--- /dev/null
+++ b/core/res/res/drawable-ldpi/star_big_on.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/star_off.png b/core/res/res/drawable-ldpi/star_off.png
new file mode 100644
index 0000000..6bc28fc
--- /dev/null
+++ b/core/res/res/drawable-ldpi/star_off.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/star_on.png b/core/res/res/drawable-ldpi/star_on.png
new file mode 100644
index 0000000..d2e3845
--- /dev/null
+++ b/core/res/res/drawable-ldpi/star_on.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_ecb_mode.png b/core/res/res/drawable-ldpi/stat_ecb_mode.png
new file mode 100644
index 0000000..a17d7db
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_ecb_mode.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_notify_call_mute.png b/core/res/res/drawable-ldpi/stat_notify_call_mute.png
new file mode 100644
index 0000000..d160009
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_notify_call_mute.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_notify_car_mode.png b/core/res/res/drawable-ldpi/stat_notify_car_mode.png
new file mode 100644
index 0000000..22e90aef
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_notify_car_mode.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_notify_chat.png b/core/res/res/drawable-ldpi/stat_notify_chat.png
new file mode 100644
index 0000000..562fbcc
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_notify_chat.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_notify_disk_full.png b/core/res/res/drawable-ldpi/stat_notify_disk_full.png
new file mode 100644
index 0000000..c329486
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_notify_disk_full.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_notify_email_generic.png b/core/res/res/drawable-ldpi/stat_notify_email_generic.png
new file mode 100644
index 0000000..352267c
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_notify_email_generic.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_notify_error.png b/core/res/res/drawable-ldpi/stat_notify_error.png
new file mode 100644
index 0000000..a2eab9b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_notify_error.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_notify_gmail.png b/core/res/res/drawable-ldpi/stat_notify_gmail.png
new file mode 100644
index 0000000..8fbfd00
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_notify_gmail.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_notify_missed_call.png b/core/res/res/drawable-ldpi/stat_notify_missed_call.png
new file mode 100644
index 0000000..4c01206
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_notify_missed_call.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_notify_more.png b/core/res/res/drawable-ldpi/stat_notify_more.png
new file mode 100644
index 0000000..a51341d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_notify_more.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_notify_sdcard.png b/core/res/res/drawable-ldpi/stat_notify_sdcard.png
new file mode 100644
index 0000000..265fd8f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_notify_sdcard.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_notify_sdcard_prepare.png b/core/res/res/drawable-ldpi/stat_notify_sdcard_prepare.png
new file mode 100644
index 0000000..84cb224
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_notify_sdcard_prepare.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_notify_sdcard_usb.png b/core/res/res/drawable-ldpi/stat_notify_sdcard_usb.png
new file mode 100644
index 0000000..cb7022b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_notify_sdcard_usb.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_notify_sim_toolkit.png b/core/res/res/drawable-ldpi/stat_notify_sim_toolkit.png
new file mode 100644
index 0000000..d9a62a9
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_notify_sim_toolkit.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_notify_sync.png b/core/res/res/drawable-ldpi/stat_notify_sync.png
new file mode 100644
index 0000000..dd63030
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_notify_sync.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_notify_sync_anim0.png b/core/res/res/drawable-ldpi/stat_notify_sync_anim0.png
new file mode 100644
index 0000000..9aa4edf
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_notify_sync_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_notify_sync_error.png b/core/res/res/drawable-ldpi/stat_notify_sync_error.png
new file mode 100644
index 0000000..431a86f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_notify_sync_error.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_notify_voicemail.png b/core/res/res/drawable-ldpi/stat_notify_voicemail.png
new file mode 100644
index 0000000..36d61a4
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_notify_voicemail.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_notify_wifi_in_range.png b/core/res/res/drawable-ldpi/stat_notify_wifi_in_range.png
new file mode 100644
index 0000000..1ff50ea
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_notify_wifi_in_range.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_adb.png b/core/res/res/drawable-ldpi/stat_sys_adb.png
new file mode 100644
index 0000000..cdead24
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_adb.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_0.png b/core/res/res/drawable-ldpi/stat_sys_battery_0.png
new file mode 100644
index 0000000..b692c7a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_battery_0.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_10.png b/core/res/res/drawable-ldpi/stat_sys_battery_10.png
new file mode 100644
index 0000000..5e7efd1
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_battery_10.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_100.png b/core/res/res/drawable-ldpi/stat_sys_battery_100.png
new file mode 100644
index 0000000..7023ea7b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_battery_100.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_20.png b/core/res/res/drawable-ldpi/stat_sys_battery_20.png
new file mode 100644
index 0000000..275ebbb
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_battery_20.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_40.png b/core/res/res/drawable-ldpi/stat_sys_battery_40.png
new file mode 100644
index 0000000..6a46fe0
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_battery_40.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_60.png b/core/res/res/drawable-ldpi/stat_sys_battery_60.png
new file mode 100644
index 0000000..f94115a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_battery_60.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_80.png b/core/res/res/drawable-ldpi/stat_sys_battery_80.png
new file mode 100644
index 0000000..8b07df9
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_battery_80.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim0.png b/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim0.png
new file mode 100644
index 0000000..7c4a783
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim1.png b/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim1.png
new file mode 100644
index 0000000..9eea8ae
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim2.png b/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim2.png
new file mode 100644
index 0000000..112c869
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim2.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim3.png b/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim3.png
new file mode 100644
index 0000000..7b5c08b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim3.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim4.png b/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim4.png
new file mode 100644
index 0000000..ddda4ad
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim4.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim5.png b/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim5.png
new file mode 100644
index 0000000..52050b2
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim5.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_unknown.png b/core/res/res/drawable-ldpi/stat_sys_battery_unknown.png
new file mode 100644
index 0000000..e095aa4
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_battery_unknown.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_data_bluetooth.png b/core/res/res/drawable-ldpi/stat_sys_data_bluetooth.png
new file mode 100644
index 0000000..2ae3355
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_data_bluetooth.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_data_usb.png b/core/res/res/drawable-ldpi/stat_sys_data_usb.png
new file mode 100644
index 0000000..ffaccbd
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_data_usb.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_download_anim0.png b/core/res/res/drawable-ldpi/stat_sys_download_anim0.png
new file mode 100644
index 0000000..12c0e21
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_download_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_download_anim1.png b/core/res/res/drawable-ldpi/stat_sys_download_anim1.png
new file mode 100644
index 0000000..f5ec4ac
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_download_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_download_anim2.png b/core/res/res/drawable-ldpi/stat_sys_download_anim2.png
new file mode 100644
index 0000000..4900ebd
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_download_anim2.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_download_anim3.png b/core/res/res/drawable-ldpi/stat_sys_download_anim3.png
new file mode 100644
index 0000000..aff9ebd
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_download_anim3.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_download_anim4.png b/core/res/res/drawable-ldpi/stat_sys_download_anim4.png
new file mode 100644
index 0000000..2eb65db
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_download_anim4.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_download_anim5.png b/core/res/res/drawable-ldpi/stat_sys_download_anim5.png
new file mode 100644
index 0000000..a9f2448
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_download_anim5.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_gps_on.png b/core/res/res/drawable-ldpi/stat_sys_gps_on.png
new file mode 100644
index 0000000..8915c59
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_gps_on.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_headset.png b/core/res/res/drawable-ldpi/stat_sys_headset.png
new file mode 100644
index 0000000..8f143a3
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_headset.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_phone_call.png b/core/res/res/drawable-ldpi/stat_sys_phone_call.png
new file mode 100644
index 0000000..275bef2
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_phone_call.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_phone_call_forward.png b/core/res/res/drawable-ldpi/stat_sys_phone_call_forward.png
new file mode 100644
index 0000000..bb07c69
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_phone_call_forward.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_phone_call_on_hold.png b/core/res/res/drawable-ldpi/stat_sys_phone_call_on_hold.png
new file mode 100644
index 0000000..b03816a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_phone_call_on_hold.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_r_signal_0_cdma.png b/core/res/res/drawable-ldpi/stat_sys_r_signal_0_cdma.png
new file mode 100644
index 0000000..2c4ff06
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_r_signal_0_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_r_signal_1_cdma.png b/core/res/res/drawable-ldpi/stat_sys_r_signal_1_cdma.png
new file mode 100644
index 0000000..82626ac1
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_r_signal_1_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_r_signal_2_cdma.png b/core/res/res/drawable-ldpi/stat_sys_r_signal_2_cdma.png
new file mode 100644
index 0000000..96304b1
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_r_signal_2_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_r_signal_3_cdma.png b/core/res/res/drawable-ldpi/stat_sys_r_signal_3_cdma.png
new file mode 100644
index 0000000..9a3f230
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_r_signal_3_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_r_signal_4_cdma.png b/core/res/res/drawable-ldpi/stat_sys_r_signal_4_cdma.png
new file mode 100644
index 0000000..5a607ee
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_r_signal_4_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_ra_signal_0_cdma.png b/core/res/res/drawable-ldpi/stat_sys_ra_signal_0_cdma.png
new file mode 100644
index 0000000..0db564b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_ra_signal_0_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_ra_signal_1_cdma.png b/core/res/res/drawable-ldpi/stat_sys_ra_signal_1_cdma.png
new file mode 100644
index 0000000..ca697db
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_ra_signal_1_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_ra_signal_2_cdma.png b/core/res/res/drawable-ldpi/stat_sys_ra_signal_2_cdma.png
new file mode 100644
index 0000000..816aaaa
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_ra_signal_2_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_ra_signal_3_cdma.png b/core/res/res/drawable-ldpi/stat_sys_ra_signal_3_cdma.png
new file mode 100644
index 0000000..ebb103c
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_ra_signal_3_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_ra_signal_4_cdma.png b/core/res/res/drawable-ldpi/stat_sys_ra_signal_4_cdma.png
new file mode 100644
index 0000000..f211201
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_ra_signal_4_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_secure.png b/core/res/res/drawable-ldpi/stat_sys_secure.png
new file mode 100644
index 0000000..096aa95
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_secure.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_signal_0_cdma.png b/core/res/res/drawable-ldpi/stat_sys_signal_0_cdma.png
new file mode 100644
index 0000000..dabba9c
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_signal_0_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_signal_1_cdma.png b/core/res/res/drawable-ldpi/stat_sys_signal_1_cdma.png
new file mode 100644
index 0000000..5d99b45
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_signal_1_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_signal_2_cdma.png b/core/res/res/drawable-ldpi/stat_sys_signal_2_cdma.png
new file mode 100644
index 0000000..f68f836
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_signal_2_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_signal_3_cdma.png b/core/res/res/drawable-ldpi/stat_sys_signal_3_cdma.png
new file mode 100644
index 0000000..370b91f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_signal_3_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_signal_4_cdma.png b/core/res/res/drawable-ldpi/stat_sys_signal_4_cdma.png
new file mode 100644
index 0000000..e8b4d38
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_signal_4_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_signal_evdo_0.png b/core/res/res/drawable-ldpi/stat_sys_signal_evdo_0.png
new file mode 100644
index 0000000..2b360c2
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_signal_evdo_0.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_signal_evdo_1.png b/core/res/res/drawable-ldpi/stat_sys_signal_evdo_1.png
new file mode 100644
index 0000000..dfcd1f7
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_signal_evdo_1.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_signal_evdo_2.png b/core/res/res/drawable-ldpi/stat_sys_signal_evdo_2.png
new file mode 100644
index 0000000..b8a5bda
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_signal_evdo_2.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_signal_evdo_3.png b/core/res/res/drawable-ldpi/stat_sys_signal_evdo_3.png
new file mode 100644
index 0000000..65c76d3
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_signal_evdo_3.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_signal_evdo_4.png b/core/res/res/drawable-ldpi/stat_sys_signal_evdo_4.png
new file mode 100644
index 0000000..974f936
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_signal_evdo_4.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_speakerphone.png b/core/res/res/drawable-ldpi/stat_sys_speakerphone.png
new file mode 100644
index 0000000..7fc67a0
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_speakerphone.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_tether_bluetooth.png b/core/res/res/drawable-ldpi/stat_sys_tether_bluetooth.png
new file mode 100644
index 0000000..ffe8e8c
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_tether_bluetooth.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_tether_general.png b/core/res/res/drawable-ldpi/stat_sys_tether_general.png
new file mode 100644
index 0000000..ca20f73
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_tether_general.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_tether_usb.png b/core/res/res/drawable-ldpi/stat_sys_tether_usb.png
new file mode 100644
index 0000000..65e9075
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_tether_usb.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_tether_wifi.png b/core/res/res/drawable-ldpi/stat_sys_tether_wifi.png
new file mode 100644
index 0000000..b4b3cfd
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_tether_wifi.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_throttled.png b/core/res/res/drawable-ldpi/stat_sys_throttled.png
new file mode 100644
index 0000000..cfeb3b6
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_throttled.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_upload_anim0.png b/core/res/res/drawable-ldpi/stat_sys_upload_anim0.png
new file mode 100644
index 0000000..29f9082
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_upload_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_upload_anim1.png b/core/res/res/drawable-ldpi/stat_sys_upload_anim1.png
new file mode 100644
index 0000000..bd1b72a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_upload_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_upload_anim2.png b/core/res/res/drawable-ldpi/stat_sys_upload_anim2.png
new file mode 100644
index 0000000..e49d23b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_upload_anim2.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_upload_anim3.png b/core/res/res/drawable-ldpi/stat_sys_upload_anim3.png
new file mode 100644
index 0000000..64525ac
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_upload_anim3.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_upload_anim4.png b/core/res/res/drawable-ldpi/stat_sys_upload_anim4.png
new file mode 100644
index 0000000..20f8f59
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_upload_anim4.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_upload_anim5.png b/core/res/res/drawable-ldpi/stat_sys_upload_anim5.png
new file mode 100644
index 0000000..0f482df
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_upload_anim5.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_vp_phone_call.png b/core/res/res/drawable-ldpi/stat_sys_vp_phone_call.png
new file mode 100644
index 0000000..504d7a5
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_vp_phone_call.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_vp_phone_call_on_hold.png b/core/res/res/drawable-ldpi/stat_sys_vp_phone_call_on_hold.png
new file mode 100644
index 0000000..edeef2b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_vp_phone_call_on_hold.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/stat_sys_warning.png b/core/res/res/drawable-ldpi/stat_sys_warning.png
new file mode 100644
index 0000000..289c6a0
--- /dev/null
+++ b/core/res/res/drawable-ldpi/stat_sys_warning.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/status_bar_background.png b/core/res/res/drawable-ldpi/status_bar_background.png
new file mode 100644
index 0000000..7881bce
--- /dev/null
+++ b/core/res/res/drawable-ldpi/status_bar_background.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/status_bar_header_background.9.png b/core/res/res/drawable-ldpi/status_bar_header_background.9.png
new file mode 100644
index 0000000..74dddb9
--- /dev/null
+++ b/core/res/res/drawable-ldpi/status_bar_header_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/status_bar_item_app_background_normal.9.png b/core/res/res/drawable-ldpi/status_bar_item_app_background_normal.9.png
new file mode 100644
index 0000000..f8cfe2c
--- /dev/null
+++ b/core/res/res/drawable-ldpi/status_bar_item_app_background_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/status_bar_item_background_focus.9.png b/core/res/res/drawable-ldpi/status_bar_item_background_focus.9.png
new file mode 100644
index 0000000..07cd873
--- /dev/null
+++ b/core/res/res/drawable-ldpi/status_bar_item_background_focus.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/status_bar_item_background_normal.9.png b/core/res/res/drawable-ldpi/status_bar_item_background_normal.9.png
new file mode 100644
index 0000000..e07f774
--- /dev/null
+++ b/core/res/res/drawable-ldpi/status_bar_item_background_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/status_bar_item_background_pressed.9.png b/core/res/res/drawable-ldpi/status_bar_item_background_pressed.9.png
new file mode 100644
index 0000000..aea2f5f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/status_bar_item_background_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/submenu_arrow_nofocus.png b/core/res/res/drawable-ldpi/submenu_arrow_nofocus.png
new file mode 100644
index 0000000..ce30b58
--- /dev/null
+++ b/core/res/res/drawable-ldpi/submenu_arrow_nofocus.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_action_add.png b/core/res/res/drawable-ldpi/sym_action_add.png
new file mode 100644
index 0000000..7afaede
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_action_add.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_action_call.png b/core/res/res/drawable-ldpi/sym_action_call.png
new file mode 100644
index 0000000..190572d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_action_call.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_action_chat.png b/core/res/res/drawable-ldpi/sym_action_chat.png
new file mode 100644
index 0000000..4eeb59b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_action_chat.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_action_email.png b/core/res/res/drawable-ldpi/sym_action_email.png
new file mode 100644
index 0000000..47dc63a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_action_email.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_app_on_sd_unavailable_icon.png b/core/res/res/drawable-ldpi/sym_app_on_sd_unavailable_icon.png
new file mode 100644
index 0000000..d88250a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_app_on_sd_unavailable_icon.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_call_incoming.png b/core/res/res/drawable-ldpi/sym_call_incoming.png
new file mode 100644
index 0000000..ec609c6
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_call_incoming.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_call_missed.png b/core/res/res/drawable-ldpi/sym_call_missed.png
new file mode 100644
index 0000000..8bad634
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_call_missed.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_call_outgoing.png b/core/res/res/drawable-ldpi/sym_call_outgoing.png
new file mode 100644
index 0000000..362df01
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_call_outgoing.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_contact_card.png b/core/res/res/drawable-ldpi/sym_contact_card.png
new file mode 100644
index 0000000..8ffd06e
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_contact_card.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_def_app_icon.png b/core/res/res/drawable-ldpi/sym_def_app_icon.png
new file mode 100644
index 0000000..2c205c8
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_def_app_icon.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_delete.png b/core/res/res/drawable-ldpi/sym_keyboard_delete.png
new file mode 100644
index 0000000..d9d5653
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_delete.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_delete_dim.png b/core/res/res/drawable-ldpi/sym_keyboard_delete_dim.png
new file mode 100644
index 0000000..d7d9385
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_delete_dim.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_feedback_delete.png b/core/res/res/drawable-ldpi/sym_keyboard_feedback_delete.png
new file mode 100644
index 0000000..8922bf9
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_feedback_delete.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_feedback_ok.png b/core/res/res/drawable-ldpi/sym_keyboard_feedback_ok.png
new file mode 100644
index 0000000..304141b5
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_feedback_ok.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_feedback_return.png b/core/res/res/drawable-ldpi/sym_keyboard_feedback_return.png
new file mode 100644
index 0000000..c5f3247
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_feedback_return.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_feedback_shift.png b/core/res/res/drawable-ldpi/sym_keyboard_feedback_shift.png
new file mode 100644
index 0000000..a7bf565
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_feedback_shift.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_feedback_shift_locked.png b/core/res/res/drawable-ldpi/sym_keyboard_feedback_shift_locked.png
new file mode 100644
index 0000000..114abac
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_feedback_shift_locked.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_feedback_space.png b/core/res/res/drawable-ldpi/sym_keyboard_feedback_space.png
new file mode 100644
index 0000000..5d52970
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_feedback_space.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_num0_no_plus.png b/core/res/res/drawable-ldpi/sym_keyboard_num0_no_plus.png
new file mode 100644
index 0000000..eb4764d4
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_num0_no_plus.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_num1.png b/core/res/res/drawable-ldpi/sym_keyboard_num1.png
new file mode 100644
index 0000000..1339b6d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_num1.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_num2.png b/core/res/res/drawable-ldpi/sym_keyboard_num2.png
new file mode 100644
index 0000000..bd2379d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_num2.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_num3.png b/core/res/res/drawable-ldpi/sym_keyboard_num3.png
new file mode 100644
index 0000000..43e8b15
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_num3.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_num4.png b/core/res/res/drawable-ldpi/sym_keyboard_num4.png
new file mode 100644
index 0000000..70d4f78
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_num4.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_num5.png b/core/res/res/drawable-ldpi/sym_keyboard_num5.png
new file mode 100644
index 0000000..5acda28
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_num5.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_num6.png b/core/res/res/drawable-ldpi/sym_keyboard_num6.png
new file mode 100644
index 0000000..950600b0
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_num6.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_num7.png b/core/res/res/drawable-ldpi/sym_keyboard_num7.png
new file mode 100644
index 0000000..caea4bb
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_num7.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_num8.png b/core/res/res/drawable-ldpi/sym_keyboard_num8.png
new file mode 100644
index 0000000..b528fc7
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_num8.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_num9.png b/core/res/res/drawable-ldpi/sym_keyboard_num9.png
new file mode 100644
index 0000000..1835e21
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_num9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_ok.png b/core/res/res/drawable-ldpi/sym_keyboard_ok.png
new file mode 100644
index 0000000..70bffc1
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_ok.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_ok_dim.png b/core/res/res/drawable-ldpi/sym_keyboard_ok_dim.png
new file mode 100644
index 0000000..01cf616
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_ok_dim.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_return.png b/core/res/res/drawable-ldpi/sym_keyboard_return.png
new file mode 100644
index 0000000..1c7c58d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_return.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_shift.png b/core/res/res/drawable-ldpi/sym_keyboard_shift.png
new file mode 100644
index 0000000..382a08f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_shift.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_shift_locked.png b/core/res/res/drawable-ldpi/sym_keyboard_shift_locked.png
new file mode 100644
index 0000000..c644eff
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_shift_locked.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/sym_keyboard_space.png b/core/res/res/drawable-ldpi/sym_keyboard_space.png
new file mode 100644
index 0000000..0b91646
--- /dev/null
+++ b/core/res/res/drawable-ldpi/sym_keyboard_space.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/tab_focus.9.png b/core/res/res/drawable-ldpi/tab_focus.9.png
new file mode 100644
index 0000000..59a0b65
--- /dev/null
+++ b/core/res/res/drawable-ldpi/tab_focus.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/tab_focus_bar_left.9.png b/core/res/res/drawable-ldpi/tab_focus_bar_left.9.png
new file mode 100755
index 0000000..0ee8347
--- /dev/null
+++ b/core/res/res/drawable-ldpi/tab_focus_bar_left.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/tab_focus_bar_right.9.png b/core/res/res/drawable-ldpi/tab_focus_bar_right.9.png
new file mode 100755
index 0000000..0ee8347
--- /dev/null
+++ b/core/res/res/drawable-ldpi/tab_focus_bar_right.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/tab_press.9.png b/core/res/res/drawable-ldpi/tab_press.9.png
new file mode 100644
index 0000000..ba9c82d
--- /dev/null
+++ b/core/res/res/drawable-ldpi/tab_press.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/tab_press_bar_left.9.png b/core/res/res/drawable-ldpi/tab_press_bar_left.9.png
new file mode 100755
index 0000000..ee129ba
--- /dev/null
+++ b/core/res/res/drawable-ldpi/tab_press_bar_left.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/tab_press_bar_right.9.png b/core/res/res/drawable-ldpi/tab_press_bar_right.9.png
new file mode 100755
index 0000000..ee129ba
--- /dev/null
+++ b/core/res/res/drawable-ldpi/tab_press_bar_right.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/tab_selected.9.png b/core/res/res/drawable-ldpi/tab_selected.9.png
new file mode 100644
index 0000000..318f09f
--- /dev/null
+++ b/core/res/res/drawable-ldpi/tab_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/tab_selected_bar_left.9.png b/core/res/res/drawable-ldpi/tab_selected_bar_left.9.png
new file mode 100755
index 0000000..03bcc13
--- /dev/null
+++ b/core/res/res/drawable-ldpi/tab_selected_bar_left.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/tab_selected_bar_left_v4.9.png b/core/res/res/drawable-ldpi/tab_selected_bar_left_v4.9.png
new file mode 100644
index 0000000..e7a07255
--- /dev/null
+++ b/core/res/res/drawable-ldpi/tab_selected_bar_left_v4.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/tab_selected_bar_right.9.png b/core/res/res/drawable-ldpi/tab_selected_bar_right.9.png
new file mode 100755
index 0000000..f228445
--- /dev/null
+++ b/core/res/res/drawable-ldpi/tab_selected_bar_right.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/tab_selected_bar_right_v4.9.png b/core/res/res/drawable-ldpi/tab_selected_bar_right_v4.9.png
new file mode 100644
index 0000000..e7a07255
--- /dev/null
+++ b/core/res/res/drawable-ldpi/tab_selected_bar_right_v4.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/tab_selected_v4.9.png b/core/res/res/drawable-ldpi/tab_selected_v4.9.png
new file mode 100644
index 0000000..2ad1757
--- /dev/null
+++ b/core/res/res/drawable-ldpi/tab_selected_v4.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/tab_unselected.9.png b/core/res/res/drawable-ldpi/tab_unselected.9.png
new file mode 100644
index 0000000..de7c467
--- /dev/null
+++ b/core/res/res/drawable-ldpi/tab_unselected.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/tab_unselected_v4.9.png b/core/res/res/drawable-ldpi/tab_unselected_v4.9.png
new file mode 100644
index 0000000..61d4ef0
--- /dev/null
+++ b/core/res/res/drawable-ldpi/tab_unselected_v4.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/text_select_handle_left.png b/core/res/res/drawable-ldpi/text_select_handle_left.png
new file mode 100644
index 0000000..bded42c
--- /dev/null
+++ b/core/res/res/drawable-ldpi/text_select_handle_left.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/text_select_handle_middle.png b/core/res/res/drawable-ldpi/text_select_handle_middle.png
new file mode 100644
index 0000000..c1d8d17
--- /dev/null
+++ b/core/res/res/drawable-ldpi/text_select_handle_middle.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/text_select_handle_right.png b/core/res/res/drawable-ldpi/text_select_handle_right.png
new file mode 100644
index 0000000..aae0b40
--- /dev/null
+++ b/core/res/res/drawable-ldpi/text_select_handle_right.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/textfield_default.9.png b/core/res/res/drawable-ldpi/textfield_default.9.png
new file mode 100644
index 0000000..4cfa745
--- /dev/null
+++ b/core/res/res/drawable-ldpi/textfield_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/textfield_disabled.9.png b/core/res/res/drawable-ldpi/textfield_disabled.9.png
new file mode 100644
index 0000000..e54bf30
--- /dev/null
+++ b/core/res/res/drawable-ldpi/textfield_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/textfield_disabled_selected.9.png b/core/res/res/drawable-ldpi/textfield_disabled_selected.9.png
new file mode 100644
index 0000000..02f6b5e
--- /dev/null
+++ b/core/res/res/drawable-ldpi/textfield_disabled_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/textfield_pressed.9.png b/core/res/res/drawable-ldpi/textfield_pressed.9.png
new file mode 100644
index 0000000..1433365
--- /dev/null
+++ b/core/res/res/drawable-ldpi/textfield_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/textfield_search_default.9.png b/core/res/res/drawable-ldpi/textfield_search_default.9.png
new file mode 100644
index 0000000..dfb3f7a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/textfield_search_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/textfield_search_empty_default.9.png b/core/res/res/drawable-ldpi/textfield_search_empty_default.9.png
new file mode 100644
index 0000000..65fbe33
--- /dev/null
+++ b/core/res/res/drawable-ldpi/textfield_search_empty_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/textfield_search_empty_pressed.9.png b/core/res/res/drawable-ldpi/textfield_search_empty_pressed.9.png
new file mode 100644
index 0000000..2a72142
--- /dev/null
+++ b/core/res/res/drawable-ldpi/textfield_search_empty_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/textfield_search_empty_selected.9.png b/core/res/res/drawable-ldpi/textfield_search_empty_selected.9.png
new file mode 100644
index 0000000..162c178
--- /dev/null
+++ b/core/res/res/drawable-ldpi/textfield_search_empty_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/textfield_search_pressed.9.png b/core/res/res/drawable-ldpi/textfield_search_pressed.9.png
new file mode 100644
index 0000000..b414f6c
--- /dev/null
+++ b/core/res/res/drawable-ldpi/textfield_search_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/textfield_search_selected.9.png b/core/res/res/drawable-ldpi/textfield_search_selected.9.png
new file mode 100644
index 0000000..d6e6a44
--- /dev/null
+++ b/core/res/res/drawable-ldpi/textfield_search_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/textfield_selected.9.png b/core/res/res/drawable-ldpi/textfield_selected.9.png
new file mode 100644
index 0000000..80a6f39
--- /dev/null
+++ b/core/res/res/drawable-ldpi/textfield_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/timepicker_down_disabled.9.png b/core/res/res/drawable-ldpi/timepicker_down_disabled.9.png
new file mode 100644
index 0000000..a4c2aba
--- /dev/null
+++ b/core/res/res/drawable-ldpi/timepicker_down_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/timepicker_down_disabled_focused.9.png b/core/res/res/drawable-ldpi/timepicker_down_disabled_focused.9.png
new file mode 100644
index 0000000..fdbc9d5
--- /dev/null
+++ b/core/res/res/drawable-ldpi/timepicker_down_disabled_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/timepicker_down_normal.9.png b/core/res/res/drawable-ldpi/timepicker_down_normal.9.png
new file mode 100644
index 0000000..c7e8018
--- /dev/null
+++ b/core/res/res/drawable-ldpi/timepicker_down_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/timepicker_down_pressed.9.png b/core/res/res/drawable-ldpi/timepicker_down_pressed.9.png
new file mode 100644
index 0000000..4dd82ae
--- /dev/null
+++ b/core/res/res/drawable-ldpi/timepicker_down_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/timepicker_down_selected.9.png b/core/res/res/drawable-ldpi/timepicker_down_selected.9.png
new file mode 100644
index 0000000..ebb701e
--- /dev/null
+++ b/core/res/res/drawable-ldpi/timepicker_down_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/timepicker_input_disabled.9.png b/core/res/res/drawable-ldpi/timepicker_input_disabled.9.png
new file mode 100644
index 0000000..39cc3d4
--- /dev/null
+++ b/core/res/res/drawable-ldpi/timepicker_input_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/timepicker_input_normal.9.png b/core/res/res/drawable-ldpi/timepicker_input_normal.9.png
new file mode 100644
index 0000000..6ffabe6
--- /dev/null
+++ b/core/res/res/drawable-ldpi/timepicker_input_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/timepicker_input_pressed.9.png b/core/res/res/drawable-ldpi/timepicker_input_pressed.9.png
new file mode 100644
index 0000000..9cfaaab
--- /dev/null
+++ b/core/res/res/drawable-ldpi/timepicker_input_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/timepicker_input_selected.9.png b/core/res/res/drawable-ldpi/timepicker_input_selected.9.png
new file mode 100644
index 0000000..e819e9b
--- /dev/null
+++ b/core/res/res/drawable-ldpi/timepicker_input_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/timepicker_up_disabled.9.png b/core/res/res/drawable-ldpi/timepicker_up_disabled.9.png
new file mode 100644
index 0000000..005a5ae
--- /dev/null
+++ b/core/res/res/drawable-ldpi/timepicker_up_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/timepicker_up_disabled_focused.9.png b/core/res/res/drawable-ldpi/timepicker_up_disabled_focused.9.png
new file mode 100644
index 0000000..f1c9465
--- /dev/null
+++ b/core/res/res/drawable-ldpi/timepicker_up_disabled_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/timepicker_up_normal.9.png b/core/res/res/drawable-ldpi/timepicker_up_normal.9.png
new file mode 100644
index 0000000..9927539
--- /dev/null
+++ b/core/res/res/drawable-ldpi/timepicker_up_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/timepicker_up_pressed.9.png b/core/res/res/drawable-ldpi/timepicker_up_pressed.9.png
new file mode 100644
index 0000000..7946450
--- /dev/null
+++ b/core/res/res/drawable-ldpi/timepicker_up_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/timepicker_up_selected.9.png b/core/res/res/drawable-ldpi/timepicker_up_selected.9.png
new file mode 100644
index 0000000..8c8136a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/timepicker_up_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/title_bar_medium.9.png b/core/res/res/drawable-ldpi/title_bar_medium.9.png
new file mode 100644
index 0000000..ab95aad
--- /dev/null
+++ b/core/res/res/drawable-ldpi/title_bar_medium.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/title_bar_portrait.9.png b/core/res/res/drawable-ldpi/title_bar_portrait.9.png
new file mode 100644
index 0000000..6f868db
--- /dev/null
+++ b/core/res/res/drawable-ldpi/title_bar_portrait.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/title_bar_shadow.9.png b/core/res/res/drawable-ldpi/title_bar_shadow.9.png
new file mode 100644
index 0000000..fc45ee8
--- /dev/null
+++ b/core/res/res/drawable-ldpi/title_bar_shadow.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/title_bar_tall.9.png b/core/res/res/drawable-ldpi/title_bar_tall.9.png
new file mode 100644
index 0000000..b4729b7
--- /dev/null
+++ b/core/res/res/drawable-ldpi/title_bar_tall.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/toast_frame.9.png b/core/res/res/drawable-ldpi/toast_frame.9.png
new file mode 100644
index 0000000..3b344ff
--- /dev/null
+++ b/core/res/res/drawable-ldpi/toast_frame.9.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/unknown_image.png b/core/res/res/drawable-ldpi/unknown_image.png
new file mode 100644
index 0000000..c6255ba
--- /dev/null
+++ b/core/res/res/drawable-ldpi/unknown_image.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/usb_android.png b/core/res/res/drawable-ldpi/usb_android.png
new file mode 100644
index 0000000..d7b1d93
--- /dev/null
+++ b/core/res/res/drawable-ldpi/usb_android.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/usb_android_connected.png b/core/res/res/drawable-ldpi/usb_android_connected.png
new file mode 100644
index 0000000..c9d8439
--- /dev/null
+++ b/core/res/res/drawable-ldpi/usb_android_connected.png
Binary files differ
diff --git a/core/res/res/drawable-ldpi/zoom_plate.9.png b/core/res/res/drawable-ldpi/zoom_plate.9.png
new file mode 100644
index 0000000..5e34e7a
--- /dev/null
+++ b/core/res/res/drawable-ldpi/zoom_plate.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_off.png b/core/res/res/drawable-mdpi/btn_check_off.png
index 56d3861..251ddff 100644
--- a/core/res/res/drawable-mdpi/btn_check_off.png
+++ b/core/res/res/drawable-mdpi/btn_check_off.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_off_disable.png b/core/res/res/drawable-mdpi/btn_check_off_disable.png
index e012afd..45e6804 100644
--- a/core/res/res/drawable-mdpi/btn_check_off_disable.png
+++ b/core/res/res/drawable-mdpi/btn_check_off_disable.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_off_disable_focused.png b/core/res/res/drawable-mdpi/btn_check_off_disable_focused.png
index 0837bbd..193acd2 100644
--- a/core/res/res/drawable-mdpi/btn_check_off_disable_focused.png
+++ b/core/res/res/drawable-mdpi/btn_check_off_disable_focused.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_off_pressed.png b/core/res/res/drawable-mdpi/btn_check_off_pressed.png
index 984dfd7..807901c 100644
--- a/core/res/res/drawable-mdpi/btn_check_off_pressed.png
+++ b/core/res/res/drawable-mdpi/btn_check_off_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_off_selected.png b/core/res/res/drawable-mdpi/btn_check_off_selected.png
index 20842d4..dbc3beb 100644
--- a/core/res/res/drawable-mdpi/btn_check_off_selected.png
+++ b/core/res/res/drawable-mdpi/btn_check_off_selected.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_on.png b/core/res/res/drawable-mdpi/btn_check_on.png
index 791ac1d..4c83e2e 100644
--- a/core/res/res/drawable-mdpi/btn_check_on.png
+++ b/core/res/res/drawable-mdpi/btn_check_on.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_on_disable.png b/core/res/res/drawable-mdpi/btn_check_on_disable.png
index 6cb02f3..f1bf178 100644
--- a/core/res/res/drawable-mdpi/btn_check_on_disable.png
+++ b/core/res/res/drawable-mdpi/btn_check_on_disable.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_on_disable_focused.png b/core/res/res/drawable-mdpi/btn_check_on_disable_focused.png
index 8a73b33..ea232ee 100644
--- a/core/res/res/drawable-mdpi/btn_check_on_disable_focused.png
+++ b/core/res/res/drawable-mdpi/btn_check_on_disable_focused.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_on_pressed.png b/core/res/res/drawable-mdpi/btn_check_on_pressed.png
index 300d64a..0de8a4c 100644
--- a/core/res/res/drawable-mdpi/btn_check_on_pressed.png
+++ b/core/res/res/drawable-mdpi/btn_check_on_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_check_on_selected.png b/core/res/res/drawable-mdpi/btn_check_on_selected.png
index 0b36adb..20294f3 100644
--- a/core/res/res/drawable-mdpi/btn_check_on_selected.png
+++ b/core/res/res/drawable-mdpi/btn_check_on_selected.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_circle_disable.png b/core/res/res/drawable-mdpi/btn_circle_disable.png
index 33b74a6..29e227c 100644
--- a/core/res/res/drawable-mdpi/btn_circle_disable.png
+++ b/core/res/res/drawable-mdpi/btn_circle_disable.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_circle_disable_focused.png b/core/res/res/drawable-mdpi/btn_circle_disable_focused.png
index 005ad8d..c5aa3c5 100644
--- a/core/res/res/drawable-mdpi/btn_circle_disable_focused.png
+++ b/core/res/res/drawable-mdpi/btn_circle_disable_focused.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_circle_normal.png b/core/res/res/drawable-mdpi/btn_circle_normal.png
index fc5af1c..6358351 100644
--- a/core/res/res/drawable-mdpi/btn_circle_normal.png
+++ b/core/res/res/drawable-mdpi/btn_circle_normal.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_circle_pressed.png b/core/res/res/drawable-mdpi/btn_circle_pressed.png
index 8f40afd..dc07a61 100644
--- a/core/res/res/drawable-mdpi/btn_circle_pressed.png
+++ b/core/res/res/drawable-mdpi/btn_circle_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_circle_selected.png b/core/res/res/drawable-mdpi/btn_circle_selected.png
index c74fac2..6eb2ff5 100644
--- a/core/res/res/drawable-mdpi/btn_circle_selected.png
+++ b/core/res/res/drawable-mdpi/btn_circle_selected.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_close_normal.png b/core/res/res/drawable-mdpi/btn_close_normal.png
index 4c6e79d..eca5828 100644
--- a/core/res/res/drawable-mdpi/btn_close_normal.png
+++ b/core/res/res/drawable-mdpi/btn_close_normal.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_close_pressed.png b/core/res/res/drawable-mdpi/btn_close_pressed.png
index fc983af..3c745bb 100644
--- a/core/res/res/drawable-mdpi/btn_close_pressed.png
+++ b/core/res/res/drawable-mdpi/btn_close_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_close_selected.png b/core/res/res/drawable-mdpi/btn_close_selected.png
index f2bf91a..c41f039 100644
--- a/core/res/res/drawable-mdpi/btn_close_selected.png
+++ b/core/res/res/drawable-mdpi/btn_close_selected.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_code_lock_default.png b/core/res/res/drawable-mdpi/btn_code_lock_default.png
index c2e0b05..f524317 100755
--- a/core/res/res/drawable-mdpi/btn_code_lock_default.png
+++ b/core/res/res/drawable-mdpi/btn_code_lock_default.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_code_lock_touched.png b/core/res/res/drawable-mdpi/btn_code_lock_touched.png
index 70e95a2..5cd436c 100755
--- a/core/res/res/drawable-mdpi/btn_code_lock_touched.png
+++ b/core/res/res/drawable-mdpi/btn_code_lock_touched.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_normal.9.png b/core/res/res/drawable-mdpi/btn_default_normal.9.png
index a2d5ccd..7ff74b2 100644
--- a/core/res/res/drawable-mdpi/btn_default_normal.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_normal_disable.9.png b/core/res/res/drawable-mdpi/btn_default_normal_disable.9.png
index edd3a3e..d3e11b5 100644
--- a/core/res/res/drawable-mdpi/btn_default_normal_disable.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_normal_disable.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_normal_disable_focused.9.png b/core/res/res/drawable-mdpi/btn_default_normal_disable_focused.9.png
index f506179..843ca7a 100644
--- a/core/res/res/drawable-mdpi/btn_default_normal_disable_focused.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_normal_disable_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_pressed.9.png b/core/res/res/drawable-mdpi/btn_default_pressed.9.png
index 033bf89..74fd58b 100644
--- a/core/res/res/drawable-mdpi/btn_default_pressed.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_selected.9.png b/core/res/res/drawable-mdpi/btn_default_selected.9.png
index 1e900bf..415b145 100644
--- a/core/res/res/drawable-mdpi/btn_default_selected.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_dialog_disable.png b/core/res/res/drawable-mdpi/btn_dialog_disable.png
index f041cab..3de9895 100755
--- a/core/res/res/drawable-mdpi/btn_dialog_disable.png
+++ b/core/res/res/drawable-mdpi/btn_dialog_disable.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_dialog_normal.png b/core/res/res/drawable-mdpi/btn_dialog_normal.png
index a2d27fa..eca5828 100755
--- a/core/res/res/drawable-mdpi/btn_dialog_normal.png
+++ b/core/res/res/drawable-mdpi/btn_dialog_normal.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_dialog_pressed.png b/core/res/res/drawable-mdpi/btn_dialog_pressed.png
index 9c9922a..f9c4551 100755
--- a/core/res/res/drawable-mdpi/btn_dialog_pressed.png
+++ b/core/res/res/drawable-mdpi/btn_dialog_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_dialog_selected.png b/core/res/res/drawable-mdpi/btn_dialog_selected.png
index 7656de5..b0afd7f 100755
--- a/core/res/res/drawable-mdpi/btn_dialog_selected.png
+++ b/core/res/res/drawable-mdpi/btn_dialog_selected.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_dropdown_disabled.9.png b/core/res/res/drawable-mdpi/btn_dropdown_disabled.9.png
index f7464c7..72915b5 100644
--- a/core/res/res/drawable-mdpi/btn_dropdown_disabled.9.png
+++ b/core/res/res/drawable-mdpi/btn_dropdown_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_dropdown_disabled_focused.9.png b/core/res/res/drawable-mdpi/btn_dropdown_disabled_focused.9.png
index ffe219f..438c06a 100644
--- a/core/res/res/drawable-mdpi/btn_dropdown_disabled_focused.9.png
+++ b/core/res/res/drawable-mdpi/btn_dropdown_disabled_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_radio_off.png b/core/res/res/drawable-mdpi/btn_radio_off.png
index 407632b..d2e42a5 100644
--- a/core/res/res/drawable-mdpi/btn_radio_off.png
+++ b/core/res/res/drawable-mdpi/btn_radio_off.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_radio_off_pressed.png b/core/res/res/drawable-mdpi/btn_radio_off_pressed.png
index d6d8a9d..f9cb91c 100644
--- a/core/res/res/drawable-mdpi/btn_radio_off_pressed.png
+++ b/core/res/res/drawable-mdpi/btn_radio_off_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_radio_off_selected.png b/core/res/res/drawable-mdpi/btn_radio_off_selected.png
index 53f3e87..b3071b7 100644
--- a/core/res/res/drawable-mdpi/btn_radio_off_selected.png
+++ b/core/res/res/drawable-mdpi/btn_radio_off_selected.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_radio_on.png b/core/res/res/drawable-mdpi/btn_radio_on.png
index 25a3ccc..ee14924 100644
--- a/core/res/res/drawable-mdpi/btn_radio_on.png
+++ b/core/res/res/drawable-mdpi/btn_radio_on.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_radio_on_pressed.png b/core/res/res/drawable-mdpi/btn_radio_on_pressed.png
index c904a35..2917ba4 100644
--- a/core/res/res/drawable-mdpi/btn_radio_on_pressed.png
+++ b/core/res/res/drawable-mdpi/btn_radio_on_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_radio_on_selected.png b/core/res/res/drawable-mdpi/btn_radio_on_selected.png
index 78e1fc0..e1d542a 100644
--- a/core/res/res/drawable-mdpi/btn_radio_on_selected.png
+++ b/core/res/res/drawable-mdpi/btn_radio_on_selected.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_square_overlay_disabled.png b/core/res/res/drawable-mdpi/btn_square_overlay_disabled.png
index cf7e4ea..285fde3 100644
--- a/core/res/res/drawable-mdpi/btn_square_overlay_disabled.png
+++ b/core/res/res/drawable-mdpi/btn_square_overlay_disabled.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_square_overlay_normal.png b/core/res/res/drawable-mdpi/btn_square_overlay_normal.png
index 45fa4fe..cc951d6 100644
--- a/core/res/res/drawable-mdpi/btn_square_overlay_normal.png
+++ b/core/res/res/drawable-mdpi/btn_square_overlay_normal.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_square_overlay_pressed.png b/core/res/res/drawable-mdpi/btn_square_overlay_pressed.png
index 952571b..a583060 100644
--- a/core/res/res/drawable-mdpi/btn_square_overlay_pressed.png
+++ b/core/res/res/drawable-mdpi/btn_square_overlay_pressed.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_square_overlay_selected.png b/core/res/res/drawable-mdpi/btn_square_overlay_selected.png
index ce4515e..ff9e13e 100644
--- a/core/res/res/drawable-mdpi/btn_square_overlay_selected.png
+++ b/core/res/res/drawable-mdpi/btn_square_overlay_selected.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/divider_horizontal_bright.9.png b/core/res/res/drawable-mdpi/divider_horizontal_bright.9.png
index 395227a..24f2a3f 100644
--- a/core/res/res/drawable-mdpi/divider_horizontal_bright.9.png
+++ b/core/res/res/drawable-mdpi/divider_horizontal_bright.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/divider_horizontal_bright_opaque.9.png b/core/res/res/drawable-mdpi/divider_horizontal_bright_opaque.9.png
index 5c537ee..24f2a3f 100644
--- a/core/res/res/drawable-mdpi/divider_horizontal_bright_opaque.9.png
+++ b/core/res/res/drawable-mdpi/divider_horizontal_bright_opaque.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/divider_horizontal_dark.9.png b/core/res/res/drawable-mdpi/divider_horizontal_dark.9.png
index bf45e38..470be26 100644
--- a/core/res/res/drawable-mdpi/divider_horizontal_dark.9.png
+++ b/core/res/res/drawable-mdpi/divider_horizontal_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/divider_horizontal_dark_opaque.9.png b/core/res/res/drawable-mdpi/divider_horizontal_dark_opaque.9.png
index 9444f0d..24f2a3f 100644
--- a/core/res/res/drawable-mdpi/divider_horizontal_dark_opaque.9.png
+++ b/core/res/res/drawable-mdpi/divider_horizontal_dark_opaque.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/divider_vertical_dark.9.png b/core/res/res/drawable-mdpi/divider_vertical_dark.9.png
index 702b878..470be26 100644
--- a/core/res/res/drawable-mdpi/divider_vertical_dark.9.png
+++ b/core/res/res/drawable-mdpi/divider_vertical_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_btn_round_more_disabled.png b/core/res/res/drawable-mdpi/ic_btn_round_more_disabled.png
index 1ab98c9..428edf2 100644
--- a/core/res/res/drawable-mdpi/ic_btn_round_more_disabled.png
+++ b/core/res/res/drawable-mdpi/ic_btn_round_more_disabled.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_btn_round_more_normal.png b/core/res/res/drawable-mdpi/ic_btn_round_more_normal.png
index ebdc55c..c2ecb01 100644
--- a/core/res/res/drawable-mdpi/ic_btn_round_more_normal.png
+++ b/core/res/res/drawable-mdpi/ic_btn_round_more_normal.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_bullet_key_permission.png b/core/res/res/drawable-mdpi/ic_bullet_key_permission.png
index ccb010f..68ad039 100644
--- a/core/res/res/drawable-mdpi/ic_bullet_key_permission.png
+++ b/core/res/res/drawable-mdpi/ic_bullet_key_permission.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_input_add.png b/core/res/res/drawable-mdpi/ic_input_add.png
index 00770f8..10d95996 100644
--- a/core/res/res/drawable-mdpi/ic_input_add.png
+++ b/core/res/res/drawable-mdpi/ic_input_add.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_green_up.png b/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_green_up.png
index ef91dc4..7ddeba5 100644
--- a/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_green_up.png
+++ b/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_green_up.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_red_up.png b/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_red_up.png
index f3d4204b..7201e58 100644
--- a/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_red_up.png
+++ b/core/res/res/drawable-mdpi/indicator_code_lock_drag_direction_red_up.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_green.png b/core/res/res/drawable-mdpi/indicator_code_lock_point_area_green.png
index 8020846..a98a29a 100755
--- a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_green.png
+++ b/core/res/res/drawable-mdpi/indicator_code_lock_point_area_green.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_red.png b/core/res/res/drawable-mdpi/indicator_code_lock_point_area_red.png
index b7aee1ba..6d579cb 100755
--- a/core/res/res/drawable-mdpi/indicator_code_lock_point_area_red.png
+++ b/core/res/res/drawable-mdpi/indicator_code_lock_point_area_red.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_selector_background_disabled.9.png b/core/res/res/drawable-mdpi/list_selector_background_disabled.9.png
index bf970b0..43c36cb 100644
--- a/core/res/res/drawable-mdpi/list_selector_background_disabled.9.png
+++ b/core/res/res/drawable-mdpi/list_selector_background_disabled.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
index c3e24158..53a7eac 100644
--- a/core/res/res/drawable-mdpi/list_selector_background_focus.9.png
+++ b/core/res/res/drawable-mdpi/list_selector_background_focus.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_selector_background_longpress.9.png b/core/res/res/drawable-mdpi/list_selector_background_longpress.9.png
index 5cbb251..0818761 100644
--- a/core/res/res/drawable-mdpi/list_selector_background_longpress.9.png
+++ b/core/res/res/drawable-mdpi/list_selector_background_longpress.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_selector_background_pressed.9.png b/core/res/res/drawable-mdpi/list_selector_background_pressed.9.png
index 02b4e9a..8bd86b2 100644
--- a/core/res/res/drawable-mdpi/list_selector_background_pressed.9.png
+++ b/core/res/res/drawable-mdpi/list_selector_background_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/menu_submenu_background.9.png b/core/res/res/drawable-mdpi/menu_submenu_background.9.png
index a153532..26f24bc 100644
--- a/core/res/res/drawable-mdpi/menu_submenu_background.9.png
+++ b/core/res/res/drawable-mdpi/menu_submenu_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/overscroll_edge.png b/core/res/res/drawable-mdpi/overscroll_edge.png
index 22f4ef8..a63a59d 100644
--- a/core/res/res/drawable-mdpi/overscroll_edge.png
+++ b/core/res/res/drawable-mdpi/overscroll_edge.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/overscroll_glow.png b/core/res/res/drawable-mdpi/overscroll_glow.png
index 761fb74..ed5cd78 100644
--- a/core/res/res/drawable-mdpi/overscroll_glow.png
+++ b/core/res/res/drawable-mdpi/overscroll_glow.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/picture_emergency.png b/core/res/res/drawable-mdpi/picture_emergency.png
index 3690b07..a224b80 100644
--- a/core/res/res/drawable-mdpi/picture_emergency.png
+++ b/core/res/res/drawable-mdpi/picture_emergency.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/quickcontact_badge_pressed.9.png b/core/res/res/drawable-mdpi/quickcontact_badge_pressed.9.png
index c8ca33a..f970ad6 100644
--- a/core/res/res/drawable-mdpi/quickcontact_badge_pressed.9.png
+++ b/core/res/res/drawable-mdpi/quickcontact_badge_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/quickcontact_badge_small_pressed.9.png b/core/res/res/drawable-mdpi/quickcontact_badge_small_pressed.9.png
index b23e921..437d25b 100644
--- a/core/res/res/drawable-mdpi/quickcontact_badge_small_pressed.9.png
+++ b/core/res/res/drawable-mdpi/quickcontact_badge_small_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/quickcontact_badge_small_unpressed.9.png b/core/res/res/drawable-mdpi/quickcontact_badge_small_unpressed.9.png
index 38f14f7..a58fe55 100644
--- a/core/res/res/drawable-mdpi/quickcontact_badge_small_unpressed.9.png
+++ b/core/res/res/drawable-mdpi/quickcontact_badge_small_unpressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/quickcontact_badge_unpressed.9.png b/core/res/res/drawable-mdpi/quickcontact_badge_unpressed.9.png
index d8dff34..68a84610 100644
--- a/core/res/res/drawable-mdpi/quickcontact_badge_unpressed.9.png
+++ b/core/res/res/drawable-mdpi/quickcontact_badge_unpressed.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..502e611
--- /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..c99d1db
--- /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..57296b1
--- /dev/null
+++ b/core/res/res/drawable-mdpi/rate_star_med_on.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/scrollbar_handle_accelerated_anim2.9.png b/core/res/res/drawable-mdpi/scrollbar_handle_accelerated_anim2.9.png
index 85caddd..da4c275 100755
--- a/core/res/res/drawable-mdpi/scrollbar_handle_accelerated_anim2.9.png
+++ b/core/res/res/drawable-mdpi/scrollbar_handle_accelerated_anim2.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_black_16.png b/core/res/res/drawable-mdpi/spinner_black_16.png
index 5ee33ce..4b7fdfe 100644
--- a/core/res/res/drawable-mdpi/spinner_black_16.png
+++ b/core/res/res/drawable-mdpi/spinner_black_16.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_black_20.png b/core/res/res/drawable-mdpi/spinner_black_20.png
index e55b60d..86d7a20 100755
--- a/core/res/res/drawable-mdpi/spinner_black_20.png
+++ b/core/res/res/drawable-mdpi/spinner_black_20.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_black_48.png b/core/res/res/drawable-mdpi/spinner_black_48.png
index 3a68192..f1571f9 100644
--- a/core/res/res/drawable-mdpi/spinner_black_48.png
+++ b/core/res/res/drawable-mdpi/spinner_black_48.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_black_76.png b/core/res/res/drawable-mdpi/spinner_black_76.png
index ec57460..e9f6e8f 100644
--- a/core/res/res/drawable-mdpi/spinner_black_76.png
+++ b/core/res/res/drawable-mdpi/spinner_black_76.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_white_16.png b/core/res/res/drawable-mdpi/spinner_white_16.png
index dd2e1fd..650e315 100644
--- a/core/res/res/drawable-mdpi/spinner_white_16.png
+++ b/core/res/res/drawable-mdpi/spinner_white_16.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_white_48.png b/core/res/res/drawable-mdpi/spinner_white_48.png
index d25a33e..11eacf8 100644
--- a/core/res/res/drawable-mdpi/spinner_white_48.png
+++ b/core/res/res/drawable-mdpi/spinner_white_48.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_white_76.png b/core/res/res/drawable-mdpi/spinner_white_76.png
index f53e8ff..6c31bc3 100644
--- a/core/res/res/drawable-mdpi/spinner_white_76.png
+++ b/core/res/res/drawable-mdpi/spinner_white_76.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_car_mode.png b/core/res/res/drawable-mdpi/stat_notify_car_mode.png
index 0272e6b..3b644d3 100644
--- a/core/res/res/drawable-mdpi/stat_notify_car_mode.png
+++ b/core/res/res/drawable-mdpi/stat_notify_car_mode.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_chat.png b/core/res/res/drawable-mdpi/stat_notify_chat.png
index 068b7ec..306d9c5 100644
--- a/core/res/res/drawable-mdpi/stat_notify_chat.png
+++ b/core/res/res/drawable-mdpi/stat_notify_chat.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_disk_full.png b/core/res/res/drawable-mdpi/stat_notify_disk_full.png
index 9120f00..3eebeb8 100755
--- a/core/res/res/drawable-mdpi/stat_notify_disk_full.png
+++ b/core/res/res/drawable-mdpi/stat_notify_disk_full.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_email_generic.png b/core/res/res/drawable-mdpi/stat_notify_email_generic.png
new file mode 100644
index 0000000..1620ad53
--- /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_error.png b/core/res/res/drawable-mdpi/stat_notify_error.png
index 6ced2b7..1275738 100644
--- a/core/res/res/drawable-mdpi/stat_notify_error.png
+++ b/core/res/res/drawable-mdpi/stat_notify_error.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_gmail.png b/core/res/res/drawable-mdpi/stat_notify_gmail.png
new file mode 100644
index 0000000..4860c34
--- /dev/null
+++ b/core/res/res/drawable-mdpi/stat_notify_gmail.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_missed_call.png b/core/res/res/drawable-mdpi/stat_notify_missed_call.png
index fe746b3..7bd5fcd 100644
--- a/core/res/res/drawable-mdpi/stat_notify_missed_call.png
+++ b/core/res/res/drawable-mdpi/stat_notify_missed_call.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_more.png b/core/res/res/drawable-mdpi/stat_notify_more.png
index e129ba9..a85a16e 100644
--- a/core/res/res/drawable-mdpi/stat_notify_more.png
+++ b/core/res/res/drawable-mdpi/stat_notify_more.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sdcard.png b/core/res/res/drawable-mdpi/stat_notify_sdcard.png
index 23093ac..fc0784d 100644
--- a/core/res/res/drawable-mdpi/stat_notify_sdcard.png
+++ b/core/res/res/drawable-mdpi/stat_notify_sdcard.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sdcard_prepare.png b/core/res/res/drawable-mdpi/stat_notify_sdcard_prepare.png
index 9abb1c9..93fad38 100644
--- a/core/res/res/drawable-mdpi/stat_notify_sdcard_prepare.png
+++ b/core/res/res/drawable-mdpi/stat_notify_sdcard_prepare.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sdcard_usb.png b/core/res/res/drawable-mdpi/stat_notify_sdcard_usb.png
index 9880694..cda4546 100644
--- a/core/res/res/drawable-mdpi/stat_notify_sdcard_usb.png
+++ b/core/res/res/drawable-mdpi/stat_notify_sdcard_usb.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sim_toolkit.png b/core/res/res/drawable-mdpi/stat_notify_sim_toolkit.png
index c1ce8f2..8b33a0f 100755
--- a/core/res/res/drawable-mdpi/stat_notify_sim_toolkit.png
+++ b/core/res/res/drawable-mdpi/stat_notify_sim_toolkit.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sync.png b/core/res/res/drawable-mdpi/stat_notify_sync.png
index 0edf692..03ce57a 100644
--- a/core/res/res/drawable-mdpi/stat_notify_sync.png
+++ b/core/res/res/drawable-mdpi/stat_notify_sync.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sync_anim0.png b/core/res/res/drawable-mdpi/stat_notify_sync_anim0.png
index 0edf692..5481461 100644
--- a/core/res/res/drawable-mdpi/stat_notify_sync_anim0.png
+++ b/core/res/res/drawable-mdpi/stat_notify_sync_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sync_error.png b/core/res/res/drawable-mdpi/stat_notify_sync_error.png
index 3078b8c..f849b50 100644
--- a/core/res/res/drawable-mdpi/stat_notify_sync_error.png
+++ b/core/res/res/drawable-mdpi/stat_notify_sync_error.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_voicemail.png b/core/res/res/drawable-mdpi/stat_notify_voicemail.png
index 658fa05..636d1cc 100644
--- a/core/res/res/drawable-mdpi/stat_notify_voicemail.png
+++ b/core/res/res/drawable-mdpi/stat_notify_voicemail.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_wifi_in_range.png b/core/res/res/drawable-mdpi/stat_notify_wifi_in_range.png
index e9c74b4..517c515 100644
--- a/core/res/res/drawable-mdpi/stat_notify_wifi_in_range.png
+++ b/core/res/res/drawable-mdpi/stat_notify_wifi_in_range.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_battery_10.png b/core/res/res/drawable-mdpi/stat_sys_battery_10.png
old mode 100755
new mode 100644
index b789f23..8fd88f3
--- a/core/res/res/drawable-mdpi/stat_sys_battery_10.png
+++ b/core/res/res/drawable-mdpi/stat_sys_battery_10.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_battery_100.png b/core/res/res/drawable-mdpi/stat_sys_battery_100.png
index d280aeb..5267517 100644
--- a/core/res/res/drawable-mdpi/stat_sys_battery_100.png
+++ b/core/res/res/drawable-mdpi/stat_sys_battery_100.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_battery_20.png b/core/res/res/drawable-mdpi/stat_sys_battery_20.png
index 009a9fd..8bc41f0 100644
--- a/core/res/res/drawable-mdpi/stat_sys_battery_20.png
+++ b/core/res/res/drawable-mdpi/stat_sys_battery_20.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_battery_40.png b/core/res/res/drawable-mdpi/stat_sys_battery_40.png
index 15b57f4..d827ce9 100644
--- a/core/res/res/drawable-mdpi/stat_sys_battery_40.png
+++ b/core/res/res/drawable-mdpi/stat_sys_battery_40.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_battery_60.png b/core/res/res/drawable-mdpi/stat_sys_battery_60.png
index 21078fd..53399dc 100644
--- a/core/res/res/drawable-mdpi/stat_sys_battery_60.png
+++ b/core/res/res/drawable-mdpi/stat_sys_battery_60.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_battery_80.png b/core/res/res/drawable-mdpi/stat_sys_battery_80.png
index 9268f7b..f38af5d 100644
--- a/core/res/res/drawable-mdpi/stat_sys_battery_80.png
+++ b/core/res/res/drawable-mdpi/stat_sys_battery_80.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim0.png b/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim0.png
index ff3cabd..9f3da11 100644
--- a/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim0.png
+++ b/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim1.png b/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim1.png
index b563701..8f8c81e 100644
--- a/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim1.png
+++ b/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim2.png b/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim2.png
index 904989e..12fd03f 100644
--- a/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim2.png
+++ b/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim2.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim3.png b/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim3.png
index ba011c9..641896c 100644
--- a/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim3.png
+++ b/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim3.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim4.png b/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim4.png
index 4f1c485..6bd19b5 100644
--- a/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim4.png
+++ b/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim4.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim5.png b/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim5.png
index 4d3396d..f9353c0 100644
--- a/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim5.png
+++ b/core/res/res/drawable-mdpi/stat_sys_battery_charge_anim5.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_battery_unknown.png b/core/res/res/drawable-mdpi/stat_sys_battery_unknown.png
index ed72ebf..506cb45 100644
--- a/core/res/res/drawable-mdpi/stat_sys_battery_unknown.png
+++ b/core/res/res/drawable-mdpi/stat_sys_battery_unknown.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_bluetooth.png b/core/res/res/drawable-mdpi/stat_sys_data_bluetooth.png
index 7a8b78f..85250d6 100644
--- a/core/res/res/drawable-mdpi/stat_sys_data_bluetooth.png
+++ b/core/res/res/drawable-mdpi/stat_sys_data_bluetooth.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_usb.png b/core/res/res/drawable-mdpi/stat_sys_data_usb.png
index 2d0da4c..cbf1da7 100644
--- a/core/res/res/drawable-mdpi/stat_sys_data_usb.png
+++ b/core/res/res/drawable-mdpi/stat_sys_data_usb.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_download_anim0.png b/core/res/res/drawable-mdpi/stat_sys_download_anim0.png
index 69b95cd..01b65e0 100755
--- a/core/res/res/drawable-mdpi/stat_sys_download_anim0.png
+++ b/core/res/res/drawable-mdpi/stat_sys_download_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_download_anim1.png b/core/res/res/drawable-mdpi/stat_sys_download_anim1.png
index 1e18eb5..2b0633f 100755
--- a/core/res/res/drawable-mdpi/stat_sys_download_anim1.png
+++ b/core/res/res/drawable-mdpi/stat_sys_download_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_download_anim2.png b/core/res/res/drawable-mdpi/stat_sys_download_anim2.png
index d7f2312..2295a6d 100755
--- a/core/res/res/drawable-mdpi/stat_sys_download_anim2.png
+++ b/core/res/res/drawable-mdpi/stat_sys_download_anim2.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_download_anim3.png b/core/res/res/drawable-mdpi/stat_sys_download_anim3.png
index 83f8d0f..99db712 100755
--- a/core/res/res/drawable-mdpi/stat_sys_download_anim3.png
+++ b/core/res/res/drawable-mdpi/stat_sys_download_anim3.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_download_anim4.png b/core/res/res/drawable-mdpi/stat_sys_download_anim4.png
index 9c1bd47..738dc87 100755
--- a/core/res/res/drawable-mdpi/stat_sys_download_anim4.png
+++ b/core/res/res/drawable-mdpi/stat_sys_download_anim4.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_download_anim5.png b/core/res/res/drawable-mdpi/stat_sys_download_anim5.png
index 3a81164..00ff542 100755
--- a/core/res/res/drawable-mdpi/stat_sys_download_anim5.png
+++ b/core/res/res/drawable-mdpi/stat_sys_download_anim5.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_gps_on.png b/core/res/res/drawable-mdpi/stat_sys_gps_on.png
index 70354b4..df737f29 100644
--- a/core/res/res/drawable-mdpi/stat_sys_gps_on.png
+++ b/core/res/res/drawable-mdpi/stat_sys_gps_on.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_phone_call.png b/core/res/res/drawable-mdpi/stat_sys_phone_call.png
index c44d062..0cfbd1b 100644
--- a/core/res/res/drawable-mdpi/stat_sys_phone_call.png
+++ b/core/res/res/drawable-mdpi/stat_sys_phone_call.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_phone_call_forward.png b/core/res/res/drawable-mdpi/stat_sys_phone_call_forward.png
index ed4b6ec..6dcf1ba 100755
--- a/core/res/res/drawable-mdpi/stat_sys_phone_call_forward.png
+++ b/core/res/res/drawable-mdpi/stat_sys_phone_call_forward.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_phone_call_on_hold.png b/core/res/res/drawable-mdpi/stat_sys_phone_call_on_hold.png
index 9216447..c4bfc2f 100644
--- a/core/res/res/drawable-mdpi/stat_sys_phone_call_on_hold.png
+++ b/core/res/res/drawable-mdpi/stat_sys_phone_call_on_hold.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_r_signal_0_cdma.png b/core/res/res/drawable-mdpi/stat_sys_r_signal_0_cdma.png
index f615681..f39f5ba 100644
--- a/core/res/res/drawable-mdpi/stat_sys_r_signal_0_cdma.png
+++ b/core/res/res/drawable-mdpi/stat_sys_r_signal_0_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_r_signal_1_cdma.png b/core/res/res/drawable-mdpi/stat_sys_r_signal_1_cdma.png
index c3962a2..86bb2de 100644
--- a/core/res/res/drawable-mdpi/stat_sys_r_signal_1_cdma.png
+++ b/core/res/res/drawable-mdpi/stat_sys_r_signal_1_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_r_signal_2_cdma.png b/core/res/res/drawable-mdpi/stat_sys_r_signal_2_cdma.png
index 68bfe94..b6eda07 100644
--- a/core/res/res/drawable-mdpi/stat_sys_r_signal_2_cdma.png
+++ b/core/res/res/drawable-mdpi/stat_sys_r_signal_2_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_r_signal_3_cdma.png b/core/res/res/drawable-mdpi/stat_sys_r_signal_3_cdma.png
index 4ccd416..b7ca7f9 100644
--- a/core/res/res/drawable-mdpi/stat_sys_r_signal_3_cdma.png
+++ b/core/res/res/drawable-mdpi/stat_sys_r_signal_3_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_r_signal_4_cdma.png b/core/res/res/drawable-mdpi/stat_sys_r_signal_4_cdma.png
index 0b25570..61a9575 100644
--- a/core/res/res/drawable-mdpi/stat_sys_r_signal_4_cdma.png
+++ b/core/res/res/drawable-mdpi/stat_sys_r_signal_4_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_ra_signal_0_cdma.png b/core/res/res/drawable-mdpi/stat_sys_ra_signal_0_cdma.png
index 9a38733..feb4f2c 100644
--- a/core/res/res/drawable-mdpi/stat_sys_ra_signal_0_cdma.png
+++ b/core/res/res/drawable-mdpi/stat_sys_ra_signal_0_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_ra_signal_1_cdma.png b/core/res/res/drawable-mdpi/stat_sys_ra_signal_1_cdma.png
index c70e283..a42ff0c 100644
--- a/core/res/res/drawable-mdpi/stat_sys_ra_signal_1_cdma.png
+++ b/core/res/res/drawable-mdpi/stat_sys_ra_signal_1_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_ra_signal_2_cdma.png b/core/res/res/drawable-mdpi/stat_sys_ra_signal_2_cdma.png
index a09564c..e991c76 100644
--- a/core/res/res/drawable-mdpi/stat_sys_ra_signal_2_cdma.png
+++ b/core/res/res/drawable-mdpi/stat_sys_ra_signal_2_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_ra_signal_3_cdma.png b/core/res/res/drawable-mdpi/stat_sys_ra_signal_3_cdma.png
index 2637dec..4b743fb 100644
--- a/core/res/res/drawable-mdpi/stat_sys_ra_signal_3_cdma.png
+++ b/core/res/res/drawable-mdpi/stat_sys_ra_signal_3_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_ra_signal_4_cdma.png b/core/res/res/drawable-mdpi/stat_sys_ra_signal_4_cdma.png
index aba13e7..65172b7 100644
--- a/core/res/res/drawable-mdpi/stat_sys_ra_signal_4_cdma.png
+++ b/core/res/res/drawable-mdpi/stat_sys_ra_signal_4_cdma.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_secure.png b/core/res/res/drawable-mdpi/stat_sys_secure.png
index 5f9ae69..a632fb2 100644
--- a/core/res/res/drawable-mdpi/stat_sys_secure.png
+++ b/core/res/res/drawable-mdpi/stat_sys_secure.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_0_cdma.png b/core/res/res/drawable-mdpi/stat_sys_signal_0_cdma.png
new file mode 100644
index 0000000..03c51ce
--- /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..dced6df
--- /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..9eac4c6
--- /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..74d983c
--- /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..8cc40b5
--- /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..177e0e9
--- /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..5f66319
--- /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..c365912
--- /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..58d631b
--- /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..e63af68
--- /dev/null
+++ b/core/res/res/drawable-mdpi/stat_sys_signal_evdo_4.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_speakerphone.png b/core/res/res/drawable-mdpi/stat_sys_speakerphone.png
index 642dfd4..d0411cf 100644
--- a/core/res/res/drawable-mdpi/stat_sys_speakerphone.png
+++ b/core/res/res/drawable-mdpi/stat_sys_speakerphone.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_tether_bluetooth.png b/core/res/res/drawable-mdpi/stat_sys_tether_bluetooth.png
index efb64ad..2db135d 100644
--- a/core/res/res/drawable-mdpi/stat_sys_tether_bluetooth.png
+++ b/core/res/res/drawable-mdpi/stat_sys_tether_bluetooth.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_tether_general.png b/core/res/res/drawable-mdpi/stat_sys_tether_general.png
index 3688803..11e638f 100644
--- a/core/res/res/drawable-mdpi/stat_sys_tether_general.png
+++ b/core/res/res/drawable-mdpi/stat_sys_tether_general.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_tether_usb.png b/core/res/res/drawable-mdpi/stat_sys_tether_usb.png
index 73f1a81..8971f93 100644
--- a/core/res/res/drawable-mdpi/stat_sys_tether_usb.png
+++ b/core/res/res/drawable-mdpi/stat_sys_tether_usb.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_tether_wifi.png b/core/res/res/drawable-mdpi/stat_sys_tether_wifi.png
index d448491..32b9431 100644
--- a/core/res/res/drawable-mdpi/stat_sys_tether_wifi.png
+++ b/core/res/res/drawable-mdpi/stat_sys_tether_wifi.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_throttled.png b/core/res/res/drawable-mdpi/stat_sys_throttled.png
index 97ac427..bc9b223 100644
--- a/core/res/res/drawable-mdpi/stat_sys_throttled.png
+++ b/core/res/res/drawable-mdpi/stat_sys_throttled.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_upload_anim0.png b/core/res/res/drawable-mdpi/stat_sys_upload_anim0.png
index b7a5978..f6fcc7a 100755
--- a/core/res/res/drawable-mdpi/stat_sys_upload_anim0.png
+++ b/core/res/res/drawable-mdpi/stat_sys_upload_anim0.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_upload_anim1.png b/core/res/res/drawable-mdpi/stat_sys_upload_anim1.png
index a203e15..5d05381 100755
--- a/core/res/res/drawable-mdpi/stat_sys_upload_anim1.png
+++ b/core/res/res/drawable-mdpi/stat_sys_upload_anim1.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_upload_anim2.png b/core/res/res/drawable-mdpi/stat_sys_upload_anim2.png
index 4af7630..a8699bc 100755
--- a/core/res/res/drawable-mdpi/stat_sys_upload_anim2.png
+++ b/core/res/res/drawable-mdpi/stat_sys_upload_anim2.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_upload_anim3.png b/core/res/res/drawable-mdpi/stat_sys_upload_anim3.png
index 1dd76b1..f5ad44a 100755
--- a/core/res/res/drawable-mdpi/stat_sys_upload_anim3.png
+++ b/core/res/res/drawable-mdpi/stat_sys_upload_anim3.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_upload_anim4.png b/core/res/res/drawable-mdpi/stat_sys_upload_anim4.png
index 36c18bf..b5884f6 100755
--- a/core/res/res/drawable-mdpi/stat_sys_upload_anim4.png
+++ b/core/res/res/drawable-mdpi/stat_sys_upload_anim4.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_upload_anim5.png b/core/res/res/drawable-mdpi/stat_sys_upload_anim5.png
index 748331f..ae6b8a9 100755
--- a/core/res/res/drawable-mdpi/stat_sys_upload_anim5.png
+++ b/core/res/res/drawable-mdpi/stat_sys_upload_anim5.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_vp_phone_call.png b/core/res/res/drawable-mdpi/stat_sys_vp_phone_call.png
index aa03b4f5..f42c7e4 100644
--- a/core/res/res/drawable-mdpi/stat_sys_vp_phone_call.png
+++ b/core/res/res/drawable-mdpi/stat_sys_vp_phone_call.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_vp_phone_call_on_hold.png b/core/res/res/drawable-mdpi/stat_sys_vp_phone_call_on_hold.png
index 5f45440..795f079 100644
--- a/core/res/res/drawable-mdpi/stat_sys_vp_phone_call_on_hold.png
+++ b/core/res/res/drawable-mdpi/stat_sys_vp_phone_call_on_hold.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_warning.png b/core/res/res/drawable-mdpi/stat_sys_warning.png
index be00f47..c0823da 100644
--- a/core/res/res/drawable-mdpi/stat_sys_warning.png
+++ b/core/res/res/drawable-mdpi/stat_sys_warning.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/status_bar_header_background.9.png b/core/res/res/drawable-mdpi/status_bar_header_background.9.png
index fa9a90c..3787ad3 100644
--- a/core/res/res/drawable-mdpi/status_bar_header_background.9.png
+++ b/core/res/res/drawable-mdpi/status_bar_header_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/status_bar_item_app_background_normal.9.png b/core/res/res/drawable-mdpi/status_bar_item_app_background_normal.9.png
index bdcb378..873c556 100644
--- a/core/res/res/drawable-mdpi/status_bar_item_app_background_normal.9.png
+++ b/core/res/res/drawable-mdpi/status_bar_item_app_background_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/status_bar_item_background_focus.9.png b/core/res/res/drawable-mdpi/status_bar_item_background_focus.9.png
index c3e24158..cec060e 100644
--- a/core/res/res/drawable-mdpi/status_bar_item_background_focus.9.png
+++ b/core/res/res/drawable-mdpi/status_bar_item_background_focus.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/status_bar_item_background_normal.9.png b/core/res/res/drawable-mdpi/status_bar_item_background_normal.9.png
index f0e4d06..38a96e3 100644
--- a/core/res/res/drawable-mdpi/status_bar_item_background_normal.9.png
+++ b/core/res/res/drawable-mdpi/status_bar_item_background_normal.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/status_bar_item_background_pressed.9.png b/core/res/res/drawable-mdpi/status_bar_item_background_pressed.9.png
index 02b4e9a..ae1263d 100644
--- a/core/res/res/drawable-mdpi/status_bar_item_background_pressed.9.png
+++ b/core/res/res/drawable-mdpi/status_bar_item_background_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/tab_focus.9.png b/core/res/res/drawable-mdpi/tab_focus.9.png
index d9bcc57a..4ca207b 100755
--- a/core/res/res/drawable-mdpi/tab_focus.9.png
+++ b/core/res/res/drawable-mdpi/tab_focus.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/tab_focus_bar_left.9.png b/core/res/res/drawable-mdpi/tab_focus_bar_left.9.png
index 2536d94..7150301 100755
--- a/core/res/res/drawable-mdpi/tab_focus_bar_left.9.png
+++ b/core/res/res/drawable-mdpi/tab_focus_bar_left.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/tab_focus_bar_right.9.png b/core/res/res/drawable-mdpi/tab_focus_bar_right.9.png
index 2536d94..7150301 100755
--- a/core/res/res/drawable-mdpi/tab_focus_bar_right.9.png
+++ b/core/res/res/drawable-mdpi/tab_focus_bar_right.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/tab_press.9.png b/core/res/res/drawable-mdpi/tab_press.9.png
index 3332660..18ff645 100755
--- a/core/res/res/drawable-mdpi/tab_press.9.png
+++ b/core/res/res/drawable-mdpi/tab_press.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/tab_press_bar_left.9.png b/core/res/res/drawable-mdpi/tab_press_bar_left.9.png
index d2c75e3..735e46b 100755
--- a/core/res/res/drawable-mdpi/tab_press_bar_left.9.png
+++ b/core/res/res/drawable-mdpi/tab_press_bar_left.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/tab_press_bar_right.9.png b/core/res/res/drawable-mdpi/tab_press_bar_right.9.png
index d2c75e3..735e46b 100755
--- a/core/res/res/drawable-mdpi/tab_press_bar_right.9.png
+++ b/core/res/res/drawable-mdpi/tab_press_bar_right.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/tab_selected.9.png b/core/res/res/drawable-mdpi/tab_selected.9.png
index 54190ea..848e891 100644
--- a/core/res/res/drawable-mdpi/tab_selected.9.png
+++ b/core/res/res/drawable-mdpi/tab_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/tab_selected_bar_left.9.png b/core/res/res/drawable-mdpi/tab_selected_bar_left.9.png
index d20f3a2..e807cf7 100755
--- a/core/res/res/drawable-mdpi/tab_selected_bar_left.9.png
+++ b/core/res/res/drawable-mdpi/tab_selected_bar_left.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/tab_selected_bar_right.9.png b/core/res/res/drawable-mdpi/tab_selected_bar_right.9.png
index d20f3a2..e807cf7 100755
--- a/core/res/res/drawable-mdpi/tab_selected_bar_right.9.png
+++ b/core/res/res/drawable-mdpi/tab_selected_bar_right.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/tab_unselected.9.png b/core/res/res/drawable-mdpi/tab_unselected.9.png
index 1b8a69c9..6e1c6e70 100644
--- a/core/res/res/drawable-mdpi/tab_unselected.9.png
+++ b/core/res/res/drawable-mdpi/tab_unselected.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/text_select_handle_left.png b/core/res/res/drawable-mdpi/text_select_handle_left.png
index 40e6ac0..81e6c20 100644
--- a/core/res/res/drawable-mdpi/text_select_handle_left.png
+++ b/core/res/res/drawable-mdpi/text_select_handle_left.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/text_select_handle_right.png b/core/res/res/drawable-mdpi/text_select_handle_right.png
index 9d2d08a..e112560 100644
--- a/core/res/res/drawable-mdpi/text_select_handle_right.png
+++ b/core/res/res/drawable-mdpi/text_select_handle_right.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_default.9.png b/core/res/res/drawable-mdpi/textfield_default.9.png
index cc78e6c..1a59bb2 100644
--- a/core/res/res/drawable-mdpi/textfield_default.9.png
+++ b/core/res/res/drawable-mdpi/textfield_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_disabled.9.png b/core/res/res/drawable-mdpi/textfield_disabled.9.png
index 9c77149..800205a 100644
--- a/core/res/res/drawable-mdpi/textfield_disabled.9.png
+++ b/core/res/res/drawable-mdpi/textfield_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_disabled_selected.9.png b/core/res/res/drawable-mdpi/textfield_disabled_selected.9.png
index 6d47708..59e1536 100644
--- a/core/res/res/drawable-mdpi/textfield_disabled_selected.9.png
+++ b/core/res/res/drawable-mdpi/textfield_disabled_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_pressed.9.png b/core/res/res/drawable-mdpi/textfield_pressed.9.png
index c909ad2..9524fec 100644
--- a/core/res/res/drawable-mdpi/textfield_pressed.9.png
+++ b/core/res/res/drawable-mdpi/textfield_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_selected.9.png b/core/res/res/drawable-mdpi/textfield_selected.9.png
index 0c1b446..faadace 100644
--- a/core/res/res/drawable-mdpi/textfield_selected.9.png
+++ b/core/res/res/drawable-mdpi/textfield_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/title_bar_shadow.9.png b/core/res/res/drawable-mdpi/title_bar_shadow.9.png
index dbcefee..f2988a3 100644
--- a/core/res/res/drawable-mdpi/title_bar_shadow.9.png
+++ b/core/res/res/drawable-mdpi/title_bar_shadow.9.png
Binary files differ
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index 9d20dff..5b1d127 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -864,7 +864,7 @@
     <string name="accessibility_compound_button_selected" msgid="5612776946036285686">"отмечено"</string>
     <string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"не проверено"</string>
     <string name="grant_credentials_permission_message_header" msgid="6824538733852821001">"Одна или несколько программ требуют разрешения для доступа к вашему аккаунту сейчас и в дальнейшем."</string>
-    <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"Разрешить этот запрос?"</string>
+    <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"Разрешить доступ?"</string>
     <string name="grant_permissions_header_text" msgid="2722567482180797717">"Запрос доступа"</string>
     <string name="allow" msgid="7225948811296386551">"Разрешить"</string>
     <string name="deny" msgid="2081879885755434506">"Отклонить"</string>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index f2ea744..976055d 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -549,7 +549,7 @@
     <string name="lockscreen_instructions_when_pattern_disabled" msgid="686260028797158364">"Tryck på Menu om du vill låsa upp."</string>
     <string name="lockscreen_pattern_instructions" msgid="7478703254964810302">"Rita grafiskt lösenord för att låsa upp"</string>
     <string name="lockscreen_emergency_call" msgid="5347633784401285225">"Nödsamtal"</string>
-    <string name="lockscreen_return_to_call" msgid="5244259785500040021">"Återgå till samtalet"</string>
+    <string name="lockscreen_return_to_call" msgid="5244259785500040021">"Tillbaka till samtal"</string>
     <string name="lockscreen_pattern_correct" msgid="9039008650362261237">"Korrekt!"</string>
     <string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Försök igen"</string>
     <string name="lockscreen_plugged_in" msgid="613343852842944435">"Laddar (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index f8d2b4b..2810fdd 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -599,7 +599,7 @@
     <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"寫入瀏覽器的記錄與書籤"</string>
     <string name="permdesc_writeHistoryBookmarks" msgid="945571990357114950">"允許應用程式修改儲存在電話上的瀏覽記錄或書籤。請注意:惡意應用程式可能會使用此選項來清除或修改您瀏覽器的資料。"</string>
     <string name="permlab_setAlarm" msgid="5924401328803615165">"在鬧鐘應用程式中設定鬧鈴"</string>
-    <string name="permdesc_setAlarm" msgid="5966966598149875082">"允許應用程式設定您所安裝的鬧鐘應用程式執行鬧鈴功能 (有些鬧鐘應用程式並不支援此功能)。"</string>
+    <string name="permdesc_setAlarm" msgid="5966966598149875082">"允許應用程式在安裝的鬧鐘應用程式中設定鬧鐘,某些鬧鐘應用程式可能無法執行這項功能。"</string>
     <string name="permlab_writeGeolocationPermissions" msgid="4715212655598275532">"修改瀏覽器地理資訊的權限"</string>
     <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"允許應用程式修改瀏覽器的地理位置權限,惡意應用程式可能會透過此方式允許將您的位置資訊任意傳送給某些網站。"</string>
     <string name="save_password_message" msgid="767344687139195790">"是否記住此密碼?"</string>
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index 46a16fc..f31dfec 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -90,10 +90,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
@@ -1429,7 +1428,8 @@
          <code>screen</code> tag, a child of <code>compatible-screens</code>,
          which is itseld a child of the root
          {@link #AndroidManifest manifest} tag. -->
-    <declare-styleable name="AndroidManifestCompatibleScreensScreen">
+    <declare-styleable name="AndroidManifestCompatibleScreensScreen"
+                       parent="AndroidManifest.AndroidManifestCompatibleScreens">
         <!-- Specifies a compatible screen size, as per the device
              configuration screen size bins. -->
         <attr name="screenSize">
diff --git a/core/tests/ConnectivityManagerTest/AndroidManifest.xml b/core/tests/ConnectivityManagerTest/AndroidManifest.xml
index d298d40..b116bea 100644
--- a/core/tests/ConnectivityManagerTest/AndroidManifest.xml
+++ b/core/tests/ConnectivityManagerTest/AndroidManifest.xml
@@ -53,6 +53,15 @@
         android.label="Test runner for unit tests"
     />
 
+    <!-- run stress test suite:
+      "adb shell am instrument -e stressnum <200> -w
+      com.android.connectivitymanagertest/.ConnectivityManagerStressTestRunner"
+    -->
+    <instrumentation android:name=".ConnectivityManagerStressTestRunner"
+        android:targetPackage="com.android.connectivitymanagertest"
+        android:label="Test runner for Connectivity Manager Stress Tests"
+    />
+
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
diff --git a/core/tests/ConnectivityManagerTest/assets/accesspoints.xml b/core/tests/ConnectivityManagerTest/assets/accesspoints.xml
new file mode 100755
index 0000000..b6bc0de
--- /dev/null
+++ b/core/tests/ConnectivityManagerTest/assets/accesspoints.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+  <accesspoint>
+    <ssid>opennet</ssid>
+    <security>NONE</security>
+  </accesspoint>
+    <accesspoint>
+    <ssid>GoogleGuest</ssid>
+    <security>NONE</security>
+  </accesspoint>
+  <accesspoint>
+    <ssid>securenetdhcp</ssid>
+    <security>PSK</security>
+    <password>androidwifi</password>
+  </accesspoint>
+  <accesspoint>
+    <ssid>securenetstatic</ssid>
+    <security>PSK</security>
+    <password>androidwifi</password>
+    <ip>192.168.14.2</ip>
+    <gateway>192.168.14.1</gateway>
+    <netmask>255.255.255.0</netmask>
+    <dns1>192.168.14.1</dns1>
+    <dns2>192.168.1.9</dns2>
+  </accesspoint>
+  <accesspoint>
+    <ssid>botnet</ssid>
+    <security>EAP</security>
+    <eap>PEAP</eap>
+    <phase2>MSCHAPV2</phase2>
+    <identity>donut</identity>
+    <password>android</password>
+  </accesspoint>
+</resources>
+
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/AccessPointParserHelper.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/AccessPointParserHelper.java
new file mode 100644
index 0000000..37c854a
--- /dev/null
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/AccessPointParserHelper.java
@@ -0,0 +1,344 @@
+/*
+ * Copyright (C) 2010, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.connectivitymanagertest;
+
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+import android.net.wifi.WifiConfiguration;
+import android.net.wifi.WifiConfiguration.AuthAlgorithm;
+import android.net.wifi.WifiConfiguration.KeyMgmt;
+import android.net.DhcpInfo;
+
+import java.io.InputStream;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+
+/**
+ * Help class to process configurations of access points saved in an XML file.
+ * The configurations of an access point is included in tag
+ * <accesspoint></accesspoint>. The supported configuration includes: ssid,
+ * security, eap, phase2, identity, password, anonymousidentity, cacert, usercert,
+ * in which each is included in the corresponding tags. Static IP setting is also supported.
+ * Tags that can be used include: ip, gateway, netmask, dns1, dns2. All access points have to be
+ * enclosed in tags of <resources></resources>.
+ *
+ * The following is a sample configuration file for an access point using EAP-PEAP with MSCHAP2.
+ * <resources>
+ *   <accesspoint>
+ *   <ssid>testnet</ssid>
+ *   <security>EAP</security>
+ *   <eap>PEAP</eap>
+ *   <phase2>MSCHAP2</phase2>
+ *   <identity>donut</identity</identity>
+ *   <password>abcdefgh</password>
+ *   </accesspoint>
+ * </resources>
+ */
+public class AccessPointParserHelper {
+    private static final String KEYSTORE_SPACE = "keystore://";
+    private static final String TAG = "AccessPointParserHelper";
+    static final int NONE = 0;
+    static final int WEP = 1;
+    static final int PSK = 2;
+    static final int EAP = 3;
+
+    List<WifiConfiguration> networks = new ArrayList<WifiConfiguration>();
+    HashMap<String, DhcpInfo> ssidToDhcpInfoHM = new HashMap<String, DhcpInfo>();
+
+    private int getSecurityType (String security) {
+        if (security.equalsIgnoreCase("NONE")) {
+            return NONE;
+        } else if (security.equalsIgnoreCase("WEP")) {
+            return WEP;
+        } else if (security.equalsIgnoreCase("PSK")) {
+            return PSK;
+        } else if (security.equalsIgnoreCase("EAP")) {
+            return EAP;
+        } else {
+            return -1;
+        }
+    }
+
+    private boolean validateEapValue(String value) {
+        if (value.equalsIgnoreCase("PEAP") ||
+                value.equalsIgnoreCase("TLS") ||
+                value.equalsIgnoreCase("TTLS")) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private static int stringToIpAddr(String addrString) throws UnknownHostException {
+        try {
+            String[] parts = addrString.split("\\.");
+            if (parts.length != 4) {
+                throw new UnknownHostException(addrString);
+            }
+
+            int a = Integer.parseInt(parts[0])      ;
+            int b = Integer.parseInt(parts[1]) <<  8;
+            int c = Integer.parseInt(parts[2]) << 16;
+            int d = Integer.parseInt(parts[3]) << 24;
+
+            return a | b | c | d;
+        } catch (NumberFormatException ex) {
+            throw new UnknownHostException(addrString);
+        }
+    }
+
+    DefaultHandler mHandler = new DefaultHandler() {
+
+        boolean ssid = false;
+        boolean security = false;
+        boolean password = false;
+        boolean ip = false;
+        boolean netmask = false;
+        boolean gateway = false;
+        boolean dns1 = false;
+        boolean dns2 = false;
+        boolean eap = false;
+        boolean phase2 = false;
+        boolean identity = false;
+        boolean anonymousidentity = false;
+        boolean cacert = false;
+        boolean usercert = false;
+        WifiConfiguration config = null;
+        int securityType = NONE;
+        DhcpInfo mDhcpInfo = null;
+
+        @Override
+        public void startElement(String uri, String localName, String tagName,
+                Attributes attributes) throws SAXException {
+            if (tagName.equalsIgnoreCase("accesspoint")) {
+                config = new WifiConfiguration();
+            }
+            if (tagName.equalsIgnoreCase("ssid")) {
+                ssid = true;
+            }
+            if (tagName.equalsIgnoreCase("security")) {
+                security = true;
+            }
+            if (tagName.equalsIgnoreCase("password")) {
+                password = true;
+            }
+            if (tagName.equalsIgnoreCase("eap")) {
+                eap = true;
+            }
+            if (tagName.equalsIgnoreCase("phase2")) {
+                phase2 = true;
+            }
+            if (tagName.equalsIgnoreCase("identity")) {
+                identity = true;
+            }
+            if (tagName.equalsIgnoreCase("anonymousidentity")) {
+                anonymousidentity = true;
+            }
+            if (tagName.equalsIgnoreCase("cacert")) {
+                cacert = true;
+            }
+            if (tagName.equalsIgnoreCase("usercert")) {
+                usercert = true;
+            }
+            if (tagName.equalsIgnoreCase("ip")) {
+                ip = true;
+                mDhcpInfo = new DhcpInfo();
+            }
+            if (tagName.equalsIgnoreCase("gateway")) {
+                gateway = true;
+            }
+            if (tagName.equalsIgnoreCase("netmask")) {
+                netmask = true;
+            }
+            if (tagName.equalsIgnoreCase("dns1")) {
+                dns1 = true;
+            }
+            if (tagName.equalsIgnoreCase("dns2")) {
+                dns2 = true;
+            }
+        }
+
+        @Override
+        public void endElement(String uri, String localName, String tagName) throws SAXException {
+            if (tagName.equalsIgnoreCase("accesspoint")) {
+                networks.add(config);
+                if (mDhcpInfo != null) {
+                    ssidToDhcpInfoHM.put(config.SSID, mDhcpInfo);
+                }
+            }
+        }
+
+        @Override
+        public void characters(char ch[], int start, int length) throws SAXException {
+            if (ssid) {
+                config.SSID = new String(ch, start, length);
+                ssid = false;
+            }
+            if (security) {
+                String securityStr = (new String(ch, start, length)).toUpperCase();
+                securityType = getSecurityType(securityStr);
+                switch (securityType) {
+                    case NONE:
+                        config.allowedKeyManagement.set(KeyMgmt.NONE);
+                        break;
+                    case WEP:
+                        config.allowedKeyManagement.set(KeyMgmt.NONE);
+                        config.allowedAuthAlgorithms.set(AuthAlgorithm.OPEN);
+                        config.allowedAuthAlgorithms.set(AuthAlgorithm.SHARED);
+                        break;
+                    case PSK:
+                        config.allowedKeyManagement.set(KeyMgmt.WPA_PSK);
+                        break;
+                    case EAP:
+                        config.allowedKeyManagement.set(KeyMgmt.WPA_EAP);
+                        config.allowedKeyManagement.set(KeyMgmt.IEEE8021X);
+                        break;
+                    default:
+                        throw new SAXException();
+                }
+                security = false;
+            }
+            if (password) {
+                String passwordStr = new String(ch, start, length);
+                int len = passwordStr.length();
+                if (len == 0) {
+                    throw new SAXException();
+                }
+                if (securityType == WEP) {
+                    if ((len == 10 || len == 26 || len == 58) &&
+                            passwordStr.matches("[0-9A-Fa-f]*")) {
+                        config.wepKeys[0] = passwordStr;
+                    } else {
+                        config.wepKeys[0] = '"' + passwordStr + '"';
+                    }
+                } else if (securityType == PSK) {
+                    if (passwordStr.matches("[0-9A-Fa-f]{64}")) {
+                        config.preSharedKey = passwordStr;
+                    } else {
+                        config.preSharedKey = '"' + passwordStr + '"';
+                    }
+                } else if (securityType == EAP) {
+                    config.password.setValue(passwordStr);
+                } else {
+                    throw new SAXException();
+                }
+                password = false;
+            }
+            if (eap) {
+                String eapValue = new String(ch, start, length);
+                if (!validateEapValue(eapValue)) {
+                    throw new SAXException();
+                }
+                config.eap.setValue(eapValue);
+                eap = false;
+            }
+            if (phase2) {
+                String phase2Value = new String(ch, start, length);
+                config.phase2.setValue("auth=" + phase2Value);
+                phase2 = false;
+            }
+            if (identity) {
+                String identityValue = new String(ch, start, length);
+                config.identity.setValue(identityValue);
+                identity = false;
+            }
+            if (anonymousidentity) {
+                String anonyId = new String(ch, start, length);
+                config.anonymous_identity.setValue(anonyId);
+                anonymousidentity = false;
+            }
+            if (cacert) {
+                String cacertValue = new String(ch, start, length);
+                // need to install the credentail to "keystore://"
+                config.ca_cert.setValue(KEYSTORE_SPACE);
+                cacert = false;
+            }
+            if (usercert) {
+                String usercertValue = new String(ch, start, length);
+                config.client_cert.setValue(KEYSTORE_SPACE);
+                usercert = false;
+            }
+            if (ip) {
+                try {
+                    mDhcpInfo.ipAddress = stringToIpAddr(new String(ch, start, length));
+                } catch (UnknownHostException e) {
+                    throw new SAXException();
+                }
+                ip = false;
+            }
+            if (gateway) {
+                try {
+                    mDhcpInfo.gateway = stringToIpAddr(new String(ch, start, length));
+                } catch (UnknownHostException e) {
+                    throw new SAXException();
+                }
+                gateway = false;
+            }
+            if (netmask) {
+                try {
+                    mDhcpInfo.netmask = stringToIpAddr(new String(ch, start, length));
+                } catch (UnknownHostException e) {
+                    throw new SAXException();
+                }
+                netmask = false;
+            }
+            if (dns1) {
+                try {
+                    mDhcpInfo.dns1 = stringToIpAddr(new String(ch, start, length));
+                } catch (UnknownHostException e) {
+                    throw new SAXException();
+                }
+                dns1 = false;
+            }
+            if (dns2) {
+                try {
+                    mDhcpInfo.dns2 = stringToIpAddr(new String(ch, start, length));
+                } catch (UnknownHostException e) {
+                    throw new SAXException();
+                }
+                dns2 = false;
+            }
+        }
+    };
+
+    /**
+     * Process the InputStream in
+     * @param in is the InputStream that can be used for XML parsing
+     * @throws Exception
+     */
+    public AccessPointParserHelper(InputStream in) throws Exception {
+        SAXParserFactory factory = SAXParserFactory.newInstance();
+        SAXParser saxParser = factory.newSAXParser();
+        saxParser.parse(in, mHandler);
+    }
+
+    public List<WifiConfiguration> getNetworkConfigurations() throws Exception {
+        return networks;
+    }
+
+    public HashMap<String, DhcpInfo> getSsidToDhcpInfoHashMap() {
+        return ssidToDhcpInfoHM;
+    }
+}
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerStressTestRunner.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerStressTestRunner.java
new file mode 100644
index 0000000..47f208a
--- /dev/null
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerStressTestRunner.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2010, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.connectivitymanagertest;
+
+import android.os.Bundle;
+import android.test.InstrumentationTestRunner;
+import android.test.InstrumentationTestSuite;
+import android.util.Log;
+import com.android.connectivitymanagertest.stress.WifiApStress;
+
+import junit.framework.TestSuite;
+
+/**
+ * Instrumentation Test Runner for all stress tests
+ *
+ * To run the stress tests:
+ *
+ * adb shell am instrument -e stressnum <stress times> \
+ *     -w com.android.connectivitymanagertest/.ConnectivityManagerStressTestRunner
+ */
+
+public class ConnectivityManagerStressTestRunner extends InstrumentationTestRunner {
+    @Override
+    public TestSuite getAllTests() {
+        TestSuite suite = new InstrumentationTestSuite(this);
+        suite.addTestSuite(WifiApStress.class);
+        return suite;
+    }
+
+    @Override
+    public ClassLoader getLoader() {
+        return ConnectivityManagerTestRunner.class.getClassLoader();
+    }
+
+    @Override
+    public void onCreate(Bundle icicle) {
+        super.onCreate(icicle);
+        String stressValue = (String) icicle.get("stressnum");
+        if (stressValue != null) {
+            int iteration = Integer.parseInt(stressValue);
+            if (iteration > 0) {
+                numStress = iteration;
+            }
+        }
+    }
+
+    public int numStress = 100;
+}
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java
index e42b657..3d62c61 100644
--- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java
@@ -16,8 +16,10 @@
 
 package com.android.connectivitymanagertest;
 
+import com.android.connectivitymanagertest.R;
 import android.app.Activity;
 import android.content.Context;
+import android.content.res.Resources;
 import android.content.BroadcastReceiver;
 import android.content.Intent;
 import android.content.IntentFilter;
@@ -25,19 +27,24 @@
 import android.provider.Settings;
 import android.util.Log;
 import android.view.KeyEvent;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 import android.widget.LinearLayout;
 import android.net.ConnectivityManager;
+import android.net.DhcpInfo;
 import android.net.NetworkInfo;
 import android.net.NetworkInfo.State;
 
+import android.net.wifi.SupplicantState;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiManager;
 import android.net.wifi.WifiInfo;
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiConfiguration.KeyMgmt;
 
-
 /**
  * An activity registered with connectivity manager broadcast
  * provides network connectivity information and
@@ -46,10 +53,17 @@
 public class ConnectivityManagerTestActivity extends Activity {
 
     public static final String LOG_TAG = "ConnectivityManagerTestActivity";
-    public static final int WAIT_FOR_SCAN_RESULT = 5 * 1000; //5 seconds
+    public static final int WAIT_FOR_SCAN_RESULT = 10 * 1000; //10 seconds
     public static final int WIFI_SCAN_TIMEOUT = 20 * 1000;
+    public static final int SHORT_TIMEOUT = 5 * 1000;
+    public static final long LONG_TIMEOUT = 50 * 1000;
+    public static final int SUCCESS = 0;  // for Wifi tethering state change
+    public static final int FAILURE = 1;
+    public static final int INIT = -1;
+    private static final String ACCESS_POINT_FILE = "accesspoints.xml";
     public ConnectivityReceiver mConnectivityReceiver = null;
     public WifiReceiver mWifiReceiver = null;
+    private AccessPointParserHelper mParseHelper = null;
     /*
      * Track network connectivity information
      */
@@ -79,6 +93,10 @@
     public static final int NUM_NETWORK_TYPES = ConnectivityManager.MAX_NETWORK_TYPE + 1;
     NetworkState[] connectivityState = new NetworkState[NUM_NETWORK_TYPES];
 
+    // For wifi tethering tests
+    private String[] mWifiRegexs;
+    public int mWifiTetherResult = INIT;    // -1 is initialization state
+
     /**
      * A wrapper of a broadcast receiver which provides network connectivity information
      * for all kinds of network: wifi, mobile, etc.
@@ -141,7 +159,18 @@
             } else if (action.equals(WifiManager.WIFI_STATE_CHANGED_ACTION)) {
                 mWifiState = intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE,
                                                 WifiManager.WIFI_STATE_UNKNOWN);
+                Log.v(LOG_TAG, "mWifiState: " + mWifiState);
                 notifyWifiState();
+            } else if (action.equals(WifiManager.WIFI_AP_STATE_CHANGED_ACTION)) {
+                notifyWifiAPState();
+            } else if (action.equals(ConnectivityManager.ACTION_TETHER_STATE_CHANGED)) {
+                ArrayList<String> available = intent.getStringArrayListExtra(
+                        ConnectivityManager.EXTRA_AVAILABLE_TETHER);
+                ArrayList<String> active = intent.getStringArrayListExtra(
+                        ConnectivityManager.EXTRA_ACTIVE_TETHER);
+                ArrayList<String> errored = intent.getStringArrayListExtra(
+                        ConnectivityManager.EXTRA_ERRORED_TETHER);
+                updateTetherState(available.toArray(), active.toArray(), errored.toArray());
             }
             else {
                 return;
@@ -175,6 +204,9 @@
         mIntentFilter.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION);
         mIntentFilter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION);
         mIntentFilter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION);
+        mIntentFilter.addAction(WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION);
+        mIntentFilter.addAction(WifiManager.WIFI_AP_STATE_CHANGED_ACTION);
+        mIntentFilter.addAction(ConnectivityManager.ACTION_TETHER_STATE_CHANGED);
         registerReceiver(mWifiReceiver, mIntentFilter);
 
         // Get an instance of ConnectivityManager
@@ -185,10 +217,36 @@
 
         if (mWifiManager.isWifiEnabled()) {
             Log.v(LOG_TAG, "Clear Wifi before we start the test.");
-            clearWifi();
+            removeConfiguredNetworksAndDisableWifi();
         }
+        mWifiRegexs = mCM.getTetherableWifiRegexs();
      }
 
+    public List<WifiConfiguration> loadNetworkConfigurations() throws Exception {
+        InputStream in = getAssets().open(ACCESS_POINT_FILE);
+        mParseHelper = new AccessPointParserHelper(in);
+        return mParseHelper.getNetworkConfigurations();
+    }
+
+    public HashMap<String, DhcpInfo> getDhcpInfo() throws Exception{
+        if (mParseHelper == null) {
+            InputStream in = getAssets().open(ACCESS_POINT_FILE);
+            mParseHelper = new AccessPointParserHelper(in);
+        }
+        return mParseHelper.getSsidToDhcpInfoHashMap();
+    }
+
+
+    private void printNetConfig(String[] configuration) {
+        for (int i = 0; i < configuration.length; i++) {
+            if (i == 0) {
+                Log.v(LOG_TAG, "SSID: " + configuration[0]);
+            } else {
+                Log.v(LOG_TAG, "      " + configuration[i]);
+            }
+        }
+    }
+
     // for each network type, initialize network states to UNKNOWN, and no verification flag is set
     public void initializeNetworkStates() {
         for (int networkType = NUM_NETWORK_TYPES - 1; networkType >=0; networkType--) {
@@ -238,13 +296,175 @@
         }
     }
 
-    public void notifyWifiState() {
+    private void notifyWifiState() {
         synchronized (wifiObject) {
             Log.v(LOG_TAG, "notify wifi state changed");
             wifiObject.notify();
         }
     }
 
+    private void notifyWifiAPState() {
+        synchronized (this) {
+            Log.v(LOG_TAG, "notify wifi AP state changed");
+            this.notify();
+        }
+    }
+
+    // Update wifi tethering state
+    private void updateTetherState(Object[] available, Object[] tethered, Object[] errored) {
+        boolean wifiTethered = false;
+        boolean wifiErrored = false;
+
+        synchronized (this) {
+            for (Object obj: tethered) {
+                String str = (String)obj;
+                for (String tethRex: mWifiRegexs) {
+                    Log.v(LOG_TAG, "str: " + str +"tethRex: " + tethRex);
+                    if (str.matches(tethRex)) {
+                        wifiTethered = true;
+                    }
+                }
+            }
+
+            for (Object obj: errored) {
+                String str = (String)obj;
+                for (String tethRex: mWifiRegexs) {
+                    Log.v(LOG_TAG, "error: str: " + str +"tethRex: " + tethRex);
+                    if (str.matches(tethRex)) {
+                        wifiErrored = true;
+                    }
+                }
+            }
+
+            if (wifiTethered) {
+                mWifiTetherResult = SUCCESS;   // wifi tethering is successful
+            } else if (wifiErrored) {
+                mWifiTetherResult = FAILURE;   // wifi tethering failed
+            }
+            Log.v(LOG_TAG, "mWifiTetherResult: " + mWifiTetherResult);
+            this.notify();
+        }
+    }
+
+
+    // Wait for network connectivity state: CONNECTING, CONNECTED, SUSPENDED,
+    //                                      DISCONNECTING, DISCONNECTED, UNKNOWN
+    public boolean waitForNetworkState(int networkType, State expectedState, long timeout) {
+        long startTime = System.currentTimeMillis();
+        while (true) {
+            if ((System.currentTimeMillis() - startTime) > timeout) {
+                if (mCM.getNetworkInfo(networkType).getState() != expectedState) {
+                    return false;
+                } else {
+                    // the broadcast has been sent out. the state has been changed.
+                    Log.v(LOG_TAG, "networktype: " + networkType + " state: " +
+                            mCM.getNetworkInfo(networkType));
+                    return true;
+                }
+            }
+            Log.v(LOG_TAG, "Wait for the connectivity state for network: " + networkType +
+                    " to be " + expectedState.toString());
+            synchronized (connectivityObject) {
+                try {
+                    connectivityObject.wait(SHORT_TIMEOUT);
+                } catch (InterruptedException e) {
+                    e.printStackTrace();
+                }
+                if ((mNetworkInfo.getType() != networkType) ||
+                    (mNetworkInfo.getState() != expectedState)) {
+                    Log.v(LOG_TAG, "network state for " + mNetworkInfo.getType() +
+                            "is: " + mNetworkInfo.getState());
+                    continue;
+                }
+                return true;
+            }
+        }
+    }
+
+    // Wait for Wifi state: WIFI_STATE_DISABLED, WIFI_STATE_DISABLING, WIFI_STATE_ENABLED,
+    //                      WIFI_STATE_ENALBING, WIFI_STATE_UNKNOWN
+    public boolean waitForWifiState(int expectedState, long timeout) {
+        long startTime = System.currentTimeMillis();
+        while (true) {
+            if ((System.currentTimeMillis() - startTime) > timeout) {
+                if (mWifiState != expectedState) {
+                    return false;
+                } else {
+                    return true;
+                }
+            }
+            Log.v(LOG_TAG, "Wait for wifi state to be: " + expectedState);
+            synchronized (wifiObject) {
+                try {
+                    wifiObject.wait(SHORT_TIMEOUT);
+                } catch (InterruptedException e) {
+                    e.printStackTrace();
+                }
+                if (mWifiState != expectedState) {
+                    Log.v(LOG_TAG, "Wifi state is: " + mWifiState);
+                    continue;
+                }
+                return true;
+            }
+        }
+    }
+
+    // Wait for Wifi AP state: WIFI_AP_STATE_DISABLED, WIFI_AP_STATE_DISABLING,
+    //                         WIFI_AP_STATE_ENABLED, WIFI_STATE_ENALBING, WIFI_STATE_UNKNOWN
+    public boolean waitForWifiAPState(int expectedState, long timeout) {
+        long startTime = System.currentTimeMillis();
+        while (true) {
+            if ((System.currentTimeMillis() - startTime) > timeout) {
+                if (mWifiManager.getWifiApState() != expectedState) {
+                    return false;
+                } else {
+                    return true;
+                }
+            }
+            Log.v(LOG_TAG, "Wait for wifi AP state to be: " + expectedState);
+            synchronized (wifiObject) {
+                try {
+                    wifiObject.wait(SHORT_TIMEOUT);
+                } catch (InterruptedException e) {
+                    e.printStackTrace();
+                }
+                if (mWifiManager.getWifiApState() != expectedState) {
+                    Log.v(LOG_TAG, "Wifi state is: " + mWifiManager.getWifiApState());
+                    continue;
+                }
+                return true;
+            }
+        }
+    }
+
+    /**
+     * Wait for the wifi tethering result:
+     * @param timeout is the maximum waiting time
+     * @return SUCCESS if tethering result is successful
+     *         FAILURE if tethering result returns error.
+     */
+    public int waitForTetherStateChange(long timeout) {
+        long startTime = System.currentTimeMillis();
+        while (true) {
+            if ((System.currentTimeMillis() - startTime) > timeout) {
+                return mWifiTetherResult;
+            }
+            Log.v(LOG_TAG, "Wait for wifi tethering result.");
+            synchronized (this) {
+                try {
+                    this.wait(SHORT_TIMEOUT);
+                } catch (InterruptedException e) {
+                    e.printStackTrace();
+                }
+                if (mWifiTetherResult == INIT ) {
+                    continue;
+                } else {
+                    return mWifiTetherResult;
+                }
+            }
+        }
+    }
+
     // Return true if device is currently connected to mobile network
     public boolean isConnectedToMobile() {
         return (mNetworkInfo.getType() == ConnectivityManager.TYPE_MOBILE);
@@ -265,6 +485,22 @@
      * We don't verify whether the connection is successful or not, leave this to the test
      */
     public boolean connectToWifi(String knownSSID) {
+        WifiConfiguration config = new WifiConfiguration();
+        config.SSID = knownSSID;
+        config.allowedKeyManagement.set(KeyMgmt.NONE);
+        return connectToWifiWithConfiguration(config);
+    }
+
+    /**
+     * Connect to Wi-Fi with the given configuration. Note the SSID in the configuration
+     * is pure string, we need to convert it to quoted string.
+     * @param config
+     * @return
+     */
+    public boolean connectToWifiWithConfiguration(WifiConfiguration config) {
+        String ssid = config.SSID;
+        config.SSID = convertToQuotedString(ssid);
+
         //If Wifi is not enabled, enable it
         if (!mWifiManager.isWifiEnabled()) {
             Log.v(LOG_TAG, "Wifi is not enabled, enable it");
@@ -273,6 +509,7 @@
 
         List<ScanResult> netList = mWifiManager.getScanResults();
         if (netList == null) {
+            Log.v(LOG_TAG, "scan results are null");
             // if no scan results are available, start active scan
             mWifiManager.startScanActive();
             mScanResultIsAvailable = false;
@@ -299,17 +536,20 @@
         }
 
         netList = mWifiManager.getScanResults();
+
         for (int i = 0; i < netList.size(); i++) {
             ScanResult sr= netList.get(i);
-            if (sr.SSID.equals(knownSSID)) {
-                Log.v(LOG_TAG, "found " + knownSSID + " in the scan result list");
-                WifiConfiguration config = new WifiConfiguration();
-                config.SSID = convertToQuotedString(sr.SSID);
-                config.allowedKeyManagement.set(KeyMgmt.NONE);
+            if (sr.SSID.equals(ssid)) {
+                Log.v(LOG_TAG, "found " + ssid + " in the scan result list");
                 int networkId = mWifiManager.addNetwork(config);
                 // Connect to network by disabling others.
                 mWifiManager.enableNetwork(networkId, true);
                 mWifiManager.saveConfiguration();
+                List<WifiConfiguration> wifiNetworks = mWifiManager.getConfiguredNetworks();
+                for (WifiConfiguration netConfig : wifiNetworks) {
+                    Log.v(LOG_TAG, netConfig.toString());
+                }
+
                 mWifiManager.reconnect();
                 break;
            }
@@ -317,14 +557,14 @@
 
         List<WifiConfiguration> netConfList = mWifiManager.getConfiguredNetworks();
         if (netConfList.size() <= 0) {
-            Log.v(LOG_TAG, knownSSID + " is not available");
+            Log.v(LOG_TAG, ssid + " is not available");
             return false;
         }
         return true;
     }
 
     /*
-     * Disconnect from the current AP
+     * Disconnect from the current AP and remove configured networks.
      */
     public boolean disconnectAP() {
         if (mWifiManager.isWifiEnabled()) {
@@ -360,9 +600,9 @@
     }
 
     /**
-     * Disconnect from the current Wifi and clear the configuration list
+     * Remove configured networks and disable wifi
      */
-    public boolean clearWifi() {
+    public boolean removeConfiguredNetworksAndDisableWifi() {
             if (!disconnectAP()) {
                 return false;
             }
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java
index 592be92..3d4dc3d 100644
--- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java
@@ -21,6 +21,7 @@
 import android.test.InstrumentationTestSuite;
 import android.util.Log;
 import com.android.connectivitymanagertest.functional.ConnectivityManagerMobileTest;
+import com.android.connectivitymanagertest.functional.WifiConnectionTest;
 
 import junit.framework.TestSuite;
 
@@ -38,6 +39,7 @@
     public TestSuite getAllTests() {
         TestSuite suite = new InstrumentationTestSuite(this);
         suite.addTestSuite(ConnectivityManagerMobileTest.class);
+        suite.addTestSuite(WifiConnectionTest.class);
         return suite;
     }
 
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java
index ad8d444..5959cf3 100644
--- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java
@@ -41,8 +41,6 @@
     extends ActivityInstrumentationTestCase2<ConnectivityManagerTestActivity> {
     private static final String LOG_TAG = "ConnectivityManagerMobileTest";
     private static final String PKG_NAME = "com.android.connectivitymanagertest";
-    private static final long STATE_TRANSITION_SHORT_TIMEOUT = 5 * 1000;
-    private static final long STATE_TRANSITION_LONG_TIMEOUT = 30 * 1000;
 
     private String TEST_ACCESS_POINT;
     private ConnectivityManagerTestActivity cmActivity;
@@ -64,9 +62,14 @@
         wl = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, "CMWakeLock");
         wl.acquire();
         // Each test case will start with cellular connection
-        waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED,
-                STATE_TRANSITION_LONG_TIMEOUT);
-        verifyCellularConnection();
+        if (!cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED,
+                ConnectivityManagerTestActivity.LONG_TIMEOUT)) {
+            // Note: When the test fails in setUp(), tearDown is not called. In that case,
+            // the activity is destroyed which blocks the next test at "getActivity()".
+            // tearDown() is called hear to avoid that situation.
+            tearDown();
+            fail("Device is not connected to Mobile, setUp failed");
+        }
     }
 
     @Override
@@ -74,86 +77,26 @@
         cmActivity.finish();
         Log.v(LOG_TAG, "tear down ConnectivityManagerTestActivity");
         wl.release();
-        cmActivity.clearWifi();
+        cmActivity.removeConfiguredNetworksAndDisableWifi();
         super.tearDown();
     }
 
     // help function to verify 3G connection
     public void verifyCellularConnection() {
-        NetworkInfo extraNetInfo = cmActivity.mNetworkInfo;
+        NetworkInfo extraNetInfo = cmActivity.mCM.getActiveNetworkInfo();
         assertEquals("network type is not MOBILE", ConnectivityManager.TYPE_MOBILE,
-            extraNetInfo.getType());
+                extraNetInfo.getType());
         assertTrue("not connected to cellular network", extraNetInfo.isConnected());
         assertTrue("no data connection", cmActivity.mState.equals(State.CONNECTED));
     }
 
-    // Wait for network connectivity state: CONNECTING, CONNECTED, SUSPENDED,
-    //                                      DISCONNECTING, DISCONNECTED, UNKNOWN
-    private void waitForNetworkState(int networkType, State expectedState, long timeout) {
-        long startTime = System.currentTimeMillis();
-        while (true) {
-            if ((System.currentTimeMillis() - startTime) > timeout) {
-                if (cmActivity.mCM.getNetworkInfo(networkType).getState() != expectedState) {
-                    assertFalse("Wait for network state timeout", true);
-                } else {
-                    // the broadcast has been sent out. the state has been changed.
-                    return;
-                }
-            }
-            Log.v(LOG_TAG, "Wait for the connectivity state for network: " + networkType +
-                    " to be " + expectedState.toString());
-            synchronized (cmActivity.connectivityObject) {
-                try {
-                    cmActivity.connectivityObject.wait(STATE_TRANSITION_SHORT_TIMEOUT);
-                } catch (InterruptedException e) {
-                    e.printStackTrace();
-                }
-                if ((cmActivity.mNetworkInfo.getType() != networkType) ||
-                    (cmActivity.mNetworkInfo.getState() != expectedState)) {
-                    Log.v(LOG_TAG, "network state for " + cmActivity.mNetworkInfo.getType() +
-                            "is: " + cmActivity.mNetworkInfo.getState());
-                    continue;
-                }
-                break;
-            }
-        }
-    }
-
-    // Wait for Wifi state: WIFI_STATE_DISABLED, WIFI_STATE_DISABLING, WIFI_STATE_ENABLED,
-    //                      WIFI_STATE_ENALBING, WIFI_STATE_UNKNOWN
-    private void waitForWifiState(int expectedState, long timeout) {
-        long startTime = System.currentTimeMillis();
-        while (true) {
-            if ((System.currentTimeMillis() - startTime) > timeout) {
-                if (cmActivity.mWifiState != expectedState) {
-                    assertFalse("Wait for Wifi state timeout", true);
-                } else {
-                    return;
-                }
-            }
-            Log.v(LOG_TAG, "Wait for wifi state to be: " + expectedState);
-            synchronized (cmActivity.wifiObject) {
-                try {
-                    cmActivity.wifiObject.wait(5*1000);
-                } catch (InterruptedException e) {
-                    e.printStackTrace();
-                }
-                if (cmActivity.mWifiState != expectedState) {
-                    Log.v(LOG_TAG, "Wifi state is: " + cmActivity.mWifiNetworkInfo.getState());
-                    continue;
-                }
-                break;
-            }
-        }
-    }
-
     // Test case 1: Test enabling Wifi without associating with any AP
     @LargeTest
     public void test3GToWifiNotification() {
         // To avoid UNKNOWN state when device boots up
         cmActivity.enableWifi();
         try {
-            Thread.sleep(2 * STATE_TRANSITION_SHORT_TIMEOUT);
+            Thread.sleep(2 * ConnectivityManagerTestActivity.SHORT_TIMEOUT);
         } catch (Exception e) {
             Log.v(LOG_TAG, "exception: " + e.toString());
         }
@@ -170,7 +113,7 @@
         // Eanble Wifi
         cmActivity.enableWifi();
         try {
-            Thread.sleep(2 * STATE_TRANSITION_SHORT_TIMEOUT);
+            Thread.sleep(2 * ConnectivityManagerTestActivity.SHORT_TIMEOUT);
         } catch (Exception e) {
             Log.v(LOG_TAG, "exception: " + e.toString());
         }
@@ -208,12 +151,13 @@
         assertTrue("failed to connect to " + TEST_ACCESS_POINT,
                 cmActivity.connectToWifi(TEST_ACCESS_POINT));
 
-        waitForWifiState(WifiManager.WIFI_STATE_ENABLED, STATE_TRANSITION_LONG_TIMEOUT);
+        assertTrue(cmActivity.waitForWifiState(WifiManager.WIFI_STATE_ENABLED,
+                ConnectivityManagerTestActivity.LONG_TIMEOUT));
         Log.v(LOG_TAG, "wifi state is enabled");
-        waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
-                STATE_TRANSITION_LONG_TIMEOUT);
-        waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.DISCONNECTED,
-                STATE_TRANSITION_LONG_TIMEOUT);
+        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
+                ConnectivityManagerTestActivity.LONG_TIMEOUT));
+        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.DISCONNECTED,
+                ConnectivityManagerTestActivity.LONG_TIMEOUT));
 
         // validate states
         if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_WIFI)) {
@@ -237,12 +181,13 @@
         // Connect to TEST_ACCESS_POINT
         assertTrue("failed to connect to " + TEST_ACCESS_POINT,
                 cmActivity.connectToWifi(TEST_ACCESS_POINT));
-        waitForWifiState(WifiManager.WIFI_STATE_ENABLED, STATE_TRANSITION_LONG_TIMEOUT);
-        waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
-                STATE_TRANSITION_LONG_TIMEOUT);
+        assertTrue(cmActivity.waitForWifiState(WifiManager.WIFI_STATE_ENABLED,
+                ConnectivityManagerTestActivity.LONG_TIMEOUT));
+        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
+                ConnectivityManagerTestActivity.LONG_TIMEOUT));
 
         try {
-            Thread.sleep(STATE_TRANSITION_SHORT_TIMEOUT);
+            Thread.sleep(ConnectivityManagerTestActivity.SHORT_TIMEOUT);
         } catch (Exception e) {
             Log.v(LOG_TAG, "exception: " + e.toString());
         }
@@ -255,11 +200,12 @@
         }
 
         // Wait for the Wifi state to be DISABLED
-        waitForWifiState(WifiManager.WIFI_STATE_DISABLED, STATE_TRANSITION_LONG_TIMEOUT);
-        waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.DISCONNECTED,
-                STATE_TRANSITION_LONG_TIMEOUT);
-        waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED,
-                STATE_TRANSITION_LONG_TIMEOUT);
+        assertTrue(cmActivity.waitForWifiState(WifiManager.WIFI_STATE_DISABLED,
+                ConnectivityManagerTestActivity.LONG_TIMEOUT));
+        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.DISCONNECTED,
+                ConnectivityManagerTestActivity.LONG_TIMEOUT));
+        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED,
+                ConnectivityManagerTestActivity.LONG_TIMEOUT));
 
         //Prepare for connectivity state verification
         NetworkInfo networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
@@ -275,10 +221,10 @@
         cmActivity.enableWifi();
 
         // Wait for Wifi to be connected and mobile to be disconnected
-        waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
-                STATE_TRANSITION_LONG_TIMEOUT);
-        waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.DISCONNECTED,
-                STATE_TRANSITION_LONG_TIMEOUT);
+        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
+                ConnectivityManagerTestActivity.LONG_TIMEOUT));
+        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.DISCONNECTED,
+                ConnectivityManagerTestActivity.LONG_TIMEOUT));
 
         // validate wifi states
         if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_WIFI)) {
@@ -298,12 +244,12 @@
         assertTrue("failed to connect to " + TEST_ACCESS_POINT,
                    cmActivity.connectToWifi(TEST_ACCESS_POINT));
 
-        waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
-            STATE_TRANSITION_LONG_TIMEOUT);
+        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
+            ConnectivityManagerTestActivity.LONG_TIMEOUT));
 
         // Wait for a few seconds to avoid the state that both Mobile and Wifi is connected
         try {
-            Thread.sleep(STATE_TRANSITION_SHORT_TIMEOUT);
+            Thread.sleep(ConnectivityManagerTestActivity.SHORT_TIMEOUT);
         } catch (Exception e) {
             Log.v(LOG_TAG, "exception: " + e.toString());
         }
@@ -318,12 +264,12 @@
                 NetworkState.TO_DISCONNECTION, State.DISCONNECTED);
 
         // clear Wifi
-        cmActivity.clearWifi();
+        cmActivity.removeConfiguredNetworksAndDisableWifi();
 
-        waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.DISCONNECTED,
-                STATE_TRANSITION_LONG_TIMEOUT);
-        waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED,
-                STATE_TRANSITION_LONG_TIMEOUT);
+        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.DISCONNECTED,
+                ConnectivityManagerTestActivity.LONG_TIMEOUT));
+        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED,
+                ConnectivityManagerTestActivity.LONG_TIMEOUT));
 
         // validate states
         if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_WIFI)) {
@@ -357,7 +303,7 @@
         // Enable airplane mode
         cmActivity.setAirplaneMode(getInstrumentation().getContext(), true);
         try {
-            Thread.sleep(STATE_TRANSITION_SHORT_TIMEOUT);
+            Thread.sleep(ConnectivityManagerTestActivity.SHORT_TIMEOUT);
         } catch (Exception e) {
             Log.v(LOG_TAG, "exception: " + e.toString());
         }
@@ -389,8 +335,8 @@
         // disable airplane mode
         cmActivity.setAirplaneMode(getInstrumentation().getContext(), false);
 
-        waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED,
-                STATE_TRANSITION_LONG_TIMEOUT);
+        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.CONNECTED,
+                ConnectivityManagerTestActivity.LONG_TIMEOUT));
 
         // Validate the state transition
         if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_MOBILE)) {
@@ -414,8 +360,8 @@
         // Eanble airplane mode
         cmActivity.setAirplaneMode(getInstrumentation().getContext(), true);
 
-        waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.DISCONNECTED,
-                STATE_TRANSITION_LONG_TIMEOUT);
+        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.DISCONNECTED,
+                ConnectivityManagerTestActivity.LONG_TIMEOUT));
 
         NetworkInfo networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
         cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_MOBILE,
@@ -429,8 +375,8 @@
         // Connect to Wifi
         assertTrue("failed to connect to " + TEST_ACCESS_POINT,
                    cmActivity.connectToWifi(TEST_ACCESS_POINT));
-        waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
-                            STATE_TRANSITION_LONG_TIMEOUT);
+        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
+                            ConnectivityManagerTestActivity.LONG_TIMEOUT));
 
         // validate state and broadcast
         if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_WIFI)) {
@@ -457,11 +403,11 @@
         assertTrue("failed to connect to " + TEST_ACCESS_POINT,
                 cmActivity.connectToWifi(TEST_ACCESS_POINT));
 
-        waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
-                STATE_TRANSITION_LONG_TIMEOUT);
+        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
+                ConnectivityManagerTestActivity.LONG_TIMEOUT));
 
         try {
-            Thread.sleep(STATE_TRANSITION_SHORT_TIMEOUT);
+            Thread.sleep(ConnectivityManagerTestActivity.SHORT_TIMEOUT);
         } catch (Exception e) {
             Log.v(LOG_TAG, "exception: " + e.toString());
         }
@@ -469,11 +415,11 @@
         // Enable airplane mode without clearing Wifi
         cmActivity.setAirplaneMode(getInstrumentation().getContext(), true);
 
-        waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.DISCONNECTED,
-                STATE_TRANSITION_LONG_TIMEOUT);
+        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.DISCONNECTED,
+                ConnectivityManagerTestActivity.LONG_TIMEOUT));
 
         try {
-            Thread.sleep(STATE_TRANSITION_SHORT_TIMEOUT);
+            Thread.sleep(ConnectivityManagerTestActivity.SHORT_TIMEOUT);
         } catch (Exception e) {
             Log.v(LOG_TAG, "exception: " + e.toString());
         }
@@ -487,10 +433,10 @@
         // Disable airplane mode
         cmActivity.setAirplaneMode(getInstrumentation().getContext(), false);
 
-        waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
-                            STATE_TRANSITION_LONG_TIMEOUT);
-        waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.DISCONNECTED,
-                            STATE_TRANSITION_LONG_TIMEOUT);
+        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
+                            ConnectivityManagerTestActivity.LONG_TIMEOUT));
+        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_MOBILE, State.DISCONNECTED,
+                            ConnectivityManagerTestActivity.LONG_TIMEOUT));
 
         // validate the state transition
         if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_WIFI)) {
@@ -508,14 +454,15 @@
         //Connect to TEST_ACCESS_POINT
         assertTrue("failed to connect to " + TEST_ACCESS_POINT,
                    cmActivity.connectToWifi(TEST_ACCESS_POINT));
-        waitForWifiState(WifiManager.WIFI_STATE_ENABLED, STATE_TRANSITION_LONG_TIMEOUT);
-        waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
-                            STATE_TRANSITION_LONG_TIMEOUT);
+        assertTrue(cmActivity.waitForWifiState(WifiManager.WIFI_STATE_ENABLED,
+                ConnectivityManagerTestActivity.LONG_TIMEOUT));
+        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED,
+                            ConnectivityManagerTestActivity.LONG_TIMEOUT));
         assertNotNull("Not associated with any AP",
                       cmActivity.mWifiManager.getConnectionInfo().getBSSID());
 
         try {
-            Thread.sleep(STATE_TRANSITION_SHORT_TIMEOUT);
+            Thread.sleep(ConnectivityManagerTestActivity.SHORT_TIMEOUT);
         } catch (Exception e) {
             Log.v(LOG_TAG, "exception: " + e.toString());
         }
@@ -527,13 +474,14 @@
         }
 
         // Verify the connectivity state for Wifi is DISCONNECTED
-        waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.DISCONNECTED,
-                STATE_TRANSITION_LONG_TIMEOUT);
+        assertTrue(cmActivity.waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.DISCONNECTED,
+                ConnectivityManagerTestActivity.LONG_TIMEOUT));
 
         if (!cmActivity.disableWifi()) {
             Log.v(LOG_TAG, "disable Wifi failed");
             return;
         }
-        waitForWifiState(WifiManager.WIFI_STATE_DISABLED, STATE_TRANSITION_LONG_TIMEOUT);
+        assertTrue(cmActivity.waitForWifiState(WifiManager.WIFI_STATE_DISABLED,
+                ConnectivityManagerTestActivity.LONG_TIMEOUT));
     }
 }
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiConnectionTest.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiConnectionTest.java
new file mode 100644
index 0000000..4140570
--- /dev/null
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiConnectionTest.java
@@ -0,0 +1,205 @@
+/*
+ * Copyright (C) 2010, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.connectivitymanagertest.functional;
+
+import com.android.connectivitymanagertest.ConnectivityManagerStressTestRunner;
+import com.android.connectivitymanagertest.ConnectivityManagerTestActivity;
+import com.android.connectivitymanagertest.ConnectivityManagerTestRunner;
+import com.android.connectivitymanagertest.NetworkState;
+
+import android.R;
+import android.app.Activity;
+import android.content.ContentResolver;
+import android.content.Intent;
+import android.content.Context;
+import android.content.res.Resources;
+import android.net.wifi.WifiConfiguration;
+import android.net.wifi.WifiInfo;
+import android.net.wifi.WifiManager;
+import android.net.ConnectivityManager;
+import android.net.DhcpInfo;
+import android.net.NetworkInfo;
+import android.net.NetworkInfo.State;
+import android.provider.Settings;
+
+import android.test.suitebuilder.annotation.LargeTest;
+import android.test.ActivityInstrumentationTestCase2;
+import android.util.Log;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map.Entry;
+import java.util.Set;
+
+/**
+ * Test Wi-Fi connection with different configuration
+ * To run this tests:
+ *     adb shell am instrument -e class
+ *          com.android.connectivitymanagertest.functional.WifiConnectionTest
+ *          -w com.android.connectivitymanagertest/.ConnectivityManagerTestRunner
+ */
+public class WifiConnectionTest
+    extends ActivityInstrumentationTestCase2<ConnectivityManagerTestActivity> {
+    private static final String TAG = "WifiConnectionTest";
+    private static final boolean DEBUG = true;
+    private static final String PKG_NAME = "com.android.connectivitymanagertests";
+    private List<WifiConfiguration> networks = new ArrayList<WifiConfiguration>();
+    private ConnectivityManagerTestActivity mAct;
+    private HashMap<String, DhcpInfo> hm = null;
+    private ConnectivityManagerTestRunner mRunner;
+    private ContentResolver cr;
+
+    public WifiConnectionTest() {
+        super(ConnectivityManagerTestActivity.class);
+    }
+
+    @Override
+    public void setUp() throws Exception {
+        super.setUp();
+        mAct = getActivity();
+        mRunner = ((ConnectivityManagerTestRunner)getInstrumentation());
+        cr = mRunner.getContext().getContentResolver();
+        networks = mAct.loadNetworkConfigurations();
+        hm = mAct.getDhcpInfo();
+        if (DEBUG) {
+            printNetworkConfigurations();
+            printDhcpInfo();
+        }
+
+        // enable Wifi and verify wpa_supplicant is started
+        assertTrue("enable Wifi failed", mAct.enableWifi());
+        try {
+            Thread.sleep( 2 * ConnectivityManagerTestActivity.SHORT_TIMEOUT);
+        } catch (Exception e) {
+            fail("interrupted while waiting for WPA_SUPPLICANT to start");
+        }
+        WifiInfo mConnection = mAct.mWifiManager.getConnectionInfo();
+        assertNotNull(mConnection);
+        assertTrue("wpa_supplicant is not started ", mAct.mWifiManager.pingSupplicant());
+    }
+
+    private void printNetworkConfigurations() {
+        Log.v(TAG, "==== print network configurations parsed from XML file ====");
+        Log.v(TAG, "number of access points: " + networks.size());
+        for (WifiConfiguration config : networks) {
+            Log.v(TAG, config.toString());
+        }
+    }
+
+    private void printDhcpInfo() {
+        if (hm == null) {
+            return;
+        } else {
+            Set<Entry<String, DhcpInfo>> set = hm.entrySet();
+            for (Entry<String, DhcpInfo> me: set) {
+               Log.v(TAG, "SSID: " + me.getKey());
+               DhcpInfo dhcp = me.getValue();
+               Log.v(TAG, "    dhcp: " + dhcp.toString());
+               Log.v(TAG, "IP: " + intToIpString(dhcp.ipAddress));
+               Log.v(TAG, "gateway: " + intToIpString(dhcp.gateway));
+               Log.v(TAG, "Netmask: " + intToIpString(dhcp.netmask));
+               Log.v(TAG, "DNS1: " + intToIpString(dhcp.dns1));
+               Log.v(TAG, "DNS2: " + intToIpString(dhcp.dns2));
+            }
+        }
+    }
+
+    @Override
+    public void tearDown() throws Exception {
+        mAct.removeConfiguredNetworksAndDisableWifi();
+        super.tearDown();
+    }
+
+    private String intToIpString(int i) {
+        return ((i & 0xFF) + "." +
+                ((i >> 8) & 0xFF) + "." +
+                ((i >> 16) & 0xFF) + "." +
+                ((i >> 24) & 0xFF));
+    }
+    /**
+     * Connect to the provided Wi-Fi network
+     * @param config is the network configuration
+     * @return true if the connection is successful.
+     */
+    private void connectToWifi(WifiConfiguration config) {
+        // step 1: connect to the test access point
+        boolean isStaticIP = false;
+        if (hm.containsKey(config.SSID)) {
+            DhcpInfo dhcpInfo = hm.get(config.SSID);
+            if (dhcpInfo != null) {
+                isStaticIP = true;
+                // set the system settings:
+                Settings.System.putInt(cr,Settings.System.WIFI_USE_STATIC_IP, 1);
+                Settings.System.putString(cr, Settings.System.WIFI_STATIC_IP,
+                        intToIpString(dhcpInfo.ipAddress));
+                Settings.System.putString(cr, Settings.System.WIFI_STATIC_GATEWAY,
+                        intToIpString(dhcpInfo.gateway));
+                Settings.System.putString(cr, Settings.System.WIFI_STATIC_NETMASK,
+                        intToIpString(dhcpInfo.netmask));
+                Settings.System.putString(cr, Settings.System.WIFI_STATIC_DNS1,
+                        intToIpString(dhcpInfo.dns1));
+                Settings.System.putString(cr, Settings.System.WIFI_STATIC_DNS2,
+                        intToIpString(dhcpInfo.dns2));
+            }
+        }
+
+        assertTrue("failed to connect to " + config.SSID,
+                mAct.connectToWifiWithConfiguration(config));
+
+        // step 2: verify Wifi state and network state;
+        assertTrue(mAct.waitForWifiState(WifiManager.WIFI_STATE_ENABLED,
+                ConnectivityManagerTestActivity.SHORT_TIMEOUT));
+        assertTrue(mAct.waitForNetworkState(ConnectivityManager.TYPE_WIFI,
+                State.CONNECTED, ConnectivityManagerTestActivity.LONG_TIMEOUT));
+
+        // step 3: verify the current connected network is the given SSID
+        if (DEBUG) {
+            Log.v(TAG, "config.SSID = " + config.SSID);
+            Log.v(TAG, "mAct.mWifiManager.getConnectionInfo.getSSID()" +
+                    mAct.mWifiManager.getConnectionInfo().getSSID());
+        }
+        assertTrue(config.SSID.contains(mAct.mWifiManager.getConnectionInfo().getSSID()));
+
+        // Maintain the connection for 50 seconds before switching
+        try {
+            Thread.sleep(mAct.LONG_TIMEOUT);
+        } catch (Exception e) {
+            fail("interrupted while waiting for WPA_SUPPLICANT to start");
+        }
+
+        if (isStaticIP) {
+            Settings.System.putInt(cr, Settings.System.WIFI_USE_STATIC_IP, 0);
+        }
+    }
+
+    @LargeTest
+    public void testWifiConnections() {
+        for (int i = 0; i < networks.size(); i++) {
+            String ssid = networks.get(i).SSID;
+            Log.v(TAG, "-- start Wi-Fi connection test for SSID: " + ssid + " --");
+            connectToWifi(networks.get(i));
+            mAct.removeConfiguredNetworksAndDisableWifi();
+            try {
+                Thread.sleep(4 * mAct.SHORT_TIMEOUT);
+            } catch (Exception e) {
+                fail("Interrupted while disabling wifi");
+            }
+            Log.v(TAG, "-- END Wi-Fi connection test for SSID: " + ssid + " --");
+        }
+    }
+}
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiApStress.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiApStress.java
new file mode 100644
index 0000000..cc53ddc
--- /dev/null
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiApStress.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2010, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.connectivitymanagertest.stress;
+
+
+import com.android.connectivitymanagertest.ConnectivityManagerStressTestRunner;
+import com.android.connectivitymanagertest.ConnectivityManagerTestActivity;
+import com.android.connectivitymanagertest.ConnectivityManagerTestRunner;
+
+import android.net.wifi.WifiConfiguration;
+import android.net.wifi.WifiConfiguration.KeyMgmt;
+import android.net.wifi.WifiConfiguration.AuthAlgorithm;
+import android.test.ActivityInstrumentationTestCase2;
+import android.test.suitebuilder.annotation.LargeTest;
+import android.util.Log;
+
+/**
+ * Stress the wifi driver as access point.
+ */
+public class WifiApStress
+    extends ActivityInstrumentationTestCase2<ConnectivityManagerTestActivity> {
+    private final static String TAG = "WifiApStress";
+    private ConnectivityManagerTestActivity mAct;
+    private static String NETWORK_ID = "AndroidAPTest";
+    private static String PASSWD = "androidwifi";
+    private int max_num;
+
+    public WifiApStress() {
+        super(ConnectivityManagerTestActivity.class);
+    }
+
+    @Override
+    public void setUp() throws Exception {
+        super.setUp();
+        mAct = getActivity();
+        max_num = ((ConnectivityManagerStressTestRunner)getInstrumentation()).numStress;
+    }
+
+    @Override
+    public void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    @LargeTest
+    public void testWifiHotSpot() {
+        WifiConfiguration config = new WifiConfiguration();
+        config.SSID = NETWORK_ID;
+        config.allowedKeyManagement.set(KeyMgmt.WPA_PSK);
+        config.allowedAuthAlgorithms.set(AuthAlgorithm.OPEN);
+        config.preSharedKey = PASSWD;
+
+        // If Wifi is enabled, disable it
+        if (mAct.mWifiManager.isWifiEnabled()) {
+            mAct.disableWifi();
+        }
+        for (int i = 0; i < max_num; i++) {
+            Log.v(TAG, "iteration: " + i);
+            // enable Wifi tethering
+            assertTrue(mAct.mWifiManager.setWifiApEnabled(config, true));
+            // Wait for wifi ap state to be ENABLED
+            assertTrue(mAct.waitForWifiAPState(mAct.mWifiManager.WIFI_AP_STATE_ENABLED,
+                    mAct.LONG_TIMEOUT));
+            // Wait for wifi tethering result
+            assertEquals(mAct.SUCCESS, mAct.waitForTetherStateChange(2*mAct.SHORT_TIMEOUT));
+            // Allow the wifi tethering to be enabled for 10 seconds
+            try {
+                Thread.sleep(2 * ConnectivityManagerTestActivity.SHORT_TIMEOUT);
+            } catch (Exception e) {
+                fail("thread in sleep is interrupted");
+            }
+            assertTrue(mAct.mWifiManager.setWifiApEnabled(config, false));
+        }
+    }
+
+}
diff --git a/core/tests/coretests/res/raw/obb_enc_file100_orig1.obb b/core/tests/coretests/res/raw/obb_enc_file100_orig1.obb
new file mode 100644
index 0000000..373b8e4
--- /dev/null
+++ b/core/tests/coretests/res/raw/obb_enc_file100_orig1.obb
Binary files differ
diff --git a/core/tests/coretests/res/raw/obb_enc_file100_orig3.obb b/core/tests/coretests/res/raw/obb_enc_file100_orig3.obb
new file mode 100644
index 0000000..aa531d8
--- /dev/null
+++ b/core/tests/coretests/res/raw/obb_enc_file100_orig3.obb
Binary files differ
diff --git a/core/tests/coretests/res/raw/obb_file1.obb b/core/tests/coretests/res/raw/obb_file1.obb
new file mode 100644
index 0000000..e71a680
--- /dev/null
+++ b/core/tests/coretests/res/raw/obb_file1.obb
Binary files differ
diff --git a/core/tests/coretests/res/raw/obb_file2.obb b/core/tests/coretests/res/raw/obb_file2.obb
new file mode 100644
index 0000000..1c397df
--- /dev/null
+++ b/core/tests/coretests/res/raw/obb_file2.obb
Binary files differ
diff --git a/core/tests/coretests/res/raw/obb_file2_nosign.obb b/core/tests/coretests/res/raw/obb_file2_nosign.obb
new file mode 100644
index 0000000..8292361
--- /dev/null
+++ b/core/tests/coretests/res/raw/obb_file2_nosign.obb
Binary files differ
diff --git a/core/tests/coretests/res/raw/obb_file3.obb b/core/tests/coretests/res/raw/obb_file3.obb
new file mode 100644
index 0000000..7f97a88
--- /dev/null
+++ b/core/tests/coretests/res/raw/obb_file3.obb
Binary files differ
diff --git a/core/tests/coretests/res/raw/obb_file3_bad_packagename.obb b/core/tests/coretests/res/raw/obb_file3_bad_packagename.obb
new file mode 100644
index 0000000..baa714a
--- /dev/null
+++ b/core/tests/coretests/res/raw/obb_file3_bad_packagename.obb
Binary files differ
diff --git a/core/tests/coretests/src/android/app/DownloadManagerBaseTest.java b/core/tests/coretests/src/android/app/DownloadManagerBaseTest.java
index 340137c..8df37ad 100644
--- a/core/tests/coretests/src/android/app/DownloadManagerBaseTest.java
+++ b/core/tests/coretests/src/android/app/DownloadManagerBaseTest.java
@@ -83,6 +83,7 @@
 
     protected static final int WAIT_FOR_DOWNLOAD_POLL_TIME = 1 * 1000;  // 1 second
     protected static final int MAX_WAIT_FOR_DOWNLOAD_TIME = 5 * 60 * 1000; // 5 minutes
+    protected static final int MAX_WAIT_FOR_LARGE_DOWNLOAD_TIME = 15 * 60 * 1000; // 15 minutes
 
     // Just a few popular file types used to return from a download
     protected enum DownloadFileType {
@@ -180,7 +181,7 @@
          * @return A Set<Long> with the ids of the completed downloads.
          */
         public Set<Long> getDownloadIds() {
-            synchronized(downloadIds) {
+            synchronized(this) {
                 Set<Long> returnIds = new HashSet<Long>(downloadIds);
                 return returnIds;
             }
@@ -224,6 +225,7 @@
             ConnectivityManager connManager = (ConnectivityManager)mContext.getSystemService(
                     Context.CONNECTIVITY_SERVICE);
             NetworkInfo info = connManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
+            Log.i(LOG_TAG, "WiFi Connection state is currently: " + info.isConnected());
             return info.isConnected();
         }
     }
@@ -511,6 +513,7 @@
      * @param enable true if it should be enabled, false if it should be disabled
      */
     protected void setWiFiStateOn(boolean enable) throws Exception {
+        Log.i(LOG_TAG, "Setting WiFi State to: " + enable);
         WifiManager manager = (WifiManager)mContext.getSystemService(Context.WIFI_SERVICE);
 
         manager.setWifiEnabled(enable);
@@ -528,7 +531,7 @@
 
             while (receiver.getWiFiIsOn() != enable && !timedOut) {
                 try {
-                    receiver.wait(DEFAULT_MAX_WAIT_TIME);
+                    receiver.wait(DEFAULT_WAIT_POLL_TIME);
 
                     if (SystemClock.elapsedRealtime() > timeoutTime) {
                         timedOut = true;
diff --git a/core/tests/coretests/src/android/app/DownloadManagerStressTest.java b/core/tests/coretests/src/android/app/DownloadManagerStressTest.java
index ddf138f..e0b28d0 100644
--- a/core/tests/coretests/src/android/app/DownloadManagerStressTest.java
+++ b/core/tests/coretests/src/android/app/DownloadManagerStressTest.java
@@ -24,7 +24,6 @@
 import android.database.Cursor;
 import android.net.Uri;
 import android.os.ParcelFileDescriptor;
-import android.test.suitebuilder.annotation.LargeTest;
 import android.util.Log;
 
 
@@ -38,6 +37,7 @@
     public void setUp() throws Exception {
         super.setUp();
         mServer.play(0);
+        setWiFiStateOn(true);
         removeAllCurrentDownloads();
     }
 
@@ -71,7 +71,8 @@
             }
 
             // wait for the download to complete or timeout
-            waitForDownloadsOrTimeout(WAIT_FOR_DOWNLOAD_POLL_TIME, MAX_WAIT_FOR_DOWNLOAD_TIME);
+            waitForDownloadsOrTimeout(WAIT_FOR_DOWNLOAD_POLL_TIME,
+                    MAX_WAIT_FOR_LARGE_DOWNLOAD_TIME);
             cursor = mDownloadManager.query(new Query());
             assertEquals(NUM_FILES, cursor.getCount());
             Log.i(LOG_TAG, "Verified number of downloads in download manager is what we expect.");
@@ -130,10 +131,11 @@
     }
 
     /**
-     * Tests trying to download a large file (~300M bytes) when there's not enough space in cache
+     * Tests trying to download a large file (~600M bytes) when there's not enough space in cache
      */
     public void testInsufficientSpace() throws Exception {
-        long fileSize = 300000000L;
+        // @TODO: Rework this to fill up cache partition with a dynamically calculated size
+        long fileSize = 600000000L;
         File largeFile = createFileOnSD(null, fileSize, DataType.TEXT, null);
 
         Cursor cursor = null;
diff --git a/core/tests/coretests/src/android/bluetooth/BluetoothStressTest.java b/core/tests/coretests/src/android/bluetooth/BluetoothStressTest.java
index 892dc8a..d30c5e8 100644
--- a/core/tests/coretests/src/android/bluetooth/BluetoothStressTest.java
+++ b/core/tests/coretests/src/android/bluetooth/BluetoothStressTest.java
@@ -94,6 +94,21 @@
         mTestUtils.disable(adapter);
     }
 
+    public void testAcceptPair() {
+        int iterations = BluetoothTestRunner.sPairIterations;
+        BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
+        BluetoothDevice device = adapter.getRemoteDevice(BluetoothTestRunner.sPairAddress);
+        mTestUtils.enable(adapter);
+
+        for (int i = 0; i < iterations; i++) {
+            mTestUtils.writeOutput("acceptPair iteration " + (i + 1) + " of " + iterations);
+            mTestUtils.acceptPair(adapter, device, BluetoothTestRunner.sPairPasskey,
+                    BluetoothTestRunner.sPairPin);
+            mTestUtils.unpair(adapter, device);
+        }
+        mTestUtils.disable(adapter);
+    }
+
     public void testConnectA2dp() {
         int iterations = BluetoothTestRunner.sConnectA2dpIterations;
         BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
diff --git a/core/tests/coretests/src/android/bluetooth/BluetoothTestUtils.java b/core/tests/coretests/src/android/bluetooth/BluetoothTestUtils.java
index a9025fb..f40d857 100644
--- a/core/tests/coretests/src/android/bluetooth/BluetoothTestUtils.java
+++ b/core/tests/coretests/src/android/bluetooth/BluetoothTestUtils.java
@@ -635,6 +635,17 @@
     }
 
     public void pair(BluetoothAdapter adapter, BluetoothDevice device, int passkey, byte[] pin) {
+        pairOrAcceptPair(adapter, device, passkey, pin, true);
+    }
+
+    public void acceptPair(BluetoothAdapter adapter, BluetoothDevice device, int passkey,
+            byte[] pin) {
+        pairOrAcceptPair(adapter, device, passkey, pin, false);
+    }
+
+    private void pairOrAcceptPair(BluetoothAdapter adapter, BluetoothDevice device, int passkey,
+            byte[] pin, boolean pair) {
+        String methodName = pair ? "pair()" : "acceptPair()";
         int mask = PairReceiver.PAIR_FLAG;
         int pairMask = PairReceiver.PAIR_STATE_BONDING | PairReceiver.PAIR_STATE_BONDED;
 
@@ -642,7 +653,7 @@
         mReceivers.add(pairReceiver);
 
         if (!adapter.isEnabled()) {
-            fail("pair() bluetooth not enabled");
+            fail(methodName + " bluetooth not enabled");
         }
 
         int state = device.getBondState();
@@ -656,10 +667,12 @@
                 break;
             case BluetoothDevice.BOND_NONE:
                 assertFalse(adapter.getBondedDevices().contains(device));
-                assertTrue(device.createBond());
+                if (pair) {
+                    assertTrue(device.createBond());
+                }
                 break;
             default:
-                fail("pair() invalide state: state=" + state);
+                fail(methodName + " invalide state: state=" + state);
         }
 
         long s = System.currentTimeMillis();
@@ -669,8 +682,8 @@
                 assertTrue(adapter.getBondedDevices().contains(device));
                 if ((pairReceiver.getFiredFlags() & mask) == mask
                         && (pairReceiver.getPairFiredFlags() & pairMask) == pairMask) {
-                    writeOutput(String.format("pair() completed in %d ms: device=%s",
-                            (System.currentTimeMillis() - s), device));
+                    writeOutput(String.format("%s completed in %d ms: device=%s",
+                            methodName, (System.currentTimeMillis() - s), device));
                     mReceivers.remove(pairReceiver);
                     mContext.unregisterReceiver(pairReceiver);
                     return;
@@ -682,9 +695,9 @@
         int firedFlags = pairReceiver.getFiredFlags();
         int pairFiredFlags = pairReceiver.getPairFiredFlags();
         pairReceiver.resetFiredFlags();
-        fail(String.format("pair() timeout: state=%d (expected %d), flags=0x%x (expected 0x%x), "
-                + "pairFlags=0x%x (expected 0x%x)", state, BluetoothDevice.BOND_BONDED, firedFlags,
-                mask, pairFiredFlags, pairMask));
+        fail(String.format("%s timeout: state=%d (expected %d), flags=0x%x (expected 0x%x), "
+                + "pairFlags=0x%x (expected 0x%x)", methodName, state, BluetoothDevice.BOND_BONDED,
+                firedFlags, mask, pairFiredFlags, pairMask));
     }
 
     public void unpair(BluetoothAdapter adapter, BluetoothDevice device) {
diff --git a/core/tests/coretests/src/android/os/storage/StorageManagerBaseTest.java b/core/tests/coretests/src/android/os/storage/StorageManagerBaseTest.java
new file mode 100644
index 0000000..90cb9a5
--- /dev/null
+++ b/core/tests/coretests/src/android/os/storage/StorageManagerBaseTest.java
@@ -0,0 +1,644 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.os.storage;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.content.res.Resources.NotFoundException;
+import android.os.Environment;
+import android.os.SystemClock;
+import android.test.InstrumentationTestCase;
+import android.util.Log;
+import android.os.Environment;
+import android.os.FileUtils;
+import android.os.storage.OnObbStateChangeListener;
+import android.os.storage.StorageManager;
+
+import java.io.BufferedReader;
+import java.io.DataInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.StringReader;
+
+public class StorageManagerBaseTest extends InstrumentationTestCase {
+
+    protected Context mContext = null;
+    protected StorageManager mSm = null;
+    private static String LOG_TAG = "StorageManagerBaseTest";
+    protected static final long MAX_WAIT_TIME = 120*1000;
+    protected static final long WAIT_TIME_INCR = 5*1000;
+    protected static String OBB_FILE_1 = "obb_file1.obb";
+    protected static String OBB_FILE_1_CONTENTS_1 = "OneToOneThousandInts.bin";
+    protected static String OBB_FILE_2 = "obb_file2.obb";
+    protected static String OBB_FILE_3 = "obb_file3.obb";
+    protected static String OBB_FILE_1_PASSWORD = "password1";
+    protected static String OBB_FILE_1_ENCRYPTED = "obb_enc_file100_orig1.obb";
+    protected static String OBB_FILE_2_UNSIGNED = "obb_file2_nosign.obb";
+    protected static String OBB_FILE_3_PASSWORD = "password3";
+    protected static String OBB_FILE_3_ENCRYPTED = "obb_enc_file100_orig3.obb";
+    protected static String OBB_FILE_3_BAD_PACKAGENAME = "obb_file3_bad_packagename.obb";
+
+    protected static boolean FORCE = true;
+    protected static boolean DONT_FORCE = false;
+
+    private static final String SAMPLE1_TEXT = "This is sample text.\n\nTesting 1 2 3.";
+
+    private static final String SAMPLE2_TEXT =
+        "We the people of the United States, in order to form a more perfect union,\n"
+        + "establish justice, insure domestic tranquility, provide for the common\n"
+        + "defense, promote the general welfare, and secure the blessings of liberty\n"
+        + "to ourselves and our posterity, do ordain and establish this Constitution\n"
+        + "for the United States of America.\n\n";
+
+    class MountingObbThread extends Thread {
+        boolean mStop = false;
+        volatile boolean mFileOpenOnObb = false;
+        private String mObbFilePath = null;
+        private String mPathToContentsFile = null;
+        private String mOfficialObbFilePath = null;
+
+        /**
+         * Constructor
+         *
+         * @param obbFilePath path to the OBB image file
+         * @param pathToContentsFile path to a file on the mounted OBB volume to open after the OBB
+         *      has been mounted
+         */
+        public MountingObbThread (String obbFilePath, String pathToContentsFile) {
+            assertTrue("obbFilePath cannot be null!", obbFilePath != null);
+            mObbFilePath = obbFilePath;
+            assertTrue("path to contents file cannot be null!", pathToContentsFile != null);
+            mPathToContentsFile = pathToContentsFile;
+        }
+
+        /**
+         * Runs the thread
+         *
+         * Mounts OBB_FILE_1, and tries to open a file on the mounted OBB (specified in the
+         * constructor). Once it's open, it waits until someone calls its doStop(), after which it
+         * closes the opened file.
+         */
+        public void run() {
+            // the official OBB file path and the mount-request file path should be the same, but
+            // let's distinguish the two as they may make for some interesting tests later
+            mOfficialObbFilePath = mountObb(mObbFilePath);
+            assertEquals("Expected and actual OBB file paths differ!", mObbFilePath,
+                    mOfficialObbFilePath);
+
+            // open a file on OBB 1...
+            DataInputStream inputFile = openFileOnMountedObb(mOfficialObbFilePath,
+                    mPathToContentsFile);
+            assertTrue("Failed to open file!", inputFile != null);
+
+            synchronized (this) {
+                mFileOpenOnObb = true;
+                notifyAll();
+            }
+
+            while (!mStop) {
+                try {
+                    Thread.sleep(WAIT_TIME_INCR);
+                } catch (InterruptedException e) {
+                    // nothing special to be done for interruptions
+                }
+            }
+            try {
+                inputFile.close();
+            } catch (IOException e) {
+                fail("Failed to close file on OBB due to error: " + e.toString());
+            }
+        }
+
+        /**
+         * Tells whether a file has yet been successfully opened on the OBB or not
+         *
+         * @return true if the specified file on the OBB was opened; false otherwise
+         */
+        public boolean isFileOpenOnObb() {
+            return mFileOpenOnObb;
+        }
+
+        /**
+         * Returns the official path of the OBB file that was mounted
+         *
+         * This is not the mount path, but the normalized path to the actual OBB file
+         *
+         * @return a {@link String} representation of the path to the OBB file that was mounted
+         */
+        public String officialObbFilePath() {
+            return mOfficialObbFilePath;
+        }
+
+        /**
+         * Requests the thread to stop running
+         *
+         * Closes the opened file and returns
+         */
+        public void doStop() {
+            mStop = true;
+        }
+    }
+
+    public class ObbListener extends OnObbStateChangeListener {
+        private String LOG_TAG = "StorageManagerBaseTest.ObbListener";
+
+        String mOfficialPath = null;
+        boolean mDone = false;
+        int mState = -1;
+
+        /**
+         * {@inheritDoc}
+         */
+        @Override
+        public void onObbStateChange(String path, int state) {
+            Log.i(LOG_TAG, "Storage state changing to: " + state);
+
+            synchronized (this) {
+                Log.i(LOG_TAG, "OfficialPath is now: " + path);
+                mState = state;
+                mOfficialPath = path;
+                mDone = true;
+                notifyAll();
+            }
+        }
+
+        /**
+         * Tells whether we are done or not (system told us the OBB has changed state)
+         *
+         * @return true if the system has told us this OBB's state has changed, false otherwise
+         */
+        public boolean isDone() {
+            return mDone;
+        }
+
+        /**
+         * The last state of the OBB, according to the system
+         *
+         * @return A {@link String} representation of the state of the OBB
+         */
+        public int state() {
+            return mState;
+        }
+
+        /**
+         * The normalized, official path to the OBB file (according to the system)
+         *
+         * @return A {@link String} representation of the official path to the OBB file
+         */
+        public String officialPath() {
+            return mOfficialPath;
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setUp() throws Exception {
+        mContext = getInstrumentation().getContext();
+        mSm = (StorageManager)mContext.getSystemService(android.content.Context.STORAGE_SERVICE);
+
+    }
+
+    /**
+     * Helper to copy a raw resource file to an actual specified file
+     *
+     * @param rawResId The raw resource ID of the OBB resource file
+     * @param outFile A File representing the file we want to copy the OBB to
+     * @throws NotFoundException If the resource file could not be found
+     */
+    private void copyRawToFile(int rawResId, File outFile) throws NotFoundException {
+        Resources res = mContext.getResources();
+        InputStream is = null;
+        try {
+            is = res.openRawResource(rawResId);
+        } catch (NotFoundException e) {
+            Log.i(LOG_TAG, "Failed to load resource with id: " + rawResId);
+            throw e;
+        }
+        FileUtils.setPermissions(outFile.getPath(), FileUtils.S_IRWXU | FileUtils.S_IRWXG
+                | FileUtils.S_IRWXO, -1, -1);
+        assertTrue(FileUtils.copyToFile(is, outFile));
+        FileUtils.setPermissions(outFile.getPath(), FileUtils.S_IRWXU | FileUtils.S_IRWXG
+                | FileUtils.S_IRWXO, -1, -1);
+    }
+
+    /**
+     * Creates an OBB file (with the given name), into the app's standard files directory
+     *
+     * @param name The name of the OBB file we want to create/write to
+     * @param rawResId The raw resource ID of the OBB file in the package
+     * @return A {@link File} representing the file to write to
+     */
+    protected File createObbFile(String name, int rawResId) {
+        File outFile = null;
+        try {
+            final File filesDir = mContext.getFilesDir();
+            outFile = new File(filesDir, name);
+            copyRawToFile(rawResId, outFile);
+        } catch (NotFoundException e) {
+            if (outFile != null) {
+                outFile.delete();
+            }
+        }
+        return outFile;
+    }
+
+    /**
+     * Mounts an OBB file and opens a file located on it
+     *
+     * @param obbPath Path to OBB image
+     * @param fileName The full name and path to the file on the OBB to open once the OBB is mounted
+     * @return The {@link DataInputStream} representing the opened file, if successful in opening
+     *      the file, or null of unsuccessful.
+     */
+    protected DataInputStream openFileOnMountedObb(String obbPath, String fileName) {
+
+        // get mSm obb mount path
+        assertTrue("Cannot open file when OBB is not mounted!", mSm.isObbMounted(obbPath));
+
+        String path = mSm.getMountedObbPath(obbPath);
+        assertTrue("Path should not be null!", path != null);
+
+        File inFile = new File(path, fileName);
+        DataInputStream inStream = null;
+        try {
+            inStream = new DataInputStream(new FileInputStream(inFile));
+            Log.i(LOG_TAG, "Opened file: " + fileName + " for read at path: " + path);
+        } catch (FileNotFoundException e) {
+            Log.e(LOG_TAG, e.toString());
+            return null;
+        } catch (SecurityException e) {
+            Log.e(LOG_TAG, e.toString());
+            return null;
+        }
+        return inStream;
+    }
+
+    /**
+     * Mounts an OBB file
+     *
+     * @param obbFilePath The full path to the OBB file to mount
+     * @param key (optional) The key to use to unencrypt the OBB; pass null for no encryption
+     * @param expectedState The expected state resulting from trying to mount the OBB
+     * @return A {@link String} representing the normalized path to OBB file that was mounted
+     */
+    protected String mountObb(String obbFilePath, String key, int expectedState) {
+        return doMountObb(obbFilePath, key, expectedState);
+    }
+
+    /**
+     * Mounts an OBB file with default options (no encryption, mounting succeeds)
+     *
+     * @param obbFilePath The full path to the OBB file to mount
+     * @return A {@link String} representing the normalized path to OBB file that was mounted
+     */
+    protected String mountObb(String obbFilePath) {
+        return doMountObb(obbFilePath, null, OnObbStateChangeListener.MOUNTED);
+    }
+
+    /**
+     * Synchronously waits for an OBB listener to be signaled of a state change, but does not throw
+     *
+     * @param obbListener The listener for the OBB file
+     * @return true if the listener was signaled of a state change by the system, else returns
+     *      false if we time out.
+     */
+    protected boolean doWaitForObbStateChange(ObbListener obbListener) {
+        synchronized(obbListener) {
+            long waitTimeMillis = 0;
+            while (!obbListener.isDone()) {
+                try {
+                    Log.i(LOG_TAG, "Waiting for listener...");
+                    obbListener.wait(WAIT_TIME_INCR);
+                    Log.i(LOG_TAG, "Awoke from waiting for listener...");
+                    waitTimeMillis += WAIT_TIME_INCR;
+                    if (waitTimeMillis > MAX_WAIT_TIME) {
+                        fail("Timed out waiting for OBB state to change!");
+                    }
+                } catch (InterruptedException e) {
+                    Log.i(LOG_TAG, e.toString());
+                }
+            }
+            return obbListener.isDone();
+            }
+    }
+
+    /**
+     * Synchronously waits for an OBB listener to be signaled of a state change
+     *
+     * @param obbListener The listener for the OBB file
+     * @return true if the listener was signaled of a state change by the system; else a fail()
+     *      is triggered if we timed out
+     */
+    protected String doMountObb_noThrow(String obbFilePath, String key, int expectedState) {
+        Log.i(LOG_TAG, "doMountObb() on " + obbFilePath + " using key: " + key);
+        assertTrue ("Null path was passed in for OBB file!", obbFilePath != null);
+        assertTrue ("Null path was passed in for OBB file!", obbFilePath != null);
+
+        ObbListener obbListener = new ObbListener();
+        boolean success = mSm.mountObb(obbFilePath, key, obbListener);
+        success &= obbFilePath.equals(doWaitForObbStateChange(obbListener));
+        success &= (expectedState == obbListener.state());
+
+        if (OnObbStateChangeListener.MOUNTED == expectedState) {
+            success &= obbFilePath.equals(obbListener.officialPath());
+            success &= mSm.isObbMounted(obbListener.officialPath());
+        } else {
+            success &= !mSm.isObbMounted(obbListener.officialPath());
+        }
+
+        if (success) {
+            return obbListener.officialPath();
+        } else {
+            return null;
+        }
+    }
+
+    /**
+     * Mounts an OBB file without throwing and synchronously waits for it to finish mounting
+     *
+     * @param obbFilePath The full path to the OBB file to mount
+     * @param key (optional) The key to use to unencrypt the OBB; pass null for no encryption
+     * @param expectedState The expected state resulting from trying to mount the OBB
+     * @return A {@link String} representing the actual normalized path to OBB file that was
+     *      mounted, or null if the mounting failed
+     */
+    protected String doMountObb(String obbFilePath, String key, int expectedState) {
+        Log.i(LOG_TAG, "doMountObb() on " + obbFilePath + " using key: " + key);
+        assertTrue ("Null path was passed in for OBB file!", obbFilePath != null);
+
+        ObbListener obbListener = new ObbListener();
+        assertTrue("mountObb call failed", mSm.mountObb(obbFilePath, key, obbListener));
+        assertTrue("Failed to get OBB mount status change for file: " + obbFilePath,
+                doWaitForObbStateChange(obbListener));
+        assertEquals("OBB mount state not what was expected!", expectedState, obbListener.state());
+
+        if (OnObbStateChangeListener.MOUNTED == expectedState) {
+            assertEquals(obbFilePath, obbListener.officialPath());
+            assertTrue("Obb should be mounted, but SM reports it is not!",
+                    mSm.isObbMounted(obbListener.officialPath()));
+        } else if (OnObbStateChangeListener.UNMOUNTED == expectedState) {
+            assertFalse("Obb should not be mounted, but SM reports it is!",
+                    mSm.isObbMounted(obbListener.officialPath()));
+        }
+
+        assertEquals("Mount state is not what was expected!", expectedState, obbListener.state());
+        return obbListener.officialPath();
+    }
+
+    /**
+     * Unmounts an OBB file without throwing, and synchronously waits for it to finish unmounting
+     *
+     * @param obbFilePath The full path to the OBB file to mount
+     * @param force true if we shuold force the unmount, false otherwise
+     * @return true if the unmount was successful, false otherwise
+     */
+    protected boolean unmountObb_noThrow(String obbFilePath, boolean force) {
+        Log.i(LOG_TAG, "doUnmountObb_noThrow() on " + obbFilePath);
+        assertTrue ("Null path was passed in for OBB file!", obbFilePath != null);
+        boolean success = true;
+
+        ObbListener obbListener = new ObbListener();
+        assertTrue("unmountObb call failed", mSm.unmountObb(obbFilePath, force, obbListener));
+
+        boolean stateChanged = doWaitForObbStateChange(obbListener);
+        if (force) {
+            success &= stateChanged;
+            success &= (OnObbStateChangeListener.UNMOUNTED == obbListener.state());
+            success &= !mSm.isObbMounted(obbFilePath);
+        }
+        return success;
+    }
+
+    /**
+     * Unmounts an OBB file and synchronously waits for it to finish unmounting
+     *
+     * @param obbFilePath The full path to the OBB file to mount
+     * @param force true if we shuold force the unmount, false otherwise
+     */
+    protected void unmountObb(String obbFilePath, boolean force) {
+        Log.i(LOG_TAG, "doUnmountObb() on " + obbFilePath);
+        assertTrue ("Null path was passed in for OBB file!", obbFilePath != null);
+
+        ObbListener obbListener = new ObbListener();
+        assertTrue("unmountObb call failed", mSm.unmountObb(obbFilePath, force, obbListener));
+
+        boolean stateChanged = doWaitForObbStateChange(obbListener);
+        if (force) {
+            assertTrue("Timed out waiting to unmount OBB file " + obbFilePath, stateChanged);
+            assertEquals("OBB failed to unmount", OnObbStateChangeListener.UNMOUNTED,
+                    obbListener.state());
+            assertFalse("Obb should NOT be mounted, but SM reports it is!", mSm.isObbMounted(
+                    obbFilePath));
+        }
+    }
+
+    /**
+     * Helper to validate the contents of an "int" file in an OBB.
+     *
+     * The format of the files are sequential int's, in the range of: [start..end)
+     *
+     * @param path The full path to the file (path to OBB)
+     * @param filename The filename containing the ints to validate
+     * @param start The first int expected to be found in the file
+     * @param end The last int + 1 expected to be found in the file
+     */
+    protected void doValidateIntContents(String path, String filename, int start, int end) {
+        File inFile = new File(path, filename);
+        DataInputStream inStream = null;
+        Log.i(LOG_TAG, "Validating file " + filename + " at " + path);
+        try {
+            inStream = new DataInputStream(new FileInputStream(inFile));
+
+            for (int i = start; i < end; ++i) {
+                if (inStream.readInt() != i) {
+                    fail("Unexpected value read in OBB file");
+                }
+            }
+            if (inStream != null) {
+                inStream.close();
+            }
+            Log.i(LOG_TAG, "Successfully validated file " + filename);
+        } catch (FileNotFoundException e) {
+            fail("File " + inFile + " not found: " + e.toString());
+        } catch (IOException e) {
+            fail("IOError with file " + inFile + ":" + e.toString());
+        }
+    }
+
+    /**
+     * Helper to validate the contents of a text file in an OBB
+     *
+     * @param path The full path to the file (path to OBB)
+     * @param filename The filename containing the ints to validate
+     * @param contents A {@link String} containing the expected contents of the file
+     */
+    protected void doValidateTextContents(String path, String filename, String contents) {
+        File inFile = new File(path, filename);
+        BufferedReader fileReader = null;
+        BufferedReader textReader = null;
+        Log.i(LOG_TAG, "Validating file " + filename + " at " + path);
+        try {
+            fileReader = new BufferedReader(new FileReader(inFile));
+            textReader = new BufferedReader(new StringReader(contents));
+            String actual = null;
+            String expected = null;
+            while ((actual = fileReader.readLine()) != null) {
+                expected = textReader.readLine();
+                if (!actual.equals(expected)) {
+                    fail("File " + filename + " in OBB " + path + " does not match expected value");
+                }
+            }
+            fileReader.close();
+            textReader.close();
+            Log.i(LOG_TAG, "File " + filename + " successfully verified.");
+        } catch (IOException e) {
+            fail("IOError with file " + inFile + ":" + e.toString());
+        }
+    }
+
+    /**
+     * Helper to validate the contents of a "long" file on our OBBs
+     *
+     * The format of the files are sequential 0's of type long
+     *
+     * @param path The full path to the file (path to OBB)
+     * @param filename The filename containing the ints to validate
+     * @param size The number of zero's expected in the file
+     * @param checkContents If true, the contents of the file are actually verified; if false,
+     *      we simply verify that the file can be opened
+     */
+    protected void doValidateZeroLongFile(String path, String filename, long size,
+            boolean checkContents) {
+        File inFile = new File(path, filename);
+        DataInputStream inStream = null;
+        Log.i(LOG_TAG, "Validating file " + filename + " at " + path);
+        try {
+            inStream = new DataInputStream(new FileInputStream(inFile));
+
+            if (checkContents) {
+                for (long i = 0; i < size; ++i) {
+                    if (inStream.readLong() != 0) {
+                        fail("Unexpected value read in OBB file" + filename);
+                    }
+                }
+            }
+
+            if (inStream != null) {
+                inStream.close();
+            }
+            Log.i(LOG_TAG, "File " + filename + " successfully verified for " + size + " zeros");
+        } catch (IOException e) {
+            fail("IOError with file " + inFile + ":" + e.toString());
+        }
+    }
+
+    /**
+     * Helper to synchronously wait until we can get a path for a given OBB file
+     *
+     * @param filePath The full normalized path to the OBB file
+     * @return The mounted path of the OBB, used to access contents in it
+     */
+    protected String doWaitForPath(String filePath) {
+        String path = null;
+
+        long waitTimeMillis = 0;
+        assertTrue("OBB " + filePath + " is not currently mounted!", mSm.isObbMounted(filePath));
+        while (path == null) {
+            try {
+                Thread.sleep(WAIT_TIME_INCR);
+                waitTimeMillis += WAIT_TIME_INCR;
+                if (waitTimeMillis > MAX_WAIT_TIME) {
+                    fail("Timed out waiting to get path of OBB file " + filePath);
+                }
+            } catch (InterruptedException e) {
+                // do nothing
+            }
+            path = mSm.getMountedObbPath(filePath);
+        }
+        Log.i(LOG_TAG, "Got OBB path: " + path);
+        return path;
+    }
+
+    /**
+     * Verifies the pre-defined contents of our first OBB (OBB_FILE_1)
+     *
+     * The OBB contains 4 files and no subdirectories
+     *
+     * @param filePath The normalized path to the already-mounted OBB file
+     */
+    protected void verifyObb1Contents(String filePath) {
+        String path = null;
+        path = doWaitForPath(filePath);
+
+        // Validate contents of 2 files in this obb
+        doValidateIntContents(path, "OneToOneThousandInts.bin", 0, 1000);
+        doValidateIntContents(path, "SevenHundredInts.bin", 0, 700);
+        doValidateZeroLongFile(path, "FiveLongs.bin", 5, true);
+    }
+
+    /**
+     * Verifies the pre-defined contents of our second OBB (OBB_FILE_2)
+     *
+     * The OBB contains 2 files and no subdirectories
+     *
+     * @param filePath The normalized path to the already-mounted OBB file
+     */
+    protected void verifyObb2Contents(String filename) {
+        String path = null;
+        path = doWaitForPath(filename);
+
+        // Validate contents of file
+        doValidateTextContents(path, "sample.txt", SAMPLE1_TEXT);
+        doValidateTextContents(path, "sample2.txt", SAMPLE2_TEXT);
+    }
+
+    /**
+     * Verifies the pre-defined contents of our third OBB (OBB_FILE_3)
+     *
+     * The OBB contains nested files and subdirectories
+     *
+     * @param filePath The normalized path to the already-mounted OBB file
+     */
+    protected void verifyObb3Contents(String filename) {
+        String path = null;
+        path = doWaitForPath(filename);
+
+        // Validate contents of file
+        doValidateIntContents(path, "OneToOneThousandInts.bin", 0, 1000);
+        doValidateZeroLongFile(path, "TwoHundredLongs", 200, true);
+
+        // validate subdirectory 1
+        doValidateZeroLongFile(path + File.separator + "subdir1", "FiftyLongs", 50, true);
+
+        // validate subdirectory subdir2/
+        doValidateIntContents(path + File.separator + "subdir2", "OneToOneThousandInts", 0, 1000);
+
+        // validate subdirectory subdir2/subdir2a/
+        doValidateZeroLongFile(path + File.separator + "subdir2" + File.separator + "subdir2a",
+                "TwoHundredLongs", 200, true);
+
+        // validate subdirectory subdir2/subdir2a/subdir2a1/
+        doValidateIntContents(path + File.separator + "subdir2" + File.separator + "subdir2a"
+                + File.separator + "subdir2a1", "OneToOneThousandInts", 0, 1000);
+    }
+}
\ No newline at end of file
diff --git a/core/tests/coretests/src/android/os/storage/StorageManagerIntegrationTest.java b/core/tests/coretests/src/android/os/storage/StorageManagerIntegrationTest.java
new file mode 100644
index 0000000..71772d9
--- /dev/null
+++ b/core/tests/coretests/src/android/os/storage/StorageManagerIntegrationTest.java
@@ -0,0 +1,244 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.os.storage;
+
+import android.content.Context;
+import android.os.Environment;
+import android.test.InstrumentationTestCase;
+import android.test.suitebuilder.annotation.LargeTest;
+import android.util.Log;
+
+import com.android.frameworks.coretests.R;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.io.File;
+import java.io.FileInputStream;
+
+import junit.framework.AssertionFailedError;
+
+public class StorageManagerIntegrationTest extends StorageManagerBaseTest {
+
+    private static String LOG_TAG = "StorageManagerBaseTest.StorageManagerIntegrationTest";
+    protected File mFile = null;
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setUp() throws Exception {
+        super.setUp();
+        mContext = getInstrumentation().getContext();
+        mFile = null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void tearDown() throws Exception {
+        if (mFile != null) {
+            mFile.delete();
+            mFile = null;
+        }
+        super.tearDown();
+    }
+
+    /**
+     * Tests mounting a single OBB file and verifies its contents.
+     */
+    @LargeTest
+    public void testMountSingleObb() {
+        mFile = createObbFile(OBB_FILE_1, R.raw.obb_file1);
+        String filePath = mFile.getAbsolutePath();
+        mountObb(filePath);
+        verifyObb1Contents(filePath);
+        unmountObb(filePath, DONT_FORCE);
+    }
+
+    /**
+     * Tests mounting several OBB files and verifies its contents.
+     */
+    @LargeTest
+    public void testMountMultipleObb() {
+        File file1 = null;
+        File file2 = null;
+        File file3 = null;
+        try {
+            file1 = createObbFile(OBB_FILE_1, R.raw.obb_file1);
+            String filePath1 = file1.getAbsolutePath();
+            mountObb(filePath1);
+            verifyObb1Contents(filePath1);
+
+            file2 = createObbFile(OBB_FILE_2, R.raw.obb_file2);
+            String filePath2 = file2.getAbsolutePath();
+            mountObb(filePath2);
+            verifyObb2Contents(filePath2);
+
+            file3 = createObbFile(OBB_FILE_3, R.raw.obb_file3);
+            String filePath3 = file3.getAbsolutePath();
+            mountObb(filePath3);
+            verifyObb3Contents(filePath3);
+
+            unmountObb(filePath1, DONT_FORCE);
+            unmountObb(filePath2, DONT_FORCE);
+            unmountObb(filePath3, DONT_FORCE);
+        } finally {
+            if (file1 != null) {
+                file1.delete();
+            }
+            if (file2 != null) {
+                file2.delete();
+            }
+            if (file3 != null) {
+                file3.delete();
+            }
+        }
+    }
+
+    /**
+     * Tests mounting a single encrypted OBB file and verifies its contents.
+     */
+    @LargeTest
+    public void testMountSingleEncryptedObb() {
+        mFile = createObbFile(OBB_FILE_3_ENCRYPTED, R.raw.obb_enc_file100_orig3);
+        String filePath = mFile.getAbsolutePath();
+        mountObb(filePath, OBB_FILE_3_PASSWORD, OnObbStateChangeListener.MOUNTED);
+        verifyObb3Contents(filePath);
+        unmountObb(filePath, DONT_FORCE);
+    }
+
+    /**
+     * Tests mounting a single encrypted OBB file using an invalid password.
+     */
+    @LargeTest
+    public void testMountSingleEncryptedObbInvalidPassword() {
+        mFile = createObbFile("bad password@$%#@^*(!&)", R.raw.obb_enc_file100_orig3);
+        String filePath = mFile.getAbsolutePath();
+        mountObb(filePath, OBB_FILE_3_PASSWORD, OnObbStateChangeListener.ERROR_COULD_NOT_MOUNT);
+        unmountObb(filePath, DONT_FORCE);
+    }
+
+    /**
+     * Tests simultaneously mounting 2 encrypted OBBs with different keys and verifies contents.
+     */
+    @LargeTest
+    public void testMountTwoEncryptedObb() {
+        File file3 = null;
+        File file1 = null;
+        try {
+            file3 = createObbFile(OBB_FILE_3_ENCRYPTED, R.raw.obb_enc_file100_orig3);
+            String filePath3 = file3.getAbsolutePath();
+            mountObb(filePath3, OBB_FILE_3_PASSWORD, OnObbStateChangeListener.MOUNTED);
+            verifyObb3Contents(filePath3);
+
+            file1 = createObbFile(OBB_FILE_1_ENCRYPTED, R.raw.obb_enc_file100_orig1);
+            String filePath1 = file1.getAbsolutePath();
+            mountObb(filePath1, OBB_FILE_1_PASSWORD, OnObbStateChangeListener.MOUNTED);
+            verifyObb1Contents(filePath1);
+
+            unmountObb(filePath3, DONT_FORCE);
+            unmountObb(filePath1, DONT_FORCE);
+        } finally {
+            if (file3 != null) {
+                file3.delete();
+            }
+            if (file1 != null) {
+                file1.delete();
+            }
+        }
+    }
+
+    /**
+     * Tests that we can not force unmount when a file is currently open on the OBB.
+     */
+    @LargeTest
+    public void testUnmount_DontForce() {
+        mFile = createObbFile(OBB_FILE_1, R.raw.obb_file1);
+        String obbFilePath = mFile.getAbsolutePath();
+
+        MountingObbThread mountingThread = new MountingObbThread(obbFilePath,
+                OBB_FILE_1_CONTENTS_1);
+
+        try {
+            mountingThread.start();
+
+            long waitTime = 0;
+            while (!mountingThread.isFileOpenOnObb()) {
+                synchronized (mountingThread) {
+                    Log.i(LOG_TAG, "Waiting for file to be opened on OBB...");
+                    mountingThread.wait(WAIT_TIME_INCR);
+                    waitTime += WAIT_TIME_INCR;
+                    if (waitTime > MAX_WAIT_TIME) {
+                        fail("Timed out waiting for file file to be opened on OBB!");
+                    }
+                }
+            }
+
+            unmountObb(obbFilePath, DONT_FORCE);
+
+            // verify still mounted
+            assertTrue("mounted path should not be null!", obbFilePath != null);
+            assertTrue("mounted path should still be mounted!", mSm.isObbMounted(obbFilePath));
+
+            // close the opened file
+            mountingThread.doStop();
+
+            // try unmounting again (should succeed this time)
+            unmountObb(obbFilePath, DONT_FORCE);
+            assertFalse("mounted path should no longer be mounted!",
+                    mSm.isObbMounted(obbFilePath));
+        } catch (InterruptedException e) {
+            fail("Timed out waiting for file on OBB to be opened...");
+        }
+    }
+
+    /**
+     * Tests mounting a single OBB that isn't signed.
+     */
+    @LargeTest
+    public void testMountUnsignedObb() {
+        mFile = createObbFile(OBB_FILE_2_UNSIGNED, R.raw.obb_file2_nosign);
+        String filePath = mFile.getAbsolutePath();
+        mountObb(filePath, OBB_FILE_2_UNSIGNED, OnObbStateChangeListener.ERROR_INTERNAL);
+    }
+
+    /**
+     * Tests mounting a single OBB that is signed with a different package.
+     */
+    @LargeTest
+    public void testMountBadPackageNameObb() {
+        mFile = createObbFile(OBB_FILE_3_BAD_PACKAGENAME, R.raw.obb_file3_bad_packagename);
+        String filePath = mFile.getAbsolutePath();
+        mountObb(filePath, OBB_FILE_3_BAD_PACKAGENAME,
+                OnObbStateChangeListener.ERROR_PERMISSION_DENIED);
+    }
+
+    /**
+     * Tests remounting a single OBB that has already been mounted.
+     */
+    @LargeTest
+    public void testRemountObb() {
+        mFile = createObbFile(OBB_FILE_1, R.raw.obb_file1);
+        String filePath = mFile.getAbsolutePath();
+        mountObb(filePath);
+        verifyObb1Contents(filePath);
+        mountObb(filePath, null, OnObbStateChangeListener.ERROR_ALREADY_MOUNTED);
+        verifyObb1Contents(filePath);
+        unmountObb(filePath, DONT_FORCE);
+    }
+}
\ No newline at end of file
diff --git a/data/sounds/notifications/Altair.ogg b/data/sounds/notifications/Altair.ogg
old mode 100755
new mode 100644
index 8b56f91..660c800
--- a/data/sounds/notifications/Altair.ogg
+++ b/data/sounds/notifications/Altair.ogg
Binary files differ
diff --git a/data/sounds/notifications/Capella.ogg b/data/sounds/notifications/Capella.ogg
old mode 100755
new mode 100644
index 22e1d37..ae4f3c5
--- a/data/sounds/notifications/Capella.ogg
+++ b/data/sounds/notifications/Capella.ogg
Binary files differ
diff --git a/data/sounds/notifications/Castor.ogg b/data/sounds/notifications/Castor.ogg
old mode 100755
new mode 100644
index 4ad22d0..92de8e7
--- a/data/sounds/notifications/Castor.ogg
+++ b/data/sounds/notifications/Castor.ogg
Binary files differ
diff --git a/data/sounds/notifications/Deneb.ogg b/data/sounds/notifications/Deneb.ogg
old mode 100755
new mode 100644
index 096ff0a..3b17e28
--- a/data/sounds/notifications/Deneb.ogg
+++ b/data/sounds/notifications/Deneb.ogg
Binary files differ
diff --git a/data/sounds/notifications/Electra.ogg b/data/sounds/notifications/Electra.ogg
old mode 100755
new mode 100644
index 313cb6f..9335d8d
--- a/data/sounds/notifications/Electra.ogg
+++ b/data/sounds/notifications/Electra.ogg
Binary files differ
diff --git a/data/sounds/notifications/Fomalhaut.ogg b/data/sounds/notifications/Fomalhaut.ogg
old mode 100755
new mode 100644
index 39c71ad..9448c18
--- a/data/sounds/notifications/Fomalhaut.ogg
+++ b/data/sounds/notifications/Fomalhaut.ogg
Binary files differ
diff --git a/data/sounds/notifications/Polaris.ogg b/data/sounds/notifications/Polaris.ogg
old mode 100755
new mode 100644
index 8104178..d5b991f
--- a/data/sounds/notifications/Polaris.ogg
+++ b/data/sounds/notifications/Polaris.ogg
Binary files differ
diff --git a/data/sounds/notifications/Pollux.ogg b/data/sounds/notifications/Pollux.ogg
old mode 100755
new mode 100644
index ede9e27..d37c75cf
--- a/data/sounds/notifications/Pollux.ogg
+++ b/data/sounds/notifications/Pollux.ogg
Binary files differ
diff --git a/data/sounds/notifications/Procyon.ogg b/data/sounds/notifications/Procyon.ogg
old mode 100755
new mode 100644
index 02dbc3f..93d1557
--- a/data/sounds/notifications/Procyon.ogg
+++ b/data/sounds/notifications/Procyon.ogg
Binary files differ
diff --git a/data/sounds/notifications/arcturus.ogg b/data/sounds/notifications/arcturus.ogg
index 7b61963..9d73103 100644
--- a/data/sounds/notifications/arcturus.ogg
+++ b/data/sounds/notifications/arcturus.ogg
Binary files differ
diff --git a/data/sounds/notifications/regulus.ogg b/data/sounds/notifications/regulus.ogg
index dc52054..4f28d9e 100644
--- a/data/sounds/notifications/regulus.ogg
+++ b/data/sounds/notifications/regulus.ogg
Binary files differ
diff --git a/data/sounds/notifications/sirius.ogg b/data/sounds/notifications/sirius.ogg
index a54481b..78c9991 100644
--- a/data/sounds/notifications/sirius.ogg
+++ b/data/sounds/notifications/sirius.ogg
Binary files differ
diff --git a/data/sounds/ringtones/ANDROMEDA.ogg b/data/sounds/ringtones/ANDROMEDA.ogg
index 33e43e3..8f6bd3e 100644
--- a/data/sounds/ringtones/ANDROMEDA.ogg
+++ b/data/sounds/ringtones/ANDROMEDA.ogg
Binary files differ
diff --git a/data/sounds/ringtones/Aquila.ogg b/data/sounds/ringtones/Aquila.ogg
old mode 100755
new mode 100644
index 3f9266d..b391be9
--- a/data/sounds/ringtones/Aquila.ogg
+++ b/data/sounds/ringtones/Aquila.ogg
Binary files differ
diff --git a/data/sounds/ringtones/ArgoNavis.ogg b/data/sounds/ringtones/ArgoNavis.ogg
old mode 100755
new mode 100644
index 11c6092..b4202ac
--- a/data/sounds/ringtones/ArgoNavis.ogg
+++ b/data/sounds/ringtones/ArgoNavis.ogg
Binary files differ
diff --git a/data/sounds/ringtones/BOOTES.ogg b/data/sounds/ringtones/BOOTES.ogg
index 485a9f6..0716a4f 100644
--- a/data/sounds/ringtones/BOOTES.ogg
+++ b/data/sounds/ringtones/BOOTES.ogg
Binary files differ
diff --git a/data/sounds/ringtones/CANISMAJOR.ogg b/data/sounds/ringtones/CANISMAJOR.ogg
index e51d6e0..177d3de 100644
--- a/data/sounds/ringtones/CANISMAJOR.ogg
+++ b/data/sounds/ringtones/CANISMAJOR.ogg
Binary files differ
diff --git a/data/sounds/ringtones/CASSIOPEIA.ogg b/data/sounds/ringtones/CASSIOPEIA.ogg
index 0456a59..c4a7948 100644
--- a/data/sounds/ringtones/CASSIOPEIA.ogg
+++ b/data/sounds/ringtones/CASSIOPEIA.ogg
Binary files differ
diff --git a/data/sounds/ringtones/Carina.ogg b/data/sounds/ringtones/Carina.ogg
old mode 100755
new mode 100644
index 25cf36e..aeb9b36
--- a/data/sounds/ringtones/Carina.ogg
+++ b/data/sounds/ringtones/Carina.ogg
Binary files differ
diff --git a/data/sounds/ringtones/Centaurus.ogg b/data/sounds/ringtones/Centaurus.ogg
old mode 100755
new mode 100644
index 58b413d..404bdbc
--- a/data/sounds/ringtones/Centaurus.ogg
+++ b/data/sounds/ringtones/Centaurus.ogg
Binary files differ
diff --git a/data/sounds/ringtones/Cygnus.ogg b/data/sounds/ringtones/Cygnus.ogg
old mode 100755
new mode 100644
index 763926e..b2e1e65
--- a/data/sounds/ringtones/Cygnus.ogg
+++ b/data/sounds/ringtones/Cygnus.ogg
Binary files differ
diff --git a/data/sounds/ringtones/Draco.ogg b/data/sounds/ringtones/Draco.ogg
old mode 100755
new mode 100644
index 8749b3a..88d5a04
--- a/data/sounds/ringtones/Draco.ogg
+++ b/data/sounds/ringtones/Draco.ogg
Binary files differ
diff --git a/data/sounds/ringtones/Eridani.ogg b/data/sounds/ringtones/Eridani.ogg
old mode 100755
new mode 100644
index a290a6e..b665a29
--- a/data/sounds/ringtones/Eridani.ogg
+++ b/data/sounds/ringtones/Eridani.ogg
Binary files differ
diff --git a/data/sounds/ringtones/Lyra.ogg b/data/sounds/ringtones/Lyra.ogg
old mode 100755
new mode 100644
index 16d47e9..696f278
--- a/data/sounds/ringtones/Lyra.ogg
+++ b/data/sounds/ringtones/Lyra.ogg
Binary files differ
diff --git a/data/sounds/ringtones/Machina.ogg b/data/sounds/ringtones/Machina.ogg
old mode 100755
new mode 100644
index ab0105e..ac16f7e
--- a/data/sounds/ringtones/Machina.ogg
+++ b/data/sounds/ringtones/Machina.ogg
Binary files differ
diff --git a/data/sounds/ringtones/Orion.ogg b/data/sounds/ringtones/Orion.ogg
old mode 100755
new mode 100644
index 8e36024..807f107
--- a/data/sounds/ringtones/Orion.ogg
+++ b/data/sounds/ringtones/Orion.ogg
Binary files differ
diff --git a/data/sounds/ringtones/Pegasus.ogg b/data/sounds/ringtones/Pegasus.ogg
old mode 100755
new mode 100644
index 17baaed..66c4970
--- a/data/sounds/ringtones/Pegasus.ogg
+++ b/data/sounds/ringtones/Pegasus.ogg
Binary files differ
diff --git a/data/sounds/ringtones/Scarabaeus.ogg b/data/sounds/ringtones/Scarabaeus.ogg
old mode 100755
new mode 100644
index 50b9fab..e70fc69
--- a/data/sounds/ringtones/Scarabaeus.ogg
+++ b/data/sounds/ringtones/Scarabaeus.ogg
Binary files differ
diff --git a/data/sounds/ringtones/Sceptrum.ogg b/data/sounds/ringtones/Sceptrum.ogg
old mode 100755
new mode 100644
index 9be353e..fc50aef
--- a/data/sounds/ringtones/Sceptrum.ogg
+++ b/data/sounds/ringtones/Sceptrum.ogg
Binary files differ
diff --git a/data/sounds/ringtones/Solarium.ogg b/data/sounds/ringtones/Solarium.ogg
old mode 100755
new mode 100644
index 2aed475..d27f141
--- a/data/sounds/ringtones/Solarium.ogg
+++ b/data/sounds/ringtones/Solarium.ogg
Binary files differ
diff --git a/data/sounds/ringtones/Testudo.ogg b/data/sounds/ringtones/Testudo.ogg
old mode 100755
new mode 100644
index 063dacf..0ca8d6b
--- a/data/sounds/ringtones/Testudo.ogg
+++ b/data/sounds/ringtones/Testudo.ogg
Binary files differ
diff --git a/data/sounds/ringtones/Vespa.ogg b/data/sounds/ringtones/Vespa.ogg
old mode 100755
new mode 100644
index eaac1bd..4423bbb
--- a/data/sounds/ringtones/Vespa.ogg
+++ b/data/sounds/ringtones/Vespa.ogg
Binary files differ
diff --git a/data/sounds/ringtones/hydra.ogg b/data/sounds/ringtones/hydra.ogg
index b48614f..edde14f 100644
--- a/data/sounds/ringtones/hydra.ogg
+++ b/data/sounds/ringtones/hydra.ogg
Binary files differ
diff --git a/docs/html/guide/appendix/market-filters.jd b/docs/html/guide/appendix/market-filters.jd
index e74cefb..6ca8acc 100644
--- a/docs/html/guide/appendix/market-filters.jd
+++ b/docs/html/guide/appendix/market-filters.jd
@@ -1,322 +1,353 @@
-page.title=Market Filters

-@jd:body

-

-<div id="qv-wrapper">

-<div id="qv">

-

-<h2>Quickview</h2>

-<ul> <li>Android Market applies filters to that let you control whether your app is shown to a

-user who is browing or searching for apps.</li> 

-<li>Filtering is determined by elements in an app's manifest file,

-aspects of the device being used, and other factors.</li> </ul>

-

-<h2>In this document</h2>

-

-<ol> <li><a href="#how-filters-work">How Filters Work in Android Market</a></li>

-<li><a href="#manifest-filters">Filtering based on Manifest File Elements</a></li>

-<li><a href="#other-filters">Other Filters</a></li> 

-</ol>

-

-<h2>See also</h2>

- <ol> 

-<li><a

-href="{@docRoot}guide/practices/compatibility.html">Compatibility</a></li>

-<li style="margin-top:2px;"><code><a

-href="{@docRoot}guide/topics/manifest/supports-screens-element.html">&lt;supports-screens&gt;</a></code></li>

-<li><code><a

-href="{@docRoot}guide/topics/manifest/uses-configuration-element.html">&lt;uses-configuration&gt;</a></code></li>

-<li><code><a

-href="{@docRoot}guide/topics/manifest/uses-feature-element.html">&lt;uses-feature&gt;</a></code></li>

-<li><code><a

-href="{@docRoot}guide/topics/manifest/uses-library-element.html">&lt;uses-library&gt;</a></code></li>

-<li><code><a

-href="{@docRoot}guide/topics/manifest/uses-permission-element.html">&lt;uses-permission&gt;</a></code></li>

-<li><code><a

-href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">&lt;uses-sdk&gt;</code></a></li>

-</ol>

-

-<div id="qv-extra"> <img id="rule" src="{@docRoot}assets/images/grad-rule-qv.png">

-<div id="qv-sub-rule"> <img src="{@docRoot}assets/images/icon_market.jpg"

-style="float:left;margin:0;padding:0;"> <p style="color:#669999;">Interested in

-publishing your app on Android Market?</p> <a id="publish-link"

-href="http://market.android.com/publish">Go to Android Market &raquo;</a> </div>

-</div>

-

-</div> </div>

-

-<p>When a user searches or browses in Android Market, the results are filtered, and

-some applications might not be visible. For example, if an application requires a

-trackball (as specified in the manifest file), then Android Market will not show

-the app on any device that does not have a trackball.</p> <p>The manifest file and

-the device's hardware and features are only part of how applications are filtered

-&#8212; filtering also depends on the country and carrier, the presence or absence

-of a SIM card, and other factors. </p>

-

-<p>Changes to the Android Market filters are independent of changes 

-to the Android platform itself. This document will be updated periodically to reflect 

-any changes that occur. </p>

-

-<h2 id="how-filters-work">How Filters Work in Android Market</h2>

-

-<p>Android Market uses the filter restrictions described below to determine

-whether to show your application to a user who is browsing or searching for

-applications on a given device. When determining whether to display your app,

-Market checks the device's hardware and software capabilities, as well as it's

-carrier, location, and other characteristics. It then compares those against the

-restrictions and dependencies expressed by the application itself, in its

-manifest, <code>.apk</code>, and publishing details. If the application is

-compatible with the device according to the filter rules, Market displays the

-application to the user. Otherwise, Market hides your application from search

-results and category browsing. </p>

-

-<p> You can use the filters described below to control whether Market shows or

-hides your application to users. You can request any combination of the

-available filters for your app &#8212; for example, you could set a

-<code>minSdkVersion</code> requirement of <code>"4"</code> and set

-<code>smallScreens="false"</code> in the app, then when uploading the app to

-Market you could target European countries (carriers) only. Android Market's

-filters would prevent the application from being visible on any device that did

-not match all three of these requirements. </p>

-

- <p>A filtered app is not visible within Market, even if a user specifically requests 

-the app by clicking a deep link that points directly to the app's ID within Market. 

-All filtering restrictions are associated with an application's version and can

-change between versions. For example:</p> 

-

-<ul> 

-<li>If you publish a new version of your app with stricter restrictions, the app

-will not be visible to users for whom it is filtered, even if those users were

-able see the previous version.</li>

-<li>If a user has installed your application and you publish an upgrade that

-makes the app invisible to the user, the user will not see that an upgrade is

-available. </li>

-</ul>

-

-<h2 id="manifest-filters">Filtering based on Manifest Elements</h2>

-

-<p>Most Market filters are triggered by elements within an application's

-manifest file, <a

-href="{@docRoot}guide/topics/manifest/manifest-intro.html">AndroidManifest.xml</a>,

-although not everything in the manifest file can trigger filtering. The

-table below lists the manifest elements that you can use to trigger Android

-Market filtering, and explains how the filtering works.</p>

-

-<p class="table-caption"><strong>Table 1.</strong> Manifest elements that

-trigger filtering on Market.</p>

-<table>

-  <tr>

-    <th>Manifest Element</th>

-    <th>Filter Name</th>

-    <th>How It Works</th>

-  </tr>

-  <tr>

-    <td valign="top" style="white-space:nowrap;"><code><a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">&lt;supports-screens&gt;</a></code>

-      <!-- ##api level 4## --></td>

-    <td valign="top">Screen Size</td>

-    <td valign="top">

-

-<p>An application indicates the screen sizes that it is capable of supporting by

-setting attributes of the <code>&lt;supports-screens&gt;</code> element. When

-the application is published, Market uses those attributes to determine whether

-to show the application to users, based on the screen sizes of their

-devices. </p>

-

-<p>As a general rule, Market assumes that the platform on the device can adapt

-smaller layouts to larger screens, but cannot adapt larger layouts to smaller

-screens. Thus, if an application declares support for "normal" screen size only,

-Market makes the application available to both normal- and large-screen devices,

-but filters the application so that it is not available to small-screen

-devices.</p>

-

-<p>If an application does not declare attributes for

-<code>&lt;supports-screens&gt;</code>, Market uses the default values for those

-attributes, which vary by API Level. Specifically: </p>

-

-<ul>

-<li><p>In API level 3, the <code>&lt;supports-screens&gt;</code> element itself

-is undefined and no attributes are available. In this case, Market assumes that

-the application is designed for normal-size screens and shows the application to

-devices that have normal or large screens. </p>

-

-<p>This behavior is especially significant for applications that set their

-<code><a

-href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">android:

-minSdkVersion</a></code> to 3 or lower, since Market will filter them from

-small-screen devices by default. Such applications can enable support for

-small-screen devices by adding a <code>android:targetSdkVersion="4"</code>

-attribute to the <code>&lt;uses-sdk&gt;</code> element in their manifest

-files. For more information, see <a

-href="{@docRoot}guide/practices/screens_support.html#strategies">Strategies for

-Legacy Applications</a>.</p></li>

-

-<li>In API Level 4, the defaults for all of the attributes is

-<code>"true"</code>. If an application does not declare a

-<code>&lt;supports-screens&gt;</code> element, Market assumes that the

-application is designed for all screen sizes and does not filter it from any

-devices. If the application does not declare one of the attributes, Market uses

-the default value of <code>"true"</code> and does not filter the app for devices

-of corresponding screen size.</li>

-</ul>

-

-    <p><strong>Example 1</strong><br />

-    The manifest declares <code>&lt;uses-sdk android:minSdkVersion="3"&gt;</code>

-    and does not does not include a <code>&lt;supports-screens&gt;</code> element.

-    <strong>Result</strong>: Android Market will not show the app to a user of a

-    small-screen device, but will show it to users of normal and large-screen

-    devices,  users, unless  other filters apply. </p>

-    <p><strong>Example 2<br />

-    </strong>The manifest declares <code>&lt;uses-sdk android:minSdkVersion="3"

-    android:targetSdkVersion="4"&gt;</code> and does not include a

-    <code>&lt;supports-screens&gt;</code> element.

-    <strong>Result</strong>: Android Market will show the app to users on all 

-    devices, unless other filters apply. </p>

-    <p><strong>Example 3<br />

-    </strong>The manifest declares <code>&lt;uses-sdk android:minSdkVersion="4"&gt;</code>

-    and does not include a <code>&lt;supports-screens&gt;</code> element.

-    <strong>Result</strong>: Android Market will show the app to all users,

-    unless  other filters apply. </p>

-    <p>For more information on how to declare support for screen sizes in your

-    application, see <code><a

-    href="{@docRoot}guide/topics/manifest/supports-screens-element.html">&lt;supports-screens&gt;</a></code>

-    and <a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple

-    Screens</a>.</p>

-</td>

-  </tr>

-  <tr>

-    <td valign="top" style="white-space:nowrap;"><code><a href="{@docRoot}guide/topics/manifest/uses-configuration-element.html">&lt;uses-configuration&gt;</a></code>

-      <!-- ##api level 3## --></td>

-    <td valign="top">Device

-    Configuration: <br />

-    keyboard, navigation, touch screen</td>

-    <td valign="top"><p>An application can

-    request certain hardware features, and Android Market will  show the app only on devices that have the required hardware.</p>

-      <p><strong>Example 1<br />

-      </strong>The manifest includes <code>&lt;uses-configuration android:reqFiveWayNav=&quot;true&quot; /&gt;</code>, and a user is searching for apps on a device that does not have a five-way navigational control. <strong>Result</strong>: Android Market will not show the app to the user. </p>

-      <p><strong>Example 2<br />

-      </strong>The manifest does not include a <code>&lt;uses-configuration&gt;</code> element. <strong>Result</strong>: Android Market will show the app to all users, unless other filters apply.</p>

-<p>For more details, see  <a

-href="{@docRoot}guide/topics/manifest/uses-configuration-element.html"><code>&lt;uses-configuration&gt;</code></a>.</p></td>

-  </tr>

-  <tr>

-    <td rowspan="2" valign="top" style="white-space:nowrap;"><code><a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">&lt;uses-feature&gt;</a></code>

-      <!-- ##api level 4## --></td>

-    <td valign="top">Device Features<br />

-      (<code>name</code>)</td>

-    <td valign="top"><p>An

-      application can require certain device features to be present on the device. This functionality

-      was introduced in Android 2.0 (API Level 5).</p>

-      <p><strong>Example 1<br />

-      </strong>The manifest includes <code>&lt;uses-feature android:name=&quot;android.hardware.sensor.light&quot; /&gt;</code>, and a user is searching for apps on a device that does not have a light sensor. <strong>Result</strong>: Android Market will not show the app to the user. </p>

-      <p><strong>Example 2<br />

-      </strong>The manifest does not include a <code>&lt;uses-feature&gt;</code> element. <strong>Result</strong>: Android Market will show the app to all users, unless other filters apply.</p>

-      <p>For more details, see <code><a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">&lt;uses-feature&gt;</a></code>.</p>

-<p><em>A note about camera:</em> If an

-        application requests the CAMERA permission using the <a

-href="{@docRoot}guide/topics/manifest/uses-permission-element.html"> <code>&lt;uses-permission&gt;</code></a> element, Market assumes that the

-        application requires the camera and all camera features (such as autofocus). For applications that require the camera and are designed to run on Android 1.5 (API Level 3), declaring the CAMERA permission is an effective way of ensuring that Market filters your app properly, since <code>uses-feature</code> filtering is not available to applications compiled against the Android 1.5 platform. For more details about requiring or requesting a camera, see the <a href="{@docRoot}guide/topics/manifest/uses-library-element.html#required"> <code>required</code></a> attribute of <code>&lt;uses-feature&gt;</code>. </p></td>

-  </tr>

-  <tr>

-    <td valign="top">OpenGL-ES

-    Version<br />

-(<code>openGlEsVersion</code>)</td>

-    <td valign="top"><p>An application can require that the device support a specific

-      OpenGL-ES version using the <code>&lt;uses-feature

-        android:openGlEsVersion=&quot;int&quot;&gt;</code> attribute.</p>

-      <p><strong>Example 1<br />

-      </strong>An app

-        requests multiple OpenGL-ES versions by specifying <code>openGlEsVersion</code> multiple times in the

-        manifest.  <strong>Result</strong>: Market assumes that the app requires the highest of the indicated versions.</p>

-<p><strong>Example 2<br />

-</strong>An app

-        requests OpenGL-ES version 1.1, and a user is searching for apps on a device that supports OpenGL-ES version 2.0. <strong>Result</strong>: Android Market will show the app to the user, unless other filters apply. If a

-  device reports that it supports OpenGL-ES version <em>X</em>,  Market assumes that it

-  also supports any version earlier than <em>X</em>.

-</p>

-<p><strong>Example 3<br />

-</strong>A user is searching for apps on a device that does not

-        report an OpenGL-ES version (for example, a device running Android 1.5 or earlier). <strong>Result</strong>: Android Market assumes that the device

-  supports only OpenGL-ES 1.0. Market will only show the user apps that do not specify <code>openGlEsVersion</code>, or apps that do not specify an OpenGL-ES version higher than 1.0. </p>

-      <p><strong>Example 4<br />

-      </strong>The manifest does not specify <code>openGlEsVersion</code>. <strong>Result</strong>: Android Market will show the app to all users, unless other filters apply. </p>

-<p>For more details, see <a

-href="{@docRoot}guide/topics/manifest/uses-feature-element.html"><code>&lt;uses-feature&gt;</code></a>.</p></td>

-  </tr>

-  <tr>

-    <td valign="top" style="white-space:nowrap;"><code><a href="{@docRoot}guide/topics/manifest/uses-library-element.html">&lt;uses-library&gt;</a></code></td>

-    <td valign="top">Software Libraries</td>

-    <td valign="top"><p>An application can require specific

-    shared libraries to be present on the device. </p>

-      <p><strong>Example 1<br />

-      </strong>An app requires the <code>com.google.android.maps</code> library, and a user is searching for apps on a device that does not have the <code>com.google.android.maps</code> library. <strong>Result</strong>: Android Market will not show the app to the user. </p>

-      <p><strong>Example 2</strong><br />

-        The manifest does not include a <code>&lt;uses-library&gt;</code> element. <strong>Result</strong>: Android Market will show the app to all users, unless other filters apply.</p>

-<p>For more details, see <a

-href="{@docRoot}guide/topics/manifest/uses-library-element.html"><code>&lt;uses-library&gt;</code></a>.</p></td>

-  </tr>

-  <tr>

-    <td valign="top" style="white-space:nowrap;"><code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">&lt;uses-permission&gt;</a></code></td>

-    <td valign="top">&nbsp;</td>

-    <td valign="top"><em>(See the note in the description of <code>&lt;uses-feature&gt;</code>, above.)</em></td>

-  </tr>

-  <tr>

-    <td rowspan="2" valign="top" style="white-space:nowrap;"><code><a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">&lt;uses-sdk&gt;</a></code></td>

-    <td valign="top">Minimum Framework Version (<code>minSdkVersion</code>)</td>

-    <td valign="top"><p>An application can require a minimum API level.  </p>

-      <p><strong>Example 1</strong><br />

-        The manifest includes <code>&lt;uses-sdk

-      android:minSdkVersion=&quot;3&quot;&gt;</code>, and the app uses APIs that were introduced in API Level 3. A user is searching for apps on a device that has API Level 2. <strong>Result</strong>: Android Market will not show the app to the user. </p>

-      <p><strong>Example 2</strong><br />

-      The manifest does not include <code>minSdkVersion</code>, and the app uses APIs that were introduced in API Level 3. A user is searching for apps on a device that has API Level 2. <strong>Result</strong>: Android Market assumes that <code>minSdkVersion</code> is &quot;1&quot; and that the app is compatible with all versions of Android. Market  shows the app to the user and allows the user to download the app. The app crashes at runtime. </p>

-    <p>Because you want to avoid this second scenario, we recommend that you always declare a <code>minSdkVersion</code>. For details, see <a

-href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min"><code>android:minSdkVersion</code></a>.</p></td>

-  </tr>

-  <tr>

-    <td valign="top">Maximum Framework Version (<code>maxSdkVersion</code>)</td>

-    <td valign="top"><p><em>Deprecated.</em> Android

-    2.1 and later do not check or enforce the <code>maxSdkVersion</code> attribute, and

-    the SDK will not compile if <code>maxSdkVersion</code> is set in an app's manifest. For devices already

-    compiled with <code>maxSdkVersion</code>, Market will respect it and use it for

-    filtering.</p>

-<p> Declaring <code>maxSdkVersion</code> is <em>not</em> recommended. For details, see <a

-href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#max"><code>android:maxSdkVersion</code></a>.</p></td>

-  </tr>

-</table>

-

-<h2 id="other-filters">Other Filters</h2>

-<p>Android Market uses other application characteristics to determine whether to show or hide an application for a particular user on a given device, as described in the table below. </p>

-

-<p class="table-caption"><strong>Table 2.</strong> Application and publishing characteristics that affect filtering on Market.</p>

-<table> <tr>

-    <th>Filter Name</th> <th>How It Works</th> </tr>

-

-  <tr>

-    <td valign="top">Publishing Status</td> <td valign="top"><p>Only published applications will appear in

-      searches and browsing within Android Market.</p> <p>Even if an app is unpublished, it can

-        be installed if users can see it in their Downloads area among their purchased,

-        installed, or recently uninstalled apps.</p> <p>If an application has been

-  suspended, users will not be able to reinstall or update it, even if it appears in their Downloads.</p> </td></tr>

-  <tr>

-  <td valign="top">Priced

-    Status</td> <td valign="top"><p>Not all users can see paid apps. To show paid apps, a device

-must have a SIM card and be running Android 1.1 or later, and it must be in a

-country (as determined by SIM carrier) in which paid apps are available.</p></td>

-</tr> <tr>

-  <td valign="top">Country / Carrier Targeting</td> <td valign="top"> <p>When you upload your app to

-    the Android Market, you can select specific countries to target. The app will only

-    be visible to the countries (carriers) that you select, as follows:</p>

-    <ul><li><p>A device's country is determined based on the carrier, if a carrier is

-      available. If no carrier can be determined, the Market application tries to

-      determine the country based on IP.</p></li> <li><p>Carrier is determined based on

-      the device's SIM (for GSM devices), not the current roaming carrier.</p></li></ul>

-</td> </tr> <tr>

-  <td valign="top">Native Platform</td> <td valign="top"><p>An application that includes native

-    libraries that target a specific platform (ARM EABI v7, for example) will only be

-    visible on devices that support that platform. For details about the NDK and using

-    native libraries, see <a href="{@docRoot}sdk/ndk/index.html#overview">What is the

-      Android NDK?</a></p> </tr> <tr>

-        <td valign="top">Forward-Locked Applications</td> <td valign="top"><p>To

-          forward lock an application, set copy protection to "On" when you upload the

-          application to Market. Market will not show copy-protected applications on

-developer devices or unreleased devices.</p></td> </tr> </table>

-

-

+page.title=Market Filters
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>Quickview</h2>
+<ul> <li>Android Market applies filters to that let you control whether your app is shown to a
+user who is browing or searching for apps.</li> 
+<li>Filtering is determined by elements in an app's manifest file,
+aspects of the device being used, and other factors.</li> </ul>
+
+<h2>In this document</h2>
+
+<ol> <li><a href="#how-filters-work">How Filters Work in Android Market</a></li>
+<li><a href="#manifest-filters">Filtering based on Manifest File Elements</a></li>
+<li><a href="#other-filters">Other Filters</a></li> 
+</ol>
+
+<h2>See also</h2>
+ <ol> 
+<li><a
+href="{@docRoot}guide/practices/compatibility.html">Compatibility</a></li>
+<li style="margin-top:2px;"><code><a
+href="{@docRoot}guide/topics/manifest/supports-screens-element.html">&lt;supports-screens&gt;</a></code></li>
+<li><code><a
+href="{@docRoot}guide/topics/manifest/uses-configuration-element.html">&lt;uses-configuration&gt;</a></code></li>
+<li><code><a
+href="{@docRoot}guide/topics/manifest/uses-feature-element.html">&lt;uses-feature&gt;</a></code></li>
+<li><code><a
+href="{@docRoot}guide/topics/manifest/uses-library-element.html">&lt;uses-library&gt;</a></code></li>
+<li><code><a
+href="{@docRoot}guide/topics/manifest/uses-permission-element.html">&lt;uses-permission&gt;</a></code></li>
+<li><code><a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">&lt;uses-sdk&gt;</code></a></li>
+</ol>
+
+<div id="qv-extra"> <img id="rule" src="{@docRoot}assets/images/grad-rule-qv.png">
+<div id="qv-sub-rule"> <img src="{@docRoot}assets/images/icon_market.jpg"
+style="float:left;margin:0;padding:0;"> <p style="color:#669999;">Interested in
+publishing your app on Android Market?</p> <a id="publish-link"
+href="http://market.android.com/publish">Go to Android Market &raquo;</a> </div>
+</div>
+
+</div> </div>
+
+<p>When a user searches or browses in Android Market, the results are filtered, and
+some applications might not be visible. For example, if an application requires a
+trackball (as specified in the manifest file), then Android Market will not show
+the app on any device that does not have a trackball.</p> <p>The manifest file and
+the device's hardware and features are only part of how applications are filtered
+&#8212; filtering also depends on the country and carrier, the presence or absence
+of a SIM card, and other factors. </p>
+
+<p>Changes to the Android Market filters are independent of changes 
+to the Android platform itself. This document will be updated periodically to reflect 
+any changes that occur. </p>
+
+<h2 id="how-filters-work">How Filters Work in Android Market</h2>
+
+<p>Android Market uses the filter restrictions described below to determine
+whether to show your application to a user who is browsing or searching for
+applications on a given device. When determining whether to display your app,
+Market checks the device's hardware and software capabilities, as well as it's
+carrier, location, and other characteristics. It then compares those against the
+restrictions and dependencies expressed by the application itself, in its
+manifest, <code>.apk</code>, and publishing details. If the application is
+compatible with the device according to the filter rules, Market displays the
+application to the user. Otherwise, Market hides your application from search
+results and category browsing. </p>
+
+<p> You can use the filters described below to control whether Market shows or
+hides your application to users. You can request any combination of the
+available filters for your app &#8212; for example, you could set a
+<code>minSdkVersion</code> requirement of <code>"4"</code> and set
+<code>smallScreens="false"</code> in the app, then when uploading the app to
+Market you could target European countries (carriers) only. Android Market's
+filters would prevent the application from being visible on any device that did
+not match all three of these requirements. </p>
+
+ <p>A filtered app is not visible within Market, even if a user specifically requests 
+the app by clicking a deep link that points directly to the app's ID within Market. 
+All filtering restrictions are associated with an application's version and can
+change between versions. For example:</p> 
+
+<ul> 
+<li>If you publish a new version of your app with stricter restrictions, the app
+will not be visible to users for whom it is filtered, even if those users were
+able see the previous version.</li>
+<li>If a user has installed your application and you publish an upgrade that
+makes the app invisible to the user, the user will not see that an upgrade is
+available. </li>
+</ul>
+
+<h2 id="manifest-filters">Filtering based on Manifest Elements</h2>
+
+<p>Most Market filters are triggered by elements within an application's
+manifest file, <a
+href="{@docRoot}guide/topics/manifest/manifest-intro.html">AndroidManifest.xml</a>,
+although not everything in the manifest file can trigger filtering. The
+table below lists the manifest elements that you can use to trigger Android
+Market filtering, and explains how the filtering works.</p>
+
+<p class="table-caption"><strong>Table 1.</strong> Manifest elements that
+trigger filtering on Market.</p>
+<table>
+  <tr>
+    <th>Manifest Element</th>
+    <th>Filter Name</th>
+    <th>How It Works</th>
+  </tr>
+  <tr>
+    <td valign="top" style="white-space:nowrap;"><code><a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">&lt;supports-screens&gt;</a></code>
+      <!-- ##api level 4## --></td>
+    <td valign="top">Screen Size</td>
+    <td valign="top">
+
+<p>An application indicates the screen sizes that it is capable of supporting by
+setting attributes of the <code>&lt;supports-screens&gt;</code> element. When
+the application is published, Market uses those attributes to determine whether
+to show the application to users, based on the screen sizes of their
+devices. </p>
+
+<p>As a general rule, Market assumes that the platform on the device can adapt
+smaller layouts to larger screens, but cannot adapt larger layouts to smaller
+screens. Thus, if an application declares support for "normal" screen size only,
+Market makes the application available to both normal- and large-screen devices,
+but filters the application so that it is not available to small-screen
+devices.</p>
+
+<p>If an application does not declare attributes for
+<code>&lt;supports-screens&gt;</code>, Market uses the default values for those
+attributes, which vary by API Level. Specifically: </p>
+
+<ul>
+<li><p>In API level 3, the <code>&lt;supports-screens&gt;</code> element itself
+is undefined and no attributes are available. In this case, Market assumes that
+the application is designed for normal-size screens and shows the application to
+devices that have normal or large screens. </p>
+
+<p>This behavior is especially significant for applications that set their
+<code><a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">android:
+minSdkVersion</a></code> to 3 or lower, since Market will filter them from
+small-screen devices by default. Such applications can enable support for
+small-screen devices by adding a <code>android:targetSdkVersion="4"</code>
+attribute to the <code>&lt;uses-sdk&gt;</code> element in their manifest
+files. For more information, see <a
+href="{@docRoot}guide/practices/screens_support.html#strategies">Strategies for
+Legacy Applications</a>.</p></li>
+
+<li>In API Level 4, the defaults for all of the attributes is
+<code>"true"</code>. If an application does not declare a
+<code>&lt;supports-screens&gt;</code> element, Market assumes that the
+application is designed for all screen sizes and does not filter it from any
+devices. If the application does not declare one of the attributes, Market uses
+the default value of <code>"true"</code> and does not filter the app for devices
+of corresponding screen size.</li>
+</ul>
+
+    <p><strong>Example 1</strong><br />
+    The manifest declares <code>&lt;uses-sdk android:minSdkVersion="3"&gt;</code>
+    and does not does not include a <code>&lt;supports-screens&gt;</code> element.
+    <strong>Result</strong>: Android Market will not show the app to a user of a
+    small-screen device, but will show it to users of normal and large-screen
+    devices,  users, unless  other filters apply. </p>
+    <p><strong>Example 2<br />
+    </strong>The manifest declares <code>&lt;uses-sdk android:minSdkVersion="3"
+    android:targetSdkVersion="4"&gt;</code> and does not include a
+    <code>&lt;supports-screens&gt;</code> element.
+    <strong>Result</strong>: Android Market will show the app to users on all 
+    devices, unless other filters apply. </p>
+    <p><strong>Example 3<br />
+    </strong>The manifest declares <code>&lt;uses-sdk android:minSdkVersion="4"&gt;</code>
+    and does not include a <code>&lt;supports-screens&gt;</code> element.
+    <strong>Result</strong>: Android Market will show the app to all users,
+    unless  other filters apply. </p>
+    <p>For more information on how to declare support for screen sizes in your
+    application, see <code><a
+    href="{@docRoot}guide/topics/manifest/supports-screens-element.html">&lt;supports-screens&gt;</a></code>
+    and <a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
+    Screens</a>.</p>
+</td>
+  </tr>
+  <tr>
+    <td valign="top" style="white-space:nowrap;"><code><a href="{@docRoot}guide/topics/manifest/uses-configuration-element.html">&lt;uses-configuration&gt;</a></code>
+      <!-- ##api level 3## --></td>
+    <td valign="top">Device
+    Configuration: <br />
+    keyboard, navigation, touch screen</td>
+    <td valign="top"><p>An application can
+    request certain hardware features, and Android Market will  show the app only on devices that have the required hardware.</p>
+      <p><strong>Example 1<br />
+      </strong>The manifest includes <code>&lt;uses-configuration android:reqFiveWayNav=&quot;true&quot; /&gt;</code>, and a user is searching for apps on a device that does not have a five-way navigational control. <strong>Result</strong>: Android Market will not show the app to the user. </p>
+      <p><strong>Example 2<br />
+      </strong>The manifest does not include a <code>&lt;uses-configuration&gt;</code> element. <strong>Result</strong>: Android Market will show the app to all users, unless other filters apply.</p>
+<p>For more details, see  <a
+href="{@docRoot}guide/topics/manifest/uses-configuration-element.html"><code>&lt;uses-configuration&gt;</code></a>.</p></td>
+  </tr>
+  <tr>
+    <td rowspan="2" valign="top" style="white-space:nowrap;"><code><a
+href="{@docRoot}guide/topics/manifest/uses-feature-element.html">&lt;uses-feature&gt;</a>
+</code>
+      <!-- ##api level 4## --></td>
+    <td valign="top">Device Features<br />
+      (<code>name</code>)</td>
+    <td valign="top"><p>An application can require certain device features to be
+present on the device. This functionality was introduced in Android 2.0 (API
+Level 5).</p>
+      <p><strong>Example 1<br />
+      </strong>The manifest includes <code>&lt;uses-feature
+android:name=&quot;android.hardware.sensor.light&quot; /&gt;</code>, and a user
+is searching for apps on a device that does not have a light sensor.
+<strong>Result</strong>: Android Market will not show the app to the user. </p>
+      <p><strong>Example 2<br />
+      </strong>The manifest does not include a <code>&lt;uses-feature&gt;</code>
+element. <strong>Result</strong>: Android Market will show the app to all users,
+unless other filters apply.</p>
+      <p>For complete information, see <code><a
+href="{@docRoot}guide/topics/manifest/uses-feature-element.html">&lt;uses-feature&gt;</a>
+</code>.</p>
+      <p><em>Filtering based on implied features:</em> In some cases, Android
+Market interprets permissions requested through
+<code>&lt;uses-permission&gt;</code> elements as feature requirements equivalent
+to those declared in <code>&lt;uses-feature&gt;</code> elements. See <a
+href="#uses-permission-filtering"><code>&lt;uses-permission&gt;</code></a>,
+below.</p>
+</td>
+  </tr>
+  <tr>
+    <td valign="top">OpenGL-ES
+    Version<br />
+(<code>openGlEsVersion</code>)</td>
+    <td valign="top"><p>An application can require that the device support a specific
+      OpenGL-ES version using the <code>&lt;uses-feature
+        android:openGlEsVersion=&quot;int&quot;&gt;</code> attribute.</p>
+      <p><strong>Example 1<br />
+      </strong>An app
+        requests multiple OpenGL-ES versions by specifying <code>openGlEsVersion</code> multiple times in the
+        manifest.  <strong>Result</strong>: Market assumes that the app requires the highest of the indicated versions.</p>
+<p><strong>Example 2<br />
+</strong>An app
+        requests OpenGL-ES version 1.1, and a user is searching for apps on a device that supports OpenGL-ES version 2.0. <strong>Result</strong>: Android Market will show the app to the user, unless other filters apply. If a
+  device reports that it supports OpenGL-ES version <em>X</em>,  Market assumes that it
+  also supports any version earlier than <em>X</em>.
+</p>
+<p><strong>Example 3<br />
+</strong>A user is searching for apps on a device that does not
+        report an OpenGL-ES version (for example, a device running Android 1.5 or earlier). <strong>Result</strong>: Android Market assumes that the device
+  supports only OpenGL-ES 1.0. Market will only show the user apps that do not specify <code>openGlEsVersion</code>, or apps that do not specify an OpenGL-ES version higher than 1.0. </p>
+      <p><strong>Example 4<br />
+      </strong>The manifest does not specify <code>openGlEsVersion</code>. <strong>Result</strong>: Android Market will show the app to all users, unless other filters apply. </p>
+<p>For more details, see <a
+href="{@docRoot}guide/topics/manifest/uses-feature-element.html"><code>&lt;uses-feature&gt;</code></a>.</p></td>
+  </tr>
+  <tr>
+    <td valign="top" style="white-space:nowrap;"><code><a href="{@docRoot}guide/topics/manifest/uses-library-element.html">&lt;uses-library&gt;</a></code></td>
+    <td valign="top">Software Libraries</td>
+    <td valign="top"><p>An application can require specific
+    shared libraries to be present on the device. </p>
+      <p><strong>Example 1<br />
+      </strong>An app requires the <code>com.google.android.maps</code> library, and a user is searching for apps on a device that does not have the <code>com.google.android.maps</code> library. <strong>Result</strong>: Android Market will not show the app to the user. </p>
+      <p><strong>Example 2</strong><br />
+        The manifest does not include a <code>&lt;uses-library&gt;</code> element. <strong>Result</strong>: Android Market will show the app to all users, unless other filters apply.</p>
+<p>For more details, see <a
+href="{@docRoot}guide/topics/manifest/uses-library-element.html"><code>&lt;uses-library&gt;</code></a>.</p></td>
+  </tr>
+  <tr id="uses-permission-filtering">
+    <td valign="top" style="white-space:nowrap;"><code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">&lt;uses-permission&gt;</a></code></td>
+    <td valign="top">&nbsp;</td>
+    <td valign="top">Strictly, Android Market does not filter based on
+<code>&lt;uses-permission&gt;</code> elements. However, it does read the
+elements to determine whether the application has hardware feature requirements
+that may not have been properly declared in <code>&lt;uses-feature&gt;</code>
+elements. For example, if an application requests the <code>CAMERA</code>
+permission but does not declare a <code>&lt;uses-feature&gt;</code> element for
+<code>android.hardware.camera</code>, Android Market considers that the
+application requires a camera and should not be shown to users whose devices do
+not offer a camera.</p>
+    <p>In general, if an application requests hardware-related permissions,
+Android Market assumes that the application requires the underlying hardware
+features, even though there might be no corresponding to
+<code>&lt;uses-feature&gt;</code> declarations. Android Market then sets up
+filtering based on the features implied by the <code>&lt;uses-feature&gt;</code>
+declarations.</p>
+    <p>For a list of permissions that imply hardware features, see
+the documentation for the <a
+href="{@docRoot}guide/topics/manifest/uses-feature-element.html#permissions-features"><code>&lt;uses-feature&gt;</code></a>
+element.</p>
+</td>
+  </tr>
+  <tr>
+    <td rowspan="2" valign="top" style="white-space:nowrap;"><code><a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">&lt;uses-sdk&gt;</a></code></td>
+    <td valign="top">Minimum Framework Version (<code>minSdkVersion</code>)</td>
+    <td valign="top"><p>An application can require a minimum API level.  </p>
+      <p><strong>Example 1</strong><br />
+        The manifest includes <code>&lt;uses-sdk
+      android:minSdkVersion=&quot;3&quot;&gt;</code>, and the app uses APIs that were introduced in API Level 3. A user is searching for apps on a device that has API Level 2. <strong>Result</strong>: Android Market will not show the app to the user. </p>
+      <p><strong>Example 2</strong><br />
+      The manifest does not include <code>minSdkVersion</code>, and the app uses APIs that were introduced in API Level 3. A user is searching for apps on a device that has API Level 2. <strong>Result</strong>: Android Market assumes that <code>minSdkVersion</code> is &quot;1&quot; and that the app is compatible with all versions of Android. Market  shows the app to the user and allows the user to download the app. The app crashes at runtime. </p>
+    <p>Because you want to avoid this second scenario, we recommend that you always declare a <code>minSdkVersion</code>. For details, see <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min"><code>android:minSdkVersion</code></a>.</p></td>
+  </tr>
+  <tr>
+    <td valign="top">Maximum Framework Version (<code>maxSdkVersion</code>)</td>
+    <td valign="top"><p><em>Deprecated.</em> Android
+    2.1 and later do not check or enforce the <code>maxSdkVersion</code> attribute, and
+    the SDK will not compile if <code>maxSdkVersion</code> is set in an app's manifest. For devices already
+    compiled with <code>maxSdkVersion</code>, Market will respect it and use it for
+    filtering.</p>
+<p> Declaring <code>maxSdkVersion</code> is <em>not</em> recommended. For details, see <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#max"><code>android:maxSdkVersion</code></a>.</p></td>
+  </tr>
+</table>
+
+<h2 id="other-filters">Other Filters</h2>
+<p>Android Market uses other application characteristics to determine whether to show or hide an application for a particular user on a given device, as described in the table below. </p>
+
+<p class="table-caption"><strong>Table 2.</strong> Application and publishing characteristics that affect filtering on Market.</p>
+<table> <tr>
+    <th>Filter Name</th> <th>How It Works</th> </tr>
+
+  <tr>
+    <td valign="top">Publishing Status</td> <td valign="top"><p>Only published applications will appear in
+      searches and browsing within Android Market.</p> <p>Even if an app is unpublished, it can
+        be installed if users can see it in their Downloads area among their purchased,
+        installed, or recently uninstalled apps.</p> <p>If an application has been
+  suspended, users will not be able to reinstall or update it, even if it appears in their Downloads.</p> </td></tr>
+  <tr>
+  <td valign="top">Priced
+    Status</td> <td valign="top"><p>Not all users can see paid apps. To show paid apps, a device
+must have a SIM card and be running Android 1.1 or later, and it must be in a
+country (as determined by SIM carrier) in which paid apps are available.</p></td>
+</tr> <tr>
+  <td valign="top">Country / Carrier Targeting</td> <td valign="top"> <p>When you upload your app to
+    the Android Market, you can select specific countries to target. The app will only
+    be visible to the countries (carriers) that you select, as follows:</p>
+    <ul><li><p>A device's country is determined based on the carrier, if a carrier is
+      available. If no carrier can be determined, the Market application tries to
+      determine the country based on IP.</p></li> <li><p>Carrier is determined based on
+      the device's SIM (for GSM devices), not the current roaming carrier.</p></li></ul>
+</td> </tr> <tr>
+  <td valign="top">Native Platform</td> <td valign="top"><p>An application that includes native
+    libraries that target a specific platform (ARM EABI v7, for example) will only be
+    visible on devices that support that platform. For details about the NDK and using
+    native libraries, see <a href="{@docRoot}sdk/ndk/index.html#overview">What is the
+      Android NDK?</a></p> </tr> <tr>
+        <td valign="top">Forward-Locked Applications</td> <td valign="top"><p>To
+          forward lock an application, set copy protection to "On" when you upload the
+          application to Market. Market will not show copy-protected applications on
+developer devices or unreleased devices.</p></td> </tr> </table>
+
+
diff --git a/docs/html/guide/appendix/media-formats.jd b/docs/html/guide/appendix/media-formats.jd
index 94a6471..8709994 100644
--- a/docs/html/guide/appendix/media-formats.jd
+++ b/docs/html/guide/appendix/media-formats.jd
@@ -22,7 +22,7 @@
 <tr>
 <td rowspan="9">Audio</td>
 <td>AAC LC/LTP</td>
-<td>&nbsp;</td>
+<td style="text-align: center;">X</td>
 <td style="text-align: center;">X</td>
 <td rowspan="3">Mono/Stereo content in any combination of standard bit rates up to 160 kbps and sampling rates from 8 to 48kHz</td>
 <td rowspan="3">3GPP (.3gp) and MPEG-4 (.mp4, .m4a). No support for raw AAC (.aac)</td>
@@ -51,7 +51,7 @@
 
 <tr>
 <td>AMR-WB</td>
-<td>&nbsp;</td>
+<td style="text-align: center;">X</td>
 <td style="text-align: center;">X</td>
 <td>9 rates from 6.60 kbit/s to 23.85 kbit/s sampled @ 16kHz</td>
 <td>3GPP (.3gp)</td>
@@ -109,7 +109,7 @@
 
 <tr>
 <td>PNG</td>
-<td>&nbsp;</td>
+<td style="text-align: center;">X</td>
 <td style="text-align: center;">X</td>
 <td>&nbsp;</td>
 <td>PNG (.png)</td>
diff --git a/docs/html/guide/developing/eclipse-adt.jd b/docs/html/guide/developing/eclipse-adt.jd
index d0fc9b8..1594159 100644
--- a/docs/html/guide/developing/eclipse-adt.jd
+++ b/docs/html/guide/developing/eclipse-adt.jd
@@ -392,11 +392,11 @@
 
 <ul>
 <li>If you are developing multiple related applications that use some of the
-same components, you move the redundant components out of their respective
+same components, you could move the redundant components out of their respective
 application projects and create a single, reuseable set of the same components
 in a library project. </li>
 <li>If you are creating an application that exists in both free and paid
-versions. You move the part of the application that is common to both versions
+versions, you could move the part of the application that is common to both versions
 into a library project. The two dependent projects, with their different package
 names, will reference the library project and provide only the difference
 between the two application versions.</li>
diff --git a/docs/html/guide/developing/other-ide.jd b/docs/html/guide/developing/other-ide.jd
index ff13f43..8c61771a 100644
--- a/docs/html/guide/developing/other-ide.jd
+++ b/docs/html/guide/developing/other-ide.jd
@@ -555,11 +555,11 @@
 
 <ul>
 <li>If you are developing multiple related applications that use some of the
-same components, you move the redundant components out of their respective
+same components, you could move the redundant components out of their respective
 application projects and create a single, reuseable set of the same components
 in a library project. </li>
 <li>If you are creating an application that exists in both free and paid
-versions. You move the part of the application that is common to both versions
+versions, you could move the part of the application that is common to both versions
 into a library project. The two dependent projects, with their different package
 names, will reference the library project and provide only the difference
 between the two application versions.</li>
diff --git a/docs/html/guide/developing/tools/MonkeyDevice.jd b/docs/html/guide/developing/tools/MonkeyDevice.jd
new file mode 100644
index 0000000..34bbba9
--- /dev/null
+++ b/docs/html/guide/developing/tools/MonkeyDevice.jd
@@ -0,0 +1,1353 @@
+page.title=MonkeyDevice
+@jd:body
+<style>
+    h4.jd-details-title {background-color: #DEE8F1;}
+</style>
+<p>
+    A monkeyrunner class that represents a device or emulator accessible by the workstation running
+<code><a href="{@docRoot}guide/developing/tools/monkeyrunner_concepts.html">monkeyrunner</a></code>.
+</p>
+<p>
+    This class is used to control an Android device or emulator. The methods send UI events,
+    retrieve information, install and remove applications, and run applications.
+</p>
+<p>
+    You normally do not have to create an instance of <code>MonkeyDevice</code>. Instead, you
+    use
+<code><a href="{@docRoot}guide/developing/tools/MonkeyRunner.html#waitForConnection">
+MonkeyRunner.waitForConnection()</a></code> to create a new object from a connection to a device or
+emulator. For example, instead of
+using:</p>
+<pre>
+newdevice = MonkeyDevice()
+</pre>
+<p>
+    you would use:
+</p>
+<pre>
+newdevice = MonkeyRunner.waitForConnection()
+</pre>
+<h2>Summary</h2>
+    <table id="constants" class="jd-sumtable" style="background-color: white;">
+       <tr>
+            <th colspan="12" style="background-color: #E2E2E2">Constants</th>
+       </tr>
+        <tr class="api" style="background-color: white;">
+            <td class="jd-typecol"><em>string</em></td>
+            <td class="jd-linkcol"><a href="#ACTION_DOWN">DOWN</a></td>
+            <td class="jd-descrcol" width="100%">
+                Use this with the <code>type</code> argument of
+                <code><a href="#press">press()</a></code> or <code><a href="#touch">touch()</a>
+                </code>
+                to send a DOWN event.
+            </td>
+        </tr>
+        <tr class="api" style="background-color: white;">
+            <td class="jd-typecol"><em>string</em></td>
+            <td class="jd-linkcol"><a href="#ACTION_UP">UP</a></td>
+            <td class="jd-descrcol" width="100%">
+                Use this with the <code>type</code> argument of
+                <code><a href="#press">press()</a></code> or <code><a href="#touch">touch()</a>
+                </code>
+                to send an UP event.
+            </td>
+        </tr>
+        <tr class="api" style="background-color: white;">
+            <td class="jd-typecol"><em>string</em></td>
+            <td class="jd-linkcol"><a href="#ACTION_DOWN_AND_UP">DOWN_AND_UP</a></td>
+            <td class="jd-descrcol" width="100%">
+                Use this with the <code>type</code> argument of
+                <code><a href="#press">press()</a></code> or <code><a href="#touch">touch()</a>
+                </code>
+                to send a DOWN event immediately followed by an UP event.
+            </td>
+        </tr>
+    </table>
+<table id="pubmethods" class="jd-sumtable">
+    <tr>
+        <th colspan="12" style="background-color: #E2E2E2">Methods</th>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                void
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#broadcastIntent">broadcastIntent</a>
+                </span>
+                (<em>string</em> uri,
+                <em>string</em> action,
+                <em>string</em> data,
+                <em>string</em> mimetype,
+                <em>iterable</em> categories
+                <em>dictionary</em> extras,
+                <em>component</em> component,
+                <em>iterable</em> flags)
+            </nobr>
+            <div class="jd-descrdiv">
+                Broadcasts an Intent to this device, as if the Intent were coming from an
+                application.
+            </div>
+        </td>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                void
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#drag">drag</a>
+                </span>
+                (<em>tuple</em> start,
+                <em>tuple</em> end,
+                <em>float</em> duration,
+                <em>integer</em> steps)
+            </nobr>
+            <div class="jd-descrdiv">
+                Simulates a drag gesture (touch, hold, and move) on this device's screen.
+            </div>
+        </td>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                <em>object</em>
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#getProperty">getProperty</a>
+                </span>
+                (<em>string</em> key)
+            </nobr>
+            <div class="jd-descrdiv">
+                Given the name of a system environment variable, returns its value for this device.
+                The available variable names are listed in the <a href="#getProperty">
+                detailed description</a> of this method.
+            </div>
+        </td>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                <em>object</em>
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#getSystemProperty">getSystemProperty</a>
+                </span>
+                (<em>string</em> key)
+            </nobr>
+            <div class="jd-descrdiv">
+.               The API equivalent of <code>adb shell getprop &lt;key&gt;. This is provided for use
+                by platform developers.
+            </div>
+        </td>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                void
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#installPackage">installPackage</a>
+                </span>
+                (<em>string</em> path)
+            </nobr>
+            <div class="jd-descrdiv">
+                Installs the Android application or test package contained in packageFile onto this
+                device. If the application or test package is already installed, it is replaced.
+            </div>
+        </td>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                <em>dictionary</em>
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#instrument">instrument</a>
+                </span>
+                (<em>string</em> className,
+                <em>dictionary</em> args)
+            </nobr>
+            <div class="jd-descrdiv">
+                Runs the specified component under Android instrumentation, and returns the results
+                in a dictionary whose exact format is dictated by the component being run. The
+                component must already be present on this device.
+            </div>
+        </td>
+    </tr>
+    <tr class="api">
+        <td class="jd-typecol">
+            <nobr>
+                void
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#press">press</a>
+                </span>
+                (<em>string</em> name,
+                <em>dictionary</em> type)
+            </nobr>
+            <div class="jd-descrdiv">
+                Sends the key event specified by type to the key specified by
+                keycode.
+            </div>
+        </td>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                void
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#reboot">reboot</a>
+                </span>
+                (<em>string</em> into)
+            </nobr>
+            <div class="jd-descrdiv">
+                Reboots this device into the bootloader specified by bootloadType.
+            </div>
+        </td>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                void
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#removePackage">removePackage</a>
+                </span>
+                (<em>string</em> package)
+            </nobr>
+            <div class="jd-descrdiv">
+                Deletes the specified package from this device, including its data and cache.
+            </div>
+        </td>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                <em>object</em>
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#shell">shell</a>
+                </span>
+                (<em>string</em> cmd)
+            </nobr>
+            <div class="jd-descrdiv">
+                Executes an <code>adb</code> shell command and returns the result, if any.
+            </div>
+        </td>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                void
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#startActivity">startActivity</a>
+                </span>
+                (<em>string</em> uri,
+                <em>string</em> action,
+                <em>string</em> data,
+                <em>string</em> mimetype,
+                <em>iterable</em> categories
+                <em>dictionary</em> extras,
+                <em>component</em> component,
+                <em>flags</em>)
+            </nobr>
+            <div class="jd-descrdiv">
+                Starts an Activity on this device by sending an Intent constructed from the
+                supplied arguments.
+            </div>
+        </td>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                <code>
+                <a href="{@docRoot}guide/developing/tools/MonkeyImage.html">
+                        MonkeyImage
+                    </a>
+                </code>
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#takeSnapshot">takeSnapshot</a>()
+                </span>
+            </nobr>
+            <div class="jd-descrdiv">
+                Captures the entire screen buffer of this device, yielding a
+                <code>
+                <a href="{@docRoot}guide/developing/tools/MonkeyImage.html">
+                        MonkeyImage
+                </a>
+                </code> object containing a screen capture of the current display.
+            </div>
+        </td>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                void
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#touch">touch</a>
+                </span>
+               (<em>integer</em> x,
+                 <em>integer</em> y,
+                 <em>integer</em> type)
+            </nobr>
+            <div class="jd-descrdiv">
+                Sends a touch event specified by type to the screen location specified
+                by x and y.
+            </div>
+        </td>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                void
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#touch">type</a>
+                </span>
+                   (<em>string</em> message)
+            </nobr>
+            <div class="jd-descrdiv">
+                Sends the characters contained in message to this device, as if they
+                had been typed on the device's keyboard. This is equivalent to calling
+                <code><a href="#press">press()</a></code> for each keycode in <code>message</code>
+                using the key event type <code><a href="#ACTION_DOWN_AND_UP"></a>DOWN_AND_UP</code>.
+            </div>
+        </td>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                void
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#touch">wake</a>
+                </span>
+                   ()
+            </nobr>
+            <div class="jd-descrdiv">
+                Wakes the screen of this device.
+            </div>
+        </td>
+    </tr>
+</table>
+<!-- ========= ENUM CONSTANTS DETAIL ======== -->
+<h2>Constants</h2>
+<A NAME="ACTION_DOWN"></a>
+<div class="jd-details api">
+    <h4 class="jd-details-title">
+        <span class="normal">
+            <em>string</em>
+        </span>
+            DOWN
+    </h4>
+    <div class="jd-details-descr">
+        <div class="jd-tagdata jd-tagdescr">
+            <p>
+                <code><a href="#press">press()</a></code> or
+                <code><a href="#press">touch()</a></code> value.
+                Specifies that a DOWN event type should be sent to the device, corresponding to
+                pressing down on a key or touching the screen.
+            </p>
+        </div>
+    </div>
+</div>
+<A NAME="ACTION_UP"></A>
+<div class="jd-details api">
+    <h4 class="jd-details-title">
+        <span class="normal">
+            <em>string</em>
+        </span>
+            UP
+    </h4>
+    <div class="jd-details-descr">
+        <div class="jd-tagdata jd-tagdescr">
+            <p>
+                <code><a href="#press">press()</a></code> or
+                <code><a href="#press">touch()</a></code> value.
+                Specifies that an UP event type should be sent to the device, corresponding to
+                releasing a key or lifting up from the screen.
+            </p>
+        </div>
+    </div>
+</div>
+<A NAME="ACTION_DOWN_AND_UP"></A>
+
+<div class="jd-details api">
+    <h4 class="jd-details-title">
+        <span class="normal">
+            <em>string</em>
+        </span>
+            DOWN_AND_UP
+    </h4>
+    <div class="jd-details-descr">
+        <div class="jd-tagdata jd-tagdescr">
+            <p>
+                <code><a href="#press">press()</a></code>,
+                <code><a href="#press">touch()</a></code> or
+                <code><a href="#type">type()</a></code> value.
+                Specifies that a DOWN event type followed by an UP event type should be sent to the
+                device, corresponding to typing a key or clicking the screen.
+            </p>
+        </div>
+    </div>
+</div>
+<!-- ========= METHOD DETAIL ======== -->
+<!-- Public methods -->
+<h2>Public Methods</h2>
+<A NAME="broadcastIntent"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        void
+      </span>
+      <span class="sympad">broadcastIntent</span>
+      <span class="normal">
+      (
+            <em>string</em> uri,
+            <em>string</em> action,
+            <em>string</em> data,
+            <em>string</em> mimetype,
+            <em>iterable</em> categories
+            <em>dictionary</em> extras,
+            <em>component</em> component,
+            <em>iterable</em> flags)
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+            Broadcasts an Intent to this device, as if the Intent were coming from an
+            application. See {@link android.content.Intent Intent} for more information about the
+            arguments.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>uri</th>
+            <td>
+                The URI for the Intent.
+                (see {@link android.content.Intent#setData(android.net.Uri) Intent.setData()}).
+            </td>
+        </tr>
+        <tr>
+            <th>action</th>
+            <td>
+                The action for this Intent
+                (see {@link android.content.Intent#setAction(java.lang.String) Intent.setAction()}).
+            </td>
+        </tr>
+        <tr>
+            <th>data</th>
+            <td>
+                The data URI for this Intent
+                (see {@link android.content.Intent#setData(android.net.Uri) Intent.setData()}).
+            </td>
+        </tr>
+        <tr>
+            <th>mimetype</th>
+            <td>
+                The MIME type for the Intent
+                (see {@link android.content.Intent#setType(java.lang.String) Intent.setType()}).
+            </td>
+        </tr>
+        <tr>
+            <th>categories</th>
+            <td>
+                An iterable data structure containing strings that define categories for this
+                Intent
+                (see
+                {@link android.content.Intent#addCategory(java.lang.String) Intent.addCategory()}).
+            </td>
+        </tr>
+        <tr>
+            <th>extras</th>
+            <td>
+                A dictionary of extra data for this Intent
+                (see {@link android.content.Intent#putExtra(java.lang.String,java.lang.String)
+                Intent.putExtra()}
+                for an example).
+                <p>
+                    The key for each dictionary item should be a <em>string</em>. The item's value
+                    can be any simple or structured data type.
+                </p>
+            </td>
+        </tr>
+        <tr>
+            <th>component</th>
+            <td>
+                The component for this Intent (see {@link android.content.ComponentName}).
+                Using this argument will direct the Intent to a specific class within a specific
+                Android package.
+            </td>
+        </tr>
+        <tr>
+            <th>flags</th>
+            <td>
+                An iterable data structure containing flags that control how the Intent is handled
+                (see {@link android.content.Intent#setFlags(int) Intent.setFlags()}).
+            </td>
+        </tr>
+      </table>
+    </div>
+  </div>
+</div>
+<A NAME="drag"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        void
+      </span>
+      <span class="sympad">drag</span>
+      <span class="normal">
+      (
+            <em>tuple</em> start,
+            <em>tuple</em> end,
+            <em>float</em> duration,
+            <em>integer</em> steps)
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+            Simulates a drag gesture (touch, hold, and move) on this device's screen.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>start</th>
+          <td>
+            The starting point of the drag gesture, in the form of a <em>tuple</em>
+            (x,y) where x and y are <em>integers</em>.
+          </td>
+        </tr>
+        <tr>
+          <th>end</th>
+          <td>
+            The end point of the drag gesture, in the form of a <em>tuple</em> (x,y)
+            where x and y are <em>integers</em>.
+          </td>
+        </tr>
+        <tr>
+            <th>duration</th>
+            <td>The duration of the drag gesture in seconds. The default is 1.0 seconds.</td>
+        </tr>
+        <tr>
+            <th>steps</th>
+            <td>The number of steps to take when interpolating points. The default is 10.</td>
+        </tr>
+      </table>
+    </div>
+  </div>
+</div>
+<A NAME="getProperty"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        <em>object</em>
+      </span>
+      <span class="sympad">getProperty</span>
+      <span class="normal">
+        (<em>string</em> key)
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+            Given the name of a system environment variable, returns its value for this device.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>key</th>
+          <td>
+            The name of the system environment variable. The available variable names are listed in
+            <a href="#table1">Table 1. Property variable names</a> at the end of this topic.
+          </td>
+        </tr>
+      </table>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Returns</h5>
+      <ul class="nolist">
+        <li>
+            The value of the variable. The data format varies according to the variable requested.
+        </li>
+      </ul>
+    </div>
+  </div>
+</div>
+<A NAME="getSystemProperty"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        <em>object</em>
+      </span>
+      <span class="sympad">getSystemProperty</span>
+      <span class="normal">
+      (<em>string</em> key)
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+            Synonym for <code><a href="#getProperty">getProperty()</a></code>.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>key</th>
+          <td>
+            The name of the system environment variable. The available variable names are listed in
+            <a href="#table1">Table 1. Property Variable Names</a>.
+          </td>
+        </tr>
+      </table>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Returns</h5>
+      <ul class="nolist">
+        <li>
+            The value of the variable. The data format varies according to the variable requested.
+        </li>
+      </ul>
+    </div>
+  </div>
+</div>
+<A NAME="installPackage"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        void
+      </span>
+      <span class="sympad">installPackage</span>
+      <span class="normal">
+      (<em>string</em> path)
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+            Installs the Android application or test package contained in packageFile
+            onto this device. If the application or test package is already installed, it is
+            replaced.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>path</th>
+          <td>
+            The fully-qualified path and filename of the <code>.apk</code> file to install.
+          </td>
+        </tr>
+      </table>
+    </div>
+  </div>
+</div>
+<A NAME="instrument"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        <em>dictionary</em>
+      </span>
+      <span class="sympad">instrument</span>
+      <span class="normal">
+      (
+            <em>string</em> className,
+            <em>dictionary</em> args)
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+            Runs the specified component with Android instrumentation, and returns the results
+            in a dictionary whose exact format is dictated by the component being run. The
+            component must already be present on this device.
+        </p>
+        <p>
+            Use this method to start a test case that uses one of Android's test case classes.
+            See <a href="{@docRoot}guide/topics/testing/testing_android.html">Testing
+            Fundamentals</a> to learn more about unit testing with the Android testing
+            framework.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>className</th>
+          <td>
+            The name of an Android component that is already installed on this device, in the
+            standard form packagename/classname, where packagename is the
+            Android package name of a <code>.apk</code> file on this device, and
+            classname is the class name of an Android component (Activity,
+            ContentProvider, Service, or BroadcastReceiver) in that file. Both
+            packagename and classname must be fully qualified. See
+            {@link android.content.ComponentName} for more details.
+          </td>
+        </tr>
+        <tr>
+          <th>args</th>
+          <td>
+            A dictionary containing flags and their values. These are passed to the component as it
+            is started. If the flag does not take a value, set its dictionary value to an empty
+            string.
+          </td>
+        </tr>
+      </table>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Returns</h5>
+        <ul class="nolist">
+            <li>
+                <p>
+                    A dictionary containing the component's output. The contents of the dictionary
+                    are defined by the component itself.
+                </p>
+                <p>
+                    If you use {@link android.test.InstrumentationTestRunner} as the class name in
+                    the componentName argument, then the result dictionary contains
+                    the single key "stream". The value of "stream" is a <em>string</em> containing
+                    the test output, as if <code>InstrumentationTestRunner</code> was run from the
+                    command line. The format of this output is described in
+                    <a href="{@docRoot}guide/developing/testing/testing_otheride.html">
+                    Testing in Other IDEs</a>.
+                </p>
+            </li>
+        </ul>
+    </div>
+    </div>
+  </div>
+</div>
+<A NAME="press"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        void
+      </span>
+      <span class="sympad">press</span>
+      <span class="normal">
+      (<em>string</em> name,
+      <em>integer</em> type)
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+            Sends the key event specified by <code>type</code> to the key specified by
+            <code>keycode</code>.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>name</th>
+          <td>
+            The name of the keycode to send. See {@link android.view.KeyEvent} for a list of
+            keycode names. Use the keycode name, not its integer value.
+          </td>
+        </tr>
+        <tr>
+          <th>type</th>
+          <td>
+            The type of key event to send. The allowed values are <code><a href="#ACTION_DOWN">
+            DOWN</a></code>, <code><a href="#ACTION_UP">UP</a></code>, and
+            <code><a href="#ACTION_DOWN_AND_UP">DOWN_AND_UP</a></code>.
+          </td>
+        </tr>
+      </table>
+    </div>
+  </div>
+</div>
+<A NAME="reboot"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        void
+      </span>
+      <span class="sympad">reboot</span>
+      <span class="normal">
+      (<em>string</em> bootloadType)
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+                Reboots this device into the bootloader specified by <code>bootloadType</code>.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>into</th>
+          <td>
+            The type of bootloader to reboot into. The allowed values are
+            "bootloader", "recovery", or "None".
+          </td>
+        </tr>
+      </table>
+    </div>
+  </div>
+</div>
+<A NAME="removePackage"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        void
+      </span>
+      <span class="sympad">removePackage</span>
+      <span class="normal">
+      (<em>string</em> package)
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+            Deletes the specified package from this device, including its data and cache.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>package</th>
+          <td>
+            The Android package name of an <code>.apk</code> file on this device.
+          </td>
+      </table>
+    </div>
+  </div>
+</div>
+<A NAME="shell"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        <em>object</em>
+      </span>
+      <span class="sympad">shell</span>
+      <span class="normal">
+      (<em>string</em> cmd)
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+            Executes an <code>adb</code> shell command and returns the result, if any.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>cmd</th>
+          <td>
+            The command to execute in the <code>adb</code> shell. The form of these commands is
+            described in the topic <a href="{@docRoot}guide/developing/tools/adb.html">Android
+            Debug Bridge</a>.
+          </td>
+        </tr>
+      </table>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Returns</h5>
+      <ul class="nolist">
+        <li>
+            The results of the command, if any. The format of the results is determined by the
+            command.
+        </li>
+      </ul>
+    </div>
+  </div>
+</div>
+<A NAME="startActivity"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        void
+      </span>
+      <span class="sympad">startActivity</span>
+      <span class="normal">
+      (
+            <em>string</em> uri,
+            <em>string</em> action,
+            <em>string</em> data,
+            <em>string</em> mimetype,
+            <em>iterable</em> categories
+            <em>dictionary</em> extras,
+            <em>component</em> component,
+            <em>iterable</em> flags)
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+           Starts an Activity on this device by sending an Intent constructed from the
+           supplied arguments.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>uri</th>
+          <td>
+            The URI for the Intent.
+            (see {@link android.content.Intent#setData(android.net.Uri) Intent.setData()}).
+          </td>
+        </tr>
+        <tr>
+            <th>action</th>
+            <td>
+                The action for the Intent
+                (see {@link android.content.Intent#setAction(java.lang.String) Intent.setAction()}).
+            </td>
+        </tr>
+        <tr>
+            <th>data</th>
+            <td>
+                The data URI for the Intent
+                (see {@link android.content.Intent#setData(android.net.Uri) Intent.setData()}).
+            </td>
+        </tr>
+        <tr>
+            <th>mimetype</th>
+            <td>
+                The MIME type for the Intent
+                (see {@link android.content.Intent#setType(java.lang.String) Intent.setType()}).
+            </td>
+        </tr>
+        <tr>
+            <th>categories</th>
+            <td>
+                An iterable data structure containing strings that define categories for the
+                Intent
+                (see
+                {@link android.content.Intent#addCategory(java.lang.String) Intent.addCategory()}).
+            </td>
+        </tr>
+        <tr>
+            <th>extras</th>
+            <td>
+                A dictionary of extra data for the Intent
+                (see
+                {@link android.content.Intent#putExtra(java.lang.String,java.lang.String)
+                Intent.putExtra()}
+                for an example).
+                <p>
+                    The key for each dictionary item should be a <em>string</em>. The item's value
+                    can be any simple or structured data type.
+                </p>
+            </td>
+        </tr>
+        <tr>
+            <th>component</th>
+            <td>
+                The component for the Intent
+                (see {@link android.content.ComponentName}). Using this argument will direct the
+                Intent to a specific class within a specific Android package.
+            </td>
+        </tr>
+        <tr>
+            <th>flags</th>
+            <td>
+                An iterable data structure containing flags that control how the Intent is handled
+                (see {@link android.content.Intent#setFlags(int) Intent.setFlags()}).
+            </td>
+        </tr>
+      </table>
+    </div>
+  </div>
+</div>
+<A NAME="takeSnapshot"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        <code>
+            <a href="{@docRoot}guide/developing/tools/MonkeyImage.html">
+                MonkeyImage
+            </a>
+        </code>
+      </span>
+      <span class="sympad">takeSnapshot</span>
+      <span class="normal">
+      ()
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+            Captures the entire screen buffer of this device, yielding a
+            screen capture of the current display.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Returns</h5>
+      <ul class="nolist">
+        <li>
+            A <a href="{@docRoot}guide/developing/tools/MonkeyImage.html">
+            MonkeyImage</a> object containing the image of the current display.
+        </li>
+      </ul>
+    </div>
+  </div>
+</div>
+<A NAME="touch"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        void
+      </span>
+      <span class="sympad">touch</span>
+      <span class="normal">
+      (
+            <em>integer</em> x,
+            <em>integer</em> y,
+            <em>string</em> type)
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+            Sends a touch event specified by type to the screen location specified
+            by x and y.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>x</th>
+          <td>
+            The horizontal position of the touch in actual device pixels, starting from the left of
+            the screen in its current orientation.
+          </td>
+        </tr>
+        <tr>
+          <th>y</th>
+          <td>
+            The vertical position of the touch in actual device pixels, starting from the top of
+            the screen in its current orientation.
+          </td>
+        </tr>
+        <tr>
+            <th>type</th>
+            <td>
+                The type of key event to send. The allowed values are <code><a href="#ACTION_DOWN">
+                DOWN</a></code>, <code><a href="#ACTION_UP">UP</a></code>, and
+                <code><a href="#ACTION_DOWN_AND_UP">DOWN_AND_UP</a></code>.
+            </td>
+        </tr>
+      </table>
+    </div>
+  </div>
+</div>
+<A NAME="type"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        void
+      </span>
+      <span class="sympad">type</span>
+      <span class="normal">
+      (<em>string</em> message)
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+            Sends the characters contained in message to this device, as if they
+            had been typed on the device's keyboard. This is equivalent to calling
+            <code><a href="#press">press()</a></code> for each keycode in <code>message</code>
+            using the key event type <code><a href="#ACTION_DOWN_AND_UP">DOWN_AND_UP</a></code>.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>message</th>
+          <td>
+              A string containing the characters to send.
+          </td>
+        </tr>
+      </table>
+    </div>
+  </div>
+</div>
+<A NAME="wake"></A>
+<div class="jd-details api">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        void
+      </span>
+      <span class="sympad">wake</span>
+      <span class="normal">
+      ()
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+            Wakes the screen of this device.
+        </p>
+    </div>
+  </div>
+</div>
+<hr></hr>
+<h2>Appendix</h2>
+    <p class="table-caption" id="table1">
+        <strong>Table 1.</strong>Property variable names used with
+        <span class="sympad"><a href="#getProperty">getProperty()</a></span> and
+        <span class="sympad"><a href="#getSystemProperty">getSystemProperty()</a></span>.
+    </p>
+    <table>
+        <tr>
+            <th>
+                Property Group
+            </th>
+            <th>
+                Property
+            </th>
+            <th>
+                Description
+            </th>
+            <th>
+                Notes
+            </th>
+        </tr>
+        <tr>
+            <td rowspan="17"><code>build</code></td>
+            <td><code>board</code></td>
+            <td>Code name for the device's system board</td>
+            <td rowspan="17">
+                See {@link android.os.Build}
+            </td>
+        </tr>
+        <tr>
+            <td><code>brand</code></td>
+            <td>The carrier or provider for which the OS is customized.</td>
+        </tr>
+            <tr>
+            <td><code>device</code></td>
+            <td>The device design name.</td>
+        </tr>
+            <tr>
+            <td><code>fingerprint</code></td>
+            <td>A unique identifier for the currently-running build.</td>
+        </tr>
+            <tr>
+            <td><code>host</code></td>
+            <td></td>
+        </tr>
+            <tr>
+            <td><code>ID</code></td>
+            <td>A changelist number or label.</td>
+        </tr>
+            <tr>
+            <td><code>model</code></td>
+            <td>The end-user-visible name for the device.</td>
+        </tr>
+            <tr>
+            <td><code>product</code></td>
+            <td>The overall product name.</td>
+        </tr>
+            <tr>
+            <td><code>tags</code></td>
+            <td>Comma-separated tags that describe the build, such as "unsigned" and "debug".</td>
+        </tr>
+            <tr>
+            <td><code>type</code></td>
+            <td>The build type, such as "user" or "eng".</td>
+        </tr>
+        <tr>
+            <td><code>user</code></td>
+            <td></td>
+        </tr>
+        <tr>
+            <td><code>CPU_ABI</code></td>
+            <td>
+                The name of the native code instruction set, in the form CPU type plus
+                ABI convention.
+            </td>
+        </tr>
+        <tr>
+            <td><code>manufacturer</code></td>
+            <td>The product/hardware manufacturer.</td>
+        </tr>
+        <tr>
+            <td><code>version.incremental</code></td>
+            <td>
+                The internal code used by the source control system to represent this version
+                of the software.
+            </td>
+        </tr>
+        <tr>
+            <td><code>version.release</code></td>
+            <td>The user-visible name of this version of the software.</td>
+        </tr>
+        <tr>
+            <td><code>version.sdk</code></td>
+            <td>The user-visible SDK version associated with this version of the OS.</td>
+        </tr>
+        <tr>
+            <td><code>version.codename</code></td>
+            <td>
+                The current development codename, or "REL" if this version of the software has been
+                released.
+            </td>
+        </tr>
+        <tr>
+            <td rowspan="3"><code>display</code></td>
+            <td><code>width</code></td>
+            <td>The device's display width in pixels.</td>
+            <td rowspan="3">
+                See
+                {@link android.util.DisplayMetrics} for details.
+            </td>
+        </tr>
+        <tr>
+            <td><code>height</code></td>
+            <td>The device's display height in pixels.</td>
+        </tr>
+        <tr>
+            <td><code>density</code></td>
+            <td>
+                The logical density of the display. This is a factor that scales
+                DIP (Density-Independent Pixel) units to the device's resolution. DIP is adjusted so
+                that 1 DIP is equivalent to one pixel on a 160 pixel-per-inch display. For example,
+                on a 160-dpi screen, density = 1.0, while on a 120-dpi screen, density = .75.
+                <p>
+                    The value does not exactly follow the real screen size, but is adjusted to
+                    conform to large changes in the display DPI. See
+                    {@link android.util.DisplayMetrics#density} for more details.
+                </p>
+            </td>
+        </tr>
+        <tr>
+            <td rowspan="6"><code>am.current</code></td>
+            <td><code>package</code></td>
+            <td>The Android package name of the currently running package.</td>
+            <td rowspan="6">
+                The <code>am.current</code> keys return information about the currently-running
+                Activity.
+            </td>
+        </tr>
+        <tr>
+            <td><code>action</code></td>
+            <td>
+                The current activity's action. This has the same format as the <code>name</code>
+                attribute of the <code>action</code> element in a package manifest.
+            </td>
+        </tr>
+        <tr>
+            <td><code>comp.class</code></td>
+            <td>
+                The class name of the component that started the current Activity. See
+                <code><a href="#comppackage">comp.package</a></code> for more details.</td>
+        </tr>
+        <tr>
+            <td><a name="comppackage"><code>comp.package</code></a></td>
+            <td>
+                The package name of the component that started the current Activity. A component
+                is specified by a package name and the name of class that the package contains.
+            </td>
+        </tr>
+        <tr>
+            <td><code>data</code></td>
+            <td>The data (if any) contained in the Intent that started the current Activity.</td>
+        </tr>
+        <tr>
+            <td><code>categories</code></td>
+            <td>The categories specified by the Intent that started the current Activity.</td>
+        </tr>
+        <tr>
+            <td rowspan="3"><code>clock</code></td>
+            <td><code>realtime</code></td>
+            <td>
+                The number of milliseconds since the device rebooted, including deep-sleep
+                time.
+            </td>
+            <td rowspan="3">
+                See {@link android.os.SystemClock} for more information.
+            </td>
+        </tr>
+        <tr>
+            <td><code>uptime</code></td>
+            <td>
+                The number of milliseconds since the device rebooted, <em>not</em> including
+                deep-sleep time
+            </td>
+        </tr>
+        <tr>
+            <td><code>millis</code></td>
+            <td>current time since the UNIX epoch, in milliseconds.</td>
+        </tr>
+    </table>
diff --git a/docs/html/guide/developing/tools/MonkeyImage.jd b/docs/html/guide/developing/tools/MonkeyImage.jd
new file mode 100644
index 0000000..ae85cb5
--- /dev/null
+++ b/docs/html/guide/developing/tools/MonkeyImage.jd
@@ -0,0 +1,435 @@
+page.title=MonkeyImage
+@jd:body
+<style>
+    h4.jd-details-title {background-color: #DEE8F1;}
+</style>
+
+<p>
+    A monkeyrunner class to hold an image of the device or emulator's screen. The image is
+    copied from the screen buffer during a screenshot. This object's methods allow you to
+    convert the image into various storage formats, write the image to a file, copy parts of
+    the image, and compare this object to other <code>MonkeyImage</code> objects.
+</p>
+<p>
+    You do not need to create new instances of <code>MonkeyImage</code>. Instead, use
+<code><a href="{@docRoot}guide/developing/tools/MonkeyDevice.html#takeSnapshot">
+MonkeyDevice.takeSnapshot()</a></code> to create a new instance from a screenshot. For example, use:
+</p>
+<pre>
+newimage = MonkeyDevice.takeSnapshot()
+</pre>
+<h2>Summary</h2>
+<table id="pubmethods" class="jd-sumtable">
+    <tr>
+        <th colspan="12" style="background-color: #E2E2E2">Methods</th>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                <em>string</em>
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#convertToBytes">convertToBytes</a>
+                </span>
+                (<em>string</em> format)
+            </nobr>
+            <div class="jd-descrdiv">
+                Converts the current image to a particular format and returns it as a
+                <em>string</em> that you can then access as an <em>iterable</em> of binary bytes.
+            </div>
+        </td>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                <em>tuple</em>
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#getRawPixel">getRawPixel</a>
+                </span>
+                (<em>integer</em> x,
+                <em>integer</em> y)
+            </nobr>
+            <div class="jd-descrdiv">
+                Returns the single pixel at the image location (x,y), as an
+                a <em>tuple</em> of <em>integer</em>, in the form (a,r,g,b).
+            </div>
+        </td>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                <em>integer</em>
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#getRawPixelInt">getRawPixelInt</a>
+                </span>
+                (<em>integer</em> x,
+                 <em>integer</em> y)
+            </nobr>
+            <div class="jd-descrdiv">
+                Returns the single pixel at the image location (x,y), as
+                a 32-bit <em>integer</em>.
+            </div>
+        </td>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                <code>
+                    <a href="{@docRoot}guide/developing/tools/MonkeyImage.html">MonkeyImage</a>
+                </code>
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#getSubImage">getSubImage</a>
+                </span>
+                (<em>tuple</em> rect)
+            </nobr>
+            <div class="jd-descrdiv">
+                Creates a new <code>MonkeyImage</code> object from a rectangular selection of the
+                current image.
+            </div>
+        </td>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                <em>boolean</em>
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#sameAs">sameAs</a>
+                </span>
+         (<code><a href="{@docRoot}guide/developing/tools/MonkeyImage.html">MonkeyImage</a></code>
+            other,
+            <em>float</em> percent)
+            </nobr>
+            <div class="jd-descrdiv">
+                Compares this <code>MonkeyImage</code> object to another and returns the result of
+                the comparison. The <code>percent</code> argument specifies the percentage
+                difference that is allowed for the two images to be "equal".
+            </div>
+        </td>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                <em>void</em>
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#writeToFile">writeToFile</a>
+                </span>
+                (<em>string</em> path,
+                <em>string</em> format)
+            </nobr>
+            <div class="jd-descrdiv">
+                Writes the current image to the file specified by <code>filename</code>, in the
+                format specified by <code>format</code>.
+            </div>
+        </td>
+    </tr>
+</table>
+<!-- ========= METHOD DETAIL ======== -->
+<!-- Public methods -->
+<h2>Public Methods</h2>
+<A NAME="convertToBytes"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        <em>string</em>
+      </span>
+      <span class="sympad">convertToBytes</span>
+      <span class="normal">
+      (
+            <em>string</em> format)
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+            Converts the current image to a particular format and returns it as a <em>string</em>
+            that you can then access as an <em>iterable</em> of binary bytes.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>format</th>
+            <td>
+                The desired output format. All of the common raster output formats are supported.
+                The default value is "png" (Portable Network Graphics).
+            </td>
+        </tr>
+        </table>
+    </div>
+</div>
+</div>
+<A NAME="getRawPixel"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        <em>tuple</em>
+      </span>
+      <span class="sympad">getRawPixel</span>
+      <span class="normal">
+        (<em>integer</em> x,
+         <em>integer</em> y)
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+            Returns the single pixel at the image location (x,y), as an
+            a <em>tuple</em> of <em>integer</em>, in the form (a,r,g,b).
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>x</th>
+          <td>
+            The horizontal position of the pixel, starting with 0 at the left of the screen in the
+            orientation it had when the screenshot was taken.
+          </td>
+        </tr>
+        <tr>
+          <th>y</th>
+          <td>
+            The vertical position of the pixel, starting with 0 at the top of the screen in the
+            orientation it had when the screenshot was taken.
+          </td>
+        </tr>
+      </table>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Returns</h5>
+      <ul class="nolist">
+        <li>
+            A tuple of integers representing the pixel, in the form (a,r,g,b) where
+            a is the alpha channel value, and r, g, and b are the red, green, and blue values,
+            respectively.
+        </li>
+      </ul>
+    </div>
+  </div>
+</div>
+<A NAME="getRawPixelInt"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        <em>tuple</em>
+      </span>
+      <span class="sympad">getRawPixelInt</span>
+      <span class="normal">
+        (<em>integer</em> x,
+         <em>integer</em> y)
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+            Returns the single pixel at the image location (x,y), as an
+            an <em>integer</em>. Use this method to economize on memory.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>x</th>
+          <td>
+            The horizontal position of the pixel, starting with 0 at the left of the screen in the
+            orientation it had when the screenshot was taken.
+          </td>
+        </tr>
+        <tr>
+          <th>y</th>
+          <td>
+            The vertical position of the pixel, starting with 0 at the top of the screen in the
+            orientation it had when the screenshot was taken.
+          </td>
+        </tr>
+      </table>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Returns</h5>
+      <ul class="nolist">
+        <li>
+            The a,r,g, and b values of the pixel as 8-bit values combined into a 32-bit
+            integer, with a as the leftmost 8 bits, r the next rightmost, and so forth.
+        </li>
+      </ul>
+    </div>
+  </div>
+</div>
+<A NAME="getSubImage"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+          <code>
+              <a href="{@docRoot}guide/developing/tools/MonkeyImage.html">MonkeyImage</a>
+          </code>
+      </span>
+      <span class="sympad">getSubImage</span>
+      <span class="normal">
+        (<em>tuple</em> rect)
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+           Creates a new <code>MonkeyImage</code> object from a rectangular selection of the
+           current image.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>rect</th>
+          <td>
+            A tuple (x, y, w, h) specifying the selection. x and y specify the 0-based pixel
+            position of the upper left-hand corner of the selection. w specifies the width of the
+            region, and h specifies its height, both in units of pixels.
+            <p>
+                The image's orientation is the same as the screen orientation at the time the
+                screenshot was made.
+            </p>
+          </td>
+        </tr>
+      </table>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Returns</h5>
+      <ul class="nolist">
+        <li>
+            A new <code>MonkeyImage</code> object containing the selection.
+        </li>
+      </ul>
+    </div>
+  </div>
+</div>
+<A NAME="sameAs"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        <em>boolean</em>
+      </span>
+      <span class="sympad">sameAs</span>
+      <span class="normal">
+      (
+       <code>
+           <a href="{@docRoot}guide/developing/tools/MonkeyImage.html">MonkeyImage</a>
+       </code> otherImage,
+       <em>float</em> percent
+      )
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+           Compares this <code>MonkeyImage</code> object to another and returns the result of
+           the comparison. The <code>percent</code> argument specifies the percentage
+           difference that is allowed for the two images to be "equal".
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>other</th>
+          <td>
+            Another <code>MonkeyImage</code> object to compare to this one.
+          </td>
+        </tr>
+        <tr>
+          <th>
+            percent
+          </th>
+          <td>
+            A float in the range 0.0 to 1.0, inclusive, indicating
+            the percentage of pixels that need to be the same for the method to return
+            <code>true</code>. The default is 1.0, indicating that all the pixels
+            must match.
+          </td>
+        </tr>
+      </table>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Returns</h5>
+      <ul class="nolist">
+        <li>
+            Boolean <code>true</code> if the images match, or boolean <code>false</code> otherwise.
+        </li>
+      </ul>
+    </div>
+  </div>
+</div>
+<A NAME="writeToFile"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        void
+      </span>
+      <span class="sympad">writeToFile</span>
+      <span class="normal">
+      (<em>string</em> filename,
+       <em>string</em> format)
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+           Writes the current image to the file specified by <code>filename</code>, in the
+           format specified by <code>format</code>.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>path</th>
+          <td>
+            The fully-qualified filename and extension of the output file.
+          </td>
+        </tr>
+        <tr>
+            <th>
+                format
+            </th>
+            <td>
+                The output format to use for the file. If no format is provided, then the
+                method tries to guess the format from the filename's extension. If no
+                extension is provided and no format is specified, then the default format of
+                "png" (Portable Network Graphics) is used.
+            </td>
+        </tr>
+      </table>
+    </div>
+  </div>
+</div>
diff --git a/docs/html/guide/developing/tools/MonkeyRunner.jd b/docs/html/guide/developing/tools/MonkeyRunner.jd
new file mode 100644
index 0000000..871e06d
--- /dev/null
+++ b/docs/html/guide/developing/tools/MonkeyRunner.jd
@@ -0,0 +1,445 @@
+page.title=MonkeyRunner
+@jd:body
+<style>
+    h4.jd-details-title {background-color: #DEE8F1;}
+</style>
+<p>
+    A monkeyrunner class that contains static utility methods.
+</p>
+<h2>Summary</h2>
+<table id="pubmethods" class="jd-sumtable">
+    <tr>
+        <th colspan="12" style="background-color: #E2E2E2">Methods</th>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                void
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#alert">alert</a>
+                </span>
+                (<em>string</em> message,
+                 <em>string</em> title,
+                 <em>string</em> okTitle)
+            </nobr>
+            <div class="jd-descrdiv">
+                Displays an alert dialog to the process running the current
+                program.
+            </div>
+        </td>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                <em>integer</em>
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#choice">choice</a>
+                </span>
+                (<em>string</em> message,
+                 <em>iterable</em> choices,
+                 <em>string</em> title)
+            </nobr>
+            <div class="jd-descrdiv">
+                Displays a dialog with a list of choices to the process running the current program.
+            </div>
+        </td>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                void
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#help">help</a>
+                </span>
+                (<em>string</em> format)
+            </nobr>
+            <div class="jd-descrdiv">
+                Displays the monkeyrunner API reference in a style similar to that of Python's
+                <code>pydoc</code> tool, using the specified format.
+            </div>
+        </td>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                <em>string</em>
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#input">input</a>
+                </span>
+                (<em>string</em> message,
+                 <em>string</em> initialValue,
+                 <em>string</em> title,
+                 <em>string</em> okTitle,
+                 <em>string</em> cancelTitle)
+            </nobr>
+            <div class="jd-descrdiv">
+                Displays a dialog that accepts input.
+            </div>
+        </td>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                void
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#sleep">sleep</a>
+                </span>
+                (<em>float</em> seconds)
+            </nobr>
+            <div class="jd-descrdiv">
+                Pauses the current program for the specified number of seconds.
+            </div>
+        </td>
+    </tr>
+    <tr class="api" >
+        <td class="jd-typecol">
+            <nobr>
+                <code>
+                    <a href="{@docRoot}guide/developing/tools/MonkeyDevice.html">MonkeyDevice</a>
+                </code>
+            </nobr>
+        </td>
+        <td class="jd-linkcol" width="100%">
+            <nobr>
+                <span class="sympad">
+                    <a href="#waitForConnection">waitForConnection</a>
+                </span>
+                (<em>float</em> timeout,
+                <em>string</em> deviceId)
+            </nobr>
+            <div class="jd-descrdiv">
+                Tries to make a connection between the <code>monkeyrunner</code> backend and the
+                specified device or emulator.
+            </div>
+        </td>
+    </tr>
+</table>
+<!-- ========= METHOD DETAIL ======== -->
+<!-- Public methods -->
+<h2>Public Methods</h2>
+<A NAME="alert"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        <em>string</em>
+      </span>
+      <span class="sympad">alert</span>
+      <span class="normal">
+      (
+            <em>string</em> message,
+            <em>string</em> title,
+            <em>string</em> okTitle)
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+            Displays an alert dialog to the process running the current
+            program. The dialog is modal, so the program pauses until the user clicks the dialog's
+            button.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>message</th>
+            <td>
+                The message to display in the dialog.
+            </td>
+        </tr>
+        <tr>
+            <th>title</th>
+            <td>
+                The dialog's title. The default value is "Alert".
+            </td>
+        </tr>
+        <tr>
+            <th>okTitle</th>
+            <td>
+                The text displayed in the dialog button. The default value is "OK".
+            </td>
+        </tr>
+        </table>
+    </div>
+</div>
+</div>
+<A NAME="choice"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        <em>integer</em>
+      </span>
+      <span class="sympad">choice</span>
+      <span class="normal">
+        (<em>string</em> message,
+         <em>iterable</em> choices,
+         <em>string</em> title)
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+            Displays a dialog with a list of choices to the process running the current program. The
+            dialog is modal, so the program pauses until the user clicks one of the dialog's
+            buttons.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>message</th>
+          <td>
+            The prompt message displayed in the dialog.
+          </td>
+        </tr>
+        <tr>
+          <th>choices</th>
+          <td>
+            A Python iterable containing one or more objects that are displayed as strings. The
+            recommended form is an array of strings.
+          </td>
+        </tr>
+        <tr>
+            <th>
+                title
+            </th>
+            <td>
+               The dialog's title. The default is "Input".
+            </td>
+        </tr>
+      </table>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Returns</h5>
+      <ul class="nolist">
+        <li>
+            If the user makes a selection and clicks the "OK" button, the method returns
+            the 0-based index of the selection within the iterable.
+            If the user clicks the "Cancel" button, the method returns -1.
+        </li>
+      </ul>
+    </div>
+  </div>
+</div>
+<A NAME="help"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        void
+      </span>
+      <span class="sympad">help</span>
+      <span class="normal">
+        (<em>string</em> format)
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+            Displays the monkeyrunner API reference in a style similar to that of Python's
+            <code>pydoc</code> tool, using the specified format.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>format</th>
+          <td>
+            The markup format to use in the output. The possible values are "text" for plain text
+            or "html" for HTML.
+          </td>
+        </tr>
+      </table>
+    </div>
+  </div>
+</div>
+<A NAME="input"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        <em>string</em>
+      </span>
+      <span class="sympad">input</span>
+      <span class="normal">
+        (<em>string</em> message
+         <em>string</em> initialValue,
+         <em>string</em> title,
+         <em>string</em> okTitle,
+         <em>string</em> cancelTitle)
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+            Displays a dialog that accepts input and returns it to the program. The dialog is
+            modal, so the program pauses until the user clicks one of the dialog's buttons.
+        </p>
+        <p>
+            The dialog contains two buttons, one of which displays the okTitle value
+            and the other the cancelTitle value. If the user clicks the okTitle button,
+            the current value of the input box is returned. If the user clicks the cancelTitle
+            button, an empty string is returned.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>message</th>
+          <td>
+            The prompt message displayed in the dialog.
+          </td>
+        </tr>
+        <tr>
+          <th>initialValue</th>
+          <td>
+            The initial value to display in the dialog. The default is an empty string.
+          </td>
+        </tr>
+        <tr>
+          <th>title</th>
+          <td>
+            The dialog's title. The default is "Input".
+          </td>
+        </tr>
+        <tr>
+          <th>okTitle</th>
+          <td>
+            The text displayed in the okTitle button. The default is "OK".
+          </td>
+        </tr>
+        <tr>
+          <th>cancelTitle</th>
+          <td>
+            The text displayed in the cancelTitle button. The default is "Cancel".
+          </td>
+        </tr>
+      </table>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Returns</h5>
+      <ul class="nolist">
+        <li>
+            If the user clicks the okTitle button, then the method returns the current value of
+            the dialog's input box. If the user clicks the cancelTitle button, the method returns
+            an empty string.
+        </li>
+      </ul>
+    </div>
+  </div>
+</div>
+<A NAME="sleep"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+        void
+      </span>
+      <span class="sympad">sleep</span>
+      <span class="normal">
+      (
+       <em>float</em> seconds
+      )
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+            Pauses the current program for the specified number of seconds.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>seconds</th>
+          <td>
+            The number of seconds to pause.
+          </td>
+        </tr>
+      </table>
+    </div>
+  </div>
+</div>
+<A NAME="waitForConnection"></A>
+<div class="jd-details api ">
+    <h4 class="jd-details-title">
+      <span class="normal">
+          <code>
+              <a href="{@docRoot}guide/developing/tools/MonkeyDevice.html">MonkeyDevice</a>
+          </code>
+      </span>
+      <span class="sympad">waitForConnection</span>
+      <span class="normal">
+      (<em>float</em> timeout,
+       <em>string</em> deviceId)
+      </span>
+    </h4>
+  <div class="jd-details-descr">
+
+    <div class="jd-tagdata jd-tagdescr">
+        <p>
+            Tries to make a connection between the <code>monkeyrunner</code> backend and the
+            specified device or emulator.
+        </p>
+    </div>
+    <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Arguments</h5>
+      <table class="jd-tagtable">
+        <tr>
+          <th>timeout</th>
+          <td>
+            The number of seconds to wait for a connection. The default is to wait forever.
+          </td>
+        </tr>
+        <tr>
+            <th>
+                deviceId
+            </th>
+            <td>
+                A regular expression that specifies the serial number of the device or emulator. See
+                the topic
+                <a href="{@docRoot}guide/developing/tools/adb.html">Android Debug Bridge</a>
+                for a description of device and emulator serial numbers.
+            </td>
+        </tr>
+      </table>
+    </div>
+        <div class="jd-tagdata">
+      <h5 class="jd-tagtitle">Returns</h5>
+      <ul class="nolist">
+        <li>
+          A <code><a href="{@docRoot}guide/developing/tools/MonkeyDevice.html">MonkeyDevice</a></code>
+          instance for the device or emulator. Use this object to control and communicate with the
+          device or emulator.
+        </li>
+      </ul>
+    </div>
+  </div>
+</div>
diff --git a/docs/html/guide/developing/tools/index.jd b/docs/html/guide/developing/tools/index.jd
index 6e9fde1..899c0dc 100644
--- a/docs/html/guide/developing/tools/index.jd
+++ b/docs/html/guide/developing/tools/index.jd
@@ -3,27 +3,27 @@
 
 <img src="{@docRoot}assets/images/android_wrench.png" alt="" align="right">
 
-<p>The Android SDK includes a variety of custom tools that help you develop mobile 
-applications on the Android platform. The most important of these are the Android 
-Emulator and the Android Development Tools plugin for Eclipse, but the SDK also 
-includes a variety of other tools for debugging, packaging, and installing your 
+<p>The Android SDK includes a variety of custom tools that help you develop mobile
+applications on the Android platform. The most important of these are the Android
+Emulator and the Android Development Tools plugin for Eclipse, but the SDK also
+includes a variety of other tools for debugging, packaging, and installing your
 applications on the emulator. </p>
-    
+
  <dl>
   <dt><a href="adt.html">Android Development Tools Plugin</a> (for the Eclipse IDE)</dt>
-          <dd>The ADT plugin adds powerful extensions to the Eclipse integrated environment, 
-          making creating and debugging your Android applications easier and faster. If you 
-          use Eclipse, the ADT plugin gives you an incredible boost in developing Android 
+          <dd>The ADT plugin adds powerful extensions to the Eclipse integrated environment,
+          making creating and debugging your Android applications easier and faster. If you
+          use Eclipse, the ADT plugin gives you an incredible boost in developing Android
           applications.</dd>
   <dt><a href="emulator.html">Android Emulator</a></dt>
-    <dd>A QEMU-based device-emulation tool that you can use to design, 
+    <dd>A QEMU-based device-emulation tool that you can use to design,
     debug, and test your applications in an actual Android run-time environment. </dd>
 
   <dt><a href="avd.html">Android Virtual Devices (AVDs)</a></dt>
     <dd>Virtual device configurations that you create, to model device
         characteristics in the Android Emulator. In each configuration, you can
         specify the Android platform to run, the hardware options, and the
-        emulator skin to use. Each AVD functions as an independent device with 
+        emulator skin to use. Each AVD functions as an independent device with
         it's own storage for user data, SD card, and so on. </dd>
 
  <dt><a href="hierarchy-viewer.html">Hierarchy Viewer</a></dt>
@@ -37,64 +37,69 @@
 efficiency.
     </dd>
 
-	  <dt><a href="draw9patch.html">Draw 9-patch</a></dt>
-	    <dd>The Draw 9-patch tool allows you to easily create a 
-	    {@link android.graphics.NinePatch} graphic using a WYSIWYG editor. It also previews stretched 
-	     versions of the image, and highlights the area in which content is allowed.
-	    </dd>
+      <dt><a href="draw9patch.html">Draw 9-patch</a></dt>
+        <dd>The Draw 9-patch tool allows you to easily create a
+        {@link android.graphics.NinePatch} graphic using a WYSIWYG editor. It also previews stretched
+         versions of the image, and highlights the area in which content is allowed.
+        </dd>
 
-  <dt><a href="ddms.html" >Dalvik Debug Monitor 
+  <dt><a href="ddms.html" >Dalvik Debug Monitor
       Service</a> (ddms)</dt>
-	    <dd>Integrated with Dalvik, the Android platform's custom VM, this tool 
-	    lets you manage processes on an emulator or device and assists in debugging. 
-	    You can use it to kill processes, select a specific process to debug, 
-	    generate trace data, view heap and thread information, take screenshots 
-	    of the emulator or device, and more. </dd>
-			
+        <dd>Integrated with Dalvik, the Android platform's custom VM, this tool
+        lets you manage processes on an emulator or device and assists in debugging.
+        You can use it to kill processes, select a specific process to debug,
+        generate trace data, view heap and thread information, take screenshots
+        of the emulator or device, and more. </dd>
+
   <dt><a href="adb.html" >Android Debug Bridge</a> (adb)</dt>
-                  <dd>The adb tool lets you install your application's .apk files on an 
-                  emulator or device and access the emulator or device from a command line. 
-                  You can also use it to link a standard debugger to application code running 
+                  <dd>The adb tool lets you install your application's .apk files on an
+                  emulator or device and access the emulator or device from a command line.
+                  You can also use it to link a standard debugger to application code running
                   on an Android emulator or device.</dd>
 
-  <dt><a href="aapt.html">Android Asset 
+  <dt><a href="aapt.html">Android Asset
           Packaging Tool</a> (aapt)</dt>
-                  <dd>The aapt tool lets you create .apk files containing the binaries and 
+                  <dd>The aapt tool lets you create .apk files containing the binaries and
                   resources of Android applications.</dd>
 
-  <dt><a href="aidl.html" >Android Interface 
+  <dt><a href="aidl.html" >Android Interface
   Description Language</a> (aidl)</dt>
             <dd>Lets you generate code for an interprocess interface, such as what
             a service might use.</dd>
 
   <dt><a href="adb.html#sqlite">sqlite3</a></dt>
-      <dd>Included as a convenience, this tool lets you access the SQLite data 
+      <dd>Included as a convenience, this tool lets you access the SQLite data
       files created and used by Android applications.</dd>
 
   <dt><a href="traceview.html" >Traceview</a></dt>
-            <dd> This tool produces graphical analysis views of trace log data that you 
+            <dd> This tool produces graphical analysis views of trace log data that you
             can generate from your Android application. </dd>
 
   <dt><a href="othertools.html#mksdcard">mksdcard</a></dt>
-            <dd>Helps you create a disk image that you can use with the emulator, 
+            <dd>Helps you create a disk image that you can use with the emulator,
                       to simulate the presence of an external storage card (such as an SD card).</dd>
 
   <dt><a href="othertools.html#dx">dx</a></dt>
-                  <dd>The dx tool rewrites .class bytecode into Android bytecode 
+                  <dd>The dx tool rewrites .class bytecode into Android bytecode
                                           (stored in .dex files.)</dd>
 
-  <dt><a href="monkey.html">UI/Application 
+  <dt><a href="monkey.html">UI/Application
   Exerciser Monkey</a></dt>
       <dd>The Monkey is a program that runs on your emulator or device and generates pseudo-random
       streams of user events such as clicks, touches, or gestures, as well as a number of system-
       level events.  You can use the Monkey to stress-test applications that you are developing,
       in a random yet repeatable manner.</dd>
 
+  <dt><a href="monkeyrunner_concepts.html">monkeyrunner</a></dt>
+  <dd>
+    The monkeyrunner tool provides an API for writing Python programs that control an Android device
+    or emulator from outside of Android code.
+  </dd>
   <dt><a  href="othertools.html#android">android</a></dt>
             <dd>A script that lets you manage AVDs and generate <a
-                        href="http://ant.apache.org/" title="Ant">Ant</a> build files that 
+                        href="http://ant.apache.org/" title="Ant">Ant</a> build files that
                         you can use to compile your Android applications. </dd>
-                        
+
   <dt><a  href="zipalign.html">zipalign</a></dt>
             <dd>An important .apk optimization tool. This tool ensures that all uncompressed data starts
             with a particular alignment relative to the start of the file. This should always be used
diff --git a/docs/html/guide/developing/tools/monkeyrunner_concepts.jd b/docs/html/guide/developing/tools/monkeyrunner_concepts.jd
new file mode 100644
index 0000000..1838905
--- /dev/null
+++ b/docs/html/guide/developing/tools/monkeyrunner_concepts.jd
@@ -0,0 +1,308 @@
+page.title=monkeyrunner
+@jd:body
+
+<div id="qv-wrapper">
+  <div id="qv">
+  <h2>In this document</h2>
+  <ol>
+    <li>
+        <a href="#SampleProgram">A Simple monkeyrunner Program</a>
+    </li>
+    <li>
+        <a href="#APIClasses">The monkeyrunner API</a>
+    </li>
+    <li>
+        <a href="#RunningMonkeyRunner">Running monkeyrunner</a>
+    </li>
+    <li>
+        <a href="#Help">monkeyrunner Built-in Help</a>
+    </li>
+    <li>
+        <a href="#Plugins">Extending monkeyrunner with Plugins</a>
+    </li>
+  </ol>
+  <h2>See Also</h2>
+      <ol>
+        <li>
+            <a href="{@docRoot}guide/topics/testing/testing_android.html">Testing Fundamentals</a>
+        </li>
+      </ol>
+  </div>
+</div>
+<p>
+    The monkeyrunner tool provides an API for writing programs that control an Android device
+    or emulator from outside of Android code. With monkeyrunner, you can write a Python program
+    that installs an Android application or test package, runs it, sends keystrokes to it,
+    takes screenshots of its user interface, and stores screenshots on the workstation. The
+    monkeyrunner tool is primarily designed to test applications and devices at the
+    functional/framework level and for running unit test suites, but you are free to use it for
+    other purposes.
+</p>
+<p>
+    The monkeyrunner tool is not related to the
+    <a href="{@docRoot}guide/developing/tools/monkey.html">UI/Application Exerciser Monkey</a>,
+    also known as the <code>monkey</code> tool. The <code>monkey</code> tool runs in an
+    <code><a href="{@docRoot}guide/developing/tools/adb.html">adb</a></code> shell directly on the
+    device or emulator and generates pseudo-random streams of user and system events. In comparison,
+    the monkeyrunner tool controls devices and emulators from a workstation by sending specific
+    commands and events from an API.
+</p>
+<p>
+    The monkeyrunner tool provides these unique features for Android testing:
+</p>
+<ul>
+    <li>
+        Multiple device control: The monkeyrunner API can apply one or more
+        test suites across multiple devices or emulators. You can physically attach all the devices
+        or start up all the emulators (or both) at once, connect to each one in turn
+        programmatically, and then run one or more tests. You can also start up an emulator
+        configuration programmatically, run one or more tests, and then shut down the emulator.
+    </li>
+    <li>
+        Functional testing: monkeyrunner can run an automated start-to-finish test of an Android
+        application. You provide input values with keystrokes or touch events, and view the results
+        as screenshots.
+    </li>
+    <li>
+        Regression testing - monkeyrunner can test application stability by running an application
+        and comparing its output screenshots to a set of screenshots that are known to be correct.
+    </li>
+    <li>
+        Extensible automation - Since monkeyrunner is an API toolkit, you can develop an entire
+        system of Python-based modules and programs for controlling Android devices. Besides using
+        the monkeyrunner API itself, you can use the standard Python
+        <code><a href="http://docs.python.org/library/os.html">os</a></code> and
+        <code><a href="http://docs.python.org/library/subprocess.html">subprocess</a></code>
+        modules to call Android tools such as
+        <a href="{@docRoot}guide/developing/tools/adb.html">Android Debug Bridge</a>.
+        <p>
+            You can also add your own classes to the monkeyrunner API. This is described
+            in more detail in the section
+            <a href="#Plugins">Extending monkeyrunner with plugins</a>.
+        </p>
+    </li>
+</ul>
+<p>
+    The monkeyrunner tool uses <a href="http://www.jython.org/">Jython</a>, a
+    implementation of Python that uses the Java programming language. Jython allows the
+    monkeyrunner API to interact easily with the Android framework. With Jython you can
+    use Python syntax to access the constants, classes, and methods of the API.
+</p>
+
+<h2 id="SampleProgram">A Simple monkeyrunner Program</h2>
+<p>
+    Here is a simple monkeyrunner program that connects to a device, creating a
+    <code><a href="{@docRoot}guide/developing/tools/MonkeyDevice.html">MonkeyDevice</a></code>
+    object. Using the <code>MonkeyDevice</code> object, the program installs an Android application
+    package, runs one of its activities, and sends key events to the activity.
+    The program then takes a screenshot of the result, creating a
+    <code><a href="{@docRoot}guide/developing/tools/MonkeyImage.html">MonkeyImage</a></code> object.
+    From this object, the program writes out a <code>.png</code> file containing the screenshot.
+</p>
+<pre>
+# Imports the monkeyrunner modules used by this program
+from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
+
+# Connects to the current device, returning a MonkeyDevice object
+device = MonkeyRunner.waitForConnection()
+
+# Installs the Android package. Notice that this method returns a boolean, so you can test
+# to see if the installation worked.
+device.installPackage('myproject/bin/MyApplication.apk')
+
+# Runs an activity in the application
+device.startActivity(component='com.example.android.myapplication.MainActivity')
+
+# Presses the Menu button
+device.press('KEYCODE_MENU','DOWN_AND_UP')
+
+# Takes a screenshot
+result = device.takeSnapShot
+
+# Writes the screenshot to a file
+result.writeToFile('myproject/shot1.png','png')
+</pre>
+
+<h2 id="APIClasses">The monkeyrunner API</h2>
+<p>
+    The monkeyrunner API is contained in three modules in the package
+    <code>com.android.monkeyrunner</code>:
+</p>
+<ul>
+    <li>
+        <code><a href="{@docRoot}guide/developing/tools/MonkeyRunner.html">MonkeyRunner</a></code>:
+        A class of utility methods for monkeyrunner programs. This class provides a method for
+        connecting monkeyrunner to a device or emulator. It also provides methods for
+        creating UIs for a monkeyrunner program and for displaying the built-in help.
+    </li>
+    <li>
+        <code><a href="{@docRoot}guide/developing/tools/MonkeyDevice.html">MonkeyDevice</a></code>:
+        Represents a device or emulator. This class provides methods for installing and
+        uninstalling packages, starting an Activity, and sending keyboard or touch events to an
+        application. You also use this class to run test packages.
+    </li>
+    <li>
+        <code><a href="{@docRoot}guide/developing/tools/MonkeyImage.html">MonkeyImage</a></code>:
+        Represents a screen capture image. This class provides methods for capturing screens,
+        converting bitmap images to various formats, comparing two MonkeyImage objects, and
+        writing an image to a file.
+    </li>
+</ul>
+<p>
+    In a Python program, you access each class as a Python module. The monkeyrunner tool
+    does not import these modules automatically. To import a module, use the
+    Python <code>from</code> statement:
+</p>
+<pre>
+from com.android.monkeyrunner import &lt;module&gt;
+</pre>
+<p>
+    where <code>&lt;module&gt;</code> is the class name you want to import. You can import more
+    than one module in the same <code>from</code> statement by separating the module names with
+    commas.
+</p>
+<h2 id="RunningMonkeyRunner">Running monkeyrunner</h2>
+<p>
+    You can either run monkeyrunner programs from a file, or enter monkeyrunner statements in
+    an interactive session. You do both by invoking the <code>monkeyrunner</code> command
+    which is found in the <code>tools/</code> subdirectory of your SDK directory.
+    If you provide a filename as an argument, the <code>monkeyrunner</code> command
+    runs the file's contents as a Python program; otherwise, it starts an interactive session.
+</p>
+<p>
+    The syntax of the <code>monkeyrunner</code> command is
+</p>
+<pre>
+monkeyrunner -plugin &lt;plugin_jar&gt; &lt;program_filename&gt; &lt;program_options&gt;
+</pre>
+<p>
+Table 1 explains the flags and arguments.
+</p>
+<p class="table-caption" id="table1">
+  <strong>Table 1.</strong> <code>monkeyrunner</code> flags and arguments.</p>
+
+<table>
+    <tr>
+        <th>Argument</th>
+        <th>Description</th>
+    </tr>
+    <tr>
+        <td>
+            <nobr>
+                <code>-plugin &lt;plugin_jar&gt;</code>
+            </nobr>
+        </td>
+        <td>
+            (Optional) Specifies a <code>.jar</code> file containing a plugin for monkeyrunner.
+            To learn more about monkeyrunner plugins, see
+            <a href="#Plugins">Extending monkeyrunner with plugins</a>. To specify more than one
+            file, include the argument multiple times.
+        </td>
+    </tr>
+    <tr>
+        <td>
+            <nobr>
+                <code>&lt;program_filename&gt;</code>
+            </nobr>
+        </td>
+        <td>
+            If you provide this argument, the <code>monkeyrunner</code> command runs the contents
+            of the file as a Python program. If the argument is not provided, the command starts an
+            interactive session.
+        </td>
+    </tr>
+    <tr>
+        <td>
+            <code>&lt;program_options&gt;</code>
+        </td>
+        <td>
+            (Optional) Flags and arguments for the program in &lt;program_file&gt;.
+        </td>
+    </tr>
+</table>
+<h2 id="Help">monkeyrunner Built-in Help</h2>
+<p>
+    You can generate an API reference for monkeyrunner by running:
+</p>
+<pre>
+monkeyrunner &lt;format&gt; help.py &lt;outfile&gt;
+</pre>
+<p>
+The arguments are:
+</p>
+    <ul>
+        <li>
+            <code>&lt;format&gt;</code> is either <code>text</code> for plain text output
+            or <code>html</code> for HTML output.
+        </li>
+        <li>
+            <code>&lt;outfile&gt;</code> is a path-qualified name for the output file.
+        </li>
+    </ul>
+<h2 id="Plugins">Extending monkeyrunner with Plugins</h2>
+<p>
+    You can extend the monkeyrunner API with classes you write in the Java programming language
+    and build into one or more <code>.jar</code> files. You can use this feature to extend the
+    monkeyrunner API with your own classes or to extend the existing classes. You can also use this
+    feature to initialize the monkeyrunner environment.
+</p>
+<p>
+    To provide a plugin to monkeyrunner, invoke the <code>monkeyrunner</code> command with the
+    <code>-plugin &lt;plugin_jar&gt;</code> argument described in
+    <a href="#table1">table 1</a>.
+</p>
+<p>
+    In your plugin code, you can import and extend the the main monkeyrunner classes
+    <code>MonkeyDevice</code>, <code>MonkeyImage</code>, and <code>MonkeyRunner</code> in
+    <code>com.android.monkeyrunner</code> (see <a href="#APIClasses">The monkeyrunner API</a>).
+</p>
+<p>
+    Note that plugins do not give you access to the Android SDK. You can't import packages
+    such as <code>com.android.app</code>. This is because monkeyrunner interacts with the
+    device or emulator below the level of the framework APIs.
+</p>
+<h3>The plugin startup class</h3>
+<p>
+    The <code>.jar</code> file for a plugin can specify a class that is instantiated before
+    script processing starts. To specify this class, add the key
+    <code>MonkeyRunnerStartupRunner</code> to the <code>.jar</code> file's
+    manifest. The value should be the name of the class to run at startup. The following
+    snippet shows how you would do this within an <code>ant</code> build script:
+</p>
+<pre>
+&lt;jar jarfile=&quot;myplugin&quot; basedir="&#36;&#123;build.dir&#125;&quot;&gt;
+&lt;manifest&gt;
+&lt;attribute name=&quot;MonkeyRunnerStartupRunner&quot; value=&quot;com.myapp.myplugin&quot;/&gt;
+&lt;/manifest&gt;
+&lt;/jar&gt;
+
+
+</pre>
+<p>
+    To get access to monkeyrunner's runtime environment, the startup class can implement
+    <code>com.google.common.base.Predicate&lt;PythonInterpreter&gt;</code>. For example, this
+    class sets up some variables in the default namespace:
+</p>
+<pre>
+package com.android.example;
+
+import com.google.common.base.Predicate;
+import org.python.util.PythonInterpreter;
+
+public class Main implements Predicate&lt;PythonInterpreter&gt; {
+    &#64;Override
+    public boolean apply(PythonInterpreter anInterpreter) {
+
+        /*
+        * Examples of creating and initializing variables in the monkeyrunner environment's
+        * namespace. During execution, the monkeyrunner program can refer to the variables "newtest"
+        * and "use_emulator"
+        *
+        */
+        anInterpreter.set("newtest", "enabled");
+        anInterpreter.set("use_emulator", 1);
+
+        return true;
+    }
+}
+</pre>
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 2b803424..545807e 100644
--- a/docs/html/guide/guide_toc.cs
+++ b/docs/html/guide/guide_toc.cs
@@ -254,34 +254,45 @@
             <li><a href="<?cs var:toroot?>guide/topics/search/searchable-config.html">Searchable Configuration</a></li>
           </ul>
       </li>
-      <li class="toggle-list">
-           <div>
-                <a href="<?cs var:toroot ?>guide/topics/testing/index.html">
-                   <span class="en">Testing</span>
-               </a> <span class="new">new!</span>
-           </div>
-           <ul>
-              <li><a href="<?cs var:toroot?>guide/topics/testing/testing_android.html">
-                <span class="en">Testing Fundamentals</span></a>
-              </li>
-              <li><a href="<?cs var:toroot?>guide/topics/testing/activity_testing.html">
-                <span class="en">Activity Testing</span></a>
-              </li>
-              <li><a href="<?cs var:toroot ?>guide/topics/testing/contentprovider_testing.html">
-                <span class="en">Content Provider Testing</span></a>
-              </li>
-              <li><a href="<?cs var:toroot ?>guide/topics/testing/service_testing.html">
-                <span class="en">Service Testing</span></a>
-              </li>
-              <li><a href="<?cs var:toroot ?>guide/topics/testing/what_to_test.html">
-                <span class="en">What To Test</span></a>
-              </li>
-           </ul>
-      </li>
-     <li><a href="<?cs var:toroot?>guide/topics/admin/device-admin.html">
+      <li><a href="<?cs var:toroot?>guide/topics/admin/device-admin.html">
             <span class="en">Device Administration</span>
          </a> <span class="new">new!</span>
-    </li>
+      </li>
+      <li class="toggle-list">
+           <div>
+                <a href="<?cs var:toroot?>guide/topics/testing/index.html">
+                   <span class="en">Testing</span>
+               </a>
+           </div>
+           <ul>
+              <li>
+                <a href="<?cs var:toroot?>guide/topics/testing/testing_android.html">
+                <span class="en">Testing Fundamentals</span></a>
+                <span class="new">new!</span>
+              </li>
+              <li>
+                <a href="<?cs var:toroot?>guide/topics/testing/activity_testing.html">
+                <span class="en">Activity Testing</span></a>
+                <span class="new">new!</span>
+              </li>
+              <li>
+                <a href="<?cs var:toroot?>guide/topics/testing/contentprovider_testing.html">
+                <span class="en">Content Provider Testing</span></a>
+                <span class="new">new!</span>
+              </li>
+              <li>
+                <a href="<?cs var:toroot?>guide/topics/testing/service_testing.html">
+                <span class="en">Service Testing</span></a>
+                <span class="new">new!</span>
+              </li>
+              <li>
+                <a href="<?cs var:toroot ?>guide/topics/testing/what_to_test.html">
+                <span class="en">What To Test</span></a>
+                <span class="new">new!</span>
+              </li>
+
+           </ul>
+      </li>
     </ul>
   </li>
 
@@ -336,6 +347,7 @@
                   <span class="en">Testing in Eclipse, with ADT</span>
                 </a>
               </li>
+
               <li>
                 <a href="<?cs var:toroot ?>guide/developing/testing/testing_otheride.html">
                   <span class="en">Testing in Other IDEs</span>
@@ -363,6 +375,35 @@
               <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">
+                 <div>
+                     <a href="<?cs var:toroot?>guide/developing/tools/monkeyrunner_concepts.html">
+                     <span class="en">monkeyrunner</span>
+                  </a>
+                      <span class="new">new!</span>
+                  </div>
+                  <ul>
+                      <li>
+                          <a href="<?cs var:toroot?>guide/developing/tools/MonkeyDevice.html">
+                                <span class="en">MonkeyDevice</span>
+                        </a>
+                        <span class="new">new!</span>
+                    </li>
+                    <li>
+                        <a href="<?cs var:toroot?>guide/developing/tools/MonkeyImage.html">
+                            <span class="en">MonkeyImage</span>
+                        </a>
+                        <span class="new">new!</span>
+                    </li>
+                    <li>
+                        <a href="<?cs var:toroot?>guide/developing/tools/MonkeyRunner.html">
+                            <span class="en">MonkeyRunner</span>
+                        </a>
+                        <span class="new">new!</span>
+                    </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>
@@ -475,18 +516,21 @@
     <h2><span class="en">Web Applications</span>
     </h2>
     <ul>
-      <li><a href="<?cs var:toroot ?>guide/webapps/targetting.html">
-            <span class="en">Targetting Android Devices</span>
-          </a> <span class="new">new!</span><!-- 10/8/10 --></li>
+      <li><a href="<?cs var:toroot ?>guide/webapps/index.html">
+            <span class="en">Web Apps Overview</span>
+          </a> <span class="new">new!</span><!-- 11/1/10 --></li>
+      <li><a href="<?cs var:toroot ?>guide/webapps/targeting.html">
+            <span class="en">Targeting Screens from Web Apps</span>
+          </a> <span class="new">new!</span><!-- 11/1/10 --></li>
       <li><a href="<?cs var:toroot ?>guide/webapps/webview.html">
             <span class="en">Building Web Apps in WebView</span>
-          </a> <span class="new">new!</span><!-- 10/8/10 --></li>
+          </a> <span class="new">new!</span><!-- 11/1/10 --></li>
       <li><a href="<?cs var:toroot ?>guide/webapps/debugging.html">
             <span class="en">Debugging Web Apps</span>
-          </a> <span class="new">new!</span><!-- 10/8/10 --></li>
+          </a> <span class="new">new!</span><!-- 11/1/10 --></li>
       <li><a href="<?cs var:toroot ?>guide/webapps/best-practices.html">
             <span class="en">Best Practices for Web Apps</span>
-          </a> <span class="new">new!</span><!-- 10/8/10 --></li>
+          </a> <span class="new">new!</span><!-- 11/1/10 --></li>
     </ul>
   </li>
 
diff --git a/docs/html/guide/practices/screens_support.jd b/docs/html/guide/practices/screens_support.jd
index 13b5e3a..7811d90 100644
--- a/docs/html/guide/practices/screens_support.jd
+++ b/docs/html/guide/practices/screens_support.jd
@@ -35,7 +35,9 @@
   <ol>
     <li><code><a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">&lt;supports-screens&gt;</a></code></li>
     <li><code><a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">&lt;uses-sdk&gt;</a></code></li>
-    <li><a href="{@docRoot}guide/topics/resources/providing-resources.html#AlternativeResources">Alternative Resources</a></li>
+    <li><a
+href="{@docRoot}guide/topics/resources/providing-resources.html#AlternativeResources">
+Providing Alternative Resources</a></li>
     <li><a href="{@docRoot}guide/developing/tools/avd.html">Android Virtual Devices</a></li>
   </ol>
 
@@ -53,7 +55,7 @@
 <p>This document explains the screens-support features provided by the platform
 and how you use them in your application. By following the practices described
 here, you can easily create an application that displays properly on all
-supported device screens and that you can deploy to any device as a single .apk.
+supported device screens and that you can deploy to any device as a single {@code .apk}.
 </p>
 
 <p>If you have already developed and published an application for Android 1.5 or
@@ -63,10 +65,16 @@
 are needed, however you should make sure to <a href="#testing">test your
 application</a> on all supported screens. </p>
 
+<p>Starting in Android 2.2, the platform includes support for extra high density screens
+(<em>xhdpi</em>), and starting in Android 2.3, the platform includes support for extra large screens
+(<em>xlarge</em>). If you've already followed the guidance in this document to support all other
+screen types, you should consider providing additional support for <em>xhdpi</em> and
+<em>xlarge</em> screens.</p>
+
 <p>In particular, if you have an existing application that you would like to
-make available for users of devices with small screens (such as QVGA), please
-see <a href="#strategies">Strategies for Legacy Applications</a> for more
-information about how to do that. </p>
+make available on small screens (such as QVGA) or for which you would like to provide better support
+for extra large screens, please see <a href="#strategies">Strategies for Legacy Applications</a> for
+more information about how to do that. </p>
 
 
 <h2 id="overview">Overview of Screens Support</h2>
@@ -82,11 +90,11 @@
 
 <dl>
 <dt><em>Screen size</em></dt>
-  <dd>Actual physical size, measured as the screen's diagonal. 
+  <dd>Actual physical size, measured as the screen's diagonal.
 
-  <p>For simplicity, Android collapses all actual screen sizes into three
-generalized sizes: large, normal, and small. Applications can provide custom
-layouts for each of these three sizes &mdash; the platform transparently handles
+  <p>For simplicity, Android collapses all actual screen sizes into four
+generalized sizes: small, normal, large, and extra large. Applications can provide custom
+layouts for each of these four sizes &mdash; the platform transparently handles
 the rendering of the layouts at the actual screen size.</p></dd>
 
 <dt><em>Aspect ratio</em></dt>
@@ -110,22 +118,22 @@
 density of a screen is important because, other things being equal, a UI element
 (such as a button) whose height and width are defined in terms of screen pixels
 will appear larger on the lower density screen and smaller on the higher density
-screen. </p>
+screen.</p>
 
-  <p>For simplicity, Android collapses all actual screen densities into three
-generalized densities: high, medium, and low. Applications can provide custom
-resources for each of these three densities &mdash; the platform handles the
-scaling of the resources up or down to meet the actual screen density. </p></dd>
-<dt><em>Density-independent pixel (dip)</em></dt>
+  <p>For simplicity, Android collapses all actual screen densities into four
+generalized densities: low, medium, large, and extra large. Applications can provide custom
+resources for each of these densities &mdash; the platform handles any necessary
+scaling of the resources up or down to meet the specific screen density. </p></dd>
+<dt><em>Density-independent pixel (dp)</em></dt>
   <dd>A virtual pixel unit that applications can use in defining their UI, to
-express layout dimensions or position in a density-independent way. 
+express layout dimensions or position in a density-independent way.
   <p>The density-independent pixel is equivalent to one physical pixel on a 160
 dpi screen, the baseline density assumed by the platform (as described later in
 this document). At run time, the platform transparently handles any scaling of
-the dip units needed, based on the actual density of the screen in use. The
-conversion of dip units to screen pixels is simple: <code>pixels = dips *
-(density / 160)</code>. For example, on 240 dpi screen, 1 dip would equal 1.5
-physical pixels. Using dip units to define your application's UI is highly
+the dp units needed, based on the actual density of the screen in use. The
+conversion of dp units to screen pixels is simple: <nobr><code>pixels = dps *
+(density / 160)</code></nobr>. For example, on 240 dpi screen, 1 dp would equal 1.5
+physical pixels. Using dp units to define your application's UI is highly
 recommended, as a way of ensuring proper display of your UI on different
 screens. </p></dd>
 </dl>
@@ -146,13 +154,19 @@
 and resolutions into:</p>
 
 <ul>
-<li>A set of three generalized sizes: <em>large</em>, <em>normal</em>, and <em>small</em>, and </li>
-<li>A set of three generalized densities:  <em>hdpi</em> (high), <em>mdpi</em> (medium), and <em>ldpi</em> (low)
+<li>A set of four generalized sizes: <em>small</em>, <em>normal</em>, <em>large</em>,
+and <em>xlarge</em></em>
+<li>A set of four generalized densities: <em>ldpi</em> (low), <em>mdpi</em> (medium),
+<em>hdpi</em> (high), and <em>xhdpi</em> (extra high)
 </ul>
 
+<p class="note"><strong>Note:</strong> The <code>xhdpi</code> density category was added in
+Android 2.2 (API Level 8). The <em>xlarge</em> size category was added in Android 2.3 (API Level
+9).</p>
+
 <p>Applications can provide custom resources (primarily layouts) for any of the
-three generalized sizes and can provide resources (primarily drawables such as
-images) for any of the three generalized densities. Applications do not need to
+four generalized sizes and can provide resources (primarily drawables such as
+images) for any of the four generalized densities. Applications do not need to
 work with the actual physical size or density of the device screen. At run time,
 the platform handles the loading of the correct size or density resources, based
 on the generalized size or density of the current device screen, and adapts them
@@ -177,8 +191,8 @@
 
 
 <img src="{@docRoot}images/screens_support/screens-ranges.png" />
-<p class="img-caption"><strong>Figure 1.</strong> 
-Illustration of how the Android platform maps actual screen densities and sizes 
+<p class="img-caption"><strong>Figure 1.</strong>
+Illustration of how the Android platform maps actual screen densities and sizes
 to generalized density and size configurations. </p>
 
 <p>Although the platform lets your application provide layouts and resources for
@@ -213,6 +227,9 @@
       <td  style="background-color:#f3f3f3">
         <nobr>High density (240), <em>hdpi</em><nobr>
       </td>
+      <td  style="background-color:#f3f3f3">
+        <nobr>Extra high density (320), <em>xhdpi</em><nobr>
+      </td>
     </tr>
     <tr>
       <td  style="background-color:#f3f3f3">
@@ -222,6 +239,7 @@
       </td>
       <td></td>
       <td></td>
+      <td></td>
     </tr>
     <tr>
       <td style="background-color:#f3f3f3">
@@ -230,6 +248,7 @@
       <td style="font-size:.9em;">WQVGA400 (240x400)<br>WQVGA432 (240x432)</td>
       <td style="font-size:.9em;">HVGA (320x480)</td>
       <td style="font-size:.9em;">WVGA800 (480x800)<br>WVGA854 (480x854)</td>
+      <td style="font-size:.9em;"></td>
     </tr>
     <tr>
       <td style="background-color:#f3f3f3">
@@ -238,16 +257,27 @@
       <td></td>
       <td style="font-size:.9em;">WVGA800* (480x800)<br>WVGA854* (480x854)</td>
       <td></td>
+      <td></td>
     </tr>
     <tr>
-      <td colspan="4" style="border:none;font-size:90%;">* To emulate this 
-        configuration, specify a custom density of 160 when 
+      <td style="background-color:#f3f3f3">
+        <em>Extra Large</em> screen
+      </td>
+      <td></td>
+      <td></td>
+      <td></td>
+      <td></td>
+    </tr>
+    <tr>
+      <td colspan="4" style="border:none;font-size:90%;">* To emulate this
+        configuration, specify a custom density of 160 when
         creating an AVD that uses a WVGA800 or WVGA854 skin.
       </td>
+    </tr>
 </table>
 
-<p>For an overview of the relative numbers of high (hdpi), medium (mdpi), and 
-low (ldpi) density screens in Android-powered devices available now, see the <a 
+<p>For an overview of the relative numbers of high (hdpi), medium (mdpi), and
+low (ldpi) density screens in Android-powered devices available now, see the <a
 href="{@docRoot}resources/dashboard/screens.html">Screen Sizes and Densities</a> dashboard.</p>
 
 
@@ -262,9 +292,9 @@
 
 <p> If you want to use size- or density-specific layouts or drawables in your
 application and you are not familiar with resource qualifiers or how the
-platform uses them, please read 
+platform uses them, please read
 <a href="{@docRoot}guide/topics/resources/providing-resources.html#AlternativeResources">
-Alternative Resources</a>.
+Providing Alternative Resources</a>.
 </div>
 </div>
 
@@ -277,19 +307,20 @@
 
 <ul>
   <li>The platform supports a set of resource qualifiers that let you provide
-size- and density-specific resources, if needed. The qualifiers for 
-size-specific resources are <code>large</code>, <code>normal</code>, and
-<code>small</code>, and those for density-specific resources are
-<code>hdpi</code> (high), <code>mdpi</code> (medium), and <code>ldpi</code>
-(low). The qualifiers correspond to the generalized densities described in 
+size- and density-specific resources, if needed. The qualifiers for
+size-specific resources are <code>small</code>, <code>normal</code>, <code>large</code>, and
+<code>xlarge</code>. Those for density-specific resources are <code>ldpi</code>
+(low), <code>mdpi</code> (medium), <code>hdpi</code> (high), and <code>xhdpi</code> (extra high).
+The qualifiers correspond to the generalized densities described in
 <a href="#range">Range of screens supported</a>, above.</li>
-  <li>The platform also provides a 
+  <li>The platform also provides a
 <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">
 <code>&lt;supports-screens&gt;</code></a>
 manifest element, whose attributes
-<code>android:largeScreens</code>, <code>android:normalScreens</code>, and
-<code>android:smallScreens</code> let you specify what generalized screen sizes
-your application supports. A fourth attribute, <code>android:anyDensity</code>,
+<code>android:smallScreens</code>, <code>android:normalScreens</code>,
+<code>android:largeScreens</code>, and <code>android:xlargeScreens</code> let you specify what
+generalized screen sizes
+your application supports. Another attribute, <code>android:anyDensity</code>,
 lets you indicate whether or not your application includes built-in support for
 multiple densities.</li>
 </ul>
@@ -299,7 +330,7 @@
 screen:</p>
 
 <ol>
-<li><em>Pre-scaling of resources (such as image assets)</em> 
+<li><em>Pre-scaling of resources (such as image assets)</em>
 
   <p>Based on the density of the current screen, the platform automatically
 loads any size- or density-specific resources from your application and displays
@@ -344,18 +375,18 @@
   <p>For more information, see the <code>android:anyDensity</code> attribute in
 <a href="#attrs">Manifest attributes for screens support</a>.</p></li>
 
-<div class="sidebox-wrapper" xstyle="margin-bottom:2em;margin-top:.5em;width:90%;"> 
-  <img id="rule" src="{@docRoot}assets/images/grad-rule-qv.png"> 
-  <div id="qv-sub-rule"> 
-    <img src="{@docRoot}assets/images/icon_market.jpg" style="float:left;margin:0;padding:0;"> 
-    <p style="color:#669999;">Publishing to Small Screen Devices</p> 
+<div class="sidebox-wrapper" xstyle="margin-bottom:2em;margin-top:.5em;width:90%;">
+  <img id="rule" src="{@docRoot}assets/images/grad-rule-qv.png">
+  <div id="qv-sub-rule">
+    <img src="{@docRoot}assets/images/icon_market.jpg" style="float:left;margin:0;padding:0;">
+    <p style="color:#669999;">Publishing to Small Screen Devices</p>
     <p>To ensure the best experience for users on small-screen devices, Android
 Market only shows applications that explicitly declare support for small
 screens. If you developed an application on Android 1.5 or earlier and published
 it on Android Market, you need to <a href="#testing">test your application</a>
-on small screens and then upload an updated version that explicitly 
+on small screens and then upload an updated version that explicitly
 <a href="#attrs">indicates support for small screens</a>. </p>
-  </div> 
+  </div>
 </div>
 
 <li><em>Compatibility-mode display on larger screen-sizes</em>
@@ -374,7 +405,7 @@
 placed as a "postage stamp" in the larger 480x800 screen.</p>
 
   <p>For more information, see the <code>android:anyDensity</code> attribute in
-<a href="#attrs">Manifest elements for screens support</a> and the 
+<a href="#attrs">Manifest elements for screens support</a> and the
 <a href="#compatibility-examples">Screen-Compatibility Examples</a>
 section.</p></li>
 </ol>
@@ -415,7 +446,7 @@
 <ul>
 <li>Through pre-scaling of drawable resources (scaled at resource loading
 time)</li>
-<li>Through auto-scaling of density-independent pixel (dip) values used in
+<li>Through auto-scaling of density-independent pixel (dp) values used in
 layouts</li>
 <li>Through auto-scaling of absolute pixel values used in the application (only
 needed if the application has set <code>android:anyDensity="false"</code> in its
@@ -437,25 +468,36 @@
 
 <p>In most cases, you can take advantage of density independence in your
 application simply by making sure that your layouts specify all dimension values
-in density-independent pixels (<code>dip</code> or <code>dp</code>) or
+in density-independent pixels (<code>dp</code> or <code>dp</code>) or
 scale-independent pixels (<code>sip</code> or <code>sp</code>, for text only).
 If you are using absolute pixel values in the application and manifest includes
 <a href="#attrs"><code>android:anyDensity="true"</code></a>, you will also need
-to scale the pixel values. See <a href="#dips-pels">Converting from dips to
-pixels</a> for more information. </p> 
+to scale the pixel values. See <a href="#dips-pels">Converting dp units to
+pixel units</a> for more information. </p>
 
 
 <h3 id="attrs">Manifest attributes for screens support</h3>
 
-<p> Android 1.6 introduced a new manifest element, 
+<p> Android 1.6 introduced a new manifest element,
 <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html"><code>&lt;supports-screens&gt;</code></a>,
 whose attributes you can use to control the
 display of your application on different classes of device screens, as listed
-below. The <code>smallScreens</code>, <code>normalScreens</code>, and
-<code>largeScreens</code> attributes correspond to the generalized screen sizes
+in table 2. The <code>smallScreens</code>, <code>normalScreens</code>, <code>largeScreens</code> and
+<code>xlargeScreens</code> attributes correspond to the generalized screen sizes
 described in <a href="#range">Range of screens supported</a>, earlier in this
-document.</p>
+document. Notice that the default values for each attribute vary, depending
+on your minimum and targeted platform, as indicated in the <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code
+android:minSdkVersion}</a> and <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code
+android:targetSdkVersion}</a> attributes of your <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code &lt;uses-sdk&gt;}</a>
+manifest element.</p>
 
+<p class="table-caption" id="table2"><strong>Table 2.</strong> Summary of attributes for the <a
+href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
+&lt;supports-screens&gt;}</a> manifest element, including default values based on platform
+version.</p>
     <table id="vrr8">
       <tr>
         <th>
@@ -465,10 +507,12 @@
           Description
         </th>
         <th>
-          Default value,<br><nobr>Android 1.5 and Lower</nobr>
+          Default value, when<br><nobr><code>minSdkVersion</code> or</nobr>
+<code>targetSdkVersion</code> is 4 or lower
         </th>
         <th>
-          Default value,<br><nobr>Android 1.6 and Higher</nobr>
+          Default value, when<br><nobr><code>minSdkVersion</code> or</nobr>
+<code>targetSdkVersion</code> is 5 or higher
         </th>
       </tr>
       <tr>
@@ -540,11 +584,46 @@
 <td>"<code>false</code>"</td>
 <td>"<code>true</code>"</td>
       </tr>
+      <tr>
+        <td colspan="4"><strong>Note:</strong> Android 2.3 (API Level 9) introduced a new
+attribute for the <code>&lt;supports-screens&gt;</code> element: <code>xlargeScreens</code>, shown
+below. It works the same as the other screen attributes above, but, if neither your
+<code>minSdkVersion</code> or <code>targetSdkVersion</code> are set to "9", the default value is
+"false" when your application is installed on a device running Android 2.3.</td>
+      </tr>
+      <tr>
+        <th>
+          Attribute
+        </th>
+        <th >
+          Description
+        </th>
+        <th>
+          Default value, when<br><nobr><code>minSdkVersion</code> or</nobr>
+<code>targetSdkVersion</code> is 8 or lower
+        </th>
+        <th>
+          Default value, when<br><nobr><code>minSdkVersion</code> or</nobr>
+<code>targetSdkVersion</code> is 9 or higher
+        </th>
+      </tr>
+      <tr>
+        <td>
+          <code>android:xlargeScreens</code>
+        </td>
+        <td>
+           Whether or not the application UI is designed for use on
+<em>xlarge</em> screens &mdash; "<code>true</code>" if it is, and
+"<code>false</code>" if not.
+        </td>
+<td>"<code>false</code>"</td>
+<td>"<code>true</code>"</td>
+      </tr>
     </table>
 
 <p>In general, when you declare a screen-size attribute
-(<code>smallScreens</code>, <code>normalScreens</code>, or
-<code>largeScreens</code>) as "<code>true</code>", you are signaling to the
+(<code>smallScreens</code>, <code>normalScreens</code>, <code>largeScreens</code>, or
+<code>xlargeScreens</code>) as "<code>true</code>", you are signaling to the
 platform that your application is designed to render properly on that screen
 size. As a result, the platform does not apply any size-compatibility features
 (such as a virtual HVGA display area). If you declare a screen-size attribute as
@@ -577,16 +656,20 @@
 
 <ul>
     <li>Assume that you declare <code>smallScreens="false" normalScreens="true"
-largeScreens="false" </code> in your application's manifest. <p>Although the
-application is not designed for display on large screens, the platform can still
-run it successfully in <a href="#compatibility-examples">size-compatibility
-mode</a>. Android Market does not filter the application from devices
-<em>normal</em> and <em>large</em> size screens, but does filter it from
-<em>small</em> size screens, since the application provides no screen support at
-<em>small</em> size (and there is no smaller size).</p></li>
+largeScreens="false" xlargeScreens="false"</code> in your application's manifest. <p>Although the
+application is not designed for display on large or extra large screens, the platform can still
+run it successfully in <a href="#compatibility-examples">screen-compatibility
+mode</a>. Android Market shows the application to devices with
+<em>normal</em>, <em>large</em>, and <em>xlarge</em> size screens, but does filter it from
+<em>small</em> size screens, because the application provides no screen support at
+<em>small</em> size. Android's <a href="#compatibility-examples">screen-compatibility
+mode</a> mode does not provide support for screens that are smaller than those the
+application supports&mdash;it only provides support for screens that are larger. Thus,
+although the application declares "false" for <em>large</em> and <em>xlarge</em> screens,
+the application still functions, but runs in compatibility mode.</p></li>
 
     <li>Assume that you declare <code>smallScreens="false" normalScreens="false"
-largeScreens="true"</code> in your application's manifest. <p>Android Market
+largeScreens="true" xlargeScreens="true"</code> in your application's manifest. <p>Android Market
 filters the application from users of devices with <em>small</em> and
 <em>normal</em> size screens. In effect, this prevents such users from
 installing the application.</p></li>
@@ -599,23 +682,24 @@
 density-independent pixels (<code>dp</code>) and scales any absolute pixel
 values (<code>px</code>) or math by the scaling factor available from {@link
 android.util.DisplayMetrics#density android.util.DisplayMetrics.density}. See <a
-href="#dips-pels">Converting from dips to pixels</a> for an example.</p>
+href="#dips-pels">Converting dp units to pixel units</a> for an example.</p>
 
 <p>Note that the setting of the <code>android:anyDensity</code> attribute does
 not affect the platform's pre-scaling of drawable resources, such as bitmaps and
 nine-patch images, which always takes place by default. </p>
 
-<p>The following example shows a manifest that declares support for large,
-normal, and small screens in any densities.</p>
+<p>The following example shows a manifest that declares support for small, normal, large, and
+ xlarge screens in any density.</p>
 
-<pre>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"&gt;
-  ...
-  &lt;supports-screens
-  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; android:largeScreens="true"
-  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; android:normalScreens="true"
-  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; android:smallScreens="true"
-  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; android:anyDensity="true" /&gt;
-  ...
+<pre>
+&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"&gt;
+    ...
+    &lt;supports-screens
+        android:smallScreens="true"
+        android:normalScreens="true"
+        android:largeScreens="true"
+        android:xlargeScreens="true"
+        android:anyDensity="true" /&gt;
 &lt;/manifest&gt;
 </pre>
 <!--  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; android:resizeable="true" -->
@@ -624,36 +708,25 @@
 </h4>
 
 <p>The default values for the <code>&lt;supports-screens&gt;</code> attributes
-differ, depending on the the value of the 
+differ, depending on the the value of the
 <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><code>android:minSdkVersion</code></a>
  attribute in the application's manifest, as well as on
-the value of <code>android:targetSdkVersion</code>, if declared:</p>
+the value of <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code
+android:targetSdkVersion}</a>, if declared.</p>
 
-<div>
-  <ul>
-    <li>
-      If <code>android:minSdkVersion</code> or
-<code>android:targetSdkVersion</code> is "4" (Android 1.6) or higher, the
-default value for everything is "<code>true</code>". If your application uses
-APIs introduced in Android 1.6 or higher, but does not support specific screen
-densities and/or screen sizes, you need to explicitly set the appropriate
-attributes to "<code>false</code>".
-    </li>
-    <li>
-      If <code>android:minSdkVersion</code> is declared with a value of "3"
-(Android 1.5) or lower <em>and</em> a <code>android:targetSdkVersion</code>
-attribute is <em>not</em> declared with a value of "4" or higher, the default
-value for all attributes except <code>android:normalScreens</code> is
-"<code>false</code>". If you are primarily targeting pre-Android 1.6 platforms
-but also want to support other densities/screen sizes, you need to explicitly
-set the appropriate attributes to "<code>true</code>".
-    </li>
-    <li>
-      Note that <code>android:normalScreens</code> always defaults to
-<code>true</code>.
-    </li>
-  </ul>
-</div>
+<p>Above, <a href="#table2">table 2</a> indicates the default values for each attribute, based on
+the values you provide for the <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code
+android:minSdkVersion}</a> and <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code
+android:targetSdkVersion}</a>, in the <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code &lt;uses-sdk&gt;}</a>
+element.</p>
+
+<p class="note"><strong>Note:</strong> If your application uses APIs introduced in Android 1.6 or
+higher, but does not support specific screen densities and/or screen sizes, you need to explicitly
+set the appropriate attributes to "<code>false</code>" (because most are "true", by default).</p>
 
 
 <h3 id="qualifiers">Resource directory qualifiers for screen size and density</h3>
@@ -673,7 +746,7 @@
 </tr>
 
 <tr>
-  <td rowspan="3">Size</td>
+  <td rowspan="4">Size</td>
   <td><code>small</code></td>
   <td>Resources designed for <em>small</em> size screens.</td>
 </tr>
@@ -683,11 +756,15 @@
 </tr>
 <tr>
 <td><code>large</code></td>
-<td>Resources for <em>large</em> size screens.</td>
+<td>Resources designed for <em>large</em> size screens.</td>
+</tr>
+<tr>
+<td><code>xlarge</code></td>
+<td>Resources designed for <em>extra large</em> size screens.</td>
 </tr>
 
 <tr>
-<td rowspan="4">Density</td>
+<td rowspan="5">Density</td>
 <td><code>ldpi</code></td>
 <td>Resources designed for low-density (<em>ldpi</em>) screens.</td>
 </tr>
@@ -700,6 +777,10 @@
 <td>Resources designed for high-density (<em>hdpi</em>) screens.</td>
 </tr>
 <tr>
+<td><code>xhdpi</code></td>
+<td>Resources designed for extra high-density (<em>xhdpi</em>) screens.</td>
+</tr>
+<tr>
 <td><code>nodpi</code></td>
 <td>Density-independent resources. The platform does not auto-scale resources
 tagged with this qualifier, regardless of the current screen's density.</td>
@@ -732,31 +813,34 @@
 Note that the density and the screen size are independent parameters and are
 interpreted by the system individually. For example, WVGA high density is
 considered a normal screen because its physical size is about the same as one of
-T-Mobile G1. On the other hand, a WVGA medium density screen is considered a 
+T-Mobile G1. On the other hand, a WVGA medium density screen is considered a
 <i>large</i> screen &mdash; it offers the same resolution but at lower pixel
 density, meaning that it is both physically larger than the baseline screen and
 can display significantly more information than a normal screen size.
 </p>
 
 <p>Here is an example of the resource directory structure of an application that
-supports low and high density, and employs different layout schemes.</p>
+employs different layout schemes for different screen sizes and supports low and high density
+screens.</p>
 
-<pre>res/layout/my_layout.xml            // layout for normal screen size
+<pre>
+res/layout/my_layout.xml            // layout for normal screen size
 res/layout-small/my_layout.xml      // layout for small screen size
 res/layout-large/my_layout.xml      // layout for large screen size
 res/layout-large-land/my_layout.xml // layout for large screen size in landscape mode
+res/layout-xlarge/my_layout.xml     // layout for extra large screen size
 
-res/drawable-ldpi/my_icon.png       // icon image for low density
-res/drawable-mdpi/dpi/my_icon.png   // icon for medium density
-res/drawable-hdpi/my_icon.png       // icon image for high density
+res/drawable-lhdpi/my_icon.png      // image for low density
+res/drawable-mdpi/dpi/my_icon.png   // image for medium density
+res/drawable-hdpi/my_icon.png       // image for high density
 
 res/drawable-nodpi/composite.xml    // density independent resource
 </pre>
 
 <p>For more information about how to use resource qualifiers or how the platform
-selects them, please read 
+selects them, please read
 <a href="{@docRoot}guide/topics/resources/providing-resources.html#AlternativeResources">
-Alternative Resources</a>.</p>
+Providing Alternative Resources</a>.</p>
 
 
 <h2 id="screen-independence">Best practices for Screen Independence</h2>
@@ -771,10 +855,11 @@
 
 <ol>
   <li>
-    Prefer wrap_content, fill_parent and the dip unit to px in XML layout files
+   Use {@code wrap_content}, {@code fill_parent}, or the {@code dp} unit (instead of {@code px}),
+when specifying dimensions in an XML layout file
   </li>
   <li>
-    Avoid AbsoluteLayout
+    Do not use {@code AbsoluteLayout}
   </li>
   <li>
     Do not use hard coded pixel values in your code
@@ -784,19 +869,19 @@
   </li>
 </ol>
 
-<h3 id="use-relative">1. Prefer wrap_content, fill_parent and the dip unit to
+<h3 id="use-relative">1. Use wrap_content, fill_parent, or the dp unit, instead of
 absolute pixels<br> </h3>
 
 <p>When defining the <code>layout_width</code> and <code>layout_height</code> of
 views in an XML layout file, using <code>wrap_content</code>,
-<code>fill_parent</code> or the <code>dip</code> will guarantee that the view is
+<code>fill_parent</code> or the <code>dp</code> will guarantee that the view is
 given an appropriate size on the current device screen. For instance, a view
-with a <code>layout_width="100dip"</code> will measure 100 pixels wide on an
+with a <code>layout_width="100dp"</code> will measure 100 pixels wide on an
 HVGA@160 density display and 150 pixels on a WVGA@240 density display, but the
 view will occupy approximately the same physical space. </p>
 
 <p>Similarly, you should prefer the <code>sp</code> (scale-independent pixel,
-the scale factor depends on a user setting) or <code>dip</code> (if you don't
+the scale factor depends on a user setting) or <code>dp</code> (if you don't
 want to allow the user to scale the text) to define font sizes.</p>
 
 <h3 id="avoid-absolute">2. Avoid AbsoluteLayout </h3>
@@ -808,7 +893,7 @@
 different displays. Because of this, <code>AbsoluteLayout</code> was deprecated
 in Android 1.5 (API Level 3). </p>
 
-<p>You can achieve much the same layout by using a 
+<p>You can achieve much the same layout by using a
 {@link android.widget.FrameLayout FrameLayout} instead, and setting
 <code>layout_margin</code> attributes of the children. This approach is more
 flexible and will yield better results on different screens.</p>
@@ -822,9 +907,9 @@
 view is 10 pixels wide. In some cases, you may need to scale the pixel values
 that you use in your code. The sections below provide more information. </p>
 
-<h4 id="dips-pels">Converting from dips to pixels</h4>
+<h4 id="dips-pels">Converting dp units to pixel units</h4>
 
-<p>In some cases, you will need to express dimensions in <code>dip</code> and
+<p>In some cases, you will need to express dimensions in <code>dp</code> and
 then convert them to pixels. Imagine an application in which a scroll gesture is
 recognized after the user's finger has moved by at least 16 pixels. On a
 baseline screen, the user will have to move his finger by 16 pixels / 160
@@ -832,26 +917,26 @@
 device with a high (240) density display, the user will move his finger by only
 16 pixels / 240 dpi = 1/15th of an inch (or 1.7 mm.) The distance is much
 shorter and the application thus appears more sensitive to the user. To fix this
-issue, the gesture threshold must be expressed in the code in <code>dip</code>
+issue, the gesture threshold must be expressed in the code in <code>dp</code>
 and then converted to actual pixels.</p>
 
-<pre>// The gesture threshold expressed in dip
-private static final float GESTURE_THRESHOLD_DIP = 16.0f;
+<pre>// The gesture threshold expressed in dp
+private static final float GESTURE_THRESHOLD_DP = 16.0f;
 
-// Convert the dips to pixels
+// Convert the dps to pixels
 final float scale = getContext().getResources().getDisplayMetrics().density;
-mGestureThreshold = (int) (GESTURE_THRESHOLD_DIP * scale + 0.5f);</span>
+mGestureThreshold = (int) (GESTURE_THRESHOLD_DP * scale + 0.5f);</span>
 
 // Use mGestureThreshold as a distance in pixels
 </pre>
 
-<p>The {@link android.util.DisplayMetrics#density android.util.DisplayMetrics.density} 
+<p>The {@link android.util.DisplayMetrics#density android.util.DisplayMetrics.density}
 field specifies the the scale factor you must use to
-convert dips to pixels according to the current screen density. You can access
+convert dps to pixels according to the current screen density. You can access
 the current screen's metrics through a <code>Context</code> or
 <code>Activity</code>. On a medium (160) density screen,
 <code>DisplayMetrics.density</code> equals "1.0", whereas on a high (240)
-density screen it equals "1.5". You can refer to the documentation of the 
+density screen it equals "1.5". You can refer to the documentation of the
 {@link android.util.DisplayMetrics DisplayMetrics}
 class for details.</p>
 
@@ -901,7 +986,7 @@
 baseline medium density. It is not recommended that you put density-specific
 resources such as images in the default directory.</p>
 
-<p>For more information about valid resource qualifiers, see 
+<p>For more information about valid resource qualifiers, see
 <a href="#qualifiers">Resource directory qualifiers</a>, earlier in this
 document.</p>
 
@@ -945,7 +1030,7 @@
 
 <p style="margin-left:2em;"><code>res/drawable-nodpi/icon.png</code></p>
 
-<p>You can also take complete control of the scaling mechanism by using the 
+<p>You can also take complete control of the scaling mechanism by using the
 {@link android.graphics.BitmapFactory.Options BitmapFactory.Options} class,
 which lets you define whether you want the bitmap to be pre-scaled and what the
 density of the bitmap should be. For instance, if you are loading a bitmap from
@@ -953,12 +1038,12 @@
 When pre-scaling is disabled, the resulting bitmap is in auto-scaling mode. The
 bitmap is associated with a density (that you may or may not have specified
 through the <code>BitmapFactory.Options</code>) which will be used to scale the
-bitmap on screen <em>at drawing time</em>. 
+bitmap on screen <em>at drawing time</em>.
 
 <p>Using auto-scaling instead of pre-scaling is more CPU expensive than
-pre-scaling but uses less memory. You can refer to the documentation of 
-{@link android.graphics.BitmapFactory BitmapFactory}, 
-{@link android.graphics.Bitmap Bitmap}, and 
+pre-scaling but uses less memory. You can refer to the documentation of
+{@link android.graphics.BitmapFactory BitmapFactory},
+{@link android.graphics.Bitmap Bitmap}, and
 {@link android.graphics.Canvas Canvas} for more
 information on auto-scaling.</p>
 
@@ -973,7 +1058,7 @@
 
 <p>If you have already developed and published an Android application based on
 Android 1.5 or earlier platform version, you need to consider how you will adapt
-your application so that it is deployable to </p>
+your application so that it is deployable to:</p>
 
 <ul>
 <li>Existing devices, which may be running Android 1.5 (or lower) platform
@@ -982,16 +1067,21 @@
 screen sizes and resolutions</li>
 </ul>
 
+<p class="note"><strong>Note:</strong> Even if your application targets Android 1.6 already, you
+should follow the same strategies below in order to support <em>xhdpi</em> and <em>xlarge</em>
+screens on Android 2.3 (API Level 9), while maintaining compatibility with older versions of
+the platform.</p>
+
 <p>To support the newer devices and the different screens they use, you might
 need to make some changes in your app, but at the same time your app may be very
 stable and so you want to minimize the changes. There are a variety of ways that
 you can extend your existing application to support new devices with multiple
 screens <em>and</em> existing devices running older platform versions. You
 should be able to make these changes to your application such that you can
-distribute a single .apk to any and all devices.</p>
+distribute a single {@code .apk} to all devices.</p>
 
 <p>The recommended strategy is to develop against the most recent version of the
-platform you are targeting, and test on the minimum one you want to run on.
+platform you are targeting, and test on the minimum platform version you want to run on.
 Here's how to do that:</p>
 
 <ol>
@@ -999,39 +1089,41 @@
 <code>android:minSdkVersion</code> attribute as it is. You <em>do not</em> need
 to increment the value of the attribute to support new devices and multiple
 screens. </li>
-  <li>Extend compatibility for Android 1.6 (and higher) devices by adding 
+  <li>Extend compatibility for Android 1.6 (and higher) devices by adding
 a new attribute &mdash; <code>android:targetSdkVersion</code> &mdash; to the
 <code>uses-sdk</code> element. Set the value of the attribute to
-"<code>4</code>". This allows your application to "inherit" the platform's
+<code>"4"</code>. [To support <em>xhdpi</em> and <em>xlarge</em> screens, set the value to
+<code>"9"</code>.] This allows your application to "inherit" the platform's
 multiple screens support, even though it is technically using an earlier version
 of the API. </li>
   <li>Add an empty <code>&lt;supports-screens&gt;</code> element as a child of
 <code>&lt;manifest&gt;</code>. If you need to enable size or density attributes
 later, this is where you will add them.</li>
   <li>Change your application's build properties, such that it compiles against
-the Android 1.6 (API Level 4) library, rather than against the Android 1.5 (or
+the Android 1.6 (API Level 4) library [or against Android 2.3 (API Level 9) to support
+<em>xhdpi</em> and <em>xlarge</em> screens], rather than against the Android 1.5 (or
 earlier) library. You will not be able to compile your application against the
 older platform because of the new manifest attribute. </li>
-  <li>Set up AVDs for testing your application on Android 1.6 and higher
+  <li>Set up AVDs for testing your application on Android 1.6 [or Android 2.3] and higher
 releases. Create AVDs that use the screen sizes and densities that you want to
-support. When you create the AVDs, make sure to select the Android 1.6 or higher
+support. When you create the AVDs, make sure to select the Android 1.6 [or Android 2.3] or higher
 platform as the system image to run. For more information, see <a
 href="#testing">How to Test Your Application on Multiple Screens</a>,
 below.</li>
-  <li>Set up AVDs for testing your application on Android 1.5 (or earlier
-platform). You need AVDs running the older platforms you are targeting, so that
+  <li>Set up AVDs for testing your application on older versions of the platform, as low as the
+version declared by your <code>android:minSdkVersion</code>. You need AVDs running the older
+platforms you are targeting, so that
 you can test for compatibility and ensure that there are no functional
 regressions. </li>
-  <li>Compile your application against the Android 1.6 library and run it on the
+  <li>Compile your application against the Android 1.6 [or Android 2.3] library and run it on the
 AVDs you created. Observe the way your application looks and runs, and test all
 of the user interactions. </li>
   <li>Debug any display or functional issues. For issues that you resolve in
 your application code, <span style="color:red">make certain not to use any APIs
-introduced in API Level 4 or later</span>. If you are in doubt, refer to SDK
-reference documentation and look for the API Level specifier for the API you
-want to use. Using an API introduced in API Level 4 or later will mean that your
-application will no longer be compatible with devices running Android 1.5 or
-earlier.</li>
+introduced later than the version declared by your <code>android:minSdkVersion</code></span>. If you
+are in doubt, refer to SDK reference documentation and look for the API Level specifier for the API
+you want to use. Using newer APIs not supported by your minimum version will mean that your
+application will no longer be compatible with devices running on that version.</li>
   <li>For resource-related issues, you can try resolving them by:
     <ul>
     <li>Adding a <code>anyDensity="false"</code> attribute to
@@ -1039,22 +1131,22 @@
 scaling.</li>
     <li>Creating any size- or density-specific resources you need and placing
 them in directories tagged with the <a href="#qualifiers">correct
-qualifiers</a>. Qualifiers must be arranged in a proscribed order. See 
+qualifiers</a>. Qualifiers must be arranged in a proscribed order. See
 <a href="{@docRoot}guide/topics/resources/providing-resources.html#AlternativeResources">
-Alternative Resources</a> for more information. </li>
+Providing Alternative Resources</a> for more information. </li>
     <li>Note that if you add size- or density-specific resource directories
 tagged with any of the resource qualifiers listed in this document, you should
 make sure to also tag those directories with the <code>v&lt;api-level&gt;</code>
-qualifier (for example, <code>-v4</code>). This ensures that those resources
+qualifier (for example, <code>-v4</code> to target API Level 4). This ensures that those resources
 will be ignored when the application is run on Android 1.5 or lower platform
 versions.</p></li>
     </ul>
   </li>
   <li>If your application does not offer support (such as custom layouts) for
 large screens and you want the platform to display your application in
-screen-compatibility mode on larger screens, add a
-<code>largeScreens="false"</code> attribute to the
-<code>&lt;supports-screens&gt;</code> element in the manifest. See 
+screen-compatibility mode on larger screens, add the
+<code>largeScreens="false"</code> and <code>xlargeScreens="false"</code> attributes to the
+<code>&lt;supports-screens&gt;</code> element in the manifest. See
 <a href="#compatibility-examples">Screen-Compatibility Examples</a> for
 illustrations of how the platform displays your application in this case.</li>
   <li>If your application does not offer support (such as custom layouts) for
@@ -1077,6 +1169,16 @@
 density mean that you may need to make tradeoffs in design, content, and
 function on those devices. </p>
 
+<p>Also give extra attention to testing your application on an AVD that emulates an <em>xlarge</em>
+screen. Devices with extra large screens
+are tablet-sized or larger, so you should pay close attention to how usable your application is on
+such screens. You might want to design new layouts specifically for extra large screens, to address
+usability aspects such as the location and size of buttons in your UI. To test your application on
+an extra large screen, create an AVD targeted to Android 2.3 with a high resolution, such as 1280 x
+800, and the default density of 160dpi. This AVD will use any resources you've provided with the
+<code>xlarge</code> <a href="#qualifiers">resouce qualifier</a>.</p>
+
+
 <h2 id="testing">How to Test Your Application on Multiple Screens</h2>
 
 <p>Before publishing an application that supports multiple screens, you should
@@ -1091,22 +1193,22 @@
 various screen sizes, you should make sure to add the corresponding size
 attribute(s) to your application's manifest. -->
 
-<div id="f9.5" style="float:right;margin:0;padding:0;">
-  <img src="{@docRoot}images/screens_support/avds-config.png" style="padding:0;margin:0;">
-  <p class="caption" style="margin:0 0 1.5em 1em;padding:0 0 0 1em;"><strong>Figure 4.</strong>
+<div id="f9.5" class="figure" style="width:530px">
+  <img src="{@docRoot}images/screens_support/avds-config.png" />
+  <p class="img-caption"><strong>Figure 4.</strong>
   A typical set of AVDs for testing screens support.</p>
 </div>
 
 <p>As a test environment for your applications, set up a series of AVDs that
 emulate the screen sizes and densities you want to support. The Android SDK
-includes six emulator skins to get you started. You can use the Android AVD
+includes several emulator skins to get you started. You can use the Android AVD
 Manager or the <code>android</code> tool to create AVDs that use the various
 emulator skins and you can also set up custom AVDs to test densities other than
-the defaults. For general information about working with AVDs, see 
+the defaults. For general information about working with AVDs, see
 <a href="{@docRoot}guide/developing/tools/avd.html">Android Virtual
 Devices</a>.</p>
 
-<p>The Android SDK provides a set of default emulator skins that you can use for 
+<p>The Android SDK provides a set of default emulator skins that you can use for
 testing. The skins are included as part of each Android platform that you can
 install in your SDK. The Android 1.6 platform offers these default skins:</p>
 
@@ -1125,7 +1227,7 @@
   </li>
 </ul>
 
-<p>The Android 2.0 platform offers all of the Android 1.6 default skins, 
+<p>The Android 2.0 platform offers all of the Android 1.6 default skins,
 above, plus:</p>
 
 <ul>
@@ -1161,15 +1263,15 @@
 monitor. The default emulator skins included in the Android SDK are listed
 in <a href="#screens-table">Table 1</a>, earlier in this document.</p>
 
-<div style="float: right;background-color:#fff;margin: 0;padding: 20px 0 20px 20px;width:520px;">
-  <img src="{@docRoot}images/screens_support/avd-density.png" style="padding:0;margin:0;">
-  <p class="caption" style="margin:0 0 1.5em 1em;padding:0 0 0 1em; width:280px;"><strong>Figure 5.</strong>
+<div class="figure" style="width:324px">
+  <img src="{@docRoot}images/screens_support/avd-density.png" >
+  <p class="img-caption"><strong>Figure 5.</strong>
   Resolution and density options that you can use, when creating an AVD using the AVD Manager.</p>
 </div>
 
 <p>You should also make sure to test your application on different physical
-screen sizes within a single size-density configuration. For example, to 
-display this screen configuration on a 30" monitor you will need to adjust 
+screen sizes within a single size-density configuration. For example, to
+display this screen configuration on a 30" monitor you will need to adjust
 the value passed to <code>-scale</code> to 96*2.8/3.3 = 81dpi. You can also
 pass a float value to <code>-scale</code> to specify your own scaling factor:</p>
 
@@ -1201,7 +1303,7 @@
   <li>Set any other hardware options and complete the AVD creation.</li>
 </ol>
 
-<p>In the example above (WVGA medium density), the new AVD will emulate a 5.8" 
+<p>In the example above (WVGA medium density), the new AVD will emulate a 5.8"
 WVGA screen.</p>
 
 <p>As an alternative to adjusting the emulator skin configuration, you can use
@@ -1216,21 +1318,21 @@
 <p>This section provides examples of how the Android platform displays an
 application written for the baseline screen configuration &mdash; HVGA (320x480)
 resolution on a 3.2" screen &mdash; with all of the platform's size- and
-density-compatibility features enabled. That is, the examples show how 
-the platform displays an application that doesn't provide built-in support 
+density-compatibility features enabled. That is, the examples show how
+the platform displays an application that doesn't provide built-in support
 for the screen on which it is being rendered, but which instead relies completely
 on the platform.</p>
 
-<p>The platform's screen-compatibility features are designed to provide such 
-an application with a virtual baseline screen environment against which to run, 
-while at the same time ensuring for the user a physical display that is 
+<p>The platform's screen-compatibility features are designed to provide such
+an application with a virtual baseline screen environment against which to run,
+while at the same time ensuring for the user a physical display that is
 approximately the same as the baseline screen size and density. </p>
 
 <p>Legacy applications that have not been modified to support multiple
-screens would be typical examples of such applications. In most cases, 
+screens would be typical examples of such applications. In most cases,
 you would want to add multiple-screens support to a legacy application and
 publish an updated version, as described in <a href="#strategies">Strategies
-for Legacy Applications</a>. However, if you did not do so, the 
+for Legacy Applications</a>. However, if you did not do so, the
 platform still performs best-effort rendering of your application, as
 illustrated below.</p>
 
@@ -1248,9 +1350,9 @@
     </li>
     <li>
       If the device's screen size is <em>small</em>, there are few options
-options for making Android 1.5 applications work well on such a screen, so 
+options for making Android 1.5 applications work well on such a screen, so
 Android Market will filter applications that are not known to support these
-screens from the device. 
+screens from the device.
     </li>
     <li>
       If the device's screen size is <em>large</em>, it limits the application's
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/guide/topics/manifest/manifest-element.jd b/docs/html/guide/topics/manifest/manifest-element.jd
index a35c5a1..7f21e6b 100644
--- a/docs/html/guide/topics/manifest/manifest-element.jd
+++ b/docs/html/guide/topics/manifest/manifest-element.jd
@@ -159,6 +159,9 @@
 storage. However, the system will not allow the user to move the application to external storage if
 this attribute is set to {@code internalOnly}, which is the default setting.</p>
 
+<p>Read <a href="{@docRoot}guide/appendix/install-location.html">App Install Location</a> for
+more information about using this attribute (including how to maintain backward compatibility).</p>
+
 <p>Introduced in: API Level 8.</p>
 
 
@@ -173,7 +176,7 @@
 
 <p>
 <dt>see also:</dt>
-<dd><a href="{@docRoot}guide/appendix/install-location.html">App Install Location</a><br/>
+<dd>
 <code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code></dd>
 
 </dl>
diff --git a/docs/html/guide/topics/manifest/uses-feature-element.jd b/docs/html/guide/topics/manifest/uses-feature-element.jd
index 4066daa..b5b30f6 100644
--- a/docs/html/guide/topics/manifest/uses-feature-element.jd
+++ b/docs/html/guide/topics/manifest/uses-feature-element.jd
@@ -5,9 +5,9 @@
 
 <dt>syntax:</dt>
 <dd>
-<pre class="stx">&lt;uses-feature android:<a href="#glEsVersion">glEsVersion</a>="<em>integer</em>"
-              android:<a href="#name">name</a>="<em>string</em>"
-              android:<a href="#required">required</a>=["true" | "false"] /&gt;</pre>
+<pre class="stx">&lt;uses-feature android:<a href="#name">name</a>="<em>string</em>"
+              android:<a href="#required">required</a>=["true" | "false"]
+              android:<a href="#glEsVersion">glEsVersion</a>="<em>integer</em>" /&gt;</pre>
 </dd>
 
 <dt>contained in:</dt>
@@ -18,8 +18,8 @@
   <img id="rule" src="{@docRoot}assets/images/grad-rule-qv.png"> 
   <div id="qv-sub-rule"> 
     <img src="{@docRoot}assets/images/icon_market.jpg" style="float:left;margin:0;padding:0;"> 
-    <p style="color:#669999;">Android Market and &lt;uses-feature&gt; elements</p> 
-    <p>Android Market filters the applications that are visible to users, so
+    <p style="color:#669999;">Android Market and <code style="color:#669999;">&lt;uses-feature&gt;</code> elements</p>
+    <p style="margin-top:1em;">Android Market filters the applications that are visible to users, so
 that users can see and download only those applications that are compatible with their
 devices. One of the ways Market filters applications is by feature compatibility.</p>
 
@@ -27,70 +27,82 @@
 <code>&lt;uses-feature&gt;</code> elements in each application's manifest, to
 establish the app's feature needs. Market then shows or hides the application to
 each user, based on a comparison with the features available on the user's
-device. For more information, see <a
-href="{@docRoot}guide/appendix/market-filters.html">Market Filters</a>.</p>
+device. </p>
 
-<p style="margin-top:1em;">By specifying the features your application requires,
+<p style="margin-top:1em;">By specifying the features that your application requires,
 you enable Android Market to present your application only to users whose
 devices meet the application's feature requirements, rather than presenting it
 to all users. </p>
+
+<p style="margin-top:1em;" class="caution">For important information about how
+Android Market uses features as the basis for filtering, please read <a
+href="#market-feature-filtering">Android Market and Feature-Based Filtering</a>,
+below.</p>
 </div>
 </div>
 
 <dt>description:</dt>
-<dd>This element declares a specific feature used by the application. Android
-provides some features that may not be equally supported by all Android devices.
-In a manner similar to the <a
-href="uses-sdk-element.html">{@code &lt;uses-sdk>}</a> element, this element
-allows an application to specify which device-variable features it uses. For
-example, an application might specify that it requires a camera with auto-focus
-capabilities.</p>
+<dd>Declares a single hardware or software feature that is used by the
+application.
 
-<p>Declaring a {@code &lt;uses-feature>} element is informational only, meaning
+<p>The purpose of a <code>&lt;uses-feature&gt;</code> declaration is to inform
+any external entity of the set of hardware and software features on which your
+application depends. The element offers a <code>required</code> attribute that
+lets you specify whether your application requires and cannot function without
+the declared feature, or whether it prefers to have the feature but can function
+without it. Because feature support can vary across Android devices, the
+<code>&lt;uses-feature&gt;</code> element serves an important role in letting an
+application describe the device-variable features that it uses.</p>
+
+<p>The set of available features that your application declares corresponds to
+the set of feature constants made available by the Android {@link
+android.content.pm.PackageManager}, which are listed for
+convenience in the <a href="#features-reference">Features Reference</a> tables
+at the bottom of this document.
+
+<p>You must specify each feature in a separate <code>&lt;uses-feature&gt;</code>
+element, so if your application requires multiple features, it would declare
+multiple <code>&lt;uses-feature&gt;</code> elements. For example, an application
+that requires both Bluetooth and camera features in the device would declare
+these two elements:</p>
+
+<pre>
+&lt;uses-feature android:name="android.hardware.bluetooth" />
+&lt;uses-feature android:name="android.hardware.camera" />
+</pre>
+
+<p>In general, you should always make sure to declare
+<code>&lt;uses-feature&gt;</code> elements for all of the features that your
+application requires.</p>
+
+<p>Declared <code>&lt;uses-feature></code> elements are informational only, meaning
 that the Android system itself does not check for matching feature support on
-the device before installing an application. However, note that other services
+the device before installing an application. However, other services
 (such as Android Market) or applications may check your application's 
-{@code &lt;uses-feature>} declarations as part of handling or interacting 
+<code>&lt;uses-feature></code> declarations as part of handling or interacting
 with your application. For this reason, it's very important that you declare all of
 the features (from the list below) that your application uses. </p>
 
 <p>For some features, there may exist a specfic attribute that allows you to define
 a version of the feature, such as the version of Open GL used (declared with
-<a href="#glEsVersion">{@code glEsVersion}</a>). Other features that either do or do not
+<a href="#glEsVersion"><code>glEsVersion</code></a>). Other features that either do or do not
 exist for a device, such as a camera, are declared using the
-<a href="#name">{@code name}</a> attribute.</p>
+<a href="#name"><code>name</code></a> attribute.</p>
 
-<p>Any software or hardware features that may vary among Android-powered devices
-will be listed on this page among the attributes below. If you see any features
-here that you use in your application, you should include a
-{@code &lt;uses-feature>} element for each one. For example, if your
-application uses the device camera, then you should include the following in
-your {@code AndroidManifest.xml}:</p>
 
-<pre>
-&lt;uses-feature android:name="android.hardware.camera" />
-</pre>
+<p>Although the <code>&lt;uses-feature></code> element is only activated for
+devices running API Level 4 or higher, it is recommended to include these
+elements for all applications, even if the <a href="uses-sdk-element.html#min"><code>minSdkVersion</code></a>
+is "3" or lower. Devices running older versions of the platform will simply
+ignore the element.</p>
 
-<p>If you declare {@code android.hardware.camera} this way, then your application is considered
-compatible with all devices that include a camera. If your application also uses auto-focus
-features, then you also need to include a
-{@code &lt;uses-feature>} element that declares the {@code android.hardware.camera.autofocus}
-feature. Also note that you must still request the {@link android.Manifest.permission#CAMERA
-CAMERA} permission. Requesting the permission grants your application access to the
-appropriate hardware and software, while declaring the features used by
-your application ensures proper device compatibility.</p>
-
-<p>Although the {@code &lt;uses-feature>} element is only activated for devices running 
-API Level 4 or higher, it is safe to include this for applications that declare 
-a <a href="uses-sdk-element.html#min">{@code minSdkVersion}</a> 
-of "3" or lower. Devices running older versions of the platform 
-will simply ignore this element, but newer devices will recognize it and enforce 
-installation restrictions based on whether the device supports the feature.</p>
-
-<p class="note"><strong>Note:</strong>
-For each feature required by your application, you must include a new {@code
-&lt;uses-feature>} element. Multiple features cannot be declared in one 
-instance of this element.</p>
+<p class="note"><strong>Note:</strong> When declaring a feature, remember
+that you must also request permissions as appropriate. For example, you must
+still request the {@link android.Manifest.permission#CAMERA}
+permission before your application can access the camera API. Requesting the
+permission grants your application access to the appropriate hardware and
+software, while declaring the features used by your application ensures proper
+device compatibility.</p>
 
 </dd> 
 
@@ -99,7 +111,35 @@
 
 <dd>
 <dl class="attr">
-  <dt><a name="glEsVersion"></a>{@code android:glEsVersion}</dt>
+
+  <dt><a name="name"></a><code>android:name</code></dt>
+  <dd>Specifies a single hardware or software feature used by the application,
+as a descriptor string. Valid descriptor values are listed in the <a
+href="#hw-features">Hardware features</a> and <a href="#sw-features">Software
+features</a> tables, below. </dd>
+
+  <dt><a name="required"></a><code>android:required</code></dt>  <!-- added in api level 5 -->
+  <dd>Boolean value that indicates whether the application requires
+  the feature specified in <code>android:name</code>.
+
+<ul>
+<li>When you declare <code>"android:required="true"</code> for a feature,
+you are specifying that the application <em>cannot function, or is not
+designed to function</em>, when the specified feature is not present on the
+device. </li>
+
+<li>When you declare <code>"android:required="false"</code> for a feature, it
+means that the application <em>prefers to use the feature</em> if present on
+the device, but that it <em>is designed to function without the specified
+feature</em>, if necessary. </li>
+
+</ul>
+
+<p>The default value for <code>android:required</code> if not declared is
+<code>"true"</code>.</p>
+  </dd>
+
+  <dt><a name="glEsVersion"></a><code>android:glEsVersion</code></dt>
   <dd>The OpenGL ES version required by the application. The higher 16 bits
 represent the major number and the lower 16 bits represent the minor number. For
 example, to specify OpenGL ES version 2.0, you would set the value as
@@ -125,110 +165,6 @@
 can check at run-time whether a higher level of OpenGL ES is available.)</p>
   </dd>
 
-  <dt><a name="name"></a>{@code android:name}</dt>
-  <dd>The name of a feature required by the application. 
-  The value must be one of the following accepted strings:
-
-  <table>
-    <tr> 
-       <th>Feature</th>
-       <th>Attribute Value</th> 
-       <th>Description</th> 
-    </tr><tr>
-       <td rowspan="2">Camera</td>
-       <td>{@code android.hardware.camera}</td>
-       <td>The application requires a camera.</td> 
-    </tr><tr>
-       <td colspan="2">
-         <strong>Note:</strong> Any application that requests the 
-         {@link android.Manifest.permission#CAMERA} permission but does <em>not</em>
-         declare any camera features with the {@code &lt;uses-feature>} element will be assumed
-         to use all camera features (auto-focus and flash). Thus, the application will not
-         be compatible with devices that do not support all camera features. Please use
-         {@code &lt;uses-feature>} to declare only the camera features that your
-         application does need. For instance, if you request the
-         {@link android.Manifest.permission#CAMERA} permission, but you do not need auto-focus or
-          flash, then declare only the {@code android.hardware.camera} feature&mdash;the other
-          camera features that you do not request will no longer be assumed as required.
-       </td>
-    </tr><tr>
-      <td>Camera auto-focus</td>
-      <td>{@code android.hardware.camera.autofocus}</td>
-      <td>The application requires a camera with auto-focus capability.
-       As a prerequisite, {@code android.hardware.camera} must also be declared
-       with a separate {@code &lt;uses-feature>} element.
-      </td>
-    </tr><tr>
-      <td>Camera flash</td>
-      <td>{@code android.hardware.camera.flash}</td>
-      <td>The application requires a camera with a flash.
-        As a prerequisite, both {@code android.hardware.camera} and {@code
-        android.hardware.camera.autofocus} must also be declared
-        with separate {@code &lt;uses-feature>} elements.
-      </td>
-    </tr><tr>
-      <td>Light sensor</td>
-      <td>{@code android.hardware.sensor.light}</td>
-      <td>The application requires a device with a light sensor.
-      </td>
-    </tr><tr>
-      <td>Live Wallpaper</td>
-      <td>{@code android.software.live_wallpaper}</td>
-      <td>The application uses or provides Live Wallpapers and should be installed only on devices that support Live Wallpapers.
-      </td>
-    </tr><tr>
-      <td>Proximity sensor</td>
-      <td>{@code android.hardware.sensor.proximity}</td>
-      <td>The application requires a device with a proximity sensor.
-      </td>
-    </tr><tr>
-      <td>Multitouch screen</td>
-      <td>{@code android.hardware.touchscreen.multitouch}</td>
-      <td>The application requires a device that supports multitouch.
-      </td>
-    </tr><tr>
-      <td>Telephony</td>
-      <td>{@code android.hardware.telephony}</td>
-      <td>The application requires a device that includes a telephony radio with data
-         communication services.
-      </td>
-    </tr><tr>
-      <td>CDMA telephony</td>
-      <td>{@code android.hardware.telephony.cdma}</td>
-      <td>The application requires a device that includes a CDMA telephony radio. As a
-        prerequisite, {@code android.hardware.telephony} must also be declared
-        with a separate {@code &lt;uses-feature>} element.
-      </td>
-    </tr><tr>
-      <td>GSM telephony</td>
-      <td>{@code android.hardware.telephony.gsm}</td>
-      <td>The application requires a device that includes a GSM telephony radio. As a
-        prerequisite, {@code android.hardware.telephony} must also be declared
-        with a separate {@code &lt;uses-feature>} element.
-      </td>
-    </tr>
-  </table>
-  </dd>
-
-  <dt><a name="required"></a>{@code android:required}</dt>  <!-- added in api level 5 -->
-  <dd>Indicates whether the feature is required by the application. This is
-    {@code true} by default. <strong>You should not use this attribute for most cases.</strong>
-    </p>
-
-    <p>The only situation in which you should set this attribute {@code false} is when your
-    application requests the {@link android.Manifest.permission#CAMERA} permission, but will degrade
-    gracefully and perform without failure if the device does not have a camera. In this situation,
-    you must declare the {@code android.hardware.camera} feature and set the {@code required}
-    attribute {@code false}. This is necessary because the {@link
-    android.Manifest.permission#CAMERA} permission will automatically turn on the requirement for
-    all camera features. So if your application uses this permission but is still compatible with
-    devices without a camera, then you must set the {@code required} attribute {@code false} for
-    {@code android.hardware.camera} or else it will not install on devices without a camera. Note
-    that, while the permission will enable the requirement for <em>all</em> camera features, you
-    only need to off the requirement for the basic camera feature.</p>
-
-  </dd>
-
 </dl>
 </dd>
 
@@ -239,8 +175,728 @@
 <dt>see also:</dt>
 <dd>
   <ul>
+    <li>{@link android.content.pm.PackageManager}</li>
+    <li>{@link android.content.pm.FeatureInfo}</li>
     <li>{@link android.content.pm.ConfigurationInfo}</li>
+    <li><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html"><code>&lt;uses-permission&gt;</code></a></li>
+    <li><a href="{@docRoot}guide/appendix/market-filters.html">Android Market Filters</a></li>
   </ul>
 </dd>
 
 </dl>
+
+
+<h2 id="market-feature-filtering">Android Market and Feature-Based Filtering</h2>
+
+<p>Android Market filters the applications that are visible to users, so that
+users can see and download only those applications that are compatible with
+their devices. One of the ways Market filters applications is by feature
+compatibility.</p>
+
+<p>To determine an application's feature compatibility with a given user's
+device, the Android Market service compares:</p>
+
+<ul>
+<li>Features required by the application &mdash; an application declares features in
+<code>&lt;uses-feature&gt;</code> elements in its manifest <br/>with...</li>
+<li>Features available on the device, in hardware or software &mdash;
+a device reports the features it supports as read-only system properties.</li>
+</ul>
+
+<p>To ensure an accurate comparison of features, the Android Package Manager
+provides a shared set of feature constants that both applications and devices
+use to declare feature requirements and support. The available feature constants
+are listed in the <a href="#features-reference">Features Reference</a> tables at
+the bottom of this document, and in the class documentation for {@link
+android.content.pm.PackageManager}.</p>
+
+<p>When the user launches the Market application, the application queries the
+Package Manager for the list of features available on the device by calling
+{@link android.content.pm.PackageManager#getSystemAvailableFeatures()}. The
+Market application then passes the features list up to the Android Market
+service when establishing the session for the user.</p>
+
+<p>Each time you upload an application to the Android Market Publisher Site,
+Android Market scans the application's manifest file. It looks for
+<code>&lt;uses-feature&gt;</code> elements and evaluates them in combination
+with other elements, in some cases, such as <code>&lt;uses-sdk&gt;</code> and
+<code>&lt;uses-permission&gt;</code> elements. After establishing the
+application's set of required features, it stores that list internally as
+metadata associated with the application <code>.apk</code> and the application
+version. </p>
+
+<p>When a user searches or browses for applications using the Android Market
+application, the service compares the features needed by each application with
+the features available on the user's device. If all of an application's required
+features are present on the device, Android Market allows the user to see the
+application and potentially download it. If any required feature is not
+supported by the device, Android Market filters the application so that it is
+not visible to the user and not available for download. </p>
+
+<p>Because the features you declare in <code>&lt;uses-feature&gt;</code>
+elements directly affect how Android Market filters your application, it's
+important to understand how Android Market evaluates the application's manifest
+and establishes the set of required features. The sections below provide more
+information. </p>
+
+<h3 id="declared">Filtering based on explicitly declared features</h3>
+
+<p>An explicitly declared feature is one that your application declares in a
+<code>&lt;uses-feature&gt;</code> element. The feature declaration can include
+an <code>android:required=["true" | "false"]</code> attribute (if you are
+compiling against API level 5 or higher), which lets you specify whether the
+application absolutely requires the feature and cannot function properly without
+it (<code>"true"</code>), or whether the application prefers to use the feature
+if available, but is designed to run without it (<code>"false"</code>).</p>
+
+<p>Android Market handles explictly declared features in this way: </p>
+
+<ul>
+<li>If a feature is explicitly declared as being required, Android Market adds
+the feature to the list of required features for the application. It then
+filters the application from users on devices that do not provide that feature.
+For example:
+<pre>&lt;uses-feature android:name="android.hardware.camera" android:required="true" /&gt;</pre></li>
+<li>If a feature is explicitly declared as <em>not</em> being required, Android
+Market <em>does not</em> add the feature to the list of required features. For
+that reason, an explicity declared non-required feature is never considered when
+filtering the application. Even if the device does not provide the declared
+feature, Android Market will still consider the application compatible with the
+device and will show it to the user, unless other filtering rules apply. For
+example:
+<pre>&lt;uses-feature android:name="android.hardware.camera" android:required="false" /&gt;</pre></li>
+<li>If a feature is explicitly declared, but without an
+<code>android:required</code> attribute, Android Market assumes that the feature
+is required and sets up filtering on it. </li>
+</ul>
+
+<p>In general, if your application is designed to run on Android 1.6 and earlier
+versions, the <code>android:required</code> attribute is not available in the
+API and Android Market assumes that any and all
+<code>&lt;uses-feature&gt;</code> declarations are required. </p>
+
+<p class="note"><strong>Note:</strong> By declaring a feature explicitly and
+including an <code>android:required="false"</code> attribute, you can
+effectively disable all filtering on Android Market for the specified feature.
+</p>
+
+
+<h3 id="implicit">Filtering based on implicit features</h3>
+
+<p>An <em>implicit</em> feature is one that an application requires in order to
+function properly, but which is <em>not</em> declared in a
+<code>&lt;uses-feature&gt;</code> element in the manifest file. Strictly
+speaking, every application should <em>always</em> declare all features that it
+uses or requires, so the absence of a declaration for a feature used by an
+application should be considered an error. However, as a safeguard for users and
+developers, Android Market looks for implicit features in each application and
+sets up filters for those features, just as it would do for an explicitly
+declared feature. </p>
+
+<p>An application might require a feature but not declare it because: </p>
+
+<ul>
+<li>The application was compiled against an older version of the Android library
+(Android 1.5 or earlier) and the <code>&lt;uses-feature&gt;</code> element was
+not available.</li>
+<li>The developer incorrectly assumed that the feature would be present on all
+devices and a declaration was unnecessary.</li>
+<li>The developer omitted the feature declaration accidentally.</li>
+<li>The developer declared the feature explicitly, but the declaration was not
+valid. For example, a spelling error in the <code>&lt;uses-feature&gt;</code>
+element name or an unrecognized string value for the
+<code>android:name</code> attribute would invalidate the feature declaration.
+</li>
+</ul>
+
+<p>To account for the cases above, Android Market attempts to discover an
+application's implied feature requirements by examining <em>other elements</em>
+declared in the manifest file, specifically,
+<code>&lt;uses-permission&gt;</code> elements.</p>
+
+<p>If an application requests hardware-related permissions, Android Market
+<em>assumes that the application uses the underlying hardware features and
+therefore requires those features</em>, even though there might be no
+corresponding to <code>&lt;uses-feature&gt;</code> declarations. For such
+permissions, Android Market adds the underlying hardware features to the
+metadata that it stores for the application and sets up filters for them.</p>
+
+<p>For example, if an application requests the <code>CAMERA</code> permission
+but does not declare a <code>&lt;uses-feature&gt;</code> element for
+<code>android.hardware.camera</code>, Android Market considers that the
+application requires a camera and should not be shown to users whose devices do
+not offer a camera.</p>
+
+<p>If you don't want Android Market to filter based on a specific implied
+feature, you can disable that behavior. To do so, declare the feature explicitly
+in a <code>&lt;uses-feature&gt;</code> element and include an 
+<code>android:required="false"</code> attribute. For example, to disable
+filtering derived from the <code>CAMERA</code> permission, you would declare
+the feature as shown below.</p>
+
+<pre>&lt;uses-feature android:name="android.hardware.camera" android:required="false" /&gt;</pre>
+
+<p class="caution">It's important to understand that the permissions that you
+request in <code>&lt;uses-permission&gt;</code> elements can directly affect how
+Android Market filters your application. The reference section <a
+href="permissions-features">Permissions that Imply Feature Requirements</a>,
+below, lists the full set of permissions that imply feature requirements and
+therefore trigger filtering.</p>
+
+<h3 id="bt-permission-handling">Special handling for Bluetooth feature</h3>
+
+<p>Android Market applies slightly different rules than described above, when
+determining filtering for Bluetooth.</p>
+
+<p>If an application declares a Bluetooth permission in a
+<code>&lt;uses-permission&gt;</code> element, but does not explicitly declare
+the Bluetooth feature in a <code>&lt;uses-feature&gt;</code> element, Android
+Market checks the version(s) of the Android platform on which the application is
+designed to run, as specified in the <code>&lt;uses-sdk&gt;</code> element. </p>
+
+<p>As shown in the table below, Android Market enables filtering for the
+Bluetooth feature only if the application declares its lowest or targeted
+platform as Android 2.0 (API level 5) or higher. However, note that Android
+market applies the normal rules for filtering when the application explicitly
+declares the Bluetooth feature in a <code>&lt;uses-feature&gt;</code> element.
+</p>
+
+<p class="caption"><strong>Table 1.</strong> How Android Market determines the
+Bluetooth feature requirement for an application that requests a Bluetooth
+permission but does not declare the Bluetooth feature in a
+<code>&lt;uses-feature&gt;</code> element.</p>
+
+<table style="margin-top:1em;">
+<tr>
+<th><nobr>If <code>minSdkVersion</code> is ...</nobr></th>
+<th><nobr>or <code>targetSdkVersion</code> is</nobr></th>
+<th>Result</th>
+</tr>
+<tr>
+<td><nobr>&lt;=4 (or uses-sdk is not declared)</nobr></td>
+<td>&lt;=4</td>
+<td>Android Market <em>will not</em> filter the application from any devices
+based on their reported support for the <code>android.hardware.bluetooth</code>
+feature.</td>
+</tr>
+<tr>
+<td>&lt;=4</td>
+<td>&gt;=5</td>
+<td rowspan="2">Android Market filters the application from any devices that
+do not support the <code>android.hardware.bluetooth</code> feature (including
+older releases).</td>
+</tr>
+<tr>
+<td>&gt;=5</td>
+<td>&gt;=5</td>
+</tr>
+</table>
+
+<p>The examples below illustrate the different filtering effects, based on how
+Android Market handles the Bluetooth feature. </p>
+
+<dl>
+<dt>In first example, an application that is designed to run on older API levels
+declares a Bluetooth permission, but does not declare the Bluetooth feature in a
+<code>&lt;uses-feature&gt;</code> element.</dt>
+<dd><em>Result:</em> Android Market does not filter the application from any device.</dd>
+</dl>
+
+<pre>&lt;manifest ...>
+...
+    &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
+    &lt;uses-sdk android:minSdkVersion="3" />
+...
+&lt;/manifest></pre>
+
+<dl>
+<dt>In the second example, below, the same application also declares a target
+API level of "5". </dt>
+<dd><em>Result:</em> Android Market now assumes that the feature is required and
+will filter the application from all devices that do not report Bluetooth support,
+including devices running older versions of the platform. </dd>
+</dl>
+
+<pre>&lt;manifest ...>
+...
+    &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
+    &lt;uses-sdk android:minSdkVersion="3" android:targetSdkVersion="5" />
+...
+&lt;/manifest></pre>
+
+<dl>
+<dt>Here the same application now specifically declares the Bluetooth feature.</dt>
+<dd><em>Result:</em> Identical to the previous example (filtering is applied).</dd>
+</dl>
+
+<pre>&lt;manifest ...>
+...
+    &lt;uses-feature android:name="android.hardware.bluetooth" />
+    &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
+    &lt;uses-sdk android:minSdkVersion="3" android:targetSdkVersion="5" />
+...
+&lt;/manifest></pre>
+
+<dl>
+<dt>Finally, in the case below, the same application adds an
+<code>android:required="false"</code> attribute.</dt>
+<dd><em>Result:</em> Android Market disables filtering based on Bluetooth
+feature support, for all devices.</dd>
+</dl>
+
+<pre>&lt;manifest ...>
+...
+    &lt;uses-feature android:name="android.hardware.bluetooth" android:required="false" />
+    &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
+    &lt;uses-sdk android:minSdkVersion="3" android:targetSdkVersion="5" />
+...
+&lt;/manifest></pre>
+
+
+
+<h3>Testing the features required by your application</h3>
+
+<p>You can use the <code>aapt</code> tool, included in the Android SDK, to
+determine how Android Market will filter your application, based on its declared
+features and permissions. To do so, run  <code>aapt</code> with the <code>dump
+badging</code> command. This causes <code>aapt</code> to parse your
+application's manifest and apply the same rules as used by Android Market to
+determine the features that your application requires. </p>
+
+<p>To use the tool, follow these steps: </p>
+
+<ol>
+<li>First, build and export your application as an unsigned <code>.apk</code>.
+If you are developing in Eclipse with ADT, right-click the project and select
+<strong>Android Tools</strong> &gt; <strong>Export Unsigned Application
+Package</strong>. Select a destination filename and path and click
+<strong>OK</strong>. </li>
+<li>Next, locate the <code>aapt</code> tool, if it is not already in your PATH.
+If you are using SDK Tools r8 or higher, you can find <code>aapt</code> in the
+<code>&lt;<em>SDK</em>&gt;/platform-tools/</code> directory.
+<p class="note"><strong>Note:</strong> You must use the version of
+<code>aapt</code> that is provided for the latest Platform-Tools component available. If
+you do not have the latest Platform-Tools component, download it using the <a
+href="{@docRoot}sdk/adding-components.html">Android SDK and AVD Manager</a>.
+</p></li>
+<li>Run <code>aapt</code> using this syntax: </li>
+</ol>
+
+<pre>$ aapt dump badging &lt;<em>path_to_exported_.apk</em>&gt;</pre>
+
+<p>Here's an example of the command output for the second Bluetooth example, above: </p>
+
+<pre>$ ./aapt dump badging BTExample.apk
+package: name='com.example.android.btexample' versionCode='' versionName=''
+<strong>uses-permission:'android.permission.BLUETOOTH_ADMIN'</strong>
+<strong>uses-feature:'android.hardware.bluetooth'</strong>
+sdkVersion:'3'
+targetSdkVersion:'5'
+application: label='BT Example' icon='res/drawable/app_bt_ex.png'
+launchable activity name='com.example.android.btexample.MyActivity'label='' icon=''
+uses-feature:'android.hardware.touchscreen'
+main
+supports-screens: 'small' 'normal' 'large'
+locales: '--_--'
+densities: '160'
+</pre>
+
+
+<h2 id=features-reference>Features Reference</h2>
+
+<p>The tables below provide reference information about hardware and software
+features and the permissions that can imply them on Android Market. </p>
+
+<h3 id="hw-features">Hardware features</h3>
+
+<p>The table below describes the hardware feature descriptors supported by the
+most current platform release. To signal that your application uses or requires
+a hardware feature, declare each value in a <code>android:name</code> attribute
+in a separate <code>&lt;uses-feature&gt;</code> element. </p>
+
+  <table>
+    <tr>
+       <th>Feature Type</th>
+       <th>Feature Descriptor</th>
+       <th>Description</th>
+       <th>Comments</th>
+    </tr>
+    <tr>
+       <td>Audio</td>
+       <td><code>android.hardware.audio.low_latency</td>
+       <td>The application uses a low-latency audio pipeline on the device and
+is sensitive to delays or lag in sound input or output.</td>
+<td>
+</td>
+    </tr>
+    <tr>
+       <td>Bluetooth</td>
+       <td><code>android.hardware.bluetooth</td>
+       <td>The application uses Bluetooth radio features in the device.</td>
+<td>
+</td>
+    </tr>
+    <tr>
+       <td rowspan="4">Camera</td>
+       <td><code>android.hardware.camera</code></td>
+       <td>The application uses the device's camera. If the device supports
+           multiple cameras, the application uses the camera that facing
+           away from the screen.</td>
+       <td></td>
+    </tr>
+<tr>
+  <td><code>android.hardware.camera.autofocus</code></td>
+  <td>Subfeature. The application uses the device camera's autofocus capability.</td>
+  <td rowspan="3">If declared with the <code>"android:required="true"</code>
+attribute, these subfeatures implicitly declare the
+<code>android.hardware.camera</code> parent feature. </td>
+</tr>
+<tr>
+  <td><code>android.hardware.camera.flash</code></td>
+  <td>Subfeature. The application uses the device camera's flash.</td>
+</tr>
+<tr>
+  <td><code>android.hardware.camera.front</code></td>
+  <td>Subfeature. The application uses a front-facing camera on the device.</td>
+</tr>
+
+<tr>
+  <td rowspan="3">Location</td>
+  <td><code>android.hardware.location</code></td>
+  <td>The application uses one or more features on the device for determining
+location, such as GPS location, network location, or cell location.</td>
+  <td></td>
+</tr>
+<tr>
+  <td><code>android.hardware.location.network</code></td>
+  <td>Subfeature. The application uses coarse location coordinates obtained from
+a network-based geolocation system supported on the device.</td>
+  <td rowspan="2">If declared with the <code>"android:required="true"</code>
+attribute, these subfeatures implicitly declare the
+<code>android.hardware.location</code> parent feature. </td>
+</tr>
+<tr>
+  <td><code>android.hardware.location.gps</code></td>
+  <td>Subfeature. The application uses precise location coordinates obtained
+from a Global Positioning System receiver on the device. </td>
+</tr>
+<tr>
+  <td>Microphone</td>
+  <td><code>android.hardware.microphone</code></td>
+  <td>The application uses a microphone on the device.
+  </td>
+  <td></td>
+</tr>
+<tr>
+  <td>Near Field Communications</td>
+  <td><code>android.hardware.nfc</td>
+  <td>The application uses NFC radio features in the device.</td>
+  <td></td>
+</tr>
+<tr>
+  <td rowspan="6">Sensors</td>
+  <td><code>android.hardware.sensor.accelerometer</code></td>
+  <td>The application uses motion readings from an accelerometer on the
+device.</td>
+  <td></td>
+</tr>
+<tr>
+  <td><code>android.hardware.sensor.barometer</code></td>
+  <td>The application uses the device's barometer.</td>
+  <td></td>
+</tr>
+<tr>
+  <td><code>android.hardware.sensor.compass</code></td>
+  <td>The application uses directional readings from a magnetometer (compass) on
+the device.</td>
+  <td></td>
+</tr>
+<tr>
+  <td><code>android.hardware.sensor.gyroscope</code></td>
+  <td>The application uses the device's gyroscope sensor.</td>
+  <td></td>
+</tr>
+<tr>
+  <td><code>android.hardware.sensor.light</code></td>
+  <td>The application uses the device's light sensor.</td>
+  <td></td>
+</tr>
+<tr>
+  <td><code>android.hardware.sensor.proximity</code></td>
+  <td>The application uses the device's proximity sensor.</td>
+  <td></td>
+</tr>
+<tr>
+  <td rowspan="2">SIP/VOIP</td>
+  <td><code>android.hardware.sip</code></td>
+  <td>The application uses SIP service on the device.
+  </td>
+  <td></td>
+</tr>
+<tr>
+  <td><code>android.hardware.sip.voip</code></td>
+  <td>Subfeature. The application uses SIP-based VOIP service on the device.
+  </td>
+  <td>If declared with the <code>"android:required="true"</code> attribute, this
+subfeature implicitly declares the <code>android.hardware.sip</code>
+parent feature.</td>
+</tr>
+
+<tr>
+  <td rowspan="3">Telephony</td>
+  <td><code>android.hardware.telephony</code></td>
+  <td>The application uses telephony features on the device, such as telephony
+radio with data communication services.</td>
+  <td></td>
+</tr>
+<tr>
+  <td><code>android.hardware.telephony.cdma</code></td>
+  <td>Subfeature. The application uses CDMA telephony radio features on the
+device. </td>
+  <td rowspan="2">If declared with the <code>"android:required="true"</code>
+attribute, these subfeatures implicitly declare the
+<code>android.hardware.telephony</code> parent feature. </td>
+</tr>
+<tr>
+  <td><code>android.hardware.telephony.gsm</code></td>
+  <td>Subfeature. The application uses GSM telephony radio features on the
+device.</td>
+</tr>
+
+<tr>
+  <td rowspan="4">Touchscreen</td>
+  <td><code>android.hardware.touchscreen</code></td>
+  <td>The application uses touchscreen capabilities on the device.</td>
+  <td></td>
+</tr>
+<tr>
+  <td><code>android.hardware.touchscreen.multitouch</code></td>
+  <td>Subfeature. The application uses basic two-point multitouch capabilities on the device
+screen.</td>
+  <td>If declared with the <code>"android:required="true"</code> attribute, this
+subfeature implicitly declares the <code>android.hardware.touchscreen</code>
+parent feature. </td>
+</tr>
+<tr>
+  <td><code>android.hardware.touchscreen.multitouch.distinct</code></td>
+  <td>Subfeature. The application uses advanced multipoint multitouch
+capabilities on the device screen, such as for tracking two or more points fully
+independently.</td>
+  <td rowspan="2">If declared with the <code>"android:required="true"</code> attribute, this
+subfeature implicitly declares the
+<code>android.hardware.touchscreen.multitouch</code> parent feature. </td>
+</tr>
+<tr>
+  <td><code>android.hardware.touchscreen.multitouch.jazzhand</code></td>
+  <td>Subfeature. The application uses advanced multipoint multitouch
+capabilities on the device screen, for tracking up to five points fully
+independently.</td>
+</tr>
+
+<tr>
+  <td>Wifi</td>
+  <td><code>android.hardware.wifi</code></td>
+  <td>The application uses 802.11 networking (wifi) features on the device.</td>
+  <td></td>
+</tr>
+
+  </table>
+
+<h3 id="sw-features">Software features</h3>
+
+<p>The table below describes the software feature descriptors supported by the
+most current platform release. To signal that your application uses or requires
+a software feature, declare each value in a <code>android:name</code> attribute
+in a separate <code>&lt;uses-feature&gt;</code> element. </p>
+
+
+  <table>
+    <tr> 
+       <th>Feature</th>
+       <th>Attribute Value</th> 
+       <th>Description</th>
+    </tr>
+    <tr>
+      <td>Live Wallpaper</td>
+      <td><code>android.software.live_wallpaper</code></td>
+      <td>The application uses or provides Live Wallpapers.
+      </td>
+    </tr>
+  </table>
+
+
+<h3 id="permissions">Permissions that Imply Feature Requirements</h3>
+
+<p>Some feature constants listed in the tables above were made available to
+applications <em>after</em> the corresponding API; for example, the
+<code>android.hardware.bluetooth</code> feature was added in Android 2.2 (API
+level 8), but the bluetooth API that it refers to was added in Android 2.0 (API
+level 5). Because of this, some apps were able to use the API before they had
+the ability to declare that they require the API via the
+<code>&lt;uses-feature&gt;</code> system. </p>
+
+<p>To prevent those apps from being made available unintentionally,  Android
+Market assumes that certain hardware-related permissions indicate that the
+underlying hardware features are required by default. For instance, applications
+that use Bluetooth must request the <code>BLUETOOTH</code> permission in a
+<code>&lt;uses-permission&gt;</code> element &mdash; for legacy apps, Android
+Market assumes that the permission declaration means that the underlying
+<code>android.hardware.bluetooth</code> feature is required by the application
+and sets up filtering based on that feature. </p>
+
+<p>The table below lists permissions that imply feature requirements
+equivalent to those declared in <code>&lt;uses-feature&gt;</code> elements. Note
+that <code>&lt;uses-feature&gt;</code> declarations, including any declared
+<code>android:required</code> attribute, always take precedence over features
+implied by the permissions below. </p>
+
+<p>For any of the permissions below, you can disable filtering based on the
+implied feature by explicitly declaring the implied feature explicitly, in a
+<code>&lt;uses-feature&gt;</code> element, with an
+<code>android:required="false"</code> attribute. For example, to disable any
+filtering based on the <code>CAMERA</code> permission, you would add this
+<code>&lt;uses-feature&gt;</code> declaration to the manifest file:</p>
+
+<pre>&lt;uses-feature android:name="android.hardware.camera" android:required="false" /&gt;</pre>
+
+<table id="permissions-features" >
+  <tr> 
+    <th>Category</th>
+    <th>This Permission...</th>
+    <th>Implies This Feature Requirement</th>
+    <!-- <th>Comments</th> -->
+  </tr>
+
+
+<tr>
+  <td rowspan="2">Bluetooth</td>
+  <td><code>BLUETOOTH</code></td>
+  <td><code>android.hardware.bluetooth</code>
+<p>(See <a href="#bt-permission-handling">Special handling for Bluetooth feature</a> for details.)</p></td>
+<!--  <td></td> -->
+</tr>
+<tr>
+  <td><code>BLUETOOTH_ADMIN</code></td>
+  <td><code>android.hardware.bluetooth</code></td>
+<!--  <td></td> -->
+</tr>
+
+<tr>
+  <td>Camera</td>
+  <td><code>CAMERA</code></td>
+  <td><code>android.hardware.camera</code> <em>and</em>
+<br><code>android.hardware.camera.autofocus</code></td>
+<!--  <td></td> -->
+</tr>
+
+<tr>
+  <td rowspan="5">Location</td>
+  <td><code>ACCESS_MOCK_LOCATION</code></td>
+  <td><code>android.hardware.location</code></td>
+<!--  <td></td> -->
+</tr>
+<tr>
+  <td><code>ACCESS_LOCATION_EXTRA_COMMANDS</code></td>
+  <td><code>android.hardware.location</code></td>
+<!--  <td></td> -->
+</tr>
+<tr>
+  <td><code>INSTALL_LOCATION_PROVIDER</code></td>
+  <td><code>android.hardware.location</code></td>
+<!--  <td></td> -->
+</tr>
+<tr>
+  <td><code>ACCESS_COARSE_LOCATION</code></td>
+  <td><code>android.hardware.location.network</code> <em>and</em>
+<br><code>android.hardware.location</code></td>
+<!--  <td></td> -->
+</tr>
+<tr>
+  <td><code>ACCESS_FINE_LOCATION</code></td>
+  <td><code>android.hardware.location.gps</code> <em>and</em>
+<br><code>android.hardware.location</code></td>
+<!--  <td></td> -->
+</tr>
+
+<tr>
+  <td>Microphone</td>
+  <td><code>RECORD_AUDIO</code></td>
+  <td><code>android.hardware.microphone</code></td>
+<!--  <td></td> -->
+</tr>
+
+<tr>
+  <td rowspan="11">Telephony</td>
+  <td><code>CALL_PHONE</code></td>
+  <td><code>android.hardware.telephony</code></td>
+<!--  <td></td> -->
+</tr>
+<tr>
+  <td><code>CALL_PRIVILEGED</code></td>
+  <td><code>android.hardware.telephony</code></td>
+<!--  <td></td> -->
+</tr>
+
+<tr>
+  <td><code>MODIFY_PHONE_STATE</code></td>
+  <td><code>android.hardware.telephony</code></td>
+<!--  <td></td> -->
+</tr>
+<tr>
+  <td><code>PROCESS_OUTGOING_CALLS</code></td>
+  <td><code>android.hardware.telephony</code></td>
+<!--  <td></td> -->
+</tr>
+<tr>
+  <td><code>READ_SMS</code></td>
+  <td><code>android.hardware.telephony</code></td>
+<!--  <td></td> -->
+</tr>
+<tr>
+  <td><code>RECEIVE_SMS</code></td>
+  <td><code>android.hardware.telephony</code></td>
+<!--  <td></td> -->
+</tr>
+<tr>
+  <td><code>RECEIVE_MMS</code></td>
+  <td><code>android.hardware.telephony</code></td>
+<!--  <td></td> -->
+</tr>
+<tr>
+  <td><code>RECEIVE_WAP_PUSH</code></td>
+  <td><code>android.hardware.telephony</code></td>
+<!--  <td></td> -->
+</tr>
+<tr>
+  <td><code>SEND_SMS</code></td>
+  <td><code>android.hardware.telephony</code></td>
+<!--  <td></td> -->
+</tr>
+<tr>
+  <td><code>WRITE_APN_SETTINGS</code></td>
+  <td><code>android.hardware.telephony</code></td>
+<!--  <td></td> -->
+</tr>
+<tr>
+  <td><code>WRITE_SMS</code></td>
+  <td><code>android.hardware.telephony</code></td>
+<!--  <td></td> -->
+</tr>
+
+<tr>
+  <td rowspan="3">Wifi</td>
+  <td><code>ACCESS_WIFI_STATE</code></td>
+  <td><code>android.hardware.wifi</code></td>
+<!--  <td></td> -->
+</tr>
+<tr>
+  <td><code>CHANGE_WIFI_STATE</code></td>
+  <td><code>android.hardware.wifi</code></td>
+<!--  <td></td> -->
+</tr>
+<tr>
+  <td><code>CHANGE_WIFI_MULTICAST_STATE</code></td>
+  <td><code>android.hardware.wifi</code></td>
+<!--  <td></td> -->
+</tr>
+</table>
\ No newline at end of file
diff --git a/docs/html/guide/topics/manifest/uses-permission-element.jd b/docs/html/guide/topics/manifest/uses-permission-element.jd
index aec765c..085b9f0 100644
--- a/docs/html/guide/topics/manifest/uses-permission-element.jd
+++ b/docs/html/guide/topics/manifest/uses-permission-element.jd
@@ -2,6 +2,38 @@
 @jd:body
 
 <dl class="xml">
+
+ <div class="sidebox-wrapper"> 
+  <img id="rule" src="{@docRoot}assets/images/grad-rule-qv.png"> 
+  <div id="qv-sub-rule"> 
+    <img src="{@docRoot}assets/images/icon_market.jpg" style="float:left;margin:0;padding:0;"> 
+    <p style="color:#669999;"><code style="color:#669999;">&lt;uses-permission&gt;</code> and filtering on Android Market. </p>
+
+<p style="margin-top:1em;">In some cases, the permissions that you request
+through <code>&lt;uses-permission&gt;</code> can affect how
+your application is filtered by Android Market.</p>
+
+<p style="margin-top:1em;">If you request a hardware-related permission &mdash;
+<code>CAMERA</code>, for example &mdash; Android Market assumes that your
+application requires the underlying hardware feature and filters the application
+from devices that do not offer it.</p>
+
+<p style="margin-top:1em;">To control filtering, always explicitly declare
+hardware features in <code>&lt;uses-feature&gt;</code> elements, rather than
+relying on Android Market to "discover" the requirements in
+<code>&lt;uses-permission&gt;</code> elements. Then, if you want to disable
+filtering for a particular feature, you can add a
+<code>android:required="false"</code> attribute to the
+<code>&lt;uses-feature&gt;</code> declaration.</p>
+
+<p style="margin-top:1em;" class="caution">For a list of permissions that imply
+hardware features, see the documentation for the <a
+href="{@docRoot}guide/topics/manifest/uses-feature-element.html#permissions-features">
+<code>&lt;uses-feature&gt;</code></a> element.</p>
+</div>
+</div>
+
+
 <dt>syntax:</dt>
 <dd><pre class="stx">&lt;uses-permission android:<a href="#nm">name</a>="<i>string</i>" /&gt;</pre></dd>
 
@@ -10,7 +42,7 @@
 
 <dt>description:</dt>
 <dd>Requests a permission that the application must be granted in 
-order for it to operate correctly.  Permissions are granted when the 
+order for it to operate correctly.  Permissions are granted by the user when the 
 application is installed, not while it's running.
 
 <p>
@@ -38,6 +70,11 @@
 <dd>API Level 1</dd>
 
 <dt>see also:</dt>
-<dd><code><a href="{@docRoot}guide/topics/manifest/permission-element.html">&lt;permission&gt;</a></code></dd>
+<dd>
+<ul>
+  <li><code><a href="{@docRoot}guide/topics/manifest/permission-element.html">&lt;permission&gt;</a></code></li>
+  <li><code><a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">&lt;uses-feature&gt;</a></code></li>
+</ul>
+</dd>
 
 </dl>
diff --git a/docs/html/guide/topics/resources/layout-resource.jd b/docs/html/guide/topics/resources/layout-resource.jd
index 111851c..36369d3 100644
--- a/docs/html/guide/topics/resources/layout-resource.jd
+++ b/docs/html/guide/topics/resources/layout-resource.jd
@@ -149,17 +149,23 @@
         </dd>
         <dt><code>android:layout_height</code></dt>
         <dd><em>Dimension or keyword</em>. Overrides the height given to the root view in the
-included layout.
+included layout. Only effective if <code>android:layout_width</code> is also declared.
         </dd>
         <dt><code>android:layout_width</code></dt>
         <dd><em>Dimension or keyword</em>. Overrides the width given to the root view in the
-included layout.
+included layout. Only effective if <code>android:layout_height</code> is also declared.
         </dd>
       </dl>
       <p>You can include any other layout attributes in the <code>&lt;include&gt;</code> that are
 supported by the root element in the included layout and they will override those defined in the
 root element.</p>
 
+      <p class="caution"><strong>Caution:</strong> If you want to override the layout dimensions,
+you must override both <code>android:layout_height</code> and
+<code>android:layout_width</code>&mdash;you cannot override only the height or only the width.
+If you override only one, it will not take effect. (Other layout properties, such as weight,
+are still inherited from the source layout.)</p>
+
     <p>Another way to include a layout is to use {@link android.view.ViewStub}. It is a lightweight
 View that consumes no layout space until you explicitly inflate it, at which point, it includes a
 layout file defined by its {@code android:layout} attribute. For more information about using {@link
diff --git a/docs/html/guide/topics/resources/providing-resources.jd b/docs/html/guide/topics/resources/providing-resources.jd
index 1d6ab25..4f3b0da 100644
--- a/docs/html/guide/topics/resources/providing-resources.jd
+++ b/docs/html/guide/topics/resources/providing-resources.jd
@@ -129,9 +129,8 @@
 
   <tr>
     <td><code>raw/</code></td>
-    <td><p>Arbitrary files to save in their raw form. Files in here are not compressed by the
-system. To open these resources with a raw {@link java.io.InputStream}, call {@link
-android.content.res.Resources#openRawResource(int)
+    <td><p>Arbitrary files to save in their raw form. To open these resources with a raw
+{@link java.io.InputStream}, call {@link android.content.res.Resources#openRawResource(int)
 Resources.openRawResource()} with the resource ID, which is {@code R.raw.<em>filename</em>}.</p>
       <p>However, if you need access to original file names and file hierarchy, you might consider
 saving some resources in the {@code
@@ -330,7 +329,8 @@
       <td>
         <code>small</code><br/>
         <code>normal</code><br/>
-        <code>large</code>
+        <code>large</code><br/>
+        <code>xlarge</code>
       </td>
       <td>
         <ul class="nolist">
@@ -348,6 +348,10 @@
         medium-density VGA screen.  Such a screen has significantly more
         available space in both width and height than an HVGA display.
         Examples are VGA and WVGA medium density screens.</li>
+        <li>{@code xlarge}: Screens that are considerably larger than the traditional
+        medium-density HVGA screen. In most cases, devices with extra large screens would be too
+large to carry in a pocket and would most likely be tablet-style devices. <em>Added in API Level
+9.</em></li>
         </ul>
         <p><em>Added in API Level 4.</em></p>
         <p>See <a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
@@ -438,6 +442,7 @@
         <code>ldpi</code><br/>
         <code>mdpi</code><br/>
         <code>hdpi</code><br/>
+        <code>xhdpi</code><br/>
         <code>nodpi</code>
       </td>
       <td>
@@ -446,6 +451,8 @@
           <li>{@code mdpi}: Medium-density (on traditional HVGA) screens; approximately
 160dpi.</li>
           <li>{@code hdpi}: High-density screens; approximately 240dpi.</li>
+          <li>{@code xhdpi}: Extra high-density screens; approximately 320dpi. <em>Added in API
+Level 8</em></li>
           <li>{@code nodpi}: This can be used for bitmap resources that you do not want to be scaled
 to match the device density.</li>
         </ul>
diff --git a/docs/html/guide/topics/testing/index.jd b/docs/html/guide/topics/testing/index.jd
index b75656f..762a897 100644
--- a/docs/html/guide/topics/testing/index.jd
+++ b/docs/html/guide/topics/testing/index.jd
@@ -59,6 +59,20 @@
         which guides you through a more complex testing scenario.
     </li>
 </ul>
+<h4>Tools</h4>
+<ul>
+    <li>
+        The
+        <a href="{@docRoot}guide/developing/tools/monkey.html">UI/Application Exerciser Monkey</a>,
+        usually called Monkey, is a command-line tool that sends pseudo-random
+        streams of keystrokes, touches, and gestures to a device.
+    </li>
+    <li>
+     The <a href="{@docRoot}guide/developing/tools/monkeyrunner_concepts.html">monkeyrunner</a> tool
+        is an API and execution environment. You use monkeyrunner with Python programs
+        to test applications and devices.
+    </li>
+</ul>
 <h4>Samples</h4>
 <ul>
     <li>
diff --git a/docs/html/guide/topics/testing/testing_android.jd b/docs/html/guide/topics/testing/testing_android.jd
index 2a4c949..d4b0dcc 100755
--- a/docs/html/guide/topics/testing/testing_android.jd
+++ b/docs/html/guide/topics/testing/testing_android.jd
@@ -38,7 +38,7 @@
         <a href="#TestResults">Seeing Test Results</a>
     </li>
     <li>
-        <a href="#Monkeys">Monkey and MonkeyRunner</a>
+        <a href="#Monkeys">monkey and monkeyrunner</a>
     </li>
     <li>
        <a href="#PackageNames">Working With Package Names</a>
@@ -77,6 +77,13 @@
           <a href="{@docRoot}guide/developing/testing/testing_otheride.html">
           Testing in Other IDEs</a>
         </li>
+        <li>
+          <a href="{@docRoot}guide/developing/tools/monkeyrunner_concepts.html">
+          monkeyrunner</a>
+        </li>
+        <li>
+     <a href="{@docRoot}guide/developing/tools/monkey.html">UI/Application Exerciser Monkey</a>
+        </li>
       </ol>
   </div>
 </div>
@@ -112,10 +119,10 @@
     </li>
     <li>
         The SDK also provides
-        <a href="{@docRoot}guide/topics/testing/monkeyrunner.html">MonkeyRunner</a>, an API for
-        testing devices with Jython scripts, and <a
-        href="{@docRoot}guide/developing/tools/monkey.html">Monkey</a>, a command-line tool for
-        stress-testing UIs by sending pseudo-random events to a device.
+  <a href="{@docRoot}guide/developing/tools/monkeyrunner_concepts.html">monkeyrunner</a>, an API
+        testing devices with Python programs, and <a
+        href="{@docRoot}guide/developing/tools/monkey.html">UI/Application Exerciser Monkey</a>,
+        a command-line tool for stress-testing UIs by sending pseudo-random events to a device.
     </li>
 </ul>
 <p>
@@ -540,25 +547,28 @@
     <a href="{@docRoot}guide/developing/testing/testing_otheride.html#RunTestsCommand">
     Testing in Other IDEs</a>.
 </p>
-<h2 id="Monkeys">Monkey and MonkeyRunner</h2>
+<h2 id="Monkeys">monkey and monkeyrunner</h2>
 <p>
     The SDK provides two tools for functional-level application testing:
 </p>
     <ul>
         <li>
-            <a href="{@docRoot}guide/developing/tools/monkey.html">Monkey</a> is a command-line
-            tool that sends pseudo-random streams of keystrokes, touches, and gestures to a
-            device. You run it with the <a href="{@docRoot}guide/developing/tools/adb.html">
-            Android Debug Bridge</a> (adb) tool. You use it to stress-test your application and
-            report back errors that are encountered. You can repeat a stream of events by
-            running the tool each time with the same random number seed.
+The <a href="{@docRoot}guide/developing/tools/monkey.html">UI/Application Exerciser Monkey</a>,
+            usually called "monkey", is a command-line tool that sends pseudo-random streams of
+            keystrokes, touches, and gestures to a device. You run it with the
+            <a href="{@docRoot}guide/developing/tools/adb.html">Android Debug Bridge</a> (adb) tool.
+            You use it to stress-test your application and report back errors that are encountered.
+            You can repeat a stream of events by running the tool each time with the same random
+            number seed.
         </li>
         <li>
-            <a href="{@docRoot}guide/topics/testing/monkeyrunner.html">MonkeyRunner</a> is a
-            Jython API that you use in test programs written in Python. The API includes functions
-            for connecting to a device, installing and uninstalling packages, taking screenshots,
-            comparing two images, and running a test package against an application. Using the API
-            with Python, you can write a wide range of large, powerful, and complex tests.
+    The <a href="{@docRoot}guide/developing/tools/monkeyrunner_concepts.html">monkeyrunner</a> tool
+            is an API and execution environment for test programs written in Python. The API
+            includes functions for connecting to a device, installing and uninstalling packages,
+            taking screenshots, comparing two images, and running a test package against an
+            application. Using the API, you can write a wide range of large, powerful, and complex
+            tests. You run programs that use the API with the <code>monkeyrunner</code> command-line
+            tool.
         </li>
     </ul>
 <h2 id="PackageNames">Working With Package names</h2>
diff --git a/docs/html/guide/webapps/best-practices.jd b/docs/html/guide/webapps/best-practices.jd
index 1bde5bf..4e9ae81 100644
--- a/docs/html/guide/webapps/best-practices.jd
+++ b/docs/html/guide/webapps/best-practices.jd
@@ -58,7 +58,7 @@
 &lt;meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"&gt;
 </pre>
   <p>For more information about how to use viewport meta data for Android-powered devices, read <a
-href="{@docRoot}guide/webapps/targetting.html">Targetting Android Devices</a>.</p>
+href="{@docRoot}guide/webapps/targeting.html">Targeting Screens from Web Apps</a>.</p>
 </li>
 
 
diff --git a/docs/html/guide/webapps/debugging.jd b/docs/html/guide/webapps/debugging.jd
index 098e17c..ee4b723 100644
--- a/docs/html/guide/webapps/debugging.jd
+++ b/docs/html/guide/webapps/debugging.jd
@@ -86,7 +86,7 @@
 <p>If you've implemented a custom {@link android.webkit.WebView} in your application, all the
 same console APIs are supported when debugging your web page in WebView. On Android
 1.6 and lower, console messages are automatically sent to logcat with the
-"WebCore" logging tag. If you're targetting Android 2.1 (API Level 7) or higher, then you must
+"WebCore" logging tag. If you're targeting Android 2.1 (API Level 7) or higher, then you must
 provide a {@link android.webkit.WebChromeClient}
 that implements the {@link android.webkit.WebChromeClient#onConsoleMessage(String,int,String)
 onConsoleMessage()} callback method, in order for console messages to appear in logcat.</p>
diff --git a/docs/html/guide/webapps/index.jd b/docs/html/guide/webapps/index.jd
new file mode 100644
index 0000000..280380f
--- /dev/null
+++ b/docs/html/guide/webapps/index.jd
@@ -0,0 +1,71 @@
+page.title=Web Apps Overview
+@jd:body
+
+<div class="figure" style="width:327px">
+  <img src="{@docRoot}images/webapps/webapps.png" alt="" />
+  <p class="img-caption"><strong>Figure 1.</strong> You can make your web content available to
+users in two ways: in a traditional web browser and in an Android application, by
+including a WebView in the layout.</p>
+</div>
+
+<p>There are essentially two ways to deliver an application on Android: as a
+client-side application (developed using the Android SDK and installed on user devices as an {@code
+.apk}) or as a web application (developed using web standards and accessed through a web
+browser&mdash;there's nothing to install on user devices).</p>
+
+<p>The approach you choose for your application could depend on several factors, but Android makes
+the decision to develop a web application easier by providing:</p>
+<ul>
+  <li>Support for viewport properties that allow you to properly size your web application
+based on the screen size</li>
+  <li>CSS and JavaScript features that allow you to provide different styles and images
+based on the screen's pixel density (screen resolution)</li>
+</ul>
+
+<p>Thus, your decision to develop a web application for Android can exclude consideration for
+screen support, because it's already easy to make your web pages look good on all types of screens
+powered by Android.</p>
+
+<p>Another great feature of Android is that you don't have to build your application purely on
+the client or purely on the web. You can mix the two together by developing a client-side Android
+application that embeds some web pages (using a {@link android.webkit.WebView} in your Android
+application layout). Figure 1 visualizes how you can provide access to your web pages from either
+a web browser or your Android application. However, you shouldn't develop an Android
+application simply as a means to launch your web site. Rather, the web pages you embed in your
+Android application should be designed especially for that environment. You can even define an
+interface between your Android application and your web pages that allows JavaScript in the web
+pages to call upon APIs in your Android application&mdash;providing Android APIs to your web-based
+application.</p>
+
+<p>Since Android 1.0, {@link android.webkit.WebView} has been available for Android
+applications to embed web content in their layout and bind JavaScript to Android APIs. After
+Android added support for more screen densities (adding support for high and low-density
+screens), Android 2.0 added features to the WebKit framework to allow web pages to specify
+viewport properties and query the screen density in order to modify styles
+and image assets, as mentioned above. Because these features are a part of Android's WebKit
+framework, both the Android Browser (the default web browser provided with the platform) and
+{@link android.webkit.WebView} support the same viewport and screen density features.</p>
+
+<p>To develop a web application for Android-powered devices, you should read the
+following documents:</p>
+
+<dl>
+  <dt><a href="{@docRoot}guide/webapps/targeting.html"><strong>Targeting Screens from Web
+Apps</strong></a></dt>
+  <dd>How to properly size your web app on Android-powered devices and support
+multiple screen densities. The information in this document is important if you're building a web
+application that you at least expect to be available on Android-powered devices (which you should
+assume for anything you publish on the web), but especially if you're targeting mobile devices
+or using {@link android.webkit.WebView}.</dd>
+  <dt><a href="{@docRoot}guide/webapps/webview.html"><strong>Building Web Apps in
+WebView</strong></a></dt>
+  <dd>How to embed web pages into your Android application using {@link android.webkit.WebView} and
+bind JavaScript to Android APIs.</dd>
+  <dt><a href="{@docRoot}guide/webapps/debugging.html"><strong>Debugging Web Apps</strong></a></dt>
+  <dd>How to debug web apps using JavaScript Console APIs.</dd>
+  <dt><a href="{@docRoot}guide/webapps/best-practices.html"><strong>Best Practices for Web</strong>
+Apps</a></dt>
+  <dd>A list of practices you should follow, in order to provide an effective web application on
+Android-powered devices.</dd>
+</dl>
+
diff --git a/docs/html/guide/webapps/targeting.jd b/docs/html/guide/webapps/targeting.jd
new file mode 100644
index 0000000..bdc2d5e
--- /dev/null
+++ b/docs/html/guide/webapps/targeting.jd
@@ -0,0 +1,439 @@
+page.title=Targeting Screens from Web Apps
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+<h2>Quickview</h2>
+<ul>
+  <li>You can target your web page for different screens using viewport metadata, CSS, and
+JavaScript</li>
+  <li>Techniques in this document work for Android 2.0 and greater, and for web pages rendered
+in the default Android Browser and in a {@link android.webkit.WebView}</li>
+</ul>
+
+<h2>In this document</h2>
+<ol>
+<li><a href="#Metadata">Using Viewport Metadata</a>
+  <ol>
+    <li><a href="#ViewportSize">Defining the viewport size</a></li>
+    <li><a href="#ViewportScale">Defining the viewport scale</a></li>
+    <li><a href="#ViewportDensity">Defining the viewport target density</a></li>
+  </ol>
+</li>
+<li><a href="#DensityCSS">Targeting Device Density with CSS</a></li>
+<li><a href="#DensityJS">targeting Device Density with JavaScript</a></li>
+</ol>
+
+</div>
+</div>
+
+
+<p>If you're developing a web application for Android or redesigning one for mobile devices, you
+should carefully consider how your web pages appear on different kinds of screens. Because
+Android is available on devices with different types of screens, you should account for some factors
+that affect the way your web pages appear on Android devices.</p>
+
+<p class="note"><strong>Note:</strong> The features described in this document are supported
+by the Android Browser application (provided with the default Android platform) and {@link
+android.webkit.WebView} (the framework view widget for displaying web pages), on Android 2.0 and
+greater. Third-party web browsers running on Android might not support these features for
+controlling the viewport size and screen densities.</p>
+
+<p>When targeting your web pages for Android devices, there are two fundamental factors that you
+should account for:</p>
+
+<dl>
+  <dt>The size of the viewport and scale of the web page</dt>
+    <dd>When the Android Browser loads a web page, the default behavior is to load the
+page in "overview mode," which provides a zoomed-out perspective of the web page. You can override
+this behavior for your web page by defining the default dimensions of the viewport or the initial
+scale of the viewport. You can also control how much the user can zoom in and out of your web
+page, if at all. The user can also disable overview mode in the
+Browser settings, so you should never assume that your page will load in overview mode. You
+should instead customize the viewport size and/or scale as appropriate for your page.</p>
+    <p>However, when your page is rendered in a {@link android.webkit.WebView}, the page loads at
+full zoom (not in "overview mode"). That is, it appears at the default size for the page,
+instead of zoomed out. (This is also how the page appears if the user disables overview
+mode.)</p></dd>
+
+  <dt>The device's screen density</dt>
+    <dd>The screen density (the number of pixels per inch) on an Android-powered device affects
+the resolution and size at which a web page is displayed. (There are three screen density
+categories: low, medium, and high.) The Android Browser and {@link android.webkit.WebView}
+compensate for variations in the screen
+density by scaling a web page so that all devices display the web page at the same perceivable size
+as a medium-density screen. If graphics are an important element of your web design, you
+should pay close attention to the scaling that occurs on different densities, because image scaling
+can produce artifacts (blurring and pixelation).
+      <p>To provide the best visual representation on all
+screen densities, you should control how scaling occurs by providing viewport metadata about
+your web page's target screen density and providing alternative graphics for different screen
+densities, which you can apply to different screens using CSS or JavaScript.</p></dd>
+</dl>
+
+<p>The rest of this document describes how you can account for these effects and provide a good
+design on multiple types of screens.</p>
+
+
+
+<h2 id="Metadata">Using Viewport Metadata</h2>
+
+<p>The viewport is the area in which your web page is drawn. Although the viewport's visible area
+matches the size of the screen,
+the viewport has its own dimensions that determine the number of pixels available to a web page.
+That is, the number of pixels available to a web page before it exceeds the screen area is
+defined by the dimensions of the viewport,
+not the dimensions of the device screen. For example, although a device screen might have a width of
+480 pixels, the viewport can have a width of 800 pixels, so that a web page designed to be 800
+pixels wide is completely visible on the screen.</p>
+
+<p>You can define properties of the viewport for your web page using the {@code "viewport"}
+property in an HTML {@code &lt;meta&gt;} tag (which must
+be placed in your document {@code &lt;head&gt;}). You can define multiple viewport properties in the
+{@code &lt;meta&gt;} tag's {@code content} attribute. For example, you can define the height and
+width of the viewport, the initial scale of the page, and the target screen density.
+Each viewport property in the {@code content} attribute must be separated by a comma.</p>
+
+<p>For example, the following snippet from an HTML document specifies that the viewport width
+should exactly match the device screen width and that the ability to zoom should be disabled:</p>
+
+<pre>
+&lt;head&gt;
+    &lt;title&gt;Example&lt;/title&gt;
+    &lt;meta name="viewport" content="width=device-width, user-scalable=no" /&gt;
+&lt;/head&gt;
+</pre>
+
+<p>That's an example of just two viewport properties. The following syntax shows all of the
+supported viewport properties and the general types of values accepted by each one:</p>
+
+<pre>
+&lt;meta name="viewport"
+      content="
+          <b>height</b> = [<em>pixel_value</em> | device-height] ,
+          <b>width</b> = [<em>pixel_value</em> | device-width ] ,
+          <b>initial-scale</b> = <em>float_value</em> ,
+          <b>minimum-scale</b> = <em>float_value</em> ,
+          <b>maximum-scale</b> = <em>float_value</em> ,
+          <b>user-scalable</b> = [yes | no] ,
+          <b>target-densitydpi</b> = [<em>dpi_value</em> | device-dpi |
+                               high-dpi | medium-dpi | low-dpi]
+          " /&gt;
+</pre>
+
+<p>The following sections discuss how to use each of these viewport properties and exactly what the
+accepted values are.</p>
+
+<div class="figure" style="width:300px">
+  <img src="{@docRoot}images/webapps/compare-default.png" alt="" height="300" />
+  <p class="img-caption"><strong>Figure 1.</strong> A web page with an image that's 320 pixels
+wide, in the Android Browser when there is no viewport metadata set (with "overview mode"
+enabled, the viewport is 800 pixels wide, by default).</p>
+</div>
+
+
+<div class="figure" style="width:300px">
+  <img src="{@docRoot}images/webapps/compare-width400.png" alt="" height="300" />
+  <p class="img-caption"><strong>Figure 2.</strong> A web page with viewport {@code width=400} and
+"overview mode" enabled (the image in the web page is 320 pixels wide).</p>
+</div>
+
+
+<h3 id="ViewportSize">Defining the viewport size</h3>
+
+<p>Viewport's {@code height} and {@code width} properties allow you to specify the size of the
+viewport (the number of pixels available to the web page before it goes off screen).</p>
+
+<p>As mentioned in the introduction above, the Android Browser loads pages in "overview mode" by
+default (unless disable by the user), which sets the minimum viewport width to 800 pixels. So, if
+your web page specifies its size to be 320 pixels wide, then your page appears smaller than the
+visible screen (even if the physical screen is 320 pixels wide, because the viewport simulates a
+drawable area that's 800 pixels wide), as shown in figure 1. To avoid this effect, you should
+explicitly define the viewport {@code width} to match the width for which you have designed your web
+page.</p>
+
+<p>For example, if your web page is designed to be exactly 320 pixels wide, then you might
+want to specify that size for the viewport width:</p>
+
+<pre>
+&lt;meta name="viewport" content="width=320" /&gt;
+</pre>
+
+<p>In this case, your web page exactly fits the screen width, because the web page width and
+viewport width are the same.</p>
+
+<p class="note"><strong>Note:</strong> Width values that are greater than 10,000 are ignored and
+values less than (or equal to) 320 result in a value equal to the device-width (discussed below).
+Height values that are greater then 10,000 or less than 200 are also ignored.</p>
+
+<p>To demonstrate how this property affects the size of
+your web page, figure 2 shows a web page that contains an image that's 320 pixels
+wide, but with the viewport width set to 400.</p>
+
+
+<p class="note"><strong>Note:</strong> If you set the viewport width to match your web page width
+and the device's screen width does <em>not</em> match those dimensions, then the web page
+still fits the screen even if the device has a high or low-density screen, because the
+Android Browser and {@link android.webkit.WebView} scale web pages to match the perceived size on a
+medium-density screen, by default (as you can see in figure 2, when comparing the hdpi device to the
+mdpi device). Screen densities are discussed more in <a href="#ViewportDensity">Defining the
+viewport target density</a>.</p>
+
+
+<h4>Automatic sizing</h4>
+
+<p>As an alternative to specifying the viewport dimensions with exact pixels, you can set the
+viewport size to always match the dimensions of the device screen, by defining the
+viewport properties {@code height}
+and {@code width} with the values {@code device-height} and {@code device-width}, respectively. This
+is appropriate when you're developing a web application that has a fluid width (not fixed width),
+but you want it to appear as if it's fixed (to perfectly fit every screen as
+if the web page width is set to match each screen). For example:</p>
+
+<pre>
+&lt;meta name="viewport" content="width=device-width" /&gt;
+</pre>
+
+<p>This results in the viewport width matching whatever the current screen width is, as shown in
+figure 3. It's important to notice that, this results in images being scaled to fit the screen
+when the current device does not match the <a href="#ViewportDensity">target
+density</a>, which is medium-density if you don't specify otherwise. As a result, the image
+displayed on the high-density device in figure 3 is scaled up in order to match the width
+of a screen with a medium-density screen.</p>
+
+<div class="figure" style="width:300px">
+  <img src="{@docRoot}images/webapps/compare-initialscale.png" alt="" height="300" />
+  <p class="img-caption"><strong>Figure 3.</strong> A web page with viewport {@code
+width=device-width} <em>or</em> {@code initial-scale=1.0}.</p>
+</div>
+
+<p class="note"><strong>Note:</strong> If you instead want {@code
+device-width} and {@code device-height} to match the physical screen pixels for every device,
+instead of scaling your web page to match the target density, then you must also include
+the {@code target-densitydpi} property with a value of {@code device-dpi}. This is discussed more in
+the section about <a href="#ViewportDensity">Defining the viewport density</a>. Otherwise, simply
+using {@code device-height} and {@code device-width} to define the viewport size makes your web page
+fit every device screen, but scaling occurs on your images in order to adjust for different screen
+densities.</p>
+
+
+
+<h3 id="ViewportScale">Defining the viewport scale</h3>
+
+<p>The scale of the viewport defines the level of zoom applied to the web page. Viewport
+properties allow you to specify the scale of your web page in the following ways:</p>
+<dl>
+  <dt>{@code initial-scale}</dt>
+  <dd>The initial scale of the page. The value is a float that indicates a multiplier for your web
+page size, relative to the screen size. For example, if you set the initial scale to "1.0" then the
+web page is displayed to match the resolution of the <a href="#ViewportDensity">target
+density</a> 1-to-1. If set to "2.0", then the page is enlarged (zoomed in) by a factor of 2.
+    <p>The default initial scale is calculated to fit the web page in the viewport size.
+Because the default viewport width is 800 pixels, if the device screen resolution is less than
+800 pixels wide, the initial scale is something less than 1.0, by default, in order to fit the
+800-pixel-wide page on the screen.</p></dd>
+
+  <dt>{@code minimum-scale}</dt>
+  <dd>The minimum scale to allow. The value is a float that indicates the minimum multiplier for
+your web page size, relative to the screen size. For example, if you set this to "1.0", then the
+page can't zoom out because the minimum size is 1-to-1 with the <a href="#ViewportDensity">target
+density</a>.</dd>
+
+  <dt>{@code maximum-scale}</dt>
+  <dd>The maximum scale to allow for the page. The value is a float that indicates the
+maximum multiplier for your web page size,
+relative to the screen size. For example, if you set this to "2.0", then the page can't
+zoom in more than 2 times the target size.</dd>
+
+  <dt>{@code user-scalable}</dt>
+  <dd>Whether the user can change the scale of the page at all (zoom in and out). Set to {@code yes}
+to allow scaling and {@code no} to disallow scaling. The default is {@code yes}. If you set
+this to {@code no}, then the {@code minimum-scale} and {@code maximum-scale} are ignored,
+because scaling is not possible.</dd>
+</dl>
+
+<p>All scale values must be within the range 0.01&ndash;10.</p>
+
+<p>For example:</p>
+
+<pre>
+&lt;meta name="viewport" content="initial-scale=1.0" /&gt;
+</pre>
+
+<p>This metadata sets the initial scale to be full sized, relative to the viewport's target
+density.</p>
+
+
+
+
+<h3 id="ViewportDensity">Defining the viewport target density</h3>
+
+<p>The density of a device's screen is based on the screen resolution, as defined by the number of
+dots per inch (dpi). There are three screen
+density categories supported by Android: low (ldpi), medium (mdpi), and high (mdpi). A screen
+with low density has fewer available pixels per inch, whereas a screen with high density has more
+pixels per inch (compared to a medium density screen). The Android Browser and {@link
+android.webkit.WebView} target a medium density screen by default.</p>
+
+
+<div class="figure" style="width:300px">
+  <img src="{@docRoot}images/webapps/compare-initialscale-devicedpi.png" alt="" height="300" />
+  <p class="img-caption"><strong>Figure 4.</strong> A web page with viewport {@code
+width=device-width} and {@code target-densitydpi=device-dpi}.</p>
+</div>
+
+
+<p>Because the default target density is medium, when users have a device with a low or high density
+screen, the Android Browser and {@link android.webkit.WebView} scale web pages (effectively zoom
+the pages) so they display at a
+size that matches the perceived appearance on a medium density screen. More specifically, the
+Android Browser and {@link android.webkit.WebView} apply approximately 1.5x scaling to web pages
+on a high density screen (because its screen pixels are smaller) and approximately 0.75x scaling to
+pages on a low density screen (because its screen pixels are bigger).</p>
+
+<p>Due to this default scaling, figures 1, 2, and 3 show the example web page at the same physical
+size on both the high and medium density device (the high-density device shows the
+web page with a default scale factor that is 1.5 times larger than the actual pixel resolution, to
+match the target density). This can introduce some undesirable artifacts in your images.
+For example, although an image appears the same size on a medium and high-density device, the image
+on the high-density device appears more blurry, because the image is designed to be 320 pixels
+wide, but is drawn with 480 pixels.</p>
+
+<p>You can change the target screen density for your web page using the {@code target-densitydpi}
+viewport property. It accepts the following values:</p>
+
+<ul>
+<li><code>device-dpi</code> - Use the device's native dpi as the target dpi. Default scaling never
+occurs.</li>
+<li><code>high-dpi</code> - Use hdpi as the target dpi. Medium and low density screens scale down
+as appropriate.</li>
+<li><code>medium-dpi</code> - Use mdpi as the target dpi. High density screens scale up and low
+density screens scale down. This is the default target density.</li>
+<li><code>low-dpi</code> - Use ldpi as the target dpi. Medium and high density screens scale up
+as appropriate.</li>
+<li><em><code>&lt;value&gt;</code></em> - Specify a dpi value to use as the target dpi. Values must
+be within the range 70&ndash;400.</li>
+</ul></p>
+
+<p>For example, to prevent the Android Browser and {@link android.webkit.WebView} from scaling
+your web page for different screen densities, set
+the {@code target-densitydpi} viewport property to {@code device-dpi}. When you do, the page is
+not scaled. Instead, the page is displayed at a size that matches the current screen's
+density. In this case, you should also define the viewport width to match the device width, so your
+web page naturally fits the screen size. For example:</p>
+
+<pre>
+&lt;meta name="viewport" content="target-densitydpi=device-dpi, width=device-width" /&gt;
+</pre>
+
+<p>Figure 4 shows a web page using these viewport settings&mdash;the high-density device
+now displays the page smaller because its physical pixels are smaller than those on the
+medium-density device, so no scaling occurs and the 320-pixel-wide image is drawn using exactly 320
+pixels on both screens. (This is how you should define your viewport if
+you want to customize your web page based on screen density and provide different image assets for
+different densities, <a href="#DensityCSS">with CSS</a> or
+<a href="#DensityJS">with JavaScript</a>.)</p>
+
+
+<h2 id="DensityCSS">Targeting Device Density with CSS</h2>
+
+<p>The Android Browser and {@link android.webkit.WebView} support a CSS media feature that allows
+you to create styles for specific
+screen densities&mdash;the <code>-webkit-device-pixel-ratio</code> CSS media feature. The
+value you apply to this feature should be either
+"0.75", "1", or "1.5", to indicate that the styles are for devices with low density, medium density,
+or high density screens, respectively.</p>
+
+<p>For example, you can create separate stylesheets for each density:</p>
+
+<pre>
+&lt;link rel="stylesheet" media="screen and (-webkit-device-pixel-ratio: 1.5)" href="hdpi.css" /&gt;
+&lt;link rel="stylesheet" media="screen and (-webkit-device-pixel-ratio: 1.0)" href="mdpi.css" /&gt;
+&lt;link rel="stylesheet" media="screen and (-webkit-device-pixel-ratio: 0.75)" href="ldpi.css" /&gt;
+</pre>
+
+
+<div class="figure" style="width:300px">
+  <img src="{@docRoot}images/webapps/compare-width-devicedpi-css.png" alt="" height="300" />
+  <p class="img-caption"><strong>Figure 5.</strong> A web page with CSS that's targetted to
+specific screen densities using the {@code -webkit-device-pixel-ratio} media feature. Notice
+that the hdpi device shows a different image that's applied in CSS.</p>
+</div>
+
+<p>Or, specify the different styles in one stylesheet:</p>
+
+<pre class="no-pretty-print">
+#header {
+    background:url(medium-density-image.png);
+}
+
+&#64;media screen and (-webkit-device-pixel-ratio: 1.5) {
+    // CSS for high-density screens
+    #header {
+        background:url(high-density-image.png);
+    }
+}
+
+&#64;media screen and (-webkit-device-pixel-ratio: 0.75) {
+    // CSS for low-density screens
+    #header {
+        background:url(low-density-image.png);
+    }
+}
+</pre>
+
+<p class="note"><strong>Note:</strong> The default style for {@code #header} applies the image
+designed for medium-density devices in order to support devices running a version of Android less
+than 2.0, which do not support the {@code -webkit-device-pixel-ratio} media feature.</p>
+
+<p>The types of styles you might want to adjust based on the screen density depend on how you've
+defined your viewport properties. To provide fully-customized styles that tailor your web page for
+each of the supported densities, you should set your viewport properties so the viewport width and
+density match the device. That is:</p>
+
+<pre>
+&lt;meta name="viewport" content="target-densitydpi=device-dpi, width=device-width" /&gt;
+</pre>
+
+<p>This way, the Android Browser and {@link android.webkit.WebView} do not perform scaling on your
+web page and the viewport width
+matches the screen width exactly. On their own, these viewport properties create results shown in
+figure 4. However, by adding some custom CSS using the {@code -webkit-device-pixel-ratio} media
+feature, you can apply different styles. For example, figure 5 shows a web page with these viewport
+properties and also some CSS added that applies a high-resolution image for high-density
+screens.</p>
+
+
+
+<h2 id="DensityJS">Targeting Device Density with JavaScript</h2>
+
+<p>The Android Browser and {@link android.webkit.WebView} support a DOM property that allows you to
+query the density of the current
+device&mdash;the <code>window.devicePixelRatio</code> DOM property. The value of this property
+specifies the scaling factor used for the current device. For example, if the value
+of <code>window.devicePixelRatio</code> is "1.0", then the device is considered a medium density
+device and no scaling is applied by default; if the value is "1.5", then the device is
+considered a high density device and the page is scaled 1.5x by default; if the value
+is "0.75", then the device is considered a low density device and the page is scaled
+0.75x by default. Of course, the scaling that the Android Browser and {@link android.webkit.WebView}
+apply is based on the web page's
+target density&mdash;as described in the section about <a href="#ViewportDensity">Defining the
+viewport target density</a>, the default target is medium-density, but you can change the
+target to affect how your web page is scaled for different screen densities.</p>
+
+<p>For example, here's how you can query the device density with JavaScript:</p>
+
+<pre>
+if (window.devicePixelRatio == 1.5) {
+  alert("This is a high-density screen");
+} else if (window.devicePixelRation == 0.75) {
+  alert("This is a low-density screen");
+}
+</pre>
+
+
+
+
+
+
+
diff --git a/docs/html/guide/webapps/targetting.jd b/docs/html/guide/webapps/targetting.jd
deleted file mode 100644
index 844b9ca..0000000
--- a/docs/html/guide/webapps/targetting.jd
+++ /dev/null
@@ -1,419 +0,0 @@
-page.title=Targetting Android Devices
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-<h2>Quickview</h2>
-<ul>
-  <li>You can target your web page for different screens using viewport metadata, CSS, and
-JavaScript</li>
-  <li>Techniques in this document work for Android 2.0 and greater</li>
-</ul>
-
-<h2>In this document</h2>
-<ol>
-<li><a href="#Metadata">Using Viewport Metadata</a>
-  <ol>
-    <li><a href="#ViewportSize">Defining the viewport size</a></li>
-    <li><a href="#ViewportScale">Defining the viewport scale</a></li>
-    <li><a href="#ViewportDensity">Defining the viewport target density</a></li>
-  </ol>
-</li>
-<li><a href="#DensityCSS">Targetting Device Density with CSS</a></li>
-<li><a href="#DensityJS">Targetting Device Density with JavaScript</a></li>
-</ol>
-
-</div>
-</div>
-
-
-<p>If you're developing a web application for Android or redesigning one for mobile devices, you
-should account for some factors that affect the way the Android Browser renders your web page by
-default. There are two fundamental factors that you should account for:</p>
-
-<dl>
-  <dt>The size of the viewport and scale of the web page</dt>
-    <dd>When the Android Browser loads a web page, the default behavior is to load the
-page in "overview mode," which provides a zoomed-out perspective of the web page. You can override
-this behavior for your web page by defining the default dimensions of the viewport or the initial
-scale of the viewport. You can also control how much the user can zoom in and out of your web
-page, if at all.
-    <p>However, the user can also disable overview mode in the
-Browser settings, so you should not assume that your page will load in overview mode. You
-should instead customize the viewport size and/or scale as appropriate for your page.</p></dd>
-
-  <dt>The device's screen density</dt>
-    <dd>The screen density (the number of pixels per inch) on an Android-powered device affects
-the resolution and size at which a web page is displayed. (There are three screen density
-categories: low, medium, and high.) The Android Browser compensates for variations in the screen
-density by scaling a web page so that all devices display the web page at the same perceivable size
-as a medium-density screen. If graphics are an important element of your web design, you
-should pay close attention to the scaling that occurs on different densities, because image scaling
-can produce artifacts (blurring and pixelation). 
-      <p>To provide the best visual representation on all
-screen densities, you should control how scaling occurs by providing viewport metadata about
-your web page's target screen density and providing alternative graphics for different screen
-densities, which you can apply to different screens using CSS or JavaScript.</p></dd>
-</dl>
-
-<p>The rest of this document describes how you can account for these effects, and how to target
-your web page for specific screen configurations.</p>
-
-<p class="note"><strong>Note:</strong> The features described in this document are supported
-by the Android Browser application on Android 2.0 and greater. Third-party web browsers running on
-Android might not support these techniques for controlling the viewport size and targetting
-screen densities.</p>
-
-
-
-<h2 id="Metadata">Using Viewport Metadata</h2>
-
-<p>The viewport is the area in which the Android Browser
-draws a web page. Although the viewport's visible area matches the size of the screen,
-the viewport has its own dimensions that determine the number of pixels available to a web page.
-That is, the number of pixels available to a web page before it exceeds the screen area is
-defined by the dimensions of the viewport,
-not the dimensions of the device screen. For example, although a device screen might have a width of
-480 pixels, the viewport can have a width of 800 pixels, so that a web page designed to be 800
-pixels wide is completely visible on the screen.</p>
-
-<p>You can define properties of the viewport for your web page using the {@code "viewport"}
-property in an HTML {@code &lt;meta&gt;} tag (which must
-be placed in your document {@code &lt;head&gt;}). You can define multiple viewport properties in the
-{@code &lt;meta&gt;} tag's {@code content} attribute. For example, you can define the height and
-width of the viewport, the initial scale of the page, and the target screen density.
-Each viewport property in the {@code content} attribute must be separated by a comma.</p>
-
-<p>For example, the following snippet from an HTML document specifies that the viewport width
-should exactly match the device screen width and that the ability to zoom should be disabled:</p>
-
-<pre>
-&lt;head&gt;
-    &lt;title&gt;Example&lt;/title&gt;
-    &lt;meta name="viewport" content="width=device-width, user-scalable=no" /&gt;
-&lt;/head&gt;
-</pre>
-
-<p>That's an example of just two viewport properties. The following syntax shows all of the
-supported viewport properties and the general types of values accepted by each one:</p>
-
-<pre>
-&lt;meta name="viewport"
-      content="
-          <b>height</b> = [<em>pixel_value</em> | device-height] ,
-          <b>width</b> = [<em>pixel_value</em> | device-width ] ,
-          <b>initial-scale</b> = <em>float_value</em> ,
-          <b>minimum-scale</b> = <em>float_value</em> ,
-          <b>maximum-scale</b> = <em>float_value</em> ,
-          <b>user-scalable</b> = [yes | no] ,
-          <b>target-densitydpi</b> = [<em>dpi_value</em> | device-dpi |
-                               high-dpi | medium-dpi | low-dpi]
-          " /&gt;
-</pre>
-
-<p>The following sections discuss how to use each of these viewport properties and exactly what the
-accepted values are.</p>
-
-<div class="figure" style="width:300px">
-  <img src="{@docRoot}images/webapps/compare-default.png" alt="" height="300" />
-  <p class="img-caption"><strong>Figure 1.</strong> A web page with no viewport metadata and an
-image that's 320 pixels wide (the viewport is 800 pixels wide, by default).</p>
-</div>
-
-
-<div class="figure" style="width:300px">
-  <img src="{@docRoot}images/webapps/compare-width400.png" alt="" height="300" />
-  <p class="img-caption"><strong>Figure 2.</strong> A web page with viewport {@code width=400}
-(the image in the web page is 320 pixels wide).</p>
-</div>
-
-
-<h3 id="ViewportSize">Defining the viewport size</h3>
-
-<p>Viewport's {@code height} and {@code width} properties allow you to specify the size of the
-viewport (the number of pixels available to the web page before it goes off screen). By default, the
-Android Browser's minimum viewport width is 800 pixels, so if your web
-page specifies its size to be 320 pixels wide, then your page renders smaller than the visible
-screen (even if the physical screen is 320 pixels wide, because the viewport simulates a
-drawable area that's 800 pixels wide), as shown in figure 1. So, you should explicitly define the
-viewport {@code width} to match the width for which you have designed your web page.</p>
-
-<p class="note"><strong>Note:</strong> Width values that are greater than 10,000 are ignored and
-values less than (or equal to) 320 result in a value equal to the device-width. Height values that
-are greater then 10,000 or less than 200 are also ignored.</p>
-
-<p>For example, if your web page is designed to be exactly 320 pixels wide, then you might
-want to specify that for the viewport width:</p>
-
-<pre>
-&lt;meta name="viewport" content="width=320" /&gt;
-</pre>
-
-<p>In this case, your web page exactly fits the screen width, because the web page width and
-viewport width are the same.</p>
-
-<p>To demonstrate how this property affects the size of
-your web page, figure 2 shows a web page that contains an image that's 320 pixels wide, but with the
-viewport width set to 400.</p>
-
-
-<p class="note"><strong>Note:</strong> If you set the viewport width to match your web page width
-and the device screen width does <em>not</em> match those dimensions, then the web page
-still fits the screen even if the device has a high or low-density screen, because the
-Android Browser scales web pages to match the perceived size on a medium-density
-screen, by default (as you can see in figure 2, when comparing the hdpi device to the mdpi device).
-Screen densities are discussed more in <a href="#ViewportDensity">Defining the viewport target
-density</a>.</p>
-
-
-<h4>Automatic sizing</h4>
-
-<p>As an alternative to specifying the viewport dimensions with exact pixels, you can set the
-viewport size to always match the dimensions of the device screen, by defining the
-viewport properties {@code height}
-and {@code width} with the values {@code device-height} and {@code device-width}, respectively. This
-is appropriate when you're developing a web application that has a fluid width (not fixed width),
-but you want it to appear as if it's fixed (to perfectly fit every screen as
-if the web page width is set to match each screen). For example:</p>
-
-<pre>
-&lt;meta name="viewport" content="width=device-width" /&gt;
-</pre>
-
-<p>This results in the viewport width matching whatever the current screen width is, as shown in
-figure 3. It's important to notice that, this results in images being scaled to fit the screen
-when the current device does not match the <a href="#ViewportDensity">target
-density</a>, which is medium-density if you don't specify otherwise. As a result, the image
-displayed on the high-density device in figure 3 is scaled up in order to match the width
-of a screen with a medium-density screen.</p>
-
-<div class="figure" style="width:300px">
-  <img src="{@docRoot}images/webapps/compare-initialscale.png" alt="" height="300" />
-  <p class="img-caption"><strong>Figure 3.</strong> A web page with viewport {@code
-width=device-width} <em>or</em> {@code initial-scale=1.0}.</p>
-</div>
-
-<p class="note"><strong>Note:</strong> If you instead want {@code
-device-width} and {@code device-height} to match the physical screen pixels for every device,
-instead of scaling your web page to match the target density, then you must also include
-the {@code target-densitydpi} property with a value of {@code device-dpi}. This is discussed more in
-the section about <a href="#ViewportDensity">Defining the viewport density</a>. Otherwise, simply
-using {@code device-height} and {@code device-width} to define the viewport size makes your web page
-fit every device screen, but scaling occurs on your images in order to adjust for different screen
-densities.</p>
-
-
-
-<h3 id="ViewportScale">Defining the viewport scale</h3>
-
-<p>The scale of the viewport defines the level of zoom applied to the web page. Viewport
-properties allow you to specify the scale of your web page in the following ways:</p>
-<dl>
-  <dt>{@code initial-scale}</dt>
-  <dd>The initial scale of the page. The value is a float that indicates a multiplier for your web
-page size, relative to the screen size. For example, if you set the initial scale to "1.0" then the
-web page is displayed to match the resolution of the <a href="#ViewportDensity">target
-density</a> 1-to-1. If set to "2.0", then the page is enlarged (zoomed in) by a factor of 2.
-    <p>The default initial scale is calculated to fit the web page in the viewport size.
-Because the default viewport width is 800 pixels, if the device screen resolution is less than
-800 pixels wide, the initial scale is something less than 1.0, by default, in order to fit the
-800-pixel-wide page on the screen.</p></dd>
-
-  <dt>{@code minimum-scale}</dt>
-  <dd>The minimum scale to allow. The value is a float that indicates the minimum multiplier for
-your web page size, relative to the screen size. For example, if you set this to "1.0", then the
-page can't zoom out because the minimum size is 1-to-1 with the <a href="#ViewportDensity">target
-density</a>.</dd>
-
-  <dt>{@code maximum-scale}</dt>
-  <dd>The maximum scale to allow for the page. The value is a float that indicates the
-maximum multiplier for your web page size,
-relative to the screen size. For example, if you set this to "2.0", then the page can't
-zoom in more than 2 times the target size.</dd>
-
-  <dt>{@code user-scalable}</dt>
-  <dd>Whether the user can change the scale of the page at all (zoom in and out). Set to {@code yes}
-to allow scaling and {@code no} to disallow scaling. The default is {@code yes}. If you set
-this to {@code no}, then the {@code minimum-scale} and {@code maximum-scale} are ignored,
-because scaling is not possible.</dd>
-</dl>
-
-<p>All scale values must be within the range 0.01&ndash;10.</p>
-
-<p>For example:</p>
-
-<pre>
-&lt;meta name="viewport" content="initial-scale=1.0" /&gt;
-</pre>
-
-<p>This metadata sets the initial scale to be full sized, relative to the viewport's target
-density.</p>
-
-
-
-
-<h3 id="ViewportDensity">Defining the viewport target density</h3>
-
-<p>The density of a device's screen is based on the screen resolution. There are three screen
-density categories supported by Android: low (ldpi), medium (mdpi), and high (mdpi). A screen
-with low density has fewer available pixels per inch, whereas a screen with high density has more
-pixels per inch (compared to a medium density screen). The Android Browser targets a medium density 
-screen by default.</p>
-
-
-<div class="figure" style="width:300px">
-  <img src="{@docRoot}images/webapps/compare-initialscale-devicedpi.png" alt="" height="300" />
-  <p class="img-caption"><strong>Figure 4.</strong> A web page with viewport {@code
-width=device-width} and {@code target-densitydpi=device-dpi}.</p>
-</div>
-
-
-<p>Because the default target density is medium, when users have a device with a low or high density
-screen, the Android Browser scales web pages (effectively zooms the pages) so they display at a
-size that matches the perceived appearance on a medium density screen. Specifically, the Android
-Browser applies approximately 1.5x scaling to web pages on a high density screen
-(because its screen pixels are smaller) and approximately 0.75x scaling to pages on a low density
-screen (because its screen pixels are bigger).</p>
-
-<p>Due to this default scaling, figures 1, 2, and 3 show the example web page at the same physical
-size on both the high and medium density device (the high-density device shows the
-web page with a default scale factor that is 1.5 times larger than the actual pixel resolution, to
-match the target density). This can introduce some undesirable artifacts in your images.
-For example, although an image appears the same size on a medium and high-density device, the image
-on the high-density device appears more blurry, because the image is designed to be 320 pixels
-wide, but is drawn with 480 pixels.</p>
-
-<p>You can change the target screen density for your web page using the {@code target-densitydpi}
-viewport property. It accepts the following values:</p>
-
-<ul>
-<li><code>device-dpi</code> - Use the device's native dpi as the target dpi. Default scaling never
-occurs.</li>
-<li><code>high-dpi</code> - Use hdpi as the target dpi. Medium and low density screens scale down
-as appropriate.</li>
-<li><code>medium-dpi</code> - Use mdpi as the target dpi. High density screens scale up and low
-density screens scale down. This is the default target density.</li>
-<li><code>low-dpi</code> - Use ldpi as the target dpi. Medium and high density screens scale up
-as appropriate.</li>
-<li><em><code>&lt;value&gt;</code></em> - Specify a dpi value to use as the target dpi. Values must
-be within the range 70&ndash;400.</li>
-</ul></p>
-
-<p>For example, to prevent the Android Browser from scaling of your web page for different screen
-densities, set
-the {@code target-densitydpi} viewport property to {@code device-dpi}. When you do, the Android
-Browser does not scale the page and, instead, displays your web page to match the current screen
-density. In this case, you should also define the viewport width to match the device width, so your
-web page naturally fits the screen size. For example:</p>
-
-<pre>
-&lt;meta name="viewport" content="target-densitydpi=device-dpi, width=device-width" /&gt;
-</pre>
-
-<p>Figure 4 shows a web page using these viewport settings&mdash;the high-density device
-now displays the page smaller because its physical pixels are smaller than those on the
-medium-density device, so no scaling occurs and the 320-pixel-wide image is drawn using exactly 320
-pixels on both screens. (This is how you should define your viewport if
-you want to customize your web page based on screen density and provide different image assets for
-different densities, <a href="#DensityCSS">with CSS</a> or
-<a href="#DensityJS">with JavaScript</a>.)</p>
-
-
-<h2 id="DensityCSS">Targetting Device Density with CSS</h2>
-
-<p>The Android Browser supports a CSS media feature that allows you to create styles for specific
-screen densities&mdash;the <code>-webkit-device-pixel-ratio</code> CSS media feature. The
-value you apply to this feature should be either
-"0.75", "1", or "1.5", to indicate that the styles are for devices with low density, medium density,
-or high density screens, respectively.</p>
-
-<p>For example, you can create separate stylesheets for each density:</p>
-
-<pre>
-&lt;link rel="stylesheet" media="screen and (-webkit-device-pixel-ratio: 1.5)" href="hdpi.css" /&gt;
-&lt;link rel="stylesheet" media="screen and (-webkit-device-pixel-ratio: 1.0)" href="mdpi.css" /&gt;
-&lt;link rel="stylesheet" media="screen and (-webkit-device-pixel-ratio: 0.75)" href="ldpi.css" /&gt;
-</pre>
-
-
-<div class="figure" style="width:300px">
-  <img src="{@docRoot}images/webapps/compare-width-devicedpi-css.png" alt="" height="300" />
-  <p class="img-caption"><strong>Figure 5.</strong> A web page with CSS that's targetted to
-specific screen densities using the {@code -webkit-device-pixel-ratio} media feature. Notice
-that the hdpi device shows a different image that's applied in CSS.</p>
-</div>
-
-<p>Or, specify the different styles in one stylesheet:</p>
-
-<pre class="no-pretty-print">
-#header {
-    background:url(medium-density-image.png);
-}
-
-&#64;media screen and (-webkit-device-pixel-ratio: 1.5) {
-    // CSS for high-density screens
-    #header {
-        background:url(high-density-image.png);
-    }
-}
-
-&#64;media screen and (-webkit-device-pixel-ratio: 0.75) {
-    // CSS for low-density screens
-    #header {
-        background:url(low-density-image.png);
-    }
-}
-</pre>
-
-<p class="note"><strong>Note:</strong> The default style for {@code #header} applies the image
-designed for medium-density devices in order to support devices running a version of Android less
-than 2.0, which do not support the {@code -webkit-device-pixel-ratio} media feature.</p>
-
-<p>The types of styles you might want to adjust based on the screen density depend on how you've
-defined your viewport properties. To provide fully-customized styles that tailor your web page for
-each of the supported densities, you should set your viewport properties so the viewport width and
-density match the device. That is:</p>
-
-<pre>
-&lt;meta name="viewport" content="target-densitydpi=device-dpi, width=device-width" /&gt;
-</pre>
-
-<p>This way, the Android Browser does not perform scaling on your web page and the viewport width
-matches the screen width exactly. On its own, these viewport properties create results shown in
-figure 4. However, by adding some custom CSS using the {@code -webkit-device-pixel-ratio} media
-feature, you can apply different styles. For example, figure 5 shows a web page with these viewport
-properties and also some CSS added that applies a high-resolution image for high-density
-screens.</p>
-
-
-
-<h2 id="DensityJS">Targetting Device Density with JavaScript</h2>
-
-<p>The Android Browser supports a DOM property that allows you to query the density of the current
-device&mdash;the <code>window.devicePixelRatio</code> DOM property. The value of this property
-specifies the scaling factor used for the current device. For example, if the value
-of <code>window.devicePixelRatio</code> is "1.0", then the device is considered a medium density
-device and no scaling is applied by default; if the value is "1.5", then the device is
-considered a high density device and the page is scaled 1.5x by default; if the value
-is "0.75", then the device is considered a low density device and the page is scaled
-0.75x by default. Of course, the scaling that the Android Browser applies is based on the web page's
-target density&mdash;as described in the section about <a href="#ViewportDensity">Defining the
-viewport target density</a>, the default target is medium-density, but you can change the
-target to affect how your web page is scaled for different screen densities.</p>
-
-<p>For example, here's how you can query the device density with JavaScript:</p>
-
-<pre>
-if (window.devicePixelRatio == 1.5) {
-  alert("This is a high-density screen");
-} else if (window.devicePixelRation == 0.75) {
-  alert("This is a low-density screen");
-}
-</pre>
-
-
-
-
-
-
-
diff --git a/docs/html/images/axis_globe_inverted.png b/docs/html/images/axis_globe_inverted.png
new file mode 100644
index 0000000..bd78c7f
--- /dev/null
+++ b/docs/html/images/axis_globe_inverted.png
Binary files differ
diff --git a/docs/html/images/screens_support/screens-ranges.png b/docs/html/images/screens_support/screens-ranges.png
index 034ac34..dce6264 100644
--- a/docs/html/images/screens_support/screens-ranges.png
+++ b/docs/html/images/screens_support/screens-ranges.png
Binary files differ
diff --git a/docs/html/images/sdk_manager_packages.png b/docs/html/images/sdk_manager_packages.png
index 463be8f..027cce7 100755
--- a/docs/html/images/sdk_manager_packages.png
+++ b/docs/html/images/sdk_manager_packages.png
Binary files differ
diff --git a/docs/html/images/webapps/compare-default.png b/docs/html/images/webapps/compare-default.png
index 9495a05..129cb33 100644
--- a/docs/html/images/webapps/compare-default.png
+++ b/docs/html/images/webapps/compare-default.png
Binary files differ
diff --git a/docs/html/images/webapps/compare-initialscale-devicedpi.png b/docs/html/images/webapps/compare-initialscale-devicedpi.png
index 6bb758a6..3b0fb6a 100644
--- a/docs/html/images/webapps/compare-initialscale-devicedpi.png
+++ b/docs/html/images/webapps/compare-initialscale-devicedpi.png
Binary files differ
diff --git a/docs/html/images/webapps/compare-initialscale.png b/docs/html/images/webapps/compare-initialscale.png
index 2232d5b..09314bb 100644
--- a/docs/html/images/webapps/compare-initialscale.png
+++ b/docs/html/images/webapps/compare-initialscale.png
Binary files differ
diff --git a/docs/html/images/webapps/compare-width-devicedpi-css.png b/docs/html/images/webapps/compare-width-devicedpi-css.png
index bb4ab31..3efa386 100644
--- a/docs/html/images/webapps/compare-width-devicedpi-css.png
+++ b/docs/html/images/webapps/compare-width-devicedpi-css.png
Binary files differ
diff --git a/docs/html/images/webapps/compare-width400.png b/docs/html/images/webapps/compare-width400.png
index 669a234..d654381 100644
--- a/docs/html/images/webapps/compare-width400.png
+++ b/docs/html/images/webapps/compare-width400.png
Binary files differ
diff --git a/docs/html/images/webapps/webapps.png b/docs/html/images/webapps/webapps.png
new file mode 100644
index 0000000..6ad6205
--- /dev/null
+++ b/docs/html/images/webapps/webapps.png
Binary files differ
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/resources/articles/layout-tricks-reuse.jd b/docs/html/resources/articles/layout-tricks-reuse.jd
index 072ba89..396e2127 100644
--- a/docs/html/resources/articles/layout-tricks-reuse.jd
+++ b/docs/html/resources/articles/layout-tricks-reuse.jd
@@ -53,12 +53,24 @@
 layout; it will also override the id of the included layout if one is defined.
 Similarly, you can override all the layout parameters. This means that any
 <code>android:layout_*</code> attribute can be used with the <code>&lt;include
-/&gt;</code> tag. Here is an example:</p>
+/&gt;</code> tag. Here is an example in
+which the same layout is included twice, but only the first one overrides the layout properties:</p>
 
-<pre class="prettyprint">&lt;include android:layout_width="fill_parent" layout="@layout/image_holder" /&gt;
-&lt;include android:layout_width="256dip" layout="@layout/image_holder" /&gt;
+<pre>
+&lt;!-- override the layout height and width --&gt;
+&lt;include layout="@layout/image_holder"
+    android:layout_height="fill_parent"
+    android:layout_width="fill_parent" /&gt;
+&lt;!-- do not override layout dimensions; inherit them from image_holder --&gt;
+&lt;include layout="@layout/image_holder" /&gt;
 </pre>
 
+<p class="caution"><strong>Caution:</strong> If you want to override the layout dimensions,
+you must override both <code>android:layout_height</code> and
+<code>android:layout_width</code>&mdash;you cannot override only the height or only the width.
+If you override only one, it will not take effect. (Other layout properties, such as weight,
+are still inherited from the source layout.)</p>
+
 <p>This tag is particularly useful when you need to customize only part of your
 UI depending on the device's configuration. For instance, the main layout of
 your activity can be placed in the <code>layout/</code> directory and can
diff --git a/docs/html/resources/dashboard/platform-versions.jd b/docs/html/resources/dashboard/platform-versions.jd
index 3b4ccb0e..cef057e 100644
--- a/docs/html/resources/dashboard/platform-versions.jd
+++ b/docs/html/resources/dashboard/platform-versions.jd
@@ -52,7 +52,7 @@
 <div class="dashboard-panel">
 
 <img alt="" height="250" width="460"
-src="http://chart.apis.google.com/chart?&cht=p&chs=460x250&chd=t:9.7,16.4,0.1,40.4,33.4&chl=
+src="http://chart.apis.google.com/chart?&cht=p&chs=460x250&chd=t:7.9,15.0,0.1,40.8,36.2&chl=
 Android%201.5|Android%201.6|Other*|Android%202.1|Android%202.2&chco=c4df9b,
 6fad0c" />
 
@@ -62,13 +62,13 @@
   <th>API Level</th>
   <th>Distribution</th>
 </tr>
-<tr><td>Android 1.5</td><td>3</td><td>9.7%</td></tr>
-<tr><td>Android 1.6</td><td>4</td><td>16.4%</td></tr>
-<tr><td>Android 2.1</td><td>7</td><td>40.4%</td></tr>
-<tr><td>Android 2.2</td><td>8</td><td>33.4%</td></tr>
+<tr><td>Android 1.5</td><td>3</td><td>7.9%</td></tr>
+<tr><td>Android 1.6</td><td>4</td><td>15.0%</td></tr>
+<tr><td>Android 2.1</td><td>7</td><td>40.8%</td></tr>
+<tr><td>Android 2.2</td><td>8</td><td>36.2%</td></tr>
 </table>
 
-<p><em>Data collected during two weeks ending on October 1, 2010</em></p>
+<p><em>Data collected during two weeks ending on November 1, 2010</em></p>
 <p style="font-size:.9em">* <em>Other: 0.1% of devices running obsolete versions</em></p>
 
 </div><!-- end dashboard-panel -->
@@ -96,19 +96,18 @@
 <div class="dashboard-panel">
 
 <img alt="" height="250" width="660" style="padding:5px;background:#fff"
-src="http://chart.apis.google.com/chart?cht=lc&chs=660x250&chxt=x,y,r&chxr=0,0,12|1,0,100|2,0,100&
-chxl=0:|2010/04/01|04/15|05/01|05/15|06/01|06/15|07/01|07/15|08/01|08/15|09/01|09/15|2010/10/01|1:|0
-%25|25%25|50%25|75%25|100%25|2:|0%25|25%25|50%25|75%25|100%25&chxp=0,0,1,2,3,4,5,6,7,8,9,10,11,12&
-chxtc=0,5&chd=t:99.6,99.6,99.6,99.7,100.6,101.1,99.9,100.0,100.0,99.8,99.9,100.0,100.0|61.5,61.7,62.
-3,63.5,73.0,76.4,78.6,81.1,84.5,86.6,88.0,89.3,90.3|29.4,30.2,32.7,35.3,46.2,51.3,55.1,59.0,64.1,68.
-2,70.4,72.2,73.9|4.0,28.3,32.0,34.9,45.9,51.0,54.9,58.8,64.0,68.1,70.3,72.1,73.8|0.0,0.0,0.0,0.0,0.8
-,1.2,1.8,3.3,4.3,11.3,27.8,32.1,33.4&chm=tAndroid+1.5,7caa36,0,0,15,,t::-5|b,c3df9b,0,1,0|tAndroid+1
-.6,638d23,1,0,15,,t::-5|b,b0db6e,1,2,0|tAndroid+2.0.1,496c13,2,0,15,,t::-5|b,9ddb3d,2,3,0|tAndroid+2
-.1,2f4708,3,1,15,,t:-30:-40|b,89cf19,3,4,0|tAndroid+2.2,131d02,4,9,15,,t::-5|B,6fad0c,4,5,0&chg=7,25
-&chdl=Android+1.5|Android+1.6|Android+2.0.1|Android+2.1|Android+2.2&chco=add274,9ad145,84c323,6ba213
-,507d08" />
+src="http://chart.apis.google.com/chart?&cht=lc&chs=660x250&chxt=x,y,r&chxr=0,0,12|1,0,100|2,0,100&
+chxl=0%3A%7C2010/05/01%7C05/15%7C06/01%7C06/15%7C07/01%7C07/15%7C08/01%7C08/15%7C09/01%7C09/15%7C10/
+01%7C10/15%7C2010/11/01%7C1%3A%7C0%25%7C25%25%7C50%25%7C75%25%7C100%25%7C2%3A%7C0%25%7C25%25%7C50%25
+%7C75%25%7C100%25&chxp=0,0,1,2,3,4,5,6,7,8,9,10,11,12&chxtc=0,5&chd=t:98.9,99.3,100.3,100.8,99.7,99.
+8,99.8,99.7,99.8,99.9,99.9,99.9,99.9|61.6,63.1,72.7,76.1,78.4,80.9,84.3,86.5,87.9,89.2,90.2,91.1,92.
+0|32.0,34.9,45.9,51.0,54.9,58.8,64.0,68.1,70.3,72.1,73.8,75.3,77.0|0.0,0.0,0.8,1.2,1.8,3.3,4.3,11.3,
+27.8,32.1,33.4,34.5,36.2&chm=tAndroid%201.5,7caa36,0,0,15,,t::-5|b,c3df9b,0,1,0|tAndroid%201.6,
+5b831d,1,0,15,,t::-5|b,aadb5e,1,2,0|tAndroid%202.1,38540b,2,0,15,,t::-5|b,91da1e,2,3,0|tAndroid%202.
+2,131d02,3,7,15,,t::-5|B,6fad0c,3,4,0&chg=7,25&chdl=Android%201.5|Android%201.6|Android%202.1|
+Android%202.2&chco=add274,94d134,73ad18,507d08" />
 
-<p><em>Last historical dataset collected during two weeks ending on October 1, 2010</em></p>
+<p><em>Last historical dataset collected during two weeks ending on November 1, 2010</em></p>
 
 
 </div><!-- end dashboard-panel -->
diff --git a/docs/html/resources/faq/framework.jd b/docs/html/resources/faq/framework.jd
index f4b8db0..4a7a3fc 100644
--- a/docs/html/resources/faq/framework.jd
+++ b/docs/html/resources/faq/framework.jd
@@ -68,12 +68,17 @@
 <p>For sharing complex non-persistent user-defined objects for short
 duration, the following approaches are recommended:
 </p>
-  <h4>The android.app.Application class</h4>
-  <p>The android.app.Application is a base class for those who need to
-maintain global application state. It can be accessed via
-getApplication() from any Activity or Service. It has a couple of
-life-cycle methods and will be instantiated by Android automatically if
-your register it in AndroidManifest.xml.</p>
+  <h4>Singleton class</h4>
+  <p>You can take advantage of the fact that your application
+components run in the same process through the use of a singleton.
+This is a class that is designed to have only one instance.  It
+has a static method with a name such as <code>getInstance()</code>
+that returns the instance; the first time this method is called,
+it creates the global instance.  Because all callers get the same
+instance, they can use this as a point of interaction.  For
+example activity A may retrieve the instance and call setValue(3);
+later activity B may retrieve the instance and call getValue() to
+retrieve the last set value.</p>
 
   <h4>A public static field/method</h4>
   <p>An alternate way to make data accessible across Activities/Services is to use <em>public static</em>
@@ -90,18 +95,6 @@
 intent extras. The recipient activity retrieves the object using this
 key.</p>
 
-  <h4>A Singleton class</h4>
-  <p>There are advantages to using a static Singleton, such as you can
-refer to them without casting getApplication() to an
-application-specific class, or going to the trouble of hanging an
-interface on all your Application subclasses so that your various
-modules can refer to that interface instead. </p>
-<p>But, the life cycle of a static is not well under your control; so
-to abide by the life-cycle model, the application class should initiate and
-tear down these static objects in the onCreate() and onTerminate() methods
-of the Application Class</p>
-</p>
-
 <h3>Persistent Objects</h3>
 
 <p>Even while an application appears to continue running, the system
@@ -146,15 +139,11 @@
 <h2>If an Activity starts a remote service, is there any way for the
 Service to pass a message back to the Activity?</h2>
 
-<p>The remote service can define a callback interface and register it with the
-clients to callback into the clients. The 
-{@link android.os.RemoteCallbackList RemoteCallbackList} class provides methods to
-register and unregister clients with the service, and send and receive
-messages.</p>
-
-<p>The sample code for remote service callbacks is given in <a
-href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/RemoteService.html">ApiDemos/RemoteService</a></p>
-
+<p>See the {@link android.app.Service} documentation's for examples of
+how clients can interact with a service.  You can take advantage of the
+fact that your components run in the same process to greatly simplify
+service interaction from the generic remote case, as shown by the "Local
+Service Sample".  In some cases techniques like singletons may also make sense.
 
 
 <a name="6" id="6"></a>
diff --git a/docs/html/resources/resources_toc.cs b/docs/html/resources/resources_toc.cs
index 628287d..ed23c7c 100644
--- a/docs/html/resources/resources_toc.cs
+++ b/docs/html/resources/resources_toc.cs
@@ -202,7 +202,7 @@
               </a></li>
           <li><a href="<?cs var:toroot ?>resources/samples/BackupRestore/index.html">
                 <span class="en">Backup and Restore</span>
-              </a> <span class="new">new!</span></li>
+              </a></li>
           <li><a href="<?cs var:toroot ?>resources/samples/BluetoothChat/index.html">
                 <span class="en">Bluetooth Chat</span>
               </a></li>
@@ -227,6 +227,9 @@
           <li><a href="<?cs var:toroot ?>resources/samples/MultiResolution/index.html">
                 <span class="en">Multiple Resolutions</span>
               </a></li>
+          <li><a href="<?cs var:toroot ?>resources/samples/NFCDemo/index.html">
+                <span class="en">NFCDemo</span>
+                </a> <span class="new">new!</span></li>
           <li><a href="<?cs var:toroot ?>resources/samples/NotePad/index.html">
                 <span class="en">Note Pad</span>
               </a></li>
@@ -235,7 +238,10 @@
               </a></li>
           <li><a href="<?cs var:toroot ?>resources/samples/SearchableDictionary/index.html">
                 <span class="en">Searchable Dictionary v2</span>
-              </a> <span class="new">new!</span></li>
+              </a></li>
+	  <li><a href="<?cs var:toroot ?>resources/samples/SipDemo/index.html">
+	        <span class="en">SIP Demo</span>
+	      </a> <span class="new">new!</span></li>
           <li><a href="<?cs var:toroot ?>resources/samples/Snake/index.html">
                 <span class="en">Snake</span>
               </a></li>
@@ -244,16 +250,16 @@
               </a></li>
           <li><a href="<?cs var:toroot ?>resources/samples/Spinner/index.html">
                 <span class="en">Spinner</span>
-                </a> <span class="new">new!</span></li>
+                </a></li>
           <li><a href="<?cs var:toroot ?>resources/samples/SpinnerTest/index.html">
                 <span class="en">SpinnerTest</span>
-                </a> <span class="new">new!</span></li>
+                </a></li>
           <li><a href="<?cs var:toroot ?>resources/samples/TicTacToeLib/index.html">
                 <span class="en">TicTacToeLib</span>
-                </a> <span class="new">new!</span></li>
+                </a></li>
           <li><a href="<?cs var:toroot ?>resources/samples/TicTacToeMain/index.html">
                 <span class="en">TicTacToeMain</span>
-                </a> <span class="new">new!</span></li>
+                </a></li>
           <li><a href="<?cs var:toroot ?>resources/samples/Wiktionary/index.html">
                 <span class="en">Wiktionary</span>
               </a></li>
diff --git a/docs/html/resources/samples/images/NfcDemo.png b/docs/html/resources/samples/images/NfcDemo.png
new file mode 100644
index 0000000..c175d12
--- /dev/null
+++ b/docs/html/resources/samples/images/NfcDemo.png
Binary files differ
diff --git a/docs/html/resources/samples/images/SipDemo.png b/docs/html/resources/samples/images/SipDemo.png
new file mode 100755
index 0000000..999bea9
--- /dev/null
+++ b/docs/html/resources/samples/images/SipDemo.png
Binary files differ
diff --git a/docs/html/resources/samples/index.jd b/docs/html/resources/samples/index.jd
index 9fc8e0bf..5749728 100644
--- a/docs/html/resources/samples/index.jd
+++ b/docs/html/resources/samples/index.jd
@@ -58,6 +58,9 @@
   <dd>A sample application that shows how to use resource directory qualifiers to
   provide different resources for different screen configurations.</dd>
 
+ <dt><a href="NFCDemo/index.html">NFCDemo</a></dt>
+  <dd>An application for reading NFC Forum Type 2 Tags using platform NFC apis.</a>.</dd>
+
  <dt><a href="NotePad/index.html">Note Pad</a></dt>
   <dd>An application for saving notes. Similar (but not identical) to the 
     <a href="{@docRoot}resources/tutorials/notepad/index.html">Notepad tutorial</a>.</dd>
@@ -73,6 +76,10 @@
   <dd>A sample application that demonstrates Android's search framework, 
   including how to provide search suggestions for Quick Search Box.</dd>
 
+ <dt><a href="SipDemo/index.html">SIP Demo</a></dt>
+ <dd>An application that demonstrates how to make an internet-based call using the SIP
+ API.</dd>
+
  <dt><a href="Snake/index.html">Snake</a></dt>
   <dd>An implementation of the classic game "Snake."</dd>
 
diff --git a/docs/html/sdk/adding-components.jd b/docs/html/sdk/adding-components.jd
index 755f200..d2e55d8 100644
--- a/docs/html/sdk/adding-components.jd
+++ b/docs/html/sdk/adding-components.jd
@@ -22,11 +22,9 @@
 </div>
 </div>
 
-<p>Adding and updating components in your Android SDK is fast and easy. To
-perform an update, use the <strong>Android SDK and AVD Manager</strong> to
-install or update the individual SDK components that you need. The Android SDK
-and AVD Manager tool is included in the <a href="index.html">Android SDK
-download</a>.</p>
+<p>Adding and updating components in your Android SDK is fast and easy. To add or
+update the individual SDK components that you need, use the <em>Android SDK and AVD
+Manager</em> (included in the SDK Tools).</p>
 
 <p>It only takes a couple of clicks to install individual versions of the
 Android platform, new development tools, new documentation, and SDK add-ons. The
@@ -34,32 +32,17 @@
 so you don't need to update your development environment to specify a new SDK
 location.</p>
 
-<p>Because each version of the Android platform can be installed as an
-individual component of your SDK, you can customize your development environment
-to the Android platforms you are targetting. Testing your app on multiple
-versions of the platform is very important in order to successfully operate on
-as many devices as possible. Be sure to install each version of the Android
-platform with which your app is compatible, then test your apps on <a
-href="{@docRoot}guide/developing/tools/avd.html">AVDs</a> that run each
-platform.</p>
+<p>If you're setting up your Android SDK for the first time,
+see <a href="{@docRoot}sdk/installing.html#components">Installing the SDK</a> for information about
+what components to install.</p>
 
-<p>If you are just getting started and you are not sure what components to install,
-see <a href="installing.html#components">Adding Platforms and Other
-Components</a> for information. </p>
+<p class="note"><strong>Note:</strong> If you develop in Eclipse, you might also need
+to update your ADT plugin when you update your development tools. See the revisions listed in the
+<a href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin for Eclipse</a> document.</p>
 
-<p>If you develop applications using Eclipse, you may also need to update your
-ADT plugin when you update your development tools, in order to compile against
-a new version of the platform. See the revisions listed in the <a
-href="{@docRoot}sdk/tools-notes.html">SDK Tools</a> document for ADT
-Plugin compatibility.</p>
-
-<div style="TEXT-ALIGN:left; width:600px;">
-<img src="{@docRoot}images/sdk_manager_packages.png"
-style="padding-bottom:0;margin-bottom:0;" />
-<p class="caption" style="margin:0 0 1.5em 1em;padding:0 0 0
-1em;"><strong>Figure 1.</strong> The Android SDK and AVD Manager's
-<strong>Available Packages</strong>
-panel, which shows the SDK components that are
+<img src="{@docRoot}images/sdk_manager_packages.png" alt="" />
+<p class="img-caption"><strong>Figure 1.</strong> The Android SDK and AVD Manager's
+<strong>Available Packages</strong> panel, which shows the SDK components that are
 available for you to download into your environment. </p>
 </div>
 
@@ -68,13 +51,7 @@
 <p>The Android SDK and AVD Manager is the tool that you use to install and
 upgrade SDK components in your development environment. </p>
 
-<p>You can access the tool in any of three ways:</p>
-<ul>
-<li>If you are developing in the Eclipse IDE with the ADT Plugin, you can access
-the tool directly from the Eclipse UI.</li>
-<li>On Windows only, you can launch he tool by double-clicking a script file.</li>
-<li>In all environments, you can access the tool from a command line.</li>
-</ul>
+<p>You can launch the Android SDK and AVD Manager in one of the following ways.</p>
 
 <h4>Launching from Eclipse/ADT</h4>
 
@@ -121,20 +98,20 @@
   This will reveal all of the components that are currently available for download
   from the SDK repository.</li>
   <li>Select the component(s) you'd like to install and click <strong>Install
-  Selected</strong>. If you aren't sure which packages to select, read <a
-  href="installing.html#which">Which components do I need?</a>.</li>
-  <li>Verify and accept the components you want and click <strong>Install
-  Accepted</strong>. The components will now be installed into your existing
-  Android SDK directories.</li>
+  Selected</strong>. (If you aren't sure which packages to select, read <a
+  href="installing.html#which">Recommended Components</a>.)</li>
+  <li>Verify and accept the components you want (ensure each one is selected with a green
+checkmark) and click <strong>Install</strong>. The components will now be installed into
+your existing Android SDK directories.</li>
 </ol>
 
 <p>New platforms are automatically saved into the
-<code>&lt;<em>sdk</em>&gt;/platforms/</code> directory of your SDK;
-new add-ons are saved in the <code>&lt;<em>sdk</em>&gt;/add-ons/</code>
+<code>&lt;sdk&gt;/platforms/</code> directory of your SDK;
+new add-ons are saved in the <code>&lt;sdk&gt;/add-ons/</code>
 directory; samples are saved in the
-<code>&lt;<em>sdk</em>&gt;/samples/android-&lt;<em>level</em>&gt;/</code>;
+<code>&lt;sdk&gt;/samples/android-&lt;level&gt;/</code>;
 and new documentation is saved in the existing
-<code>&lt;<em>sdk</em>&gt;/docs/</code> directory (old docs are replaced).</p>
+<code>&lt;sdk&gt;/docs/</code> directory (old docs are replaced).</p>
 
 
 <h2 id="UpdatingComponents">Updating SDK Components</h2>
@@ -173,27 +150,32 @@
 
 <p>For example, there may be a dependency between the ADT Plugin for Eclipse and
 the SDK Tools component. When you install the SDK Tools
-component, you would then need to upgrade to the required version of ADT (if you
-are developing in Eclipse). In this case, you would find dependencies listed in
-"Revisions" section of the <a href="{@docRoot}sdk/eclipse-adt.html#notes">ADT
-Plugin Notes</a> and <a href="{@docRoot}sdk/tools-notes.html#notes">SDK Tools
-Notes</a> documents. </p>
+component, you should also upgrade to the required version of ADT (if you
+are developing in Eclipse). In this case,  the major version number for your ADT plugin should
+always match the revision number of your SDK Tools (for example, ADT 8.x requires SDK Tools r8).
+</p>
 
-<p>Additionally, the development tools will notify you with debug warnings
-if there is dependency that you need to address. </p>
+<p>Also make sure that, each time you install a new version of the Android platform, you have
+the latest version of the SDK Platform-tools component. The SDK Platform-tools contain
+tools that are backward compatible with all versions of the Android platform and are
+often updated to support new features in the latest version of the Android platform.</p>
+
+<p>The development tools will notify you with debug warnings if there is dependency that you need to
+address. The SDK and AVD Manager also enforces dependencies by requiring that you download any
+components that are needed by those you have selected.</p>
 
 
 <h2 id="AddingSites">Adding New Sites</h2>
 
-<p>By default, <strong>Available Packages</strong> only shows the default
-repository site, which offers platforms, SDK tools, documentation, the
-Google APIs Add-on, and other components. You can add other sites that host
+<p>By default, <strong>Available Packages</strong> displays components available from the
+<em>Android Repository</em> and <em>Third party Add-ons</em>. You can add other sites that host
 their own Android SDK add-ons, then download the SDK add-ons
 from those sites.</p>
 
 <p>For example, a mobile carrier or device manufacturer might offer additional
 API libraries that are supported by their own Android-powered devices. In order
-to develop using their libraries, you must install their Android SDK add-on. </p>
+to develop using their libraries, you must install their Android SDK add-on, if it's not already
+available under <em>Third party Add-ons</em>. </p>
 
 <p>If a carrier or device manufacturer has hosted an SDK add-on repository file
 on their web site, follow these steps to add their site to the SDK and AVD
@@ -201,11 +183,12 @@
 
 <ol>
   <li>Select <strong>Available Packages</strong> in the left panel.</li>
-  <li>Click <strong>Add Site</strong> and enter the URL of the
+  <li>Click <strong>Add Add-on Site</strong> and enter the URL of the
 {@code repository.xml} file. Click <strong>OK</strong>.</li>
 </ol>
-<p>Any SDK components available from the site will now be listed under
-<strong>Available Packages</strong>.</p>
+<p>Any SDK components available from the site will now be listed under a new item named
+<strong>User Add-ons</strong>.</p>
+
 
 <h2 id="troubleshooting">Troubleshooting</h2>
 
diff --git a/docs/html/sdk/adt_download.jd b/docs/html/sdk/adt_download.jd
index 3da576a..33e480a 100644
--- a/docs/html/sdk/adt_download.jd
+++ b/docs/html/sdk/adt_download.jd
@@ -22,6 +22,13 @@
     <th>Notes</th>
   </tr>
   <tr>
+     <td>8.0.0</td>
+     <td><a href="http://dl-ssl.google.com/android/ADT-8.0.0.zip">ADT-8.0.0.zip</a></td>
+     <td><nobr> bytes</nobr></td>
+     <td></td>
+     <td>Requires SDK Tools, Revision 8 <em><nobr>November 2010</nobr></em></td>
+  </tr>
+  <tr>
      <td>0.9.9</td>
      <td><a href="http://dl-ssl.google.com/android/ADT-0.9.9.zip">ADT-0.9.9.zip</a></td>
      <td><nobr>8301681 bytes</nobr></td>
diff --git a/docs/html/sdk/eclipse-adt.jd b/docs/html/sdk/eclipse-adt.jd
index 9f3c8b0..8f6f518 100644
--- a/docs/html/sdk/eclipse-adt.jd
+++ b/docs/html/sdk/eclipse-adt.jd
@@ -22,13 +22,12 @@
       </ol>
     </li>
     <li><a href="#updating">Updating the ADT Plugin</a></li>
-    <li><a href="#uninstalling">Uninstalling the ADT Plugin</a></li>
   </ol>
 
 </div>
 </div>
 
-<p>Android Development Tools (ADT) is a plugin for the Eclipse IDE 
+<p>Android Development Tools (ADT) is a plugin for the Eclipse IDE
 that is designed to give you a powerful, integrated environment in which
 to build Android applications. </p>
 
@@ -48,13 +47,10 @@
 Eclipse IDE and the Android SDK installed. For details, make sure to read <a
 href="#installing">Installing the ADT Plugin</a>, below. </p>
 
-<p>If you are already using ADT, this document also provides instructions on 
+<p>If you are already using ADT, this document also provides instructions on
 how to update ADT to the latest version or how to uninstall it, if necessary.
 </p>
 
-<p class="caution"><strong>Caution:</strong> There are known issues with the ADT plugin running with
-Eclipse 3.6. Please stay on 3.5 until further notice.</p>
-
 <h2 id="notes">Revisions</h2>
 
 <p>The sections below provide notes about successive releases of
@@ -103,12 +99,54 @@
 <div class="toggleable opened">
   <a href="#" onclick="return toggleDiv(this)">
         <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px" width="9px" />
-ADT 0.9.9</a> <em>(September 2010)</em>
+ADT 8.0.0</a> <em>(December 2010)</em>
   <div class="toggleme">
 
+<dl>
 
+<dt>Dependencies:</dt>
+
+<p><p>ADT 8.0.0 is designed for use with SDK Tools r8. If you haven't
+already installed SDK Tools r8 into your SDK, use the Android SDK and AVD Manager to do
+so.</p></dd>
+
+<dt>General notes:</dt>
+<dd>
+<ul>
+  <li>New version number scheme that follows the SDK Tools revision number. The major version
+number for your ADT plugin should now always match the revision number of your SDK Tools. For
+example, ADT 8.x is for SDK Tools r8.</li>
+  <li>Support for true debug build. You no longer need to change the value of the
+   <code>debuggable</code> attribute in the Android Manifest.
+  <p>Incremental builds automatically insert <code>debuggable="true"</code>, but if you perform
+  "export signed/unsigned application package", ADT does <em>not</em> insert it.
+  If you manually set <code>debuggable="true"</code> in the manifest file, then release builds will
+  actually create a debug build (it does not remove it if you placed it there).</p></li>
+  <li>Automatic <a href="{@docRoot}guide/developing/tools/proguard.html">Proguard</a> support in
+release builds. For it to work, you need to have a <code>proguard.config</code>
+  property in the <code>default.properties</code> file that points to a proguard config file.</li>
+  <li>Completely rewritten Visual Layout Editor. (This is still a work in progress.) Now includes:
+    <ul>
+      <li>Full drag and drop from palette to layout for all Layout classes.</li>
+      <li>Move widgets inside a Layout view, from one Layout view to another and from one layout file to another.</li>
+      <li>Contextual menu with enum/flag type properties.</li>
+      <li>New zoom controls.</li>
+    </ul></li>
+  <li>New HierarchyViewer plug-in integrated in Eclipse.</li>
+  <li>Android launch configurations don't recompile the whole workspace on launch anymore.</li>
+  <li><code>android.jar</code> source and javadoc location can now be configured.</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" />
+ADT 0.9.9</a> <em>(September 2010)</em>
+  <div class="toggleme">
 
 <dl>
 
@@ -156,7 +194,7 @@
 called <code>src/</code>. There is now support for any number of source folders,
 with no name restriction. They can even be in subfolder such as
 <code>src/java</code>. If you are already working with library projects created
-in ADT 0.9.7, see <a 
+in ADT 0.9.7, see <a
 href="{@docRoot}guide/developing/eclipse-adt.html#libraryMigrating">Migrating
 library projects to ADT 0.9.8</a> for important information about moving
 to the new ADT environment.</li>
@@ -166,7 +204,7 @@
 <code>car</code>/<code>desk</code>, <code>night</code>/<code>notnight</code> and
 <code>navexposed</code>/<code>navhidden</code>.</li>
 <li>Adds more device screen types in the layout editor. All screen
-resolution/density combinations listed in the <a 
+resolution/density combinations listed in the <a
 href="{@docRoot}guide/practices/screens_support.html#range">Supporting
 Multiple Screens</a> are now available.</li>
 <li>Fixes problems with handling of library project names that
@@ -195,10 +233,10 @@
 library project from other Android projects and, at build time, the tools
 compile the shared code and resources as part of the dependent applications.
 More information about this feature is available in the <a
-href="{@docRoot}guide/developing/eclipse-adt.html#libraryProject">Developing 
+href="{@docRoot}guide/developing/eclipse-adt.html#libraryProject">Developing
 in Eclipse with ADT</a> document. </p>
-<p>If you are not developing in Eclipse, <a 
-href="tools-notes.html">SDK Tools r6</a> provides the equivalent library 
+<p>If you are not developing in Eclipse, <a
+href="tools-notes.html">SDK Tools r6</a> provides the equivalent library
 project support through the Ant build system.</p>
 </dd>
 </dl>
@@ -215,7 +253,7 @@
 <dl>
 <dt>Dependencies:</dt>
 
-<dd><p>ADT 0.9.6 is designed for use with SDK Tools r5 and later. Before 
+<dd><p>ADT 0.9.6 is designed for use with SDK Tools r5 and later. Before
 updating to ADT 0.9.6, we highly recommend that you use the Android SDK and
 AVD Manager to install SDK Tools r5 into your SDK.</p></dd>
 
@@ -339,7 +377,7 @@
 <ul>
 <li>Includes the improvements from the standlone DDMS, revision 3.</li>
 <li>Adds an option to open HPROF files into eclipse instead of writing them on
-disk. If a profiler such as MAT (<a href="http://eclipse.org/mat">Memory Analyzer 
+disk. If a profiler such as MAT (<a href="http://eclipse.org/mat">Memory Analyzer
 Tool</a>) is installed, it'll open the file.</li>
 </ul>
 </dd>
@@ -347,7 +385,7 @@
 <dt>Android SDK and AVD Manager integration:</dt>
 <dd>
 <ul>
-<li>Includes the improvements from the standalone Android SDK and AVD Manager, 
+<li>Includes the improvements from the standalone Android SDK and AVD Manager,
 revision 3.</li>
 </ul>
 </dd>
@@ -355,12 +393,15 @@
  </div>
 </div>
 
+
+
 <h2 id="installing">Installing the ADT Plugin</h2>
 
 <p>The sections below provide instructions on how to download and install
 ADT into your Eclipse environment. If you encounter problems, see the <a
 href="#troubleshooting">Troubleshooting</a> section.</p>
 
+
 <h3 id="preparing">Preparing Your Development Computer</h3>
 
 <p>ADT is a plugin for the Eclipse IDE. Before you can install or use ADT,
@@ -379,7 +420,8 @@
 "http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a>
 </p>
 
-<p>A Java or RCP version of Eclipse is recommended.</p></li>
+<p>For Eclipse 3.5 or newer, the "Eclipse Classic" version is recommended. Otherwise, a Java or RCP
+version of Eclipse is recommended.</p></li>
 </ul>
 
 <p>Additionally, before you can configure or use ADT, you must install the
@@ -403,55 +445,52 @@
 environment. </p>
 
 <table style="font-size:100%">
-<tr><th>Eclipse 3.4 (Ganymede)</th><th>Eclipse 3.5 (Galileo)</th></tr>
+<tr><th>Eclipse 3.5 (Galileo) and 3.6 (Helios)</th><th>Eclipse 3.4 (Ganymede)</th></tr>
 <tr>
 <td width="45%">
-<!-- 3.4 steps -->
+<!-- 3.5+ steps -->
 <ol>
-    <li>Start Eclipse, then select <strong>Help</strong> &gt; <strong>Software Updates...</strong>. 
-        In the dialog that appears, click the <strong>Available Software</strong> tab. </li>
-    <li>Click <strong>Add Site...</strong> </li>
-    <li>In the Add Site dialog that appears, enter this URL in the "Location" field:
-      <pre style="margin-left:0">https://dl-ssl.google.com/android/eclipse/</pre>
+    <li>Start Eclipse, then select <strong>Help</strong> &gt; <strong>Install New
+Software...</strong>.</li>
+    <li>Click <strong>Add</strong>, in the top-right corner.</li>
+    <li>In the Add Repository dialog that appears, enter "ADT Plugin" for the <em>Name</em> and the
+following URL for the <em>Location</em>:
+      <pre>https://dl-ssl.google.com/android/eclipse/</pre>
         <p>Note: If you have trouble acquiring the plugin, try using "http" in the Location URL,
-        instead of "https" (https is preferred for security reasons).</p>   
+        instead of "https" (https is preferred for security reasons).</p>
       <p>Click <strong>OK</strong>.</p></li>
-    <li>Back in the Available Software view, you should see the plugin listed by the URL,
-    with "Developer Tools" nested within it. Select the checkbox next to 
-      Developer Tools and click <strong>Install...</strong></li>
-    <li>On the subsequent Install window, "Android DDMS" and "Android Development Tools"
-    should both be checked. Click <strong>Next</strong>. </li>
-    <li>Read and accept the license agreement, then click <strong>Finish</strong>.</li>
-    <li>Restart Eclipse. </li>
+    <li>In the Available Software dialog, select
+the checkbox next to Developer Tools and click <strong>Next</strong>.</li>
+    <li>In the next window, you'll see a list of the tools to be downloaded. Click
+<strong>Next</strong>. </li>
+    <li>Read and accept the license agreements, then click <strong>Finish</strong>.</li>
+    <li>When the installation completes, restart Eclipse. </li>
 </ol>
 
 </td>
-<td>
-<!-- 3.5 steps -->
+<td width="50%">
+
+<!-- 3.4 steps -->
 <ol>
-    <li>Start Eclipse, then select <strong>Help</strong> &gt; <strong>Install
-        New Software</strong>. </li>
-    <li>In the Available Software dialog, click <strong>Add...</strong>.</li>
-    <li>In the Add Site dialog that appears, enter a name for the remote site
-        (for example, "Android Plugin") in the "Name" field. 
-        <p>In the "Location" field, enter this URL:</p>
+    <li>Start Eclipse, then select <strong>Help</strong> &gt; <strong>Software Updates...</strong>.
+In the dialog that appears, click the <strong>Available Software</strong> tab.</li>
+    <li>Click <strong>Add Site</strong>.</li>
+    <li>In the Add Site dialog that appears, enter this URL in the "Location" field:
         <pre>https://dl-ssl.google.com/android/eclipse/</pre>
         <p>Note: If you have trouble acquiring the plugin, you can try
-           using "http" in the URL, instead of "https" (https is preferred for 
+           using "http" in the URL, instead of "https" (https is preferred for
            security reasons).</p>
         <p>Click <strong>OK</strong>.</p>
     </li>
-    <li>Back in the Available Software view, you should now see "Developer
-        Tools" added to the list. Select the checkbox next to Developer Tools, 
-        which will automatically select the nested tools Android DDMS and Android 
-        Development Tools. 
-        Click <strong>Next</strong>. </li>
-    <li>In the resulting Install Details dialog, the Android DDMS and Android 
-        Development Tools features are listed. Click <strong>Next</strong> to 
-        read and accept the license agreement and install any dependencies, 
-        then click <strong>Finish</strong>. </li>
-    <li>Restart Eclipse. </li>
-	
+    <li>Back in the Available Software view, you should see the plugin listed by the URL,
+       with "Developer Tools" nested within it. Select the checkbox next to Developer Tools,
+        which will automatically select the nested tools. Then click
+        <strong>Install</strong></li>
+    <li>On the subsequent Install window, all of the included tools
+        should be checked. Click <strong>Next</strong>. </li>
+    <li>Read and accept the license agreements, then click <strong>Finish</strong>.</li>
+    <li>When the installation completes, restart Eclipse. </li>
+
 </ol>
 </td>
 </tr>
@@ -466,15 +505,15 @@
     <li>Select <strong>Window</strong> &gt; <strong>Preferences...</strong> to open the Preferences
         panel (Mac OS X: <strong>Eclipse</strong> &gt; <strong>Preferences</strong>).</li>
     <li>Select <strong>Android</strong> from the left panel. </li>
-    <li>For the <em>SDK Location</em> in the main panel, click <strong>Browse...</strong> and 
+    <li>For the <em>SDK Location</em> in the main panel, click <strong>Browse...</strong> and
         locate your downloaded SDK directory. </li>
     <li>Click <strong>Apply</strong>, then <strong>OK</strong>.</li>
 </ol>
 
 <p>Done! If you haven't encountered any problems, then the installation is
-complete. Now read <a href="installing.html#components">Adding Platforms and
-Other Components</a> for instructions on how to complete the setup of your 
-SDK environment. </p>
+complete. If you're installing the Android SDK for the first time, return to <a
+href="{@docRoot}sdk/installing.html#InstallingADT">Installing the SDK</a> to complete your setup.
+</p>
 
 
 <h3 id="troubleshooting">Troubleshooting ADT Installation</h3>
@@ -486,9 +525,9 @@
   <li>If Eclipse can not find the remote update site containing the ADT plugin,
 try changing the remote site URL to use http, rather than https. That is, set
 the Location for the remote site to:
-<pre>http://dl-ssl.google.com/android/eclipse/</pre></li> 
+<pre>http://dl-ssl.google.com/android/eclipse/</pre></li>
 <li>If you are behind a firewall (such as a corporate firewall), make sure that
-you have properly configured your proxy settings in Eclipse. In Eclipse 3.3/3.4,
+you have properly configured your proxy settings in Eclipse. In Eclipse,
 you can configure proxy information from the main Eclipse menu in
 <strong>Window</strong> (on Mac OS X, <strong>Eclipse</strong>) &gt;
 <strong>Preferences</strong> &gt; <strong>General</strong> &gt; <strong>Network
@@ -521,14 +560,14 @@
 </li>
 
 </li>
-  <li>Follow steps 1 and 2 in the <a href="#installing">default install 
+  <li>Follow steps 1 and 2 in the <a href="#installing">default install
       instructions</a> (above).</li>
   <li>In the Add Site dialog, click <strong>Archive</strong>.</li>
   <li>Browse and select the downloaded zip file.</li>
-  <li>In Eclipse 3.5 only, enter a name for the local update site (e.g.,
+  <li>Enter a name for the local update site (e.g.,
       "Android Plugin") in the "Name" field.</li>
   <li>Click <strong>OK</strong>.
-  <li>Follow the remaining procedures as listed for 
+  <li>Follow the remaining procedures as listed for
       <a href="#installing">default installation</a> above,
       starting from step 4.</li>
 </ol>
@@ -538,16 +577,16 @@
 
 <h4>Other install errors</h4>
 
-<p>Note that there are features of ADT that require some optional 
-Eclipse components (for example, WST). If you encounter an error when 
-installing ADT, your Eclipse installion might not include these components. 
-For information about how to quickly add the necessary components to your 
-Eclipse installation, see the troubleshooting topic 
-<a href="{@docRoot}resources/faq/troubleshooting.html#installeclipsecomponents">ADT 
+<p>Note that there are features of ADT that require some optional
+Eclipse components (for example, WST). If you encounter an error when
+installing ADT, your Eclipse installion might not include these components.
+For information about how to quickly add the necessary components to your
+Eclipse installation, see the troubleshooting topic
+<a href="{@docRoot}resources/faq/troubleshooting.html#installeclipsecomponents">ADT
 Installation Error: "requires plug-in org.eclipse.wst.sse.ui"</a>.</p>
 
 <h4>For Linux users</h4>
-<p>If you encounter this error when installing the ADT Plugin for Eclipse: 
+<p>If you encounter this error when installing the ADT Plugin for Eclipse:
 <pre>
 An error occurred during provisioning.
 Cannot connect to keystore.
@@ -572,48 +611,43 @@
 
 <p>To learn about new features of each ADT revision and also any dependencies on
 the SDK Tools, see the listings in the <a href="#notes">Revisions</a>
-section. To determine the version currently installed, open the 
+section. To determine the version currently installed, open the
 Eclipse Installed Software window using <strong>Help</strong>
-&gt; <strong>Software Updates</strong> and refer to the version listed for 
+&gt; <strong>Software Updates</strong> and refer to the version listed for
 "Android Development Tools".</p>
 
-<p>Follow the steps below to check whether an update is available and, if so, 
+<p>Follow the steps below to check whether an update is available and, if so,
 to install it. </p>
 
 <table style="font-size:100%">
-<tr><th>Eclipse 3.4 (Ganymede)</th><th>Eclipse 3.5 (Galileo)</th></tr>
+<tr><th>Eclipse 3.5 (Galileo) and 3.6 (Helios)</th><th>Eclipse 3.4 (Ganymede)</th></tr>
 <tr>
+<td>
+<!-- 3.5+ steps -->
+<ol>
+    <li>Select <strong>Help</strong> &gt; <strong>Check for Updates</strong>.
+      <p>If there are no updates available, a dialog will say so and you're done.</p></li>
+    <li>If there are updates available, select Android DDMS, Android Development Tools,
+      and Android Hierarchy Viewer, then click <strong>Next</strong>.</li>
+    <li>In the Update Details dialog, click <strong>Next</strong>.</li>
+    <li>Read and accept the license agreement and then click <strong>Finish</strong>.
+      This will download and install the latest version of Android DDMS and
+      Android Development Tools.</li>
+    <li>Restart Eclipse.</li>
+</ol>
+</td>
+
 <td width="50%">
 <!-- 3.4 steps -->
 <ol>
     <li>Select <strong>Help</strong> &gt; <strong>Software Updates</strong>.</li>
     <li>Select the <strong>Available Software</strong> tab.</li>
-    <li>Select the checkboxes next to Android DDMS and Android Developer Tools, 
-      then click  <strong>Update</strong>.</li>
-    <li>In the resulting Available Updates dialog, ensure that both Android DDMS 
-      and Android Development Tools are selected, then click 
-      <strong>Next</strong>.</li>
+    <li>If there are updates available, select Android DDMS, Android Development Tools,
+      and Android Hierarchy Viewer, then click <strong>Update</strong>.</li>
+    <li>In the resulting Available Updates dialog, ensure that each of the listed tools
+      are selected, then click <strong>Next</strong>.</li>
     <li>Read and accept the license agreement and then click <strong>Finish</strong>.
-      This will download and install the latest version of Android DDMS and 
-      Android Development Tools.</li>
-    <li>Restart Eclipse.</li>
-</ol>
-</td>
-<td>
-<!-- 3.5 steps -->
-<ol>
-    <li>Select <strong>Help</strong> &gt; <strong>Check for Updates</strong>. </li>
-    <li>In the resulting Available Updates dialog, locate the Android DDMS and 
-        Android Development Tools features in the list and ensure that the checkboxes
-        next to them are selected. Click <strong>Next</strong>. 
-        <p>If the Available Updates dialog does not list Android DDMS and Android 
-           Development tools, make sure that you have set up a remote update site 
-           for them, as described in 
-           <a href="#installing">Installing the ADT Plugin</a>. 
-        </p></li>
-    <li>In the Update Details dialog, click <strong>Next</strong>.</li>
-    <li>Read and accept the license agreement and then click <strong>Finish</strong>.
-      This will download and install the latest version of Android DDMS and 
+      This will download and install the latest version of Android DDMS and
       Android Development Tools.</li>
     <li>Restart Eclipse.</li>
 </ol>
@@ -622,45 +656,10 @@
 </table>
 
 
-<p>If you encounter problems during the update of ADT, you 
+<p>If you encounter problems during the update of ADT, you
 can try removing the existing ADT plugin and then performing a fresh
 installation. To remove the plugin, follow the instructions in <a
-href="#uninstalling">Uninstalling the ADT Plugin</a>, below. To reinstall 
+href="#uninstalling">Uninstalling the ADT Plugin</a>, below. To reinstall
 the plugin, follow the instructions in <a
 href="#installing">Installing the ADT Plugin</a>, above.</p>
 
-
-<h2 id="uninstalling">Uninstalling the ADT plugin</h2>
-
-<p><p>If you encounter problems when installing or updating ADT, you 
-can try removing the existing ADT plugin and then performing a fresh
-installation. To remove ADT, follow these steps: </p>
-
-<table style="font-size:100%">
-<tr><th>Eclipse 3.4 (Ganymede)</th><th>Eclipse 3.5 (Galileo)</th></tr>
-<tr>
-<td width="50%">
-<!-- 3.4 steps -->
-<ol>
-    <li>Select <strong>Help</strong> &gt; <strong>Software Updates</strong> &gt; 
-      <strong>Manage Configuration</strong>. </li>
-    <li>Expand the list in the left panel to reveal the installed tools.</li>
-    <li>Right-click "Android Editors" and click <strong>Uninstall</strong>. Click <strong>OK</strong> 
-    to confirm.</li>
-    <li>Restart Eclipse. 
-      <p>(Do not uninstall "Android Development Tools".)</p></li>
-</ol>
-</td>
-<td>
-<!-- 3.5 steps -->
-<ol>
-    <li>Select <strong>Help</strong> &gt; <strong>Install New Software</strong>.</li>
-    <li>In the "Details" panel, click the "What is already installed?" link.</li>
-    <li>In the <strong>Eclipse Installation Details</strong> dialog, select "Android DDMS" and "Android Development Tools" and then click <strong>Uninstall</strong>.</li>
-    <li>In the next window, confirm that the ADT features are selected for uninstall and then click <strong>Finish</strong> to uninstall.</li>
-    <li>Restart Eclipse.</li>
-</ol>
-</td>
-</tr>
-</table>
-
diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd
index 2e59801..8b77303 100644
--- a/docs/html/sdk/index.jd
+++ b/docs/html/sdk/index.jd
@@ -19,52 +19,16 @@
 
 @jd:body
 
+<p>Here's an overview of the steps you must follow to set up the Android SDK:</p>
 
-<h2 id="quickstart">Quick Start</h2>
+<ol>
+  <li>Prepare your development computer and ensure it meets the system requirements.</li>
+  <li>Install the SDK starter package from the table above. (If you're on Windows, download the
+installer for help with the initial setup.)</li>
+  <li>Install the ADT Plugin for Eclipse (if you'll be developing in Eclipse).</li>
+  <li>Add Android platforms and other components to your SDK.</li>
+  <li>Explore the contents of the Android SDK (optional).</li>
+</ol>
 
-<p><strong>1. Prepare your development computer</strong></p>
-
-<p>Read the <a href="{@docRoot}sdk/requirements.html">System Requirements</a>
-document and make sure that your development computer meets the hardware and
-software requirements for the Android SDK. Install any additional software
-needed before downloading the Android SDK. In particular, you may need to
-install the <a href="http://java.sun.com/javase/downloads/index.jsp">JDK</a>
- (version 5 or 6 required) and <a href="http://www.eclipse.org/downloads/">Eclipse</a>
- (version 3.4 or 3.5, needed only if you want develop using the ADT Plugin).
-
-<p><strong>2. Download and install the SDK starter package</strong></p>
-
-<p>Download a starter package from the table above onto your development computer.
-If you're using Windows, we recommend that you download the installer (the {@code .exe} file),
-which will launch a Wizard to guide you through the installation and check your computer for
-required software. Otherwise, download the SDK starter package ({@code .zip} or {@code .tgz})
-appropriate for your system, unpack it to a safe location, then add the location to your PATH
-environment variable. </p>
-
-<p><strong>3. Install the ADT Plugin for Eclipse</strong></p>
-
-<p>If you are developing in Eclipse, add a new remote update site with the URL
-<code>https://dl-ssl.google.com/android/eclipse/</code>. Install the Android
-Development Tools (ADT) Plugin from that site, restart Eclipse, and set the "Android"
-preferences in Eclipse to point to the Android SDK directory (installed in the previous step). For
-detailed instructions to setup Eclipse, see <a href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin
-for Eclipse</a>.</p>
-
-<p><strong>4. Add Android platforms and other components to your SDK</strong></p>
-
-<p>Launch the <em>Android SDK and AVD Manager</em> by executing {@code SDK Manager.exe} (Windows) or
-{@code android} (Mac/Linux) from the SDK's {@code tools/} directory (if you used the Windows
-installer, this is launched for you when the Wizard is complete). Add some Android platforms
-(such as Android 1.6 and Android 2.3) and other components (such as documentation) to your SDK. If
-you aren't sure what to add, see <a
-href="installing.html#which">Which components do I need?</a></p>
-
-<p><strong>Done!</strong></p>
-
-<p>To write your first Android application, see the <a
-href="{@docRoot}resources/tutorials/hello-world.html">Hello World</a> tutorial. Also see <a
-href="{@docRoot}sdk/installing.html#NextSteps">Next
-Steps</a> for other suggestions about how to get started.</p>
-
-<p>For a more detailed guide to installing and setting up the SDK, read <a
+<p>To get started, download the appropriate package from the table above, then read the guide to <a
 href="installing.html">Installing the SDK</a>.</p>
diff --git a/docs/html/sdk/installing.jd b/docs/html/sdk/installing.jd
index 8484bea..4cb1bb2 100644
--- a/docs/html/sdk/installing.jd
+++ b/docs/html/sdk/installing.jd
@@ -3,19 +3,63 @@
 
 @jd:body
 
+
+<script type="text/javascript">
+function toggleDiv(link) {
+  var toggleable = $(link).parent();
+  if (toggleable.hasClass("closed")) {
+    //$(".toggleme", toggleable).slideDown("fast");
+    toggleable.removeClass("closed");
+    toggleable.addClass("open");
+    $(".toggle-img", toggleable).attr("title", "hide").attr("src", (toRoot +
+"assets/images/triangle-opened.png"));
+  } else {
+    //$(".toggleme", toggleable).slideUp("fast");
+    toggleable.removeClass("open");
+    toggleable.addClass("closed");
+    $(".toggle-img", toggleable).attr("title", "show").attr("src", (toRoot +
+"assets/images/triangle-closed.png"));
+  }
+  return false;
+}
+</script>
+<style>
+.toggleable {
+  padding: .25em 1em 0em 1em;
+  margin-bottom: 0;
+}
+.toggleme {
+  padding: 1em 1em 0 2em;
+  line-height:1em;
+}
+.toggleable a {
+  text-decoration:none;
+}
+.toggleme a {
+  text-decoration:underline;
+}
+.toggleable.closed .toggleme {
+  display:none;
+}
+#jd-content .toggle-img {
+  margin:0;
+}
+</style>
+
 <div id="qv-wrapper">
 <div id="qv">
 
   <h2>In this document</h2>
   <ol>
-    <li><a href="#Preparing">Preparing Your Development Computer</a></li>
-    <li><a href="#Installing">Downloading the SDK Starter Package</a></li>
-    <li><a href="#InstallingADT">Installing the ADT Plugin for Eclipse</a></li>
-    <li><a href="#components">Adding Platforms and Other Components</a>
-    <ol>
-    <li><a href="#which">Which components do I need?</a></li>
-    </ol></li>
-    <li><a href="#sdkContents">Exploring the SDK</a></li>
+    <li><a href="#Preparing">1. Preparing Your Development Computer</a></li>
+    <li><a href="#Installing">2. Downloading the SDK Starter Package</a></li>
+    <li><a href="#InstallingADT">3. Installing the ADT Plugin for Eclipse</a></li>
+    <li><a href="#components">4. Adding Platforms and Other Components</a>
+      <ol>
+        <li><a href="#components">Available Components</a></li>
+        <li><a href="#which">Recommended Components</a></li>
+      </ol></li>
+    <li><a href="#sdkContents">5. Exploring the SDK (Optional)</a></li>
     <li><a href="#NextSteps">Next Steps</a></li>
     <li><a href="#troubleshooting">Troubleshooting</a></li>
   </ol>
@@ -38,96 +82,52 @@
 
 <h4>Updating?</h4>
 
-<p>If you are currently using the Android 1.6 SDK or later and want to update
-to the latest tools or platforms, you do not need to install a new SDK. Instead,
-you can simply update the individual components in your SDK using the
-Android SDK and AVD Manager tool. For information about how to do that, see <a
-href="{@docRoot}sdk/adding-components.html#UpdatingComponents">Updating SDK
-Components</a></p>
-
-<p>If you are using Android 1.5 SDK or earlier, you should install a new SDK as
-described in this document and move your application projects to the new
-SDK environment. </p>
+<p>If you already have an Android SDK, use the <em>Android SDK and AVD Manager</em> tool to install
+updated tools and new Android platforms into your existing environment. For information about how to
+do that, see <a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a></p>
 
 
 <h2 id="Preparing">Step 1. Preparing Your Development Computer</h2>
 
 <p>Before getting started with the Android SDK, take a moment to confirm that
 your development computer meets the <a href="requirements.html">System
-Requirements</a>. In particular, you may need to install the <a
-href="http://java.sun.com/javase/downloads/index.jsp">JDK</a> before
-continuing, if it's not already installed on your computer. </p>
+Requirements</a>. In particular, you might need to install the <a
+href="http://java.sun.com/javase/downloads/index.jsp">JDK</a>, if you don't have it already. </p>
 
 <p>If you will be developing in Eclipse with the Android Development
-Tools (ADT) Plugin &mdash; the recommended path if you are new to
-Android &mdash; make sure that you have a suitable version of Eclipse
+Tools (ADT) Plugin&mdash;the recommended path if you are new to
+Android&mdash;make sure that you have a suitable version of Eclipse
 installed on your computer (3.4 or newer is recommended). If you need
 to install Eclipse, you can download it from this location: </p>
 
 <p style="margin-left:2em;"><a href=
 "http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a></p>
 
-<p>A Java or RCP version of Eclipse is recommended. For Eclipse 3.5, the
-"Eclipse Classic" version is recommended.</p>
+<p>For Eclipse 3.5 or newer, the "Eclipse Classic" version is recommended. Otherwise, a Java or
+RCP version of Eclipse is recommended.</p>
 
 
 <h2 id="Installing">Step 2. Downloading the SDK Starter Package</h2>
 
-<p>The first step in setting up your environment for developing Android applications
-is downloading the Android SDK starter package. The starter package is not a full
-development environment &mdash; it includes only the core SDK Tools, which you can
-use to download the rest of the SDK components (such as the platform system images). </p>
+<p>The SDK starter package is not a full
+development environment&mdash;it includes only the core SDK Tools, which you can
+use to download the rest of the SDK components (such as the latest Android platform).</p>
 
-<p>You can get the latest version of the SDK starter package from the <a
-href="{@docRoot}sdk/index.html">SDK download page</a>. Make sure to download the
-package that is appropriate for your development computer.</p>
+<p>If you haven't already, get the latest version of the SDK starter package from the <a
+href="{@docRoot}sdk/index.html">SDK download page</a>.</p>
 
-<p class="note"><strong>Note:</strong> If you're using Windows, we recommend that you download
-the SDK installer (the {@code .exe} file from the download table). It will guide you through the
-installation process and check your computer for the required software.</p>
+<p>If you downloaded a {@code .zip} or {@code .tgz} package (instead of the SDK installer), unpack
+it to a safe location on your machine. By default, the SDK files are unpacked
+into a directory named <code>android-sdk-&lt;machine-platform&gt;</code>.</p>
 
-<p>If you downloaded a {@code .zip} of {@code .tgz} (instead of using the SDK installer), unpack the
-Android SDK archive to a safe location on your machine. By default, the SDK files are unpacked into
-a directory named <code>android-sdk-&lt;machine-platform&gt;</code>.</p>
+<p>If you downloaded the Windows installer ({@code .exe} file), run it now and it will check
+whether the proper Java SE Development Kit (JDK) is installed (installing it, if necessary), then
+install the SDK Tools into a default location (which you can modify).</p>
 
-<p>Make a note of the name and
-location of the unpacked SDK directory on your system &mdash; you will need to
+<p>Make a note of the name and location of the SDK directory on your system&mdash;you will need to
 refer to the SDK directory later, when setting up the ADT plugin and when using
 the SDK tools from command line.</p>
 
-<p>Optionally, you might want to add the location of the SDK's primary
-<code>tools</code> directory and the additional {@code platform-tools/} directory  to your system
-<code>PATH</code>. Both tool directories are located at the root of the SDK folder. Adding
-<code>tools/</code> and {@code platform-tools/} to your path lets you run Android Debug Bridge (adb)
-and the other command line <a
-href="{@docRoot}guide/developing/tools/index.html">tools</a> without needing to
-supply the full path to the tool directories. </p>
-
-<ul>
-    <li>On Linux, edit your <code>~/.bash_profile</code> or <code>~/.bashrc</code> file. Look
-    for a line that sets the PATH environment variable and add the
-    full path to the <code>tools/</code> and {@code platform-tools/} directories to it. If you don't
-    see a line setting the path, you can add one:</li>
-
-    <ul><code>export PATH=${PATH}:&lt;your_sdk_dir&gt;/tools:&lt;your_sdk_dir&gt;/platform-tools</code></ul>
-
-    <li>On a Mac OS X, look in your home directory for <code>.bash_profile</code> and
-    proceed as for Linux. You can create the <code>.bash_profile</code> if
-    you haven't already set one up on your machine. </li>
-
-    <li>On Windows, right-click on My Computer, and select Properties.
-  Under the Advanced tab, hit the Environment Variables button, and in the
-  dialog that comes up, double-click on Path (under System Variables). Add the full path to the
-  <code>tools/</code> and {@code platform-tools/} directories to the path. </li>
-  </ul>
-
-<p>If you will be using the Eclipse IDE as your development environment, the
-next section describes how to install the Android Development Tools (ADT) plugin
-and set up Eclipse. If you choose not to use Eclipse, you can develop Android
-applications in an IDE of your choice and then compile, debug and deploy using
-the tools included in the SDK (skip to <a href="#components">Adding Platforms
-and Other Components</a>).</p>
-
 
 <h2 id="InstallingADT">Step 3. Installing the ADT Plugin for Eclipse</h2>
 
@@ -135,64 +135,87 @@
 Development Tools (ADT), that is designed to give you a powerful, integrated
 environment in which to build Android applications. It extends the capabilites
 of Eclipse to let you quickly set up new Android projects, create an application
-UI, add components based on the Android Framework API, debug your applications
+UI, debug your applications
 using the Android SDK tools, and even export signed (or unsigned) APKs in order
 to distribute your application. In general, developing in Eclipse with ADT is a
 highly recommended approach and is the fastest way to get started with Android.
 </p>
 
 <p>If you'd like to use ADT for developing Android applications, install it now.
-Read <a href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin for Eclipse</a> for
-step-by-step installation instructions, then return here to continue with the
-last step in setting up your SDK: adding platforms and other
-components.</p>
+Read <a href="{@docRoot}sdk/eclipse-adt.html#installing">Installing the ADT Plugin</a> for
+step-by-step installation instructions, then return here to continue the
+last step in setting up your Android SDK.</p>
 
-<p>If you prefer to work in an IDE other than Eclipse, you do not need to
+<p>If you prefer to work in a different IDE, you do not need to
 install Eclipse or ADT, instead, you can directly use the SDK tools to build and
-debug your application.</p>
+debug your application. The developer guide has more information about <a
+href="{@docRoot}guide/developing/other-ide.html">Developing in Other IDEs</a>.</p>
+
 
 
 <h2 id="components">Step 4. Adding Android Platforms and Other Components</h2>
 
-<div class="sidebox-wrapper" style="margin-right:2.5em;">
-<div class="sidebox"> <h2>Using the Android SDK and AVD Manager</h2>
+<p>The last step in setting up your SDK is using the <em>Android SDK and AVD Manager</em> (a
+tool included in the SDK starter package) to download
+essential SDK components into your development environment.</p>
 
-<p>The <em>Android SDK and AVD Manager</em> is a tool that you will use often,
-to add components to your SDK environment and manage Android Virtual Devices.
-</p>
+<p>The SDK uses a modular structure that separates the major parts of the SDK&mdash;Android platform
+versions, add-ons, tools, samples, and documentation&mdash;into a set of separately installable
+components. The SDK starter package, which you've already downloaded, includes only a single
+component: the latest version of the SDK Tools. To develop an Android
+application, you also need to download at least one Android platform and the SDK Platform-tools
+(tools that the latest platform depend upon). However, downloading
+additional components is highly recommended.</p>
 
-<p style="margin-top:.5em;">The tool is pre-installed in your SDK. See <a
-href="adding-components.html">Adding SDK Components</a> for details on how to
-launch and use the tool.</p>
-</div>
-</div>
+<p>If you used the Windows installer, when you complete the installation wizard, it will launch the
+Android SDK and AVD Manager with a default set of platforms and other components selected
+for you to install. Simply click <strong>Install</strong> to accept the recommended set of
+components and install them. You can then skip to <a href="#sdkContents">Step 5</a>, but we
+recommend you first read the section about the <a href="#components">Available Components</a> to
+better understand the components available from the Android SDK and AVD Manager.</p>
 
-<p>The last step in setting up your SDK is using a tool included the SDK starter
-package &mdash; the <em>Android SDK and AVD Manager</em> &mdash; to download
-essential components into your development environment. Read the information
-below to understand what components you'll need, then see <a
-href="adding-components.html">Adding SDK Components</a> for step-by-step
-instructions on how to launch the Android SDK and AVD Manager and download the
-components into your environment.</p>
+<p>You can launch the Android SDK and AVD Manager in one of the following ways:</p>
+<ul>
+  <li>From within Eclipse, select <strong>Window &gt; Android SDK and AVD Manager</strong>.</li>
+  <li>On Windows, double-click the <code>SDK Manager.ext</code> file at the root of the Android
+SDK directory.</li>
+  <li>On Mac or Linux, open a terminal and navigate to the <code>tools/</code> directory in the
+Android SDK, then execute: <pre>android</pre> </li>
+</ul>
 
-<p>The SDK uses a modular structure that separates the major parts of the SDK
-&mdash; Android platform versions, add-ons, tools, samples, and the API
-documentation &mdash; into a set of separately installable components. The SDK
-starter package, which you've already downloaded, includes only a single
-component: the latest version of the SDK Tools. To develop any Android
-application, you also need to download at least one Android platform into your
-environment, although downloading additional components is highly recommended.
-See <a href="#which">Which components do I need?</a> for information about
-which components are required and which are optional.</p>
+<p>To download components, use the graphical UI of the Android SDK and AVD
+Manager, shown in Figure 1, to browse the SDK repository and select new or updated
+components. The Android SDK and AVD Manager will install the selected components in
+your SDK environment. For information about which components you should download, see the following
+section about <a href="#which">Recommended Components</a>.</p>
 
-<p>The SDK repository offers these types of components:</p>
+<img src="/images/sdk_manager_packages.png" />
+<p class="img-caption"><strong>Figure 1.</strong> The Android SDK and AVD Manager's
+<strong>Available Packages</strong> panel, which shows the SDK components that are
+available for you to download into your environment.</p>
+
+
+<h3 id="components">Available Components</h3>
+
+<p>By default, there are two repositories of components for your SDK: <em>Android
+Repository</em> and <em>Third party Add-ons</em>.</p>
+
+<p>The <em>Android Repository</em> offers these types of components:</p>
 
 <ul>
 <li><strong>SDK Tools</strong> (pre-installed in the Android SDK starter
-package) &mdash; Contains the full set of SDK tools for developing, debugging,
-and testing your application code and UI. You can read about the tools in the <a
-href="{@docRoot}guide/developing/tools/index.html">Dev Guide</a> and access them
-in the <code>&lt;sdk&gt;/tools/</code> directory. </li>
+package) &mdash; Contains tools for debugging
+and testing your application and other utility tools. You can access these
+in the <code>&lt;sdk&gt;/tools/</code> directory of your SDK and read more about them in the <a
+href="{@docRoot}guide/developing/tools/index.html">Tools</a> section of the developer guide. </li>
+
+<li><strong>SDK Platform-tools</strong> &mdash; Contains tools that are required to develop and
+debug your application, but which are developed alongside the Android platform in order to support
+the latest features. These tools are typically updated only when a new platform becomes
+available. You can access these
+in the <code>&lt;sdk&gt;/platform-tools/</code> directory. Read more about them in
+the <a href="{@docRoot}guide/developing/tools/index.html">Tools</a> section of the developer guide.
+</li>
 
 <li><strong>Android platforms</strong> &mdash; An SDK platform is
 available for every production Android platform deployable to Android-powered
@@ -201,20 +224,14 @@
 detailed information about each platform, see the overview documents available
 under the section "Downloadable SDK Components," at left. </li>
 
-<li><strong>SDK Add-Ons</strong> &mdash; SDK add-ons provide a development
-environment for specific Android external
-library or a customized (but fully compliant) Android system image.  The Android
-SDK repository offers the Google APIs Add-On, which gives your application
-access to powerful mapping capabilities through the
-<code>com.google.android.maps</code> library. You can also add additional
-repositories, so that you can download other SDK add-ons, where available. </li>
-
-<li><strong>USB Driver for Windows</strong> &mdash; Contains driver files
+<li><strong>USB Driver for Windows</strong> (Windows only) &mdash; Contains driver files
 that you can install on your Windows computer, so that you can run and debug
 your applications on an actual device. You <em>do not</em> need the USB driver unless
 you plan to debug your application on an actual Android-powered device. If you
 develop on Mac OS X or Linux, you do not need a special driver to debug
-your application on an Android-powered device.</li>
+your application on an Android-powered device. (See <a
+href="{@docRoot}guide/developing/device.html">Developing on a Device</a> for more information
+about developing on a real device.)</li>
 
 <li><strong>Samples</strong> &mdash; Contains the sample code and apps available
 for each Android development platform. If you are just getting started with
@@ -227,28 +244,18 @@
 multiversion documentation for the Android framework API. </li>
 </ul>
 
-<p>To download components, use the graphical UI of the Android SDK and AVD
-Manager, shown in Figure 1, to browse the SDK repository, select new or updated
-components for download, and then install the selected components in your SDK
-environment. </p>
-
-<div style="TEXT-ALIGN:left;width:600px;">
-<img src="/images/sdk_manager_packages.png"
-style="padding-bottom:0;margin-bottom:0;" />
-<p class="caption" style="margin:0 0 1.5em 1em;padding:0 0 0
-1em;"><strong>Figure 1.</strong> The Android SDK and AVD Manager's
-<strong>Available Packages</strong>
-panel, which shows the SDK components that are
-available for you to download into your environment. </p>
-</div>
+<p>The <em>Third party Add-ons</em> provide components that allow you to create a development
+environment using a specific Android external library (such as the Google Maps library) or a
+customized (but fully compliant) Android system image. You can add additional Add-on repositories,
+by clicking <strong>Add Add-on Site</strong>.</p>
 
 
-<h3 id="which">Which components do I need?</h3>
+<h3 id="which">Recommended Components</h3>
 
 <p>The SDK repository contains a range of components that you can download.
 Use the table below to determine which components you need, based on whether you
-want to set up a basic (but functionnal) development environment or a
-recommended or full development environment: </p>
+want to set up a basic, recommended, or full development environment:
+</p>
 
 <table style="width:95%">
 
@@ -259,12 +266,21 @@
 </tr>
 
 <tr>
-<td rowspan="2" style="font-size:.9em;background-color:#FFE;">Basic</td>
-<td style="font-size:.9em;background-color:#FFE;color:gray">SDK Tools</td>
-<td style="font-size:.9em;background-color:#FFE;color:gray">If you've installed
-the SDK starter package, then you already have this component preinstalled. The
-SDK Tools and the SDK Platform-tools components are required &mdash; you can't develop or build an
-application without these. Make sure you keep these up to date.</td>
+<td rowspan="3" style="font-size:.9em;background-color:#FFE;">Basic</td>
+<td style="font-size:.9em;background-color:#FFE;">SDK Tools</td>
+<td style="font-size:.9em;background-color:#FFE;">If you've just installed
+the SDK starter package, then you already have the latest version of this component. The
+SDK Tools component is required to develop an Android application. Make sure you keep this up to
+date.</td>
+</tr>
+
+<tr>
+<td style="font-size:.9em;background-color:#FFE;">SDK Platform-tools</td>
+<td style="font-size:.9em;background-color:#FFE;">This includes more tools that are required
+for application development. These tools are platform-dependent and typically update only when
+a new SDK platform is made available, in order to support new features in the platform. These
+tools are always backward compatible with older platforms, but you must be sure that you have
+the latest version of these tools when you install a new SDK platform.</td>
 </tr>
 
 <tr>
@@ -275,14 +291,15 @@
 Device (AVD) to run it on (in the emulator). To start with, just download the
 latest version of the platform. Later, if you plan to publish your application,
 you will want to download other platforms as well, so that you can test your
-application on the full range of Android platform versions that your customers
-are using.</td>
+application on the full range of Android platform versions that your application supports.</td>
 </tr>
 <tr>
-<td colspan="3" style="border:none;text-align:center;font-size:1.5em;font-weight:bold;">+</td>
+<td colspan="2"
+style="border:none;text-align:center;font-size:1.5em;font-weight:bold;">+</td><td
+style="border:none"></td>
 </tr>
 <tr>
-<td rowspan="3">Recommended</td>
+<td rowspan="3">Recommended<br/>(plus Basic)</td>
 <td>Documentation</td>
 <td>The Documentation component is useful because it lets you work offline and
 also look up API reference information from inside Eclipse.</td>
@@ -304,10 +321,12 @@
 special driver is needed.</td>
 </tr>
 <tr>
-<td colspan="3" style="border:none;text-align:center;font-size:1.5em;font-weight:bold;">+</td>
+<td colspan="2"
+style="border:none;text-align:center;font-size:1.5em;font-weight:bold;">+</td><td
+style="border:none"></td>
 </tr>
 <tr>
-<td rowspan="3">Full</td>
+<td rowspan="3">Full<br/>(plus Recommended)</td>
 <td>Google APIs</td>
 <td>The Google APIs add-on gives your application access to the Maps external
 library, which makes it easy to display and manipulate Maps data in your
@@ -326,19 +345,18 @@
 
 </table>
 
-<p>For step-by-step instructions on how to use the Android SDK and AVD Manager
-to add components, see the <a href="{@docRoot}sdk/adding-components.html">Adding
-SDK Components</a> document. </p>
+<p>Once you've installed at least the basic configuration of SDK components, you're ready to start
+developing Android apps. The next section describes the contents of the Android SDK to familiarize
+you with the components you've just installed.</p>
 
-<p>For revision notes and other detailed information about individual SDK
-components, see the documents listed under "Downloadable SDK Components" in
-the navigation at left.</p>
+<p>For more information about using the Android SDK and AVD Manager, see the <a
+href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a> document. </p>
 
 
-<h2 id="sdkContents">Step 5. Exploring the SDK</h2>
+<h2 id="sdkContents">Step 5. Exploring the SDK (Optional)</h2>
 
 <p>Once you've installed the SDK and downloaded the platforms, documentation,
-and add-ons that you need, open the SDK directory and take a look at what's
+and add-ons that you need, we suggest that you open the SDK directory and take a look at what's
 inside.</p>
 
 <p>The table below describes the full SDK directory contents, with components
@@ -452,6 +470,47 @@
 
 </table>
 
+
+<p>Optionally, you might want to add the location of the SDK's <code>tools/</code> and
+<code>platform-tools</code> to your <code>PATH</code> environment variable, to provide easy
+access to the tools.</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" />
+        How to update your PATH</a>
+  <div class="toggleme">
+
+<p>Adding both <code>tools/</code> and <code>platform-tools/</code> to your PATH lets you run
+command line <a href="{@docRoot}guide/developing/tools/index.html">tools</a> without needing to
+supply the full path to the tool directories. Depending on your operating system, you can
+include these directories in your PATH in the following way:</p>
+
+<ul>
+
+  <li>On Windows, right-click on My Computer, and select Properties.
+  Under the Advanced tab, hit the Environment Variables button, and in the
+  dialog that comes up, double-click on Path (under System Variables). Add the full path to the
+  <code>tools/</code> and <code>platform-tools/</code> directories to the path. </li>
+
+  <li>On Linux, edit your <code>~/.bash_profile</code> or <code>~/.bashrc</code> file. Look
+  for a line that sets the PATH environment variable and add the
+  full path to the <code>tools/</code> and <code>platform-tools</code> directories to it. If you
+  don't see a line setting the path, you can add one:
+  <pre>export PATH=${PATH}:&lt;sdk&gt;/tools:&lt;sdk&gt;/platform-tools</pre>
+  </li>
+
+  <li>On a Mac OS X, look in your home directory for <code>.bash_profile</code> and
+  proceed as for Linux. You can create the <code>.bash_profile</code> if
+  you don't already have one. </li>
+</ul>
+
+</div><!-- end toggleme -->
+</div><!-- end toggleable -->
+
+
 <h2 id="NextSteps">Next Steps</h2>
 <p>Once you have completed installation, you are ready to
 begin developing applications. Here are a few ways you can get started: </p>
@@ -466,7 +525,7 @@
 </li>
 </ul>
 
-<p class="caution">Following the Hello World tutorial is an essential
+<p class="note">Following the Hello World tutorial is an essential
 first step in getting started with Android development. </p>
 
 <p><strong>Learn about Android</strong></p>
@@ -506,7 +565,7 @@
   and architectural concepts in a moderately complex application.
   </li>
 </ul>
-<p class="caution">Following the Notepad tutorial is an excellent
+<p class="note">Following the Notepad tutorial is an excellent
 second step in getting started with Android development. </p>
 
 <p><strong>Explore some code</strong></p>
diff --git a/docs/html/sdk/ndk/index.jd b/docs/html/sdk/ndk/index.jd
index 9e88d94..0f36345 100644
--- a/docs/html/sdk/ndk/index.jd
+++ b/docs/html/sdk/ndk/index.jd
@@ -60,511 +60,522 @@
 </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>A new toolchain (based on GCC 4.4.3), which generates better code, and can also now
+be used as a standalone cross-compiler, for people who want to build their stuff with
+<code>./configure &amp;&amp; make</code>. See
+docs/STANDALONE-TOOLCHAIN.html for the details. The binaries for GCC 4.4.0 are still provided,
+but the 4.2.1 binaries were removed.</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>Support for prebuilt static and shared libraries (docs/PREBUILTS.html), module
+exports and imports to make sharing and reuse of third-party modules much easier
+(docs/IMPORT-MODULE.html explains why).</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>A C++ STL implementation (based on STLport) is now provided as a helper module. It
+can be used either as a static or shared library (details and usage exemple under
+sources/android/stlport/README). <strong>Note:</strong> For now, C++ Exceptions and RTTI are still
+not supported.</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>Improvements to the <code>cpufeatures</code> helper library to deal with buggy
+kernel that incorrectly report they run on an ARMv7 CPU (while the device really is an ARMv6). We
+recommend developers that use it to simply rebuild their applications to benefit from it, then
+upload to Market.</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 1</a> <em>(June 2009)</em>
-  <div class="toggleme">
+            <li>Adds support for native activities, which allows you to write completely native
+            applications.</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>Adds an EGL library that lets you create and manage OpenGL ES textures and
+            services.</li>
 
-</dl>
- </div>
-</div>
+            <li>Adds native support for the following:
 
+              <ul>
+                <li>Input subsystem (such as the keyboard and touch screen)</li>
 
-<h2 id="overview">What is the Android NDK?</h2>
+                <li>Window and surface subsystem</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>Audio APIs based on the OpenSL ES standard that support playback and recording
+                as well as control over platform audio effects</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>Event loop APIs to wait for things such as input and sensor events</li>
 
-<p>The NDK provides:</p>
+                <li>Access to assets packaged in the <code>.apk</code></li>
 
-<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>
+                <li>Access to sensor data (accelerometer, compass, gyroscope, etc.)</li>
+              </ul>
+            </li>
 
-<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>
+            <li>New sample applications, <code>native-plasma</code> and
+              <code>native-activity</code>, to demonstrate how to write a native activity.</li>
+            
+            <li>Plus many bugfixes and other small improvements; see docs/CHANGES.html for a more
+detailed list of changes.</li>
+          </ul>
+        </dd>
+      </dl>
+    </div>
+  </div>
 
-<p>Future releases of the NDK will also support:</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>x86 instructions (see CPU-ARCH-ABIS.TXT for more information)</li>
-</ul>
+    <div class="toggleme">
+      <dl>
+        <dt>NDK r4b notes:</dt>
 
-<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>
+        <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>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>
+      <dl>
+        <dt>General notes:</dt>
 
-<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>
+        <dd>
+          <ul>
+            <li>Provides a simplified build system through the new <code>ndk-build</code> build
+            command.</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>Adds support for easy native debugging of generated machine code on production
+            devices through the new <code>ndk-gdb</code> command.</li>
 
-<h2 id="contents">Contents of the NDK</h2>
+            <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:
 
-<h4>Development tools</h4>
+              <ul>
+                <li>Thumb-2 instructions</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>VFP hardware FPU instructions (VFPv3-D16)</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>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>
+
+            <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>
+
+  <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>
 
-<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>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/requirements.jd b/docs/html/sdk/requirements.jd
index 7b11654..3679d44 100644
--- a/docs/html/sdk/requirements.jd
+++ b/docs/html/sdk/requirements.jd
@@ -8,7 +8,7 @@
 <ul>
   <li>Windows XP (32-bit), Vista (32- or 64-bit), or Windows 7 (32- or 64-bit)</li>
   <li>Mac OS X 10.5.8 or later (x86 only)</li>
-  <li>Linux (tested on Linux Ubuntu Hardy Heron)
+  <li>Linux (tested on Linux Ubuntu Hardy Heron and Lucid Lynx)
     <ul>
       <li>64-bit distributions must be capable of running 32-bit applications. 
       For information about how to add support for 32-bit applications, see
@@ -22,10 +22,7 @@
 
 <h4 style="margin-top:.25em"><em>Eclipse IDE</em></h4>
     <ul>
-      <li>Eclipse 3.4 (Ganymede) or 3.5 (Galileo)
-         <p class="caution"><strong>Caution:</strong> There are known issues with the ADT plugin
-running with Eclipse 3.6. Please stay on 3.5 until further notice.</p>
-      </li>
+      <li>Eclipse 3.4 (Ganymede) or greater</li>
       <li>Eclipse <a href="http://www.eclipse.org/jdt">JDT</a> plugin (included
 in most Eclipse IDE packages) </li>
       <li>If you need to install or update Eclipse, you can download it from <a
@@ -35,23 +32,22 @@
 developing Android applications, we recommend that you install one of these
 packages: </p>
          <ul>
-           <li>Eclipse IDE for Java EE Developers</li>
            <li>Eclipse IDE for Java Developers</li>
-           <li>Eclipse for RCP/Plug-in Developers</li>
            <li>Eclipse Classic (versions 3.5.1 and higher)</li>
+           <li>Eclipse IDE for Java EE Developers</li>
          </ul>
       </li>
-      <li><a href="http://java.sun.com/javase/downloads/index.jsp">JDK 5 or JDK
+      <li><a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">JDK 5 or JDK
 6</a> (JRE alone is not sufficient)</li>
       <li><a href="eclipse-adt.html">Android Development Tools plugin</a>
-(optional)</li>
+(recommended)</li>
       <li><strong>Not</strong> compatible with Gnu Compiler for Java (gcj)</li>
     </ul>
 
 
 <h4><em>Other development environments or IDEs</em></h4>
     <ul>
-      <li><a href="http://java.sun.com/javase/downloads/index.jsp">JDK 5 or JDK
+      <li><a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">JDK 5 or JDK
 6</a> (JRE alone is not sufficient)</li>
       <li><a href="http://ant.apache.org/">Apache Ant</a> 1.6.5 or later for
 Linux and Mac, 1.7 or later for Windows</li>
@@ -75,7 +71,12 @@
 </tr>
 <tr>
 <td>SDK Tools</td>
-<td>50 MB</td>
+<td>35 MB</td>
+<td>Required.</td>
+</tr>
+<tr>
+<td>SDK Platform-tools</td>
+<td>6 MB</td>
 <td>Required.</td>
 </tr>
 <tr>
diff --git a/docs/html/sdk/sdk_toc.cs b/docs/html/sdk/sdk_toc.cs
index 7b9a5a2..057d9e0 100644
--- a/docs/html/sdk/sdk_toc.cs
+++ b/docs/html/sdk/sdk_toc.cs
@@ -75,7 +75,7 @@
       </li>
     </ul>
     <ul>
-      <li><a href="<?cs var:toroot ?>sdk/tools-notes.html">SDK Tools, r7</a></li>
+      <li><a href="<?cs var:toroot ?>sdk/tools-notes.html">SDK Tools, r8</a> <span class="new">new!</span></li>
       <li><a href="<?cs var:toroot ?>sdk/win-usb.html">USB Driver for
       Windows, r3</a>
       </li>
@@ -93,7 +93,7 @@
       <span style="display:none" class="zh-TW"></span>
       </h2>
     <ul>
-      <li><a href="<?cs var:toroot ?>sdk/eclipse-adt.html">ADT 0.9.9
+      <li><a href="<?cs var:toroot ?>sdk/eclipse-adt.html">ADT 8.0
       <span style="display:none" class="de"></span>
       <span style="display:none" class="es"></span>
       <span style="display:none" class="fr"></span>
@@ -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,12 @@
       <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>
+        <span class="new">new!</span></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/docs/html/sdk/tools-notes.jd b/docs/html/sdk/tools-notes.jd
index 0f075e5..9316fae 100644
--- a/docs/html/sdk/tools-notes.jd
+++ b/docs/html/sdk/tools-notes.jd
@@ -64,6 +64,70 @@
 <div class="toggleable opened">
   <a href="#" onclick="return toggleDiv(this)">
         <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px" width="9px" />
+SDK Tools, Revision 8</a> <em>(December 2010)</em>
+  <div class="toggleme">
+
+<dl>
+<dt>Dependencies:</dt>
+<dd>
+<p>If you are developing in Eclipse with ADT, note that SDK Tools r8 is
+designed for use with ADT 8.0.0 and later. After installing SDK Tools r8, we
+highly recommend updating your ADT Plugin to 8.0.0.</p>
+
+<p>Also note that SDK Tools r8 requires a new SDK component called
+<em>Platform-tools</em>. The new Platform-tools component lets all SDK platforms
+(Android 2.1, Android 2.2, and so on) use the same (latest) version of build
+tools such as <code>adb</code>, <code>aapt</code>, <code>aidl</code>, and
+<code>dx</code>. To download the Platform-tools component, use the Android SDK
+Manager, as described in <a href="adding-components.html">Adding SDK
+Components</a></p>
+
+<dt>Upgrading from SDK Tools r7:</dt>
+<dd>
+<p>If you are upgrading to SDK Tools r8 from an earlier version, note that the
+the default installed location for the <code>adb</code> tool has changed from
+<code>&lt;<em>SDK</em>&gt;/tools/adb</code> to
+<code>&lt;<em>SDK</em>&gt;/platform-tools/adb</code>. This means that you should
+add the new location to your PATH and modify any custom build scripts to
+reference the new location. Copying the <code>adb</code> executable from the new
+location to the old is not recommended, since subsequent updates to the SDK
+Tools will delete the file.</p>
+</dd>
+
+<dt>General notes:</dt>
+<dd>
+<ul>
+<li>All SDK platforms now support Library Projects.</li>
+<li>Support for a true debug build. Developers no longer need to add the
+<code>android:debuggable</code> attribute to the
+<code>&lt;application&gt;</code> tag in the manifest &mdash; the build tools add
+the attribute automatically. In Eclipse/ADT, all incremental builds are assumed
+to be debug builds, so the tools insert <code>android:debuggable="true"</code>.
+When exporting a signed release build, the tools do not add the attribute. In
+Ant, a <code>ant debug</code> command automatically inserts the
+<code>android:debuggable="true"</code> attribute, while <code>ant release</code>
+does not. If <code>android:debuggable="true"</code> is manually set, then
+<code>ant release</code> will actually do a debug build, rather than a release
+build.</li>
+<li>Automatic ProGuard support in release builds. Developers generate a ProGuard
+configuration file using the <code>android</code> tool &mdash; the build tools
+then automatically run ProGuard against the project sources during the build.
+For more information, see the <a
+href="{@docRoot}guide/developing/tools/proguard.html">ProGuard</a>
+documentation. </li>
+<li>New overridable Ant javac properties: <code>java.encoding</code>,
+<code>java.source</code>, and <code>java.target</code> (default values are
+"ascii", "1.5", and "1.5", respectively).</li>
+<li>New UI for the HierarchyViewer tool.</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" />
 SDK Tools, Revision 7</a> <em>(September 2010)</em>
   <div class="toggleme">
 
diff --git a/include/camera/Camera.h b/include/camera/Camera.h
index e6d84ba..e734c38 100644
--- a/include/camera/Camera.h
+++ b/include/camera/Camera.h
@@ -105,8 +105,8 @@
 };
 
 enum {
-    CAMERA_FACING_BACK = 0,
-    CAMERA_FACING_FRONT = 1 /* The camera faces to the user */
+    CAMERA_FACING_BACK = 0, /* The facing of the camera is opposite to that of the screen. */
+    CAMERA_FACING_FRONT = 1 /* The facing of the camera is the same as that of the screen. */
 };
 
 struct CameraInfo {
@@ -122,10 +122,12 @@
      * camera image needs to be rotated clockwise so it shows correctly on
      * the display in its natural orientation. It should be 0, 90, 180, or 270.
      *
-     * For example, suppose a device has a naturally tall screen, but the camera
-     * sensor is mounted in landscape. If the top side of the camera sensor is
-     * aligned with the right edge of the display in natural orientation, the
-     * value should be 90.
+     * For example, suppose a device has a naturally tall screen. The
+     * back-facing camera sensor is mounted in landscape. You are looking at
+     * the screen. If the top side of the camera sensor is aligned with the
+     * right edge of the screen in natural orientation, the value should be
+     * 90. If the top side of a front-facing camera sensor is aligned with
+     * the right of the screen, the value should be 270.
      */
     int orientation;
 };
diff --git a/include/camera/CameraHardwareInterface.h b/include/camera/CameraHardwareInterface.h
index 6a66e3c..35c5aa1 100644
--- a/include/camera/CameraHardwareInterface.h
+++ b/include/camera/CameraHardwareInterface.h
@@ -190,7 +190,9 @@
      */
     virtual status_t    cancelPicture() = 0;
 
-    /** Set the camera parameters. */
+    /**
+     * Set the camera parameters. This returns BAD_VALUE if any parameter is
+     * invalid or not supported. */
     virtual status_t    setParameters(const CameraParameters& params) = 0;
 
     /** Return the camera parameters. */
diff --git a/include/camera/CameraParameters.h b/include/camera/CameraParameters.h
index 53039a0..4e770fd 100644
--- a/include/camera/CameraParameters.h
+++ b/include/camera/CameraParameters.h
@@ -142,16 +142,23 @@
     // the best.
     // Example value: "90". Read/write.
     static const char KEY_JPEG_QUALITY[];
-    // The orientation of the device in degrees. For example, suppose the
-    // natural position of the device is landscape. If the user takes a picture
-    // in landscape mode in 2048x1536 resolution, the rotation will be set to
-    // "0". If the user rotates the phone 90 degrees clockwise, the rotation
-    // should be set to "90".
-    // The camera driver can set orientation in the EXIF header without rotating
-    // the picture. Or the driver can rotate the picture and the EXIF thumbnail.
-    // If the Jpeg picture is rotated, the orientation in the EXIF header should
-    // be missing or 1 (row #0 is top and column #0 is left side). The driver
-    // should not set default value for this parameter.
+    // The rotation angle in degrees relative to the orientation of the camera.
+    // This affects the pictures returned from CAMERA_MSG_COMPRESSED_IMAGE. The
+    // camera driver may set orientation in the EXIF header without rotating the
+    // picture. Or the driver may rotate the picture and the EXIF thumbnail. If
+    // the Jpeg picture is rotated, the orientation in the EXIF header will be
+    // missing or 1 (row #0 is top and column #0 is left side).
+    //
+    // Note that the JPEG pictures of front-facing cameras are not mirrored
+    // as in preview display.
+    //
+    // For example, suppose the natural orientation of the device is portrait.
+    // The device is rotated 270 degrees clockwise, so the device orientation is
+    // 270. Suppose a back-facing camera sensor is mounted in landscape and the
+    // top side of the camera sensor is aligned with the right edge of the
+    // display in natural orientation. So the camera orientation is 90. The
+    // rotation should be set to 0 (270 + 90).
+    //
     // Example value: "0" or "90" or "180" or "270". Write only.
     static const char KEY_ROTATION[];
     // GPS latitude coordinate. GPSLatitude and GPSLatitudeRef will be stored in
diff --git a/include/media/IOMX.h b/include/media/IOMX.h
index 2f61cbe..f794766 100644
--- a/include/media/IOMX.h
+++ b/include/media/IOMX.h
@@ -115,7 +115,8 @@
             const char *componentName,
             OMX_COLOR_FORMATTYPE colorFormat,
             size_t encodedWidth, size_t encodedHeight,
-            size_t displayWidth, size_t displayHeight) = 0;
+            size_t displayWidth, size_t displayHeight,
+            int32_t rotationDegrees) = 0;
 
     // Note: These methods are _not_ virtual, it exists as a wrapper around
     // the virtual "createRenderer" method above facilitating extraction
@@ -125,14 +126,16 @@
             const char *componentName,
             OMX_COLOR_FORMATTYPE colorFormat,
             size_t encodedWidth, size_t encodedHeight,
-            size_t displayWidth, size_t displayHeight);
+            size_t displayWidth, size_t displayHeight,
+            int32_t rotationDegrees);
 
     sp<IOMXRenderer> createRendererFromJavaSurface(
             JNIEnv *env, jobject javaSurface,
             const char *componentName,
             OMX_COLOR_FORMATTYPE colorFormat,
             size_t encodedWidth, size_t encodedHeight,
-            size_t displayWidth, size_t displayHeight);
+            size_t displayWidth, size_t displayHeight,
+            int32_t rotationDegrees);
 };
 
 struct omx_message {
diff --git a/include/media/stagefright/HardwareAPI.h b/include/media/stagefright/HardwareAPI.h
index 221c679..63f11d1 100644
--- a/include/media/stagefright/HardwareAPI.h
+++ b/include/media/stagefright/HardwareAPI.h
@@ -32,6 +32,14 @@
         size_t displayWidth, size_t displayHeight,
         size_t decodedWidth, size_t decodedHeight);
 
+extern android::VideoRenderer *createRendererWithRotation(
+        const android::sp<android::ISurface> &surface,
+        const char *componentName,
+        OMX_COLOR_FORMATTYPE colorFormat,
+        size_t displayWidth, size_t displayHeight,
+        size_t decodedWidth, size_t decodedHeight,
+        int32_t rotationDegrees);
+
 extern android::OMXPluginBase *createOMXPlugin();
 
 #endif  // HARDWARE_API_H_
diff --git a/include/media/stagefright/MPEG4Writer.h b/include/media/stagefright/MPEG4Writer.h
index bb469e5..7bf07eb 100644
--- a/include/media/stagefright/MPEG4Writer.h
+++ b/include/media/stagefright/MPEG4Writer.h
@@ -154,6 +154,7 @@
     bool exceedsFileDurationLimit();
     bool isFileStreamable() const;
     void trackProgressStatus(const Track* track, int64_t timeUs, status_t err = OK);
+    void writeCompositionMatrix(int32_t degrees);
 
     MPEG4Writer(const MPEG4Writer &);
     MPEG4Writer &operator=(const MPEG4Writer &);
diff --git a/include/media/stagefright/MetaData.h b/include/media/stagefright/MetaData.h
index d2bd9f2..29bfc4a 100644
--- a/include/media/stagefright/MetaData.h
+++ b/include/media/stagefright/MetaData.h
@@ -32,6 +32,7 @@
     kKeyMIMEType          = 'mime',  // cstring
     kKeyWidth             = 'widt',  // int32_t
     kKeyHeight            = 'heig',  // int32_t
+    kKeyRotation          = 'rotA',  // int32_t (angle in degrees)
     kKeyIFramesInterval   = 'ifiv',  // int32_t
     kKeyStride            = 'strd',  // int32_t
     kKeySliceHeight       = 'slht',  // int32_t
@@ -90,6 +91,7 @@
     // Track authoring progress status
     // kKeyTrackTimeStatus is used to track progress in elapsed time
     kKeyTrackTimeStatus   = 'tktm',  // int64_t
+    kKeyRotationDegree    = 'rdge',  // int32_t (clockwise, in degree)
 
     kKeyNotRealTime       = 'ntrt',  // bool (int32_t)
 
diff --git a/include/media/stagefright/OMXCodec.h b/include/media/stagefright/OMXCodec.h
index 1d94160..fed6761 100644
--- a/include/media/stagefright/OMXCodec.h
+++ b/include/media/stagefright/OMXCodec.h
@@ -109,6 +109,7 @@
         kAvoidMemcopyInputRecordingFrames     = 2048,
         kRequiresLargerEncoderOutputBuffer    = 4096,
         kOutputBuffersAreUnreadable           = 8192,
+        kStoreMetaDataInInputVideoBuffers     = 16384,
     };
 
     struct BufferInfo {
diff --git a/include/private/media/VideoFrame.h b/include/private/media/VideoFrame.h
index 9c35274ba..3aff0c6 100644
--- a/include/private/media/VideoFrame.h
+++ b/include/private/media/VideoFrame.h
@@ -120,6 +120,7 @@
     uint32_t mDisplayHeight;
     uint32_t mSize;            // Number of bytes in mData
     uint8_t* mData;            // Actual binary data
+    int32_t  mRotationAngle;   // rotation angle, clockwise
 };
 
 }; // namespace android
diff --git a/libs/ui/InputDispatcher.cpp b/libs/ui/InputDispatcher.cpp
index ae81d26..28ccc43 100644
--- a/libs/ui/InputDispatcher.cpp
+++ b/libs/ui/InputDispatcher.cpp
@@ -51,8 +51,8 @@
 
 namespace android {
 
-// Delay between reporting long touch events to the power manager.
-const nsecs_t EVENT_IGNORE_DURATION = 300 * 1000000LL; // 300 ms
+// Delay before reporting long touch events to the power manager.
+const nsecs_t LONG_TOUCH_DELAY = 300 * 1000000LL; // 300 ms
 
 // Default input dispatching timeout if there is no focused application or paused window
 // from which to determine an appropriate dispatching timeout.
@@ -619,6 +619,38 @@
 bool InputDispatcher::dispatchKeyLocked(
         nsecs_t currentTime, KeyEntry* entry, nsecs_t keyRepeatTimeout,
         DropReason* dropReason, nsecs_t* nextWakeupTime) {
+    // Preprocessing.
+    if (! entry->dispatchInProgress) {
+        if (entry->repeatCount == 0
+                && entry->action == AKEY_EVENT_ACTION_DOWN
+                && (entry->policyFlags & POLICY_FLAG_TRUSTED)
+                && !entry->isInjected()) {
+            if (mKeyRepeatState.lastKeyEntry
+                    && mKeyRepeatState.lastKeyEntry->keyCode == entry->keyCode) {
+                // We have seen two identical key downs in a row which indicates that the device
+                // driver is automatically generating key repeats itself.  We take note of the
+                // repeat here, but we disable our own next key repeat timer since it is clear that
+                // we will not need to synthesize key repeats ourselves.
+                entry->repeatCount = mKeyRepeatState.lastKeyEntry->repeatCount + 1;
+                resetKeyRepeatLocked();
+                mKeyRepeatState.nextRepeatTime = LONG_LONG_MAX; // don't generate repeats ourselves
+            } else {
+                // Not a repeat.  Save key down state in case we do see a repeat later.
+                resetKeyRepeatLocked();
+                mKeyRepeatState.nextRepeatTime = entry->eventTime + keyRepeatTimeout;
+            }
+            mKeyRepeatState.lastKeyEntry = entry;
+            entry->refCount += 1;
+        } else if (! entry->syntheticRepeat) {
+            resetKeyRepeatLocked();
+        }
+
+        entry->dispatchInProgress = true;
+        resetTargetsLocked();
+
+        logOutboundKeyDetailsLocked("dispatchKey - ", entry);
+    }
+
     // Give the policy a chance to intercept the key.
     if (entry->interceptKeyResult == KeyEntry::INTERCEPT_KEY_RESULT_UNKNOWN) {
         if (entry->policyFlags & POLICY_FLAG_PASS_TO_USER) {
@@ -647,38 +679,6 @@
         return true;
     }
 
-    // Preprocessing.
-    if (! entry->dispatchInProgress) {
-        logOutboundKeyDetailsLocked("dispatchKey - ", entry);
-
-        if (entry->repeatCount == 0
-                && entry->action == AKEY_EVENT_ACTION_DOWN
-                && (entry->policyFlags & POLICY_FLAG_TRUSTED)
-                && !entry->isInjected()) {
-            if (mKeyRepeatState.lastKeyEntry
-                    && mKeyRepeatState.lastKeyEntry->keyCode == entry->keyCode) {
-                // We have seen two identical key downs in a row which indicates that the device
-                // driver is automatically generating key repeats itself.  We take note of the
-                // repeat here, but we disable our own next key repeat timer since it is clear that
-                // we will not need to synthesize key repeats ourselves.
-                entry->repeatCount = mKeyRepeatState.lastKeyEntry->repeatCount + 1;
-                resetKeyRepeatLocked();
-                mKeyRepeatState.nextRepeatTime = LONG_LONG_MAX; // don't generate repeats ourselves
-            } else {
-                // Not a repeat.  Save key down state in case we do see a repeat later.
-                resetKeyRepeatLocked();
-                mKeyRepeatState.nextRepeatTime = entry->eventTime + keyRepeatTimeout;
-            }
-            mKeyRepeatState.lastKeyEntry = entry;
-            entry->refCount += 1;
-        } else if (! entry->syntheticRepeat) {
-            resetKeyRepeatLocked();
-        }
-
-        entry->dispatchInProgress = true;
-        resetTargetsLocked();
-    }
-
     // Identify targets.
     if (! mCurrentInputTargetsValid) {
         int32_t injectionResult = findFocusedWindowTargetsLocked(currentTime,
@@ -705,16 +705,24 @@
 #if DEBUG_OUTBOUND_EVENT_DETAILS
     LOGD("%seventTime=%lld, deviceId=0x%x, source=0x%x, policyFlags=0x%x, "
             "action=0x%x, flags=0x%x, keyCode=0x%x, scanCode=0x%x, metaState=0x%x, "
-            "downTime=%lld",
+            "repeatCount=%d, downTime=%lld",
             prefix,
             entry->eventTime, entry->deviceId, entry->source, entry->policyFlags,
             entry->action, entry->flags, entry->keyCode, entry->scanCode, entry->metaState,
-            entry->downTime);
+            entry->repeatCount, entry->downTime);
 #endif
 }
 
 bool InputDispatcher::dispatchMotionLocked(
         nsecs_t currentTime, MotionEntry* entry, DropReason* dropReason, nsecs_t* nextWakeupTime) {
+    // Preprocessing.
+    if (! entry->dispatchInProgress) {
+        entry->dispatchInProgress = true;
+        resetTargetsLocked();
+
+        logOutboundMotionDetailsLocked("dispatchMotion - ", entry);
+    }
+
     // Clean up if dropping the event.
     if (*dropReason != DROP_REASON_NOT_DROPPED) {
         resetTargetsLocked();
@@ -723,14 +731,6 @@
         return true;
     }
 
-    // Preprocessing.
-    if (! entry->dispatchInProgress) {
-        logOutboundMotionDetailsLocked("dispatchMotion - ", entry);
-
-        entry->dispatchInProgress = true;
-        resetTargetsLocked();
-    }
-
     bool isPointerEvent = entry->source & AINPUT_SOURCE_CLASS_POINTER;
 
     // Identify targets.
@@ -1416,7 +1416,7 @@
                 eventType = POWER_MANAGER_TOUCH_UP_EVENT;
                 break;
             default:
-                if (motionEntry->eventTime - motionEntry->downTime >= EVENT_IGNORE_DURATION) {
+                if (motionEntry->eventTime - motionEntry->downTime < LONG_TOUCH_DELAY) {
                     eventType = POWER_MANAGER_TOUCH_EVENT;
                 } else {
                     eventType = POWER_MANAGER_LONG_TOUCH_EVENT;
diff --git a/libs/ui/InputReader.cpp b/libs/ui/InputReader.cpp
index d167439..3197ab2 100644
--- a/libs/ui/InputReader.cpp
+++ b/libs/ui/InputReader.cpp
@@ -934,7 +934,7 @@
             ssize_t keyDownIndex = findKeyDownLocked(scanCode);
             if (keyDownIndex >= 0) {
                 // key repeat, be sure to use same keycode as before in case of rotation
-                keyCode = mLocked.keyDowns.top().keyCode;
+                keyCode = mLocked.keyDowns.itemAt(keyDownIndex).keyCode;
             } else {
                 // key down
                 mLocked.keyDowns.push();
@@ -949,7 +949,7 @@
             ssize_t keyDownIndex = findKeyDownLocked(scanCode);
             if (keyDownIndex >= 0) {
                 // key up, be sure to use same keycode as before in case of rotation
-                keyCode = mLocked.keyDowns.top().keyCode;
+                keyCode = mLocked.keyDowns.itemAt(keyDownIndex).keyCode;
                 mLocked.keyDowns.removeAt(size_t(keyDownIndex));
             } else {
                 // key was not actually down
diff --git a/libs/ui/Region.cpp b/libs/ui/Region.cpp
index 12db908..1994f6a 100644
--- a/libs/ui/Region.cpp
+++ b/libs/ui/Region.cpp
@@ -289,7 +289,7 @@
     void flushSpan() {
         bool merge = false;
         if (tail-head == ssize_t(span.size())) {
-            Rect const* p = cur;
+            Rect const* p = span.editArray();
             Rect const* q = head;
             if (p->top == q->bottom) {
                 merge = true;
diff --git a/media/java/android/media/CamcorderProfile.java b/media/java/android/media/CamcorderProfile.java
index a27df57..4004c76 100644
--- a/media/java/android/media/CamcorderProfile.java
+++ b/media/java/android/media/CamcorderProfile.java
@@ -16,6 +16,9 @@
 
 package android.media;
 
+import android.hardware.Camera;
+import android.hardware.Camera.CameraInfo;
+
 /**
  * The CamcorderProfile class is used to retrieve the
  * predefined camcorder profile settings for camcorder applications.
@@ -119,12 +122,21 @@
     public int audioChannels;
 
     /**
-     * Returns the camcorder profile for the default camera at the given
-     * quality level.
+     * Returns the camcorder profile for the first back-facing camera on the
+     * device at the given quality level. If the device has no back-facing
+     * camera, this returns null.
      * @param quality the target quality level for the camcorder profile
      */
     public static CamcorderProfile get(int quality) {
-        return get(0, quality);
+        int numberOfCameras = Camera.getNumberOfCameras();
+        CameraInfo cameraInfo = new CameraInfo();
+        for (int i = 0; i < numberOfCameras; i++) {
+            Camera.getCameraInfo(i, cameraInfo);
+            if (cameraInfo.facing == CameraInfo.CAMERA_FACING_BACK) {
+                return get(i, quality);
+            }
+        }
+        return null;
     }
 
     /**
diff --git a/media/java/android/media/CameraProfile.java b/media/java/android/media/CameraProfile.java
index 6a0be08..905e2d2d 100644
--- a/media/java/android/media/CameraProfile.java
+++ b/media/java/android/media/CameraProfile.java
@@ -16,6 +16,9 @@
 
 package android.media;
 
+import android.hardware.Camera;
+import android.hardware.Camera.CameraInfo;
+
 import java.util.Arrays;
 import java.util.HashMap;
 
@@ -46,12 +49,21 @@
     /**
      * Returns a pre-defined still image capture (jpeg) quality level
      * used for the given quality level in the Camera application for
-     * the default camera.
+     * the first back-facing camera on the device. If the device has no
+     * back-facing camera, this returns 0.
      *
      * @param quality The target quality level
      */
     public static int getJpegEncodingQualityParameter(int quality) {
-        return getJpegEncodingQualityParameter(0, quality);
+        int numberOfCameras = Camera.getNumberOfCameras();
+        CameraInfo cameraInfo = new CameraInfo();
+        for (int i = 0; i < numberOfCameras; i++) {
+            Camera.getCameraInfo(i, cameraInfo);
+            if (cameraInfo.facing == CameraInfo.CAMERA_FACING_BACK) {
+                return getJpegEncodingQualityParameter(i, quality);
+            }
+        }
+        return 0;
     }
 
     /**
diff --git a/media/java/android/media/MediaRecorder.java b/media/java/android/media/MediaRecorder.java
index b38124e..ecabae8 100644
--- a/media/java/android/media/MediaRecorder.java
+++ b/media/java/android/media/MediaRecorder.java
@@ -285,6 +285,31 @@
     }
 
     /**
+     * Sets the orientation hint for output video playback.
+     * This method should be called before prepare(). 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/jni/android_media_MediaMetadataRetriever.cpp b/media/jni/android_media_MediaMetadataRetriever.cpp
index efea802..63e9dc8 100644
--- a/media/jni/android_media_MediaMetadataRetriever.cpp
+++ b/media/jni/android_media_MediaMetadataRetriever.cpp
@@ -36,6 +36,7 @@
     jfieldID context;
     jclass bitmapClazz;
     jmethodID bitmapConstructor;
+    jmethodID createBitmapMethod;
 };
 
 static fields_t fields;
@@ -174,6 +175,41 @@
         return NULL;
     }
 
+    jobject matrix = NULL;
+    if (videoFrame->mRotationAngle != 0) {
+        LOGD("Create a rotation matrix: %d degrees", videoFrame->mRotationAngle);
+        jclass matrixClazz = env->FindClass("android/graphics/Matrix");
+        if (matrixClazz == NULL) {
+            jniThrowException(env, "java/lang/RuntimeException",
+                "Can't find android/graphics/Matrix");
+            return NULL;
+        }
+        jmethodID matrixConstructor =
+            env->GetMethodID(matrixClazz, "<init>", "()V");
+        if (matrixConstructor == NULL) {
+            jniThrowException(env, "java/lang/RuntimeException",
+                "Can't find Matrix constructor");
+            return NULL;
+        }
+        matrix =
+            env->NewObject(matrixClazz, matrixConstructor);
+        if (matrix == NULL) {
+            LOGE("Could not create a Matrix object");
+            return NULL;
+        }
+
+        LOGV("Rotate the matrix: %d degrees", videoFrame->mRotationAngle);
+        jmethodID setRotateMethod =
+                env->GetMethodID(matrixClazz, "setRotate", "(F)V");
+        if (setRotateMethod == NULL) {
+            jniThrowException(env, "java/lang/RuntimeException",
+                "Can't find Matrix setRotate method");
+            return NULL;
+        }
+        env->CallVoidMethod(matrix, setRotateMethod, 1.0 * videoFrame->mRotationAngle);
+        env->DeleteLocalRef(matrixClazz);
+    }
+
     // Create a SkBitmap to hold the pixels
     SkBitmap *bitmap = new SkBitmap();
     if (bitmap == NULL) {
@@ -191,7 +227,19 @@
     // Since internally SkBitmap uses reference count to manage the reference to
     // its pixels, it is important that the pixels (along with SkBitmap) be
     // available after creating the Bitmap is returned to Java app.
-    return env->NewObject(fields.bitmapClazz, fields.bitmapConstructor, (int) bitmap, true, NULL, -1);
+    jobject jSrcBitmap = env->NewObject(fields.bitmapClazz,
+            fields.bitmapConstructor, (int) bitmap, true, NULL, -1);
+
+    LOGV("Return a new bitmap constructed with the rotation matrix");
+    return env->CallStaticObjectMethod(
+                fields.bitmapClazz, fields.createBitmapMethod,
+                jSrcBitmap,                     // source Bitmap
+                0,                              // x
+                0,                              // y
+                videoFrame->mDisplayWidth,      // width
+                videoFrame->mDisplayHeight,     // height
+                matrix,                         // transform matrix
+                false);                         // filter
 }
 
 static jbyteArray android_media_MediaMetadataRetriever_extractAlbumArt(JNIEnv *env, jobject thiz)
@@ -291,6 +339,15 @@
         jniThrowException(env, "java/lang/RuntimeException", "Can't find Bitmap constructor");
         return;
     }
+    fields.createBitmapMethod =
+            env->GetStaticMethodID(fields.bitmapClazz, "createBitmap",
+                    "(Landroid/graphics/Bitmap;IIIILandroid/graphics/Matrix;Z)"
+                    "Landroid/graphics/Bitmap;");
+    if (fields.createBitmapMethod == NULL) {
+        jniThrowException(env, "java/lang/RuntimeException",
+                "Can't find Bitmap.createBitmap method");
+        return;
+    }
 }
 
 static void android_media_MediaMetadataRetriever_native_setup(JNIEnv *env, jobject thiz)
diff --git a/media/libmedia/IOMX.cpp b/media/libmedia/IOMX.cpp
index f3804b8..ae6c2bf 100644
--- a/media/libmedia/IOMX.cpp
+++ b/media/libmedia/IOMX.cpp
@@ -38,11 +38,13 @@
         const char *componentName,
         OMX_COLOR_FORMATTYPE colorFormat,
         size_t encodedWidth, size_t encodedHeight,
-        size_t displayWidth, size_t displayHeight) {
+        size_t displayWidth, size_t displayHeight,
+        int32_t rotationDegrees) {
     return createRenderer(
             surface->getISurface(),
             componentName, colorFormat, encodedWidth, encodedHeight,
-            displayWidth, displayHeight);
+            displayWidth, displayHeight,
+            rotationDegrees);
 }
 
 sp<IOMXRenderer> IOMX::createRendererFromJavaSurface(
@@ -50,7 +52,8 @@
         const char *componentName,
         OMX_COLOR_FORMATTYPE colorFormat,
         size_t encodedWidth, size_t encodedHeight,
-        size_t displayWidth, size_t displayHeight) {
+        size_t displayWidth, size_t displayHeight,
+        int32_t rotationDegrees) {
     jclass surfaceClass = env->FindClass("android/view/Surface");
     if (surfaceClass == NULL) {
         LOGE("Can't find android/view/Surface");
@@ -67,7 +70,8 @@
 
     return createRenderer(
             surface, componentName, colorFormat, encodedWidth,
-            encodedHeight, displayWidth, displayHeight);
+            encodedHeight, displayWidth, displayHeight,
+            rotationDegrees);
 }
 
 class BpOMX : public BpInterface<IOMX> {
@@ -349,7 +353,8 @@
             const char *componentName,
             OMX_COLOR_FORMATTYPE colorFormat,
             size_t encodedWidth, size_t encodedHeight,
-            size_t displayWidth, size_t displayHeight) {
+            size_t displayWidth, size_t displayHeight,
+            int32_t rotationDegrees) {
         Parcel data, reply;
         data.writeInterfaceToken(IOMX::getInterfaceDescriptor());
 
@@ -360,6 +365,7 @@
         data.writeInt32(encodedHeight);
         data.writeInt32(displayWidth);
         data.writeInt32(displayHeight);
+        data.writeInt32(rotationDegrees);
 
         remote()->transact(CREATE_RENDERER, data, &reply);
 
@@ -682,11 +688,13 @@
             size_t encodedHeight = (size_t)data.readInt32();
             size_t displayWidth = (size_t)data.readInt32();
             size_t displayHeight = (size_t)data.readInt32();
+            int32_t rotationDegrees = data.readInt32();
 
             sp<IOMXRenderer> renderer =
                 createRenderer(isurface, componentName, colorFormat,
                                encodedWidth, encodedHeight,
-                               displayWidth, displayHeight);
+                               displayWidth, displayHeight,
+                               rotationDegrees);
 
             reply->writeStrongBinder(renderer->asBinder());
 
diff --git a/media/libmediaplayerservice/MetadataRetrieverClient.cpp b/media/libmediaplayerservice/MetadataRetrieverClient.cpp
index ca229fa..39fce81 100644
--- a/media/libmediaplayerservice/MetadataRetrieverClient.cpp
+++ b/media/libmediaplayerservice/MetadataRetrieverClient.cpp
@@ -253,6 +253,8 @@
     frameCopy->mDisplayWidth = frame->mDisplayWidth;
     frameCopy->mDisplayHeight = frame->mDisplayHeight;
     frameCopy->mSize = frame->mSize;
+    frameCopy->mRotationAngle = frame->mRotationAngle;
+    LOGV("rotation: %d", frameCopy->mRotationAngle);
     frameCopy->mData = (uint8_t *)frameCopy + sizeof(VideoFrame);
     memcpy(frameCopy->mData, frame->mData, frame->mSize);
     delete frame;  // Fix memory leakage
diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp
index d37d83d..553648d 100644
--- a/media/libmediaplayerservice/StagefrightRecorder.cpp
+++ b/media/libmediaplayerservice/StagefrightRecorder.cpp
@@ -340,6 +340,17 @@
     return OK;
 }
 
+// Always rotate clockwise, and only support 0, 90, 180 and 270 for now.
+status_t StagefrightRecorder::setParamVideoRotation(int32_t degrees) {
+    LOGV("setParamVideoRotation: %d", degrees);
+    if (degrees < 0 || degrees % 90 != 0) {
+        LOGE("Unsupported video rotation angle: %d", degrees);
+        return BAD_VALUE;
+    }
+    mRotationDegrees = degrees % 360;
+    return OK;
+}
+
 status_t StagefrightRecorder::setParamMaxFileDurationUs(int64_t timeUs) {
     LOGV("setParamMaxFileDurationUs: %lld us", timeUs);
     if (timeUs <= 0) {
@@ -532,6 +543,11 @@
         if (safe_strtoi32(value.string(), &video_bitrate)) {
             return setParamVideoEncodingBitRate(video_bitrate);
         }
+    } else if (key == "video-param-rotation-angle-degrees") {
+        int32_t degrees;
+        if (safe_strtoi32(value.string(), &degrees)) {
+            return setParamVideoRotation(degrees);
+        }
     } else if (key == "video-param-i-frames-interval") {
         int32_t seconds;
         if (safe_strtoi32(value.string(), &seconds)) {
@@ -1105,6 +1121,9 @@
     if (mTrackEveryTimeDurationUs > 0) {
         meta->setInt64(kKeyTrackTimeStatus, mTrackEveryTimeDurationUs);
     }
+    if (mRotationDegrees != 0) {
+        meta->setInt32(kKeyRotationDegree, mRotationDegrees);
+    }
     writer->setListener(mListener);
     mWriter = writer;
     return mWriter->start(meta.get());
@@ -1187,6 +1206,7 @@
     mMaxFileDurationUs = 0;
     mMaxFileSizeBytes = 0;
     mTrackEveryTimeDurationUs = 0;
+    mRotationDegrees = 0;
     mEncoderProfiles = MediaProfiles::getInstance();
 
     mOutputFd = -1;
diff --git a/media/libmediaplayerservice/StagefrightRecorder.h b/media/libmediaplayerservice/StagefrightRecorder.h
index ad0dfa0..e42df2e 100644
--- a/media/libmediaplayerservice/StagefrightRecorder.h
+++ b/media/libmediaplayerservice/StagefrightRecorder.h
@@ -91,6 +91,7 @@
     int64_t mMaxFileSizeBytes;
     int64_t mMaxFileDurationUs;
     int64_t mTrackEveryTimeDurationUs;
+    int32_t mRotationDegrees;  // Clockwise
 
     String8 mParams;
     int mOutputFd;
@@ -120,6 +121,7 @@
     status_t setParamVideoEncoderLevel(int32_t level);
     status_t setParamVideoCameraId(int32_t cameraId);
     status_t setParamVideoTimeScale(int32_t timeScale);
+    status_t setParamVideoRotation(int32_t degrees);
     status_t setParamTrackTimeStatus(int64_t timeDurationUs);
     status_t setParamInterleaveDuration(int32_t durationUs);
     status_t setParam64BitFileOffset(bool use64BitFileOffset);
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 064a00c..66eb7ee 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -103,12 +103,14 @@
             OMX_COLOR_FORMATTYPE colorFormat,
             const sp<ISurface> &surface,
             size_t displayWidth, size_t displayHeight,
-            size_t decodedWidth, size_t decodedHeight)
+            size_t decodedWidth, size_t decodedHeight,
+            int32_t rotationDegrees)
         : mTarget(NULL),
           mLibHandle(NULL) {
             init(previewOnly, componentName,
                  colorFormat, surface, displayWidth,
-                 displayHeight, decodedWidth, decodedHeight);
+                 displayHeight, decodedWidth, decodedHeight,
+                 rotationDegrees);
     }
 
     virtual void render(MediaBuffer *buffer) {
@@ -141,7 +143,8 @@
             OMX_COLOR_FORMATTYPE colorFormat,
             const sp<ISurface> &surface,
             size_t displayWidth, size_t displayHeight,
-            size_t decodedWidth, size_t decodedHeight);
+            size_t decodedWidth, size_t decodedHeight,
+            int32_t rotationDegrees);
 
     AwesomeLocalRenderer(const AwesomeLocalRenderer &);
     AwesomeLocalRenderer &operator=(const AwesomeLocalRenderer &);;
@@ -153,7 +156,8 @@
         OMX_COLOR_FORMATTYPE colorFormat,
         const sp<ISurface> &surface,
         size_t displayWidth, size_t displayHeight,
-        size_t decodedWidth, size_t decodedHeight) {
+        size_t decodedWidth, size_t decodedHeight,
+        int32_t rotationDegrees) {
     if (!previewOnly) {
         // We will stick to the vanilla software-color-converting renderer
         // for "previewOnly" mode, to avoid unneccessarily switching overlays
@@ -162,6 +166,14 @@
         mLibHandle = dlopen("libstagefrighthw.so", RTLD_NOW);
 
         if (mLibHandle) {
+            typedef VideoRenderer *(*CreateRendererWithRotationFunc)(
+                    const sp<ISurface> &surface,
+                    const char *componentName,
+                    OMX_COLOR_FORMATTYPE colorFormat,
+                    size_t displayWidth, size_t displayHeight,
+                    size_t decodedWidth, size_t decodedHeight,
+                    int32_t rotationDegrees);
+
             typedef VideoRenderer *(*CreateRendererFunc)(
                     const sp<ISurface> &surface,
                     const char *componentName,
@@ -169,17 +181,36 @@
                     size_t displayWidth, size_t displayHeight,
                     size_t decodedWidth, size_t decodedHeight);
 
-            CreateRendererFunc func =
-                (CreateRendererFunc)dlsym(
+            CreateRendererWithRotationFunc funcWithRotation =
+                (CreateRendererWithRotationFunc)dlsym(
                         mLibHandle,
-                        "_Z14createRendererRKN7android2spINS_8ISurfaceEEEPKc20"
-                        "OMX_COLOR_FORMATTYPEjjjj");
+                        "_Z26createRendererWithRotationRKN7android2spINS_8"
+                        "ISurfaceEEEPKc20OMX_COLOR_FORMATTYPEjjjji");
 
-            if (func) {
+            if (funcWithRotation) {
                 mTarget =
-                    (*func)(surface, componentName, colorFormat,
-                        displayWidth, displayHeight,
-                        decodedWidth, decodedHeight);
+                    (*funcWithRotation)(
+                            surface, componentName, colorFormat,
+                            displayWidth, displayHeight,
+                            decodedWidth, decodedHeight,
+                            rotationDegrees);
+            } else {
+                if (rotationDegrees != 0) {
+                    LOGW("renderer does not support rotation.");
+                }
+
+                CreateRendererFunc func =
+                    (CreateRendererFunc)dlsym(
+                            mLibHandle,
+                            "_Z14createRendererRKN7android2spINS_8ISurfaceEEEPKc20"
+                            "OMX_COLOR_FORMATTYPEjjjj");
+
+                if (func) {
+                    mTarget =
+                        (*func)(surface, componentName, colorFormat,
+                            displayWidth, displayHeight,
+                            decodedWidth, decodedHeight);
+                }
             }
         }
     }
@@ -187,7 +218,7 @@
     if (mTarget == NULL) {
         mTarget = new SoftwareRenderer(
                 colorFormat, surface, displayWidth, displayHeight,
-                decodedWidth, decodedHeight);
+                decodedWidth, decodedHeight, rotationDegrees);
     }
 }
 
@@ -785,6 +816,12 @@
         CHECK(meta->findInt32(kKeyWidth, &decodedWidth));
         CHECK(meta->findInt32(kKeyHeight, &decodedHeight));
 
+        int32_t rotationDegrees;
+        if (!mVideoTrack->getFormat()->findInt32(
+                    kKeyRotation, &rotationDegrees)) {
+            rotationDegrees = 0;
+        }
+
         mVideoRenderer.clear();
 
         // Must ensure that mVideoRenderer's destructor is actually executed
@@ -800,7 +837,8 @@
                         mISurface, component,
                         (OMX_COLOR_FORMATTYPE)format,
                         decodedWidth, decodedHeight,
-                        mVideoWidth, mVideoHeight));
+                        mVideoWidth, mVideoHeight,
+                        rotationDegrees));
         } else {
             // Other decoders are instantiated locally and as a consequence
             // allocate their buffers in local address space.
@@ -810,7 +848,7 @@
                 (OMX_COLOR_FORMATTYPE)format,
                 mISurface,
                 mVideoWidth, mVideoHeight,
-                decodedWidth, decodedHeight);
+                decodedWidth, decodedHeight, rotationDegrees);
         }
     }
 }
@@ -1625,7 +1663,22 @@
         if (mVideoWidth < 0 || mVideoHeight < 0) {
             notifyListener_l(MEDIA_SET_VIDEO_SIZE, 0, 0);
         } else {
-            notifyListener_l(MEDIA_SET_VIDEO_SIZE, mVideoWidth, mVideoHeight);
+            int32_t rotationDegrees;
+            if (!mVideoTrack->getFormat()->findInt32(
+                        kKeyRotation, &rotationDegrees)) {
+                rotationDegrees = 0;
+            }
+
+#if 1
+            if (rotationDegrees == 90 || rotationDegrees == 270) {
+                notifyListener_l(
+                        MEDIA_SET_VIDEO_SIZE, mVideoHeight, mVideoWidth);
+            } else
+#endif
+            {
+                notifyListener_l(
+                        MEDIA_SET_VIDEO_SIZE, mVideoWidth, mVideoHeight);
+            }
         }
 
         notifyListener_l(MEDIA_PREPARED);
@@ -1757,7 +1810,8 @@
                     state->mVideoWidth,
                     state->mVideoHeight,
                     state->mDecodedWidth,
-                    state->mDecodedHeight);
+                    state->mDecodedHeight,
+                    0);
 
         mVideoRendererIsPreview = true;
 
diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp
index f404708..2154f2f 100644
--- a/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/MPEG4Extractor.cpp
@@ -27,11 +27,11 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include <media/stagefright/foundation/ADebug.h>
 #include <media/stagefright/DataSource.h>
 #include "include/ESDS.h"
 #include <media/stagefright/MediaBuffer.h>
 #include <media/stagefright/MediaBufferGroup.h>
-#include <media/stagefright/MediaDebug.h>
 #include <media/stagefright/MediaDefs.h>
 #include <media/stagefright/MediaSource.h>
 #include <media/stagefright/MetaData.h>
@@ -579,52 +579,9 @@
 
         case FOURCC('t', 'k', 'h', 'd'):
         {
-            if (chunk_data_size < 4) {
-                return ERROR_MALFORMED;
-            }
-
-            uint8_t version;
-            if (mDataSource->readAt(data_offset, &version, 1) < 1) {
-                return ERROR_IO;
-            }
-
-            uint64_t ctime, mtime, duration;
-            int32_t id;
-            uint32_t width, height;
-
-            if (version == 1) {
-                if (chunk_data_size != 36 + 60) {
-                    return ERROR_MALFORMED;
-                }
-
-                uint8_t buffer[36 + 60];
-                if (mDataSource->readAt(
-                            data_offset, buffer, sizeof(buffer)) < (ssize_t)sizeof(buffer)) {
-                    return ERROR_IO;
-                }
-
-                ctime = U64_AT(&buffer[4]);
-                mtime = U64_AT(&buffer[12]);
-                id = U32_AT(&buffer[20]);
-                duration = U64_AT(&buffer[28]);
-                width = U32_AT(&buffer[88]);
-                height = U32_AT(&buffer[92]);
-            } else if (version == 0) {
-                if (chunk_data_size != 24 + 60) {
-                    return ERROR_MALFORMED;
-                }
-
-                uint8_t buffer[24 + 60];
-                if (mDataSource->readAt(
-                            data_offset, buffer, sizeof(buffer)) < (ssize_t)sizeof(buffer)) {
-                    return ERROR_IO;
-                }
-                ctime = U32_AT(&buffer[4]);
-                mtime = U32_AT(&buffer[8]);
-                id = U32_AT(&buffer[12]);
-                duration = U32_AT(&buffer[20]);
-                width = U32_AT(&buffer[76]);
-                height = U32_AT(&buffer[80]);
+            status_t err;
+            if ((err = parseTrackHeader(data_offset, chunk_data_size)) != OK) {
+                return err;
             }
 
             *offset += chunk_size;
@@ -1073,6 +1030,89 @@
     return OK;
 }
 
+status_t MPEG4Extractor::parseTrackHeader(
+        off_t data_offset, off_t data_size) {
+    if (data_size < 4) {
+        return ERROR_MALFORMED;
+    }
+
+    uint8_t version;
+    if (mDataSource->readAt(data_offset, &version, 1) < 1) {
+        return ERROR_IO;
+    }
+
+    size_t dynSize = (version == 1) ? 36 : 24;
+
+    uint8_t buffer[36 + 60];
+
+    if (data_size != (off_t)dynSize + 60) {
+        return ERROR_MALFORMED;
+    }
+
+    if (mDataSource->readAt(
+                data_offset, buffer, data_size) < (ssize_t)data_size) {
+        return ERROR_IO;
+    }
+
+    uint64_t ctime, mtime, duration;
+    int32_t id;
+
+    if (version == 1) {
+        ctime = U64_AT(&buffer[4]);
+        mtime = U64_AT(&buffer[12]);
+        id = U32_AT(&buffer[20]);
+        duration = U64_AT(&buffer[28]);
+    } else if (version == 0) {
+        ctime = U32_AT(&buffer[4]);
+        mtime = U32_AT(&buffer[8]);
+        id = U32_AT(&buffer[12]);
+        duration = U32_AT(&buffer[20]);
+    }
+
+    size_t matrixOffset = dynSize + 16;
+    int32_t a00 = U32_AT(&buffer[matrixOffset]);
+    int32_t a01 = U32_AT(&buffer[matrixOffset + 4]);
+    int32_t dx = U32_AT(&buffer[matrixOffset + 8]);
+    int32_t a10 = U32_AT(&buffer[matrixOffset + 12]);
+    int32_t a11 = U32_AT(&buffer[matrixOffset + 16]);
+    int32_t dy = U32_AT(&buffer[matrixOffset + 20]);
+
+#if 0
+    LOGI("x' = %.2f * x + %.2f * y + %.2f",
+         a00 / 65536.0f, a01 / 65536.0f, dx / 65536.0f);
+    LOGI("y' = %.2f * x + %.2f * y + %.2f",
+         a10 / 65536.0f, a11 / 65536.0f, dy / 65536.0f);
+#endif
+
+    uint32_t rotationDegrees;
+
+    static const int32_t kFixedOne = 0x10000;
+    if (a00 == kFixedOne && a01 == 0 && a10 == 0 && a11 == kFixedOne) {
+        // Identity, no rotation
+        rotationDegrees = 0;
+    } else if (a00 == 0 && a01 == kFixedOne && a10 == -kFixedOne && a11 == 0) {
+        rotationDegrees = 90;
+    } else if (a00 == 0 && a01 == -kFixedOne && a10 == kFixedOne && a11 == 0) {
+        rotationDegrees = 270;
+    } else if (a00 == -kFixedOne && a01 == 0 && a10 == 0 && a11 == -kFixedOne) {
+        rotationDegrees = 180;
+    } else {
+        LOGW("We only support 0,90,180,270 degree rotation matrices");
+        rotationDegrees = 0;
+    }
+
+    if (rotationDegrees != 0) {
+        mLastTrack->meta->setInt32(kKeyRotation, rotationDegrees);
+    }
+
+#if 0
+    uint32_t width = U32_AT(&buffer[dynSize + 52]);
+    uint32_t height = U32_AT(&buffer[dynSize + 56]);
+#endif
+
+    return OK;
+}
+
 status_t MPEG4Extractor::parseMetaData(off_t offset, size_t size) {
     if (size < 4) {
         return ERROR_MALFORMED;
@@ -1386,7 +1426,7 @@
         const uint8_t *ptr = (const uint8_t *)data;
 
         CHECK(size >= 7);
-        CHECK_EQ(ptr[0], 1);  // configurationVersion == 1
+        CHECK_EQ((unsigned)ptr[0], 1u);  // configurationVersion == 1
 
         // The number of bytes used to encode the length of a NAL unit.
         mNALLengthSize = 1 + (ptr[4] & 3);
@@ -1534,7 +1574,7 @@
         }
 
         uint32_t sampleTime;
-        CHECK_EQ(OK, mSampleTable->getMetaDataForSample(
+        CHECK_EQ((status_t)OK, mSampleTable->getMetaDataForSample(
                     sampleIndex, NULL, NULL, &sampleTime));
 
         if (mode == ReadOptions::SEEK_CLOSEST) {
@@ -1581,7 +1621,7 @@
         err = mGroup->acquire_buffer(&mBuffer);
 
         if (err != OK) {
-            CHECK_EQ(mBuffer, NULL);
+            CHECK(mBuffer == NULL);
             return err;
         }
     }
diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp
index a15c274..cbb1604 100644
--- a/media/libstagefright/MPEG4Writer.cpp
+++ b/media/libstagefright/MPEG4Writer.cpp
@@ -202,6 +202,7 @@
 
     // Simple validation on the codec specific data
     status_t checkCodecSpecificData() const;
+    int32_t mRotation;
 
     void updateTrackSizeEstimate();
     void addOneStscTableEntry(size_t chunkId, size_t sampleId);
@@ -519,6 +520,58 @@
     pthread_join(mThread, &dummy);
 }
 
+/*
+ * MP4 file standard defines a composition matrix:
+ * | a  b  u |
+ * | c  d  v |
+ * | x  y  w |
+ *
+ * the element in the matrix is stored in the following
+ * order: {a, b, u, c, d, v, x, y, w},
+ * where a, b, c, d, x, and y is in 16.16 format, while
+ * u, v and w is in 2.30 format.
+ */
+void MPEG4Writer::writeCompositionMatrix(int degrees) {
+    LOGV("writeCompositionMatrix");
+    uint32_t a = 0x00010000;
+    uint32_t b = 0;
+    uint32_t c = 0;
+    uint32_t d = 0x00010000;
+    switch (degrees) {
+        case 0:
+            break;
+        case 90:
+            a = 0;
+            b = 0x00010000;
+            c = 0xFFFF0000;
+            d = 0;
+            break;
+        case 180:
+            a = 0xFFFF0000;
+            d = 0xFFFF0000;
+            break;
+        case 270:
+            a = 0;
+            b = 0xFFFF0000;
+            c = 0x00010000;
+            d = 0;
+            break;
+        default:
+            CHECK(!"Should never reach this unknown rotation");
+            break;
+    }
+
+    writeInt32(a);           // a
+    writeInt32(b);           // b
+    writeInt32(0);           // u
+    writeInt32(c);           // c
+    writeInt32(d);           // d
+    writeInt32(0);           // v
+    writeInt32(0);           // x
+    writeInt32(0);           // y
+    writeInt32(0x40000000);  // w
+}
+
 status_t MPEG4Writer::stop() {
     if (mFile == NULL) {
         return OK;
@@ -584,15 +637,7 @@
         writeInt16(0);             // reserved
         writeInt32(0);             // reserved
         writeInt32(0);             // reserved
-        writeInt32(0x10000);       // matrix
-        writeInt32(0);
-        writeInt32(0);
-        writeInt32(0);
-        writeInt32(0x10000);
-        writeInt32(0);
-        writeInt32(0);
-        writeInt32(0);
-        writeInt32(0x40000000);
+        writeCompositionMatrix(0);
         writeInt32(0);             // predefined
         writeInt32(0);             // predefined
         writeInt32(0);             // predefined
@@ -885,7 +930,8 @@
       mCodecSpecificData(NULL),
       mCodecSpecificDataSize(0),
       mGotAllCodecSpecificData(false),
-      mReachedEOS(false) {
+      mReachedEOS(false),
+      mRotation(0) {
     getCodecSpecificDataFromInputFormatIfPossible();
 
     const char *mime;
@@ -1178,6 +1224,11 @@
         startTimeUs = 0;
     }
 
+    int32_t rotationDegrees;
+    if (!mIsAudio && params && params->findInt32(kKeyRotationDegree, &rotationDegrees)) {
+        mRotation = rotationDegrees;
+    }
+
     mIsRealTimeRecording = true;
     {
         int32_t isNotRealTime;
@@ -2071,15 +2122,7 @@
         mOwner->writeInt16(mIsAudio ? 0x100 : 0);  // volume
         mOwner->writeInt16(0);             // reserved
 
-        mOwner->writeInt32(0x10000);       // matrix
-        mOwner->writeInt32(0);
-        mOwner->writeInt32(0);
-        mOwner->writeInt32(0);
-        mOwner->writeInt32(0x10000);
-        mOwner->writeInt32(0);
-        mOwner->writeInt32(0);
-        mOwner->writeInt32(0);
-        mOwner->writeInt32(0x40000000);
+        mOwner->writeCompositionMatrix(mRotation);
 
         if (mIsAudio) {
             mOwner->writeInt32(0);
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 9a49a9b..980da77 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -412,6 +412,13 @@
         quirks |= kOutputBuffersAreUnreadable;
     }
 
+    if (!strncmp(componentName, "OMX.SEC.", 8) && isEncoder) {
+        // These input buffers contain meta data (for instance,
+        // information helps locate the actual YUV data, or
+        // the physical address of the YUV data).
+        quirks |= kStoreMetaDataInInputVideoBuffers;
+    }
+
     return quirks;
 }
 
@@ -1695,7 +1702,15 @@
                      "an EMPTY_BUFFER_DONE.", buffer);
             }
 
-            buffers->editItemAt(i).mOwnedByComponent = false;
+            {
+                BufferInfo *info = &buffers->editItemAt(i);
+                info->mOwnedByComponent = false;
+                if (info->mMediaBuffer != NULL) {
+                    // It is time to release the media buffers storing meta data
+                    info->mMediaBuffer->release();
+                    info->mMediaBuffer = NULL;
+                }
+            }
 
             if (mPortStatus[kPortIndexInput] == DISABLING) {
                 CODEC_LOGV("Port is disabled, freeing buffer %p", buffer);
@@ -2202,6 +2217,7 @@
             CHECK_EQ(info->mMediaBuffer->refcount(), 0);
 
             info->mMediaBuffer->release();
+            info->mMediaBuffer = NULL;
         }
 
         buffers->removeAt(i);
@@ -2434,11 +2450,19 @@
             break;
         }
 
+        // Do not release the media buffer if it stores meta data
+        // instead of YUV data. The release is delayed until
+        // EMPTY_BUFFER_DONE callback is received.
+        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();
         } else {
+            if (mQuirks & kStoreMetaDataInInputVideoBuffers) {
+                releaseBuffer = false;
+                info->mMediaBuffer = srcBuffer;
+            }
             memcpy((uint8_t *)info->mData + offset,
                     (const uint8_t *)srcBuffer->data() + srcBuffer->range_offset(),
                     srcBuffer->range_length());
@@ -2454,8 +2478,10 @@
 
         offset += srcBuffer->range_length();
 
-        srcBuffer->release();
-        srcBuffer = NULL;
+        if (releaseBuffer) {
+            srcBuffer->release();
+            srcBuffer = NULL;
+        }
 
         ++n;
 
diff --git a/media/libstagefright/StagefrightMetadataRetriever.cpp b/media/libstagefright/StagefrightMetadataRetriever.cpp
index a800a93..9b2dec9 100644
--- a/media/libstagefright/StagefrightMetadataRetriever.cpp
+++ b/media/libstagefright/StagefrightMetadataRetriever.cpp
@@ -191,6 +191,11 @@
     CHECK(meta->findInt32(kKeyWidth, &width));
     CHECK(meta->findInt32(kKeyHeight, &height));
 
+    int32_t rotationAngle;
+    if (!trackMeta->findInt32(kKeyRotation, &rotationAngle)) {
+        rotationAngle = 0;  // By default, no rotation
+    }
+
     VideoFrame *frame = new VideoFrame;
     frame->mWidth = width;
     frame->mHeight = height;
@@ -198,6 +203,7 @@
     frame->mDisplayHeight = height;
     frame->mSize = width * height * 2;
     frame->mData = new uint8_t[frame->mSize];
+    frame->mRotationAngle = rotationAngle;
 
     int32_t srcFormat;
     CHECK(meta->findInt32(kKeyColorFormat, &srcFormat));
diff --git a/media/libstagefright/colorconversion/SoftwareRenderer.cpp b/media/libstagefright/colorconversion/SoftwareRenderer.cpp
index a6dbf69..86ad85b 100644
--- a/media/libstagefright/colorconversion/SoftwareRenderer.cpp
+++ b/media/libstagefright/colorconversion/SoftwareRenderer.cpp
@@ -30,7 +30,8 @@
         OMX_COLOR_FORMATTYPE colorFormat,
         const sp<ISurface> &surface,
         size_t displayWidth, size_t displayHeight,
-        size_t decodedWidth, size_t decodedHeight)
+        size_t decodedWidth, size_t decodedHeight,
+        int32_t rotationDegrees)
     : mColorFormat(colorFormat),
       mConverter(colorFormat, OMX_COLOR_Format16bitRGB565),
       mISurface(surface),
@@ -56,10 +57,20 @@
     CHECK(mMemoryHeap->heapID() >= 0);
     CHECK(mConverter.isValid());
 
+    uint32_t orientation;
+    switch (rotationDegrees) {
+        case 0: orientation = ISurface::BufferHeap::ROT_0; break;
+        case 90: orientation = ISurface::BufferHeap::ROT_90; break;
+        case 180: orientation = ISurface::BufferHeap::ROT_180; break;
+        case 270: orientation = ISurface::BufferHeap::ROT_270; break;
+        default: orientation = ISurface::BufferHeap::ROT_0; break;
+    }
+
     ISurface::BufferHeap bufferHeap(
             mDisplayWidth, mDisplayHeight,
             mDecodedWidth, mDecodedHeight,
             PIXEL_FORMAT_RGB_565,
+            orientation, 0,
             mMemoryHeap);
 
     status_t err = mISurface->registerBuffers(bufferHeap);
diff --git a/media/libstagefright/include/MPEG4Extractor.h b/media/libstagefright/include/MPEG4Extractor.h
index 1c9cc7e..2610b0e 100644
--- a/media/libstagefright/include/MPEG4Extractor.h
+++ b/media/libstagefright/include/MPEG4Extractor.h
@@ -71,6 +71,8 @@
 
     static status_t verifyTrack(Track *track);
 
+    status_t parseTrackHeader(off_t data_offset, off_t data_size);
+
     MPEG4Extractor(const MPEG4Extractor &);
     MPEG4Extractor &operator=(const MPEG4Extractor &);
 };
diff --git a/media/libstagefright/include/OMX.h b/media/libstagefright/include/OMX.h
index c99da59..72ab5aa 100644
--- a/media/libstagefright/include/OMX.h
+++ b/media/libstagefright/include/OMX.h
@@ -92,7 +92,8 @@
             const char *componentName,
             OMX_COLOR_FORMATTYPE colorFormat,
             size_t encodedWidth, size_t encodedHeight,
-            size_t displayWidth, size_t displayHeight);
+            size_t displayWidth, size_t displayHeight,
+            int32_t rotationDegrees);
 
     virtual void binderDied(const wp<IBinder> &the_late_who);
 
diff --git a/media/libstagefright/include/SoftwareRenderer.h b/media/libstagefright/include/SoftwareRenderer.h
index 9eed089..25c9df7 100644
--- a/media/libstagefright/include/SoftwareRenderer.h
+++ b/media/libstagefright/include/SoftwareRenderer.h
@@ -33,7 +33,8 @@
             OMX_COLOR_FORMATTYPE colorFormat,
             const sp<ISurface> &surface,
             size_t displayWidth, size_t displayHeight,
-            size_t decodedWidth, size_t decodedHeight);
+            size_t decodedWidth, size_t decodedHeight,
+            int32_t rotationDegrees = 0);
 
     virtual ~SoftwareRenderer();
 
diff --git a/media/libstagefright/omx/OMX.cpp b/media/libstagefright/omx/OMX.cpp
index c927da1..63af26a 100644
--- a/media/libstagefright/omx/OMX.cpp
+++ b/media/libstagefright/omx/OMX.cpp
@@ -459,7 +459,8 @@
         const char *componentName,
         OMX_COLOR_FORMATTYPE colorFormat,
         size_t encodedWidth, size_t encodedHeight,
-        size_t displayWidth, size_t displayHeight) {
+        size_t displayWidth, size_t displayHeight,
+        int32_t rotationDegrees) {
     Mutex::Autolock autoLock(mLock);
 
     VideoRenderer *impl = NULL;
@@ -467,6 +468,14 @@
     void *libHandle = dlopen("libstagefrighthw.so", RTLD_NOW);
 
     if (libHandle) {
+        typedef VideoRenderer *(*CreateRendererWithRotationFunc)(
+                const sp<ISurface> &surface,
+                const char *componentName,
+                OMX_COLOR_FORMATTYPE colorFormat,
+                size_t displayWidth, size_t displayHeight,
+                size_t decodedWidth, size_t decodedHeight,
+                int32_t rotationDegrees);
+
         typedef VideoRenderer *(*CreateRendererFunc)(
                 const sp<ISurface> &surface,
                 const char *componentName,
@@ -474,22 +483,35 @@
                 size_t displayWidth, size_t displayHeight,
                 size_t decodedWidth, size_t decodedHeight);
 
-        CreateRendererFunc func =
-            (CreateRendererFunc)dlsym(
+        CreateRendererWithRotationFunc funcWithRotation =
+            (CreateRendererWithRotationFunc)dlsym(
                     libHandle,
-                    "_Z14createRendererRKN7android2spINS_8ISurfaceEEEPKc20"
-                    "OMX_COLOR_FORMATTYPEjjjj");
+                    "_Z26createRendererWithRotationRKN7android2spINS_8"
+                    "ISurfaceEEEPKc20OMX_COLOR_FORMATTYPEjjjji");
 
-        if (func) {
-            impl = (*func)(surface, componentName, colorFormat,
-                    displayWidth, displayHeight, encodedWidth, encodedHeight);
+        if (funcWithRotation) {
+            impl = (*funcWithRotation)(
+                    surface, componentName, colorFormat,
+                    displayWidth, displayHeight, encodedWidth, encodedHeight,
+                    rotationDegrees);
+        } else {
+            CreateRendererFunc func =
+                (CreateRendererFunc)dlsym(
+                        libHandle,
+                        "_Z14createRendererRKN7android2spINS_8ISurfaceEEEPKc20"
+                        "OMX_COLOR_FORMATTYPEjjjj");
 
-            if (impl) {
-                impl = new SharedVideoRenderer(libHandle, impl);
-                libHandle = NULL;
+            if (func) {
+                impl = (*func)(surface, componentName, colorFormat,
+                        displayWidth, displayHeight, encodedWidth, encodedHeight);
             }
         }
 
+        if (impl) {
+            impl = new SharedVideoRenderer(libHandle, impl);
+            libHandle = NULL;
+        }
+
         if (libHandle) {
             dlclose(libHandle);
             libHandle = NULL;
diff --git a/opengl/include/EGL/eglplatform.h b/opengl/include/EGL/eglplatform.h
index 25d7697..bfac71b 100644
--- a/opengl/include/EGL/eglplatform.h
+++ b/opengl/include/EGL/eglplatform.h
@@ -78,18 +78,7 @@
 typedef void *EGLNativeWindowType;
 typedef void *EGLNativePixmapType;
 
-#elif defined(__unix__) && !defined(ANDROID)
-
-/* X11 (tentative)  */
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-
-typedef Display *EGLNativeDisplayType;
-typedef Pixmap   EGLNativePixmapType;
-typedef Window   EGLNativeWindowType;
-
-
-#elif defined(ANDROID)
+#elif defined(__ANDROID__) || defined(ANDROID)
 
 #include <android/native_window.h>
 
@@ -99,6 +88,16 @@
 typedef struct egl_native_pixmap_t*     EGLNativePixmapType;
 typedef void*                           EGLNativeDisplayType;
 
+#elif defined(__unix__)
+
+/* X11 (tentative)  */
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+typedef Display *EGLNativeDisplayType;
+typedef Pixmap   EGLNativePixmapType;
+typedef Window   EGLNativeWindowType;
+
 #else
 #error "Platform not recognized"
 #endif
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp
index 2d1a278..ab260d5 100644
--- a/opengl/libs/EGL/egl.cpp
+++ b/opengl/libs/EGL/egl.cpp
@@ -407,6 +407,10 @@
             (__eglMustCastToProperFunctionPointerType)&eglDestroyImageKHR }, 
     { "eglSetSwapRectangleANDROID", 
             (__eglMustCastToProperFunctionPointerType)&eglSetSwapRectangleANDROID }, 
+    { "glEGLImageTargetTexture2DOES",
+            (__eglMustCastToProperFunctionPointerType)NULL },
+    { "glEGLImageTargetRenderbufferStorageOES",
+            (__eglMustCastToProperFunctionPointerType)NULL },
 };
 
 extern const __eglMustCastToProperFunctionPointerType gExtensionForwarders[MAX_NUMBER_OF_GL_EXTENSIONS];
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_close_on.9.png b/packages/SystemUI/res/drawable-hdpi/status_bar_close_on.9.png
index 87d1944..1d0192c 100644
--- a/packages/SystemUI/res/drawable-hdpi/status_bar_close_on.9.png
+++ b/packages/SystemUI/res/drawable-hdpi/status_bar_close_on.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/battery_low_battery.png b/packages/SystemUI/res/drawable-mdpi/battery_low_battery.png
index 60bbe6c..7417afc 100644
--- a/packages/SystemUI/res/drawable-mdpi/battery_low_battery.png
+++ b/packages/SystemUI/res/drawable-mdpi/battery_low_battery.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_notification_overlay.9.png b/packages/SystemUI/res/drawable-mdpi/ic_notification_overlay.9.png
index 1a3063c4..8ed5e5c 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_notification_overlay.9.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_notification_overlay.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_notify_alarm.png b/packages/SystemUI/res/drawable-mdpi/stat_notify_alarm.png
index 1b01b85..bd04206 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_notify_alarm.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_notify_alarm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_notify_more.png b/packages/SystemUI/res/drawable-mdpi/stat_notify_more.png
index e129ba9..63e3985 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_notify_more.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_notify_more.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_bluetooth.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_bluetooth.png
new file mode 100644
index 0000000..640d612
--- /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_bluetooth_connected.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_bluetooth_connected.png
old mode 100755
new mode 100644
index f09b83b..a9a5385
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_bluetooth_connected.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_bluetooth_connected.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..78ece9e
--- /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..31fc1b02
--- /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..19adb4b0
--- /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..fd419ea
--- /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..94e77ae
--- /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..91328c0
--- /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..2fee6924
--- /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..d0968aa
--- /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..991228b
--- /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..ae03e38
--- /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..97b011e
--- /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..a826866
--- /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..f6a6891
--- /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..19b9816
--- /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..f8c0961
--- /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..22deb70
--- /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..c7c1b49
--- /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..d9a0702
--- /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..6beed8a
--- /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..e4179c1
--- /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..4b2f86d
--- /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..6779604
--- /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..1309a97
--- /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..2fc1e8e
--- /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..0eef2c1
--- /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..f8904e2
--- /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..3ef306e
--- /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..2ff6d90
--- /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..8ff49b0
--- /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..f416203
--- /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..24b7daa
--- /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..5ea9142
--- /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..5bf6aca
--- /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..002bf46
--- /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..924b84f
--- /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..bd0d1ca
--- /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..f583eec
--- /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..66940eaf
--- /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..0381f52
--- /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..0b84fe8
--- /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_gps_acquiring.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_gps_acquiring.png
index 07f0a0a..e5e98f9 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_gps_acquiring.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_gps_acquiring.png
Binary files differ
diff --git a/packages/SystemUI/res/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..7f6fa9c
--- /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..7f6fa9c
--- /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..ca20839
--- /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..1ad5d8b
--- /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..6eba560
--- /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..f2358dd
--- /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..1ebe23e
--- /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..468ad7d
--- /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..d9f2a0d
--- /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..290822a
--- /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_ringer_silent.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_ringer_silent.png
index d62f32d..e0a3141 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_ringer_silent.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_ringer_silent.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_ringer_vibrate.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_ringer_vibrate.png
index 665ca38..116b8e2 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_ringer_vibrate.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_ringer_vibrate.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..168cbf8
--- /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..168cbf8
--- /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..8ce41ab
--- /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..3736d58
--- /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..a6fb566
--- /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..3469149
--- /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..fe0e93f
--- /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..36cd50c
--- /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..4ca603f
--- /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..993216a
--- /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..4f0d1f1
--- /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..5d9957a
--- /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..c8b82b5
--- /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..d049baa
--- /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..1b3b164
--- /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..28b7af6
--- /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..b0a6bf9
--- /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..e39061c
--- /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..d63f1ed
--- /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..cfd01ab
--- /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..19165ab
--- /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-mdpi/status_bar_close_on.9.png b/packages/SystemUI/res/drawable-mdpi/status_bar_close_on.9.png
old mode 100755
new mode 100644
index 5e3e971..833ec10
--- a/packages/SystemUI/res/drawable-mdpi/status_bar_close_on.9.png
+++ b/packages/SystemUI/res/drawable-mdpi/status_bar_close_on.9.png
Binary files differ
diff --git a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
index 47ed7da..7dff549 100644
--- a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
@@ -23,6 +23,8 @@
 import android.content.Intent;
 import android.content.res.Resources;
 import android.os.Environment;
+import android.os.Handler;
+import android.os.HandlerThread;
 import android.os.storage.StorageEventListener;
 import android.os.storage.StorageManager;
 import android.provider.Settings;
@@ -60,6 +62,8 @@
     private boolean        mUmsAvailable;
     private StorageManager mStorageManager;
 
+    private Handler        mAsyncEventHandler;
+
     public StorageNotification(Context context) {
         mContext = context;
 
@@ -67,6 +71,11 @@
         final boolean connected = mStorageManager.isUsbMassStorageConnected();
         Slog.d(TAG, String.format( "Startup with UMS connection %s (media state %s)", mUmsAvailable,
                 Environment.getExternalStorageState()));
+        
+        HandlerThread thr = new HandlerThread("SystemUI StorageNotification");
+        thr.start();
+        mAsyncEventHandler = new Handler(thr.getLooper());
+
         onUsbMassStorageConnectionChanged(connected);
     }
 
@@ -74,7 +83,16 @@
      * @override com.android.os.storage.StorageEventListener
      */
     @Override
-    public void onUsbMassStorageConnectionChanged(boolean connected) {
+    public void onUsbMassStorageConnectionChanged(final boolean connected) {
+        mAsyncEventHandler.post(new Runnable() {
+            @Override
+            public void run() {
+                onUsbMassStorageConnectionChangedAsync(connected);
+            }
+        });
+    }
+
+    private void onUsbMassStorageConnectionChangedAsync(boolean connected) {
         mUmsAvailable = connected;
         /*
          * Even though we may have a UMS host connected, we the SD card
@@ -98,7 +116,16 @@
      * @override com.android.os.storage.StorageEventListener
      */
     @Override
-    public void onStorageStateChanged(String path, String oldState, String newState) {
+    public void onStorageStateChanged(final String path, final String oldState, final String newState) {
+        mAsyncEventHandler.post(new Runnable() {
+            @Override
+            public void run() {
+                onStorageStateChangedAsync(path, oldState, newState);
+            }
+        });
+    }
+
+    private void onStorageStateChangedAsync(String path, String oldState, String newState) {
         Slog.i(TAG, String.format(
                 "Media {%s} state changed from {%s} -> {%s}", path, oldState, newState));
         if (newState.equals(Environment.MEDIA_SHARED)) {
diff --git a/packages/SystemUI/src/com/android/systemui/usb/UsbStorageActivity.java b/packages/SystemUI/src/com/android/systemui/usb/UsbStorageActivity.java
index d024dd0..1383216 100644
--- a/packages/SystemUI/src/com/android/systemui/usb/UsbStorageActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/UsbStorageActivity.java
@@ -34,6 +34,7 @@
 import android.os.Bundle;
 import android.os.Environment;
 import android.os.Handler;
+import android.os.HandlerThread;
 import android.os.IBinder;
 import android.os.storage.IMountService;
 import android.os.storage.StorageManager;
@@ -71,6 +72,12 @@
     private static final int DLG_ERROR_SHARING = 2;
     static final boolean localLOGV = false;
 
+    // UI thread
+    private Handler mUIHandler;
+
+    // thread for working with the storage services, which can be slow
+    private Handler mAsyncStorageHandler;
+
     /** Used to detect when the USB cable is unplugged, so we can call finish() */
     private BroadcastReceiver mUsbStateReceiver = new BroadcastReceiver() {
         @Override
@@ -99,6 +106,12 @@
                 Log.w(TAG, "Failed to get StorageManager");
             }
         }
+        
+        mUIHandler = new Handler();
+
+        HandlerThread thr = new HandlerThread("SystemUI UsbStorageActivity");
+        thr.start();
+        mAsyncStorageHandler = new Handler(thr.getLooper());
 
         requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
         setProgressBarIndeterminateVisibility(true);
@@ -123,7 +136,16 @@
         mProgressBar = (ProgressBar) findViewById(com.android.internal.R.id.progress);
     }
 
-    private void switchDisplay(boolean usbStorageInUse) {
+    private void switchDisplay(final boolean usbStorageInUse) {
+        mUIHandler.post(new Runnable() {
+            @Override
+            public void run() {
+                switchDisplayAsync(usbStorageInUse);
+            }
+        });
+    }
+
+    private void switchDisplayAsync(boolean usbStorageInUse) {
         if (usbStorageInUse) {
             mProgressBar.setVisibility(View.GONE);
             mUnmountButton.setVisibility(View.VISIBLE);
@@ -148,7 +170,12 @@
         mStorageManager.registerListener(mStorageListener);
         registerReceiver(mUsbStateReceiver, new IntentFilter(Usb.ACTION_USB_STATE));
         try {
-            switchDisplay(mStorageManager.isUsbMassStorageEnabled());
+            mAsyncStorageHandler.post(new Runnable() {
+                @Override
+                public void run() {
+                    switchDisplay(mStorageManager.isUsbMassStorageEnabled());
+                }
+            });
         } catch (Exception ex) {
             Log.e(TAG, "Failed to read UMS enable state", ex);
         }
@@ -188,7 +215,7 @@
                     .setTitle(R.string.dlg_confirm_kill_storage_users_title)
                     .setPositiveButton(R.string.dlg_ok, new DialogInterface.OnClickListener() {
                         public void onClick(DialogInterface dialog, int which) {
-                            switchUsbMassStorageAsync(true);
+                            switchUsbMassStorage(true);
                         }})
                     .setNegativeButton(R.string.cancel, null)
                     .setMessage(R.string.dlg_confirm_kill_storage_users_text)
@@ -210,26 +237,42 @@
         showDialog(id);
     }
 
-    private void switchUsbMassStorageAsync(boolean on) {
-        mUnmountButton.setVisibility(View.GONE);
-        mMountButton.setVisibility(View.GONE);
-
-        mProgressBar.setVisibility(View.VISIBLE);
-        // will be hidden once USB mass storage kicks in (or fails)
-        
-        final boolean _on = on;
-        new Thread() {
+    private void switchUsbMassStorage(final boolean on) {
+        // things to do on the UI thread
+        mUIHandler.post(new Runnable() {
+            @Override
             public void run() {
-                if (_on) {
+                mUnmountButton.setVisibility(View.GONE);
+                mMountButton.setVisibility(View.GONE);
+
+                mProgressBar.setVisibility(View.VISIBLE);
+                // will be hidden once USB mass storage kicks in (or fails)
+            }
+        });
+        
+        // things to do elsewhere
+        mAsyncStorageHandler.post(new Runnable() {
+            @Override
+            public void run() {
+                if (on) {
                     mStorageManager.enableUsbMassStorage();
                 } else {
                     mStorageManager.disableUsbMassStorage();
                 }
             }
-        }.start();
+        });
     }
 
     private void checkStorageUsers() {
+        mAsyncStorageHandler.post(new Runnable() {
+            @Override
+            public void run() {
+                checkStorageUsersAsync();
+            }
+        });
+    }
+
+    private void checkStorageUsersAsync() {
         IMountService ims = getMountService();
         if (ims == null) {
             // Display error dialog
@@ -258,7 +301,7 @@
             showDialogInner(DLG_CONFIRM_KILL_STORAGE_USERS);
         } else {
             if (localLOGV) Log.i(TAG, "Enabling UMS");
-            switchUsbMassStorageAsync(true);
+            switchUsbMassStorage(true);
         }
     }
 
@@ -268,7 +311,7 @@
             checkStorageUsers();
         } else if (v == mUnmountButton) {
             if (localLOGV) Log.i(TAG, "Disabling UMS");
-            switchUsbMassStorageAsync(false);
+            switchUsbMassStorage(false);
         }
     }
 
diff --git a/packages/VpnServices/res/drawable/vpn_connected.png b/packages/VpnServices/res/drawable/vpn_connected.png
index 65fc6db..c920876 100644
--- a/packages/VpnServices/res/drawable/vpn_connected.png
+++ b/packages/VpnServices/res/drawable/vpn_connected.png
Binary files differ
diff --git a/packages/VpnServices/res/drawable/vpn_disconnected.png b/packages/VpnServices/res/drawable/vpn_disconnected.png
index 2440c69..c920876 100644
--- a/packages/VpnServices/res/drawable/vpn_disconnected.png
+++ b/packages/VpnServices/res/drawable/vpn_disconnected.png
Binary files differ
diff --git a/preloaded-classes b/preloaded-classes
index 8de175a..da03111 100644
--- a/preloaded-classes
+++ b/preloaded-classes
@@ -1269,7 +1269,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/PackageManagerService.java b/services/java/com/android/server/PackageManagerService.java
index d324c2b..4520f18 100644
--- a/services/java/com/android/server/PackageManagerService.java
+++ b/services/java/com/android/server/PackageManagerService.java
@@ -7166,7 +7166,9 @@
                     pw.print("    resourcePath="); pw.println(ps.resourcePathString);
                     pw.print("    nativeLibraryPath="); pw.println(ps.nativeLibraryPathString);
                     pw.print("    obbPath="); pw.println(ps.obbPathString);
+                    pw.print("    versionCode="); pw.println(ps.versionCode);
                     if (ps.pkg != null) {
+                        pw.print("    versionName="); pw.println(ps.pkg.mVersionName);
                         pw.print("    dataDir="); pw.println(ps.pkg.applicationInfo.dataDir);
                         pw.print("    targetSdk="); pw.println(ps.pkg.applicationInfo.targetSdkVersion);
                         if (ps.pkg.mOperationPending) {
@@ -7224,8 +7226,6 @@
                     pw.print("    pkgFlags=0x"); pw.print(Integer.toHexString(ps.pkgFlags));
                             pw.print(" installStatus="); pw.print(ps.installStatus);
                             pw.print(" enabled="); pw.println(ps.enabled);
-                    pw.print("    versionCode="); pw.print(ps.versionCode);
-                            pw.print(" versionName="); pw.println(ps.pkg.mVersionName);
                     if (ps.disabledComponents.size() > 0) {
                         pw.println("    disabledComponents:");
                         for (String s : ps.disabledComponents) {
diff --git a/services/java/com/android/server/PowerManagerService.java b/services/java/com/android/server/PowerManagerService.java
index b0e30f9..a6daaef 100644
--- a/services/java/com/android/server/PowerManagerService.java
+++ b/services/java/com/android/server/PowerManagerService.java
@@ -2213,9 +2213,9 @@
             int eventType, boolean force) {
 
         if (((mPokey & POKE_LOCK_IGNORE_CHEEK_EVENTS) != 0)
-                && (eventType == CHEEK_EVENT || eventType == TOUCH_EVENT)) {
+                && (eventType == CHEEK_EVENT)) {
             if (false) {
-                Slog.d(TAG, "dropping cheek or short event mPokey=0x" + Integer.toHexString(mPokey));
+                Slog.d(TAG, "dropping cheek event mPokey=0x" + Integer.toHexString(mPokey));
             }
             return;
         }
diff --git a/services/sensorservice/Android.mk b/services/sensorservice/Android.mk
index 75f690f..7e17fdd 100644
--- a/services/sensorservice/Android.mk
+++ b/services/sensorservice/Android.mk
@@ -2,7 +2,13 @@
 include $(CLEAR_VARS)
 
 LOCAL_SRC_FILES:= \
-    SensorService.cpp
+	GravitySensor.cpp \
+	LinearAccelerationSensor.cpp \
+	RotationVectorSensor.cpp \
+    SensorService.cpp \
+    SensorInterface.cpp \
+    SensorDevice.cpp \
+    SecondOrderLowPassFilter.cpp
 
 LOCAL_CFLAGS:= -DLOG_TAG=\"SensorService\"
 
diff --git a/services/sensorservice/GravitySensor.cpp b/services/sensorservice/GravitySensor.cpp
new file mode 100644
index 0000000..18bd359
--- /dev/null
+++ b/services/sensorservice/GravitySensor.cpp
@@ -0,0 +1,112 @@
+/*
+ * 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.
+ */
+
+#include <stdint.h>
+#include <math.h>
+#include <sys/types.h>
+
+#include <utils/Errors.h>
+
+#include <hardware/sensors.h>
+
+#include "GravitySensor.h"
+
+namespace android {
+// ---------------------------------------------------------------------------
+
+GravitySensor::GravitySensor(sensor_t const* list, size_t count)
+    : mSensorDevice(SensorDevice::getInstance()),
+      mEnabled(false), mAccTime(0),
+      mLowPass(M_SQRT1_2, 1),
+      mX(mLowPass), mY(mLowPass), mZ(mLowPass)
+
+{
+    for (size_t i=0 ; i<count ; i++) {
+        if (list[i].type == SENSOR_TYPE_ACCELEROMETER) {
+            mAccelerometer = Sensor(list + i);
+            break;
+        }
+    }
+}
+
+bool GravitySensor::process(sensors_event_t* outEvent,
+        const sensors_event_t& event)
+{
+    const static double NS2S = 1.0 / 1000000000.0;
+    if (event.type == SENSOR_TYPE_ACCELEROMETER) {
+        float x, y, z;
+        const double now = event.timestamp * NS2S;
+        if (mAccTime == 0) {
+            x = mX.init(event.acceleration.x);
+            y = mY.init(event.acceleration.y);
+            z = mZ.init(event.acceleration.z);
+        } else {
+            double dT = now - mAccTime;
+            mLowPass.setSamplingPeriod(dT);
+            x = mX(event.acceleration.x);
+            y = mY(event.acceleration.y);
+            z = mZ(event.acceleration.z);
+        }
+        mAccTime = now;
+        *outEvent = event;
+        outEvent->data[0] = x;
+        outEvent->data[1] = y;
+        outEvent->data[2] = z;
+        outEvent->sensor = '_grv';
+        outEvent->type = SENSOR_TYPE_GRAVITY;
+        return true;
+    }
+    return false;
+}
+
+bool GravitySensor::isEnabled() const {
+    return mEnabled;
+}
+
+status_t GravitySensor::activate(void* ident, bool enabled) {
+    status_t err = mSensorDevice.activate(this, mAccelerometer.getHandle(), enabled);
+    if (err == NO_ERROR) {
+        mEnabled = enabled;
+        if (enabled) {
+            mAccTime = 0;
+        }
+    }
+    return err;
+}
+
+status_t GravitySensor::setDelay(void* ident, int handle, int64_t ns)
+{
+    return mSensorDevice.setDelay(this, mAccelerometer.getHandle(), ns);
+}
+
+Sensor GravitySensor::getSensor() const {
+    sensor_t hwSensor;
+    hwSensor.name       = "Gravity Sensor";
+    hwSensor.vendor     = "Google Inc.";
+    hwSensor.version    = 1;
+    hwSensor.handle     = '_grv';
+    hwSensor.type       = SENSOR_TYPE_GRAVITY;
+    hwSensor.maxRange   = mAccelerometer.getMaxValue();
+    hwSensor.resolution = mAccelerometer.getResolution();
+    hwSensor.power      = mAccelerometer.getPowerUsage();
+    hwSensor.minDelay   = mAccelerometer.getMinDelay();
+    Sensor sensor(&hwSensor);
+    return sensor;
+}
+
+// ---------------------------------------------------------------------------
+}; // namespace android
+
diff --git a/services/sensorservice/GravitySensor.h b/services/sensorservice/GravitySensor.h
new file mode 100644
index 0000000..f9850b7
--- /dev/null
+++ b/services/sensorservice/GravitySensor.h
@@ -0,0 +1,56 @@
+/*
+ * 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 ANDROID_GRAVITY_SENSOR_H
+#define ANDROID_GRAVITY_SENSOR_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <gui/Sensor.h>
+
+#include "SensorDevice.h"
+#include "SensorInterface.h"
+#include "SecondOrderLowPassFilter.h"
+
+// ---------------------------------------------------------------------------
+namespace android {
+// ---------------------------------------------------------------------------
+
+class GravitySensor : public SensorInterface {
+    SensorDevice& mSensorDevice;
+    Sensor mAccelerometer;
+    bool mEnabled;
+    double mAccTime;
+
+    SecondOrderLowPassFilter mLowPass;
+    BiquadFilter mX, mY, mZ;
+
+public:
+    GravitySensor(sensor_t const* list, size_t count);
+    virtual bool process(sensors_event_t* outEvent,
+            const sensors_event_t& event);
+    virtual bool isEnabled() const;
+    virtual status_t activate(void* ident, bool enabled);
+    virtual status_t setDelay(void* ident, int handle, int64_t ns);
+    virtual Sensor getSensor() const;
+    virtual bool isVirtual() const { return true; }
+};
+
+// ---------------------------------------------------------------------------
+}; // namespace android
+
+#endif // ANDROID_GRAVITY_SENSOR_H
diff --git a/services/sensorservice/LinearAccelerationSensor.cpp b/services/sensorservice/LinearAccelerationSensor.cpp
new file mode 100644
index 0000000..2dc12dc
--- /dev/null
+++ b/services/sensorservice/LinearAccelerationSensor.cpp
@@ -0,0 +1,86 @@
+/*
+ * 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.
+ */
+
+#include <stdint.h>
+#include <math.h>
+#include <sys/types.h>
+
+#include <utils/Errors.h>
+
+#include <hardware/sensors.h>
+
+#include "LinearAccelerationSensor.h"
+
+namespace android {
+// ---------------------------------------------------------------------------
+
+LinearAccelerationSensor::LinearAccelerationSensor(sensor_t const* list, size_t count)
+    : mSensorDevice(SensorDevice::getInstance()),
+      mGravitySensor(list, count)
+{
+    mData[0] = mData[1] = mData[2] = 0;
+}
+
+bool LinearAccelerationSensor::process(sensors_event_t* outEvent,
+        const sensors_event_t& event)
+{
+    bool result = mGravitySensor.process(outEvent, event);
+    if (result) {
+        if (event.type == SENSOR_TYPE_ACCELEROMETER) {
+            mData[0] = event.acceleration.x;
+            mData[1] = event.acceleration.y;
+            mData[2] = event.acceleration.z;
+        }
+        outEvent->data[0] = mData[0] - outEvent->data[0];
+        outEvent->data[1] = mData[1] - outEvent->data[1];
+        outEvent->data[2] = mData[2] - outEvent->data[2];
+        outEvent->sensor = '_lin';
+        outEvent->type = SENSOR_TYPE_LINEAR_ACCELERATION;
+    }
+    return result;
+}
+
+bool LinearAccelerationSensor::isEnabled() const {
+    return mGravitySensor.isEnabled();
+}
+
+status_t LinearAccelerationSensor::activate(void* ident, bool enabled) {
+    return mGravitySensor.activate(ident, enabled);
+}
+
+status_t LinearAccelerationSensor::setDelay(void* ident, int handle, int64_t ns) {
+    return mGravitySensor.setDelay(ident, handle, ns);
+}
+
+Sensor LinearAccelerationSensor::getSensor() const {
+    Sensor gsensor(mGravitySensor.getSensor());
+    sensor_t hwSensor;
+    hwSensor.name       = "Linear Acceleration Sensor";
+    hwSensor.vendor     = "Google Inc.";
+    hwSensor.version    = 1;
+    hwSensor.handle     = '_lin';
+    hwSensor.type       = SENSOR_TYPE_LINEAR_ACCELERATION;
+    hwSensor.maxRange   = gsensor.getMaxValue();
+    hwSensor.resolution = gsensor.getResolution();
+    hwSensor.power      = gsensor.getPowerUsage();
+    hwSensor.minDelay   = gsensor.getMinDelay();
+    Sensor sensor(&hwSensor);
+    return sensor;
+}
+
+// ---------------------------------------------------------------------------
+}; // namespace android
+
diff --git a/services/sensorservice/LinearAccelerationSensor.h b/services/sensorservice/LinearAccelerationSensor.h
new file mode 100644
index 0000000..ee918ce
--- /dev/null
+++ b/services/sensorservice/LinearAccelerationSensor.h
@@ -0,0 +1,53 @@
+/*
+ * 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 ANDROID_LINEAR_ACCELERATION_SENSOR_H
+#define ANDROID_LINEAR_ACCELERATION_SENSOR_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <gui/Sensor.h>
+
+#include "SensorDevice.h"
+#include "SensorInterface.h"
+#include "GravitySensor.h"
+
+// ---------------------------------------------------------------------------
+
+namespace android {
+// ---------------------------------------------------------------------------
+
+class LinearAccelerationSensor : public SensorInterface {
+    SensorDevice& mSensorDevice;
+    GravitySensor mGravitySensor;
+    float mData[3];
+
+    virtual bool process(sensors_event_t* outEvent,
+            const sensors_event_t& event);
+public:
+    LinearAccelerationSensor(sensor_t const* list, size_t count);
+    virtual bool isEnabled() const;
+    virtual status_t activate(void* ident, bool enabled);
+    virtual status_t setDelay(void* ident, int handle, int64_t ns);
+    virtual Sensor getSensor() const;
+    virtual bool isVirtual() const { return true; }
+};
+
+// ---------------------------------------------------------------------------
+}; // namespace android
+
+#endif // ANDROID_LINEAR_ACCELERATION_SENSOR_H
diff --git a/services/sensorservice/RotationVectorSensor.cpp b/services/sensorservice/RotationVectorSensor.cpp
new file mode 100644
index 0000000..6f4b8be
--- /dev/null
+++ b/services/sensorservice/RotationVectorSensor.cpp
@@ -0,0 +1,174 @@
+/*
+ * 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.
+ */
+
+#include <stdint.h>
+#include <math.h>
+#include <sys/types.h>
+
+#include <utils/Errors.h>
+
+#include <hardware/sensors.h>
+
+#include "RotationVectorSensor.h"
+
+namespace android {
+// ---------------------------------------------------------------------------
+
+template <typename T>
+static inline T clamp(T v) {
+    return v < 0 ? 0 : v;
+}
+
+RotationVectorSensor::RotationVectorSensor(sensor_t const* list, size_t count)
+    : mSensorDevice(SensorDevice::getInstance()),
+      mEnabled(false),
+      mALowPass(M_SQRT1_2, 5.0f),
+      mAX(mALowPass), mAY(mALowPass), mAZ(mALowPass),
+      mMLowPass(M_SQRT1_2, 2.5f),
+      mMX(mMLowPass), mMY(mMLowPass), mMZ(mMLowPass)
+{
+    for (size_t i=0 ; i<count ; i++) {
+        if (list[i].type == SENSOR_TYPE_ACCELEROMETER) {
+            mAcc = Sensor(list + i);
+        }
+        if (list[i].type == SENSOR_TYPE_MAGNETIC_FIELD) {
+            mMag = Sensor(list + i);
+        }
+    }
+    memset(mMagData, 0, sizeof(mMagData));
+}
+
+bool RotationVectorSensor::process(sensors_event_t* outEvent,
+        const sensors_event_t& event)
+{
+    const static double NS2S = 1.0 / 1000000000.0;
+    if (event.type == SENSOR_TYPE_MAGNETIC_FIELD) {
+        const double now = event.timestamp * NS2S;
+        if (mMagTime == 0) {
+            mMagData[0] = mMX.init(event.magnetic.x);
+            mMagData[1] = mMY.init(event.magnetic.y);
+            mMagData[2] = mMZ.init(event.magnetic.z);
+        } else {
+            double dT = now - mMagTime;
+            mMLowPass.setSamplingPeriod(dT);
+            mMagData[0] = mMX(event.magnetic.x);
+            mMagData[1] = mMY(event.magnetic.y);
+            mMagData[2] = mMZ(event.magnetic.z);
+        }
+        mMagTime = now;
+    }
+    if (event.type == SENSOR_TYPE_ACCELEROMETER) {
+        const double now = event.timestamp * NS2S;
+        float Ax, Ay, Az;
+        if (mAccTime == 0) {
+            Ax = mAX.init(event.acceleration.x);
+            Ay = mAY.init(event.acceleration.y);
+            Az = mAZ.init(event.acceleration.z);
+        } else {
+            double dT = now - mAccTime;
+            mALowPass.setSamplingPeriod(dT);
+            Ax = mAX(event.acceleration.x);
+            Ay = mAY(event.acceleration.y);
+            Az = mAZ(event.acceleration.z);
+        }
+        mAccTime = now;
+        const float Ex = mMagData[0];
+        const float Ey = mMagData[1];
+        const float Ez = mMagData[2];
+        float Hx = Ey*Az - Ez*Ay;
+        float Hy = Ez*Ax - Ex*Az;
+        float Hz = Ex*Ay - Ey*Ax;
+        const float normH = sqrtf(Hx*Hx + Hy*Hy + Hz*Hz);
+        if (normH < 0.1f) {
+            // device is close to free fall (or in space?), or close to
+            // magnetic north pole. Typical values are  > 100.
+            return false;
+        }
+        const float invH = 1.0f / normH;
+        const float invA = 1.0f / sqrtf(Ax*Ax + Ay*Ay + Az*Az);
+        Hx *= invH;
+        Hy *= invH;
+        Hz *= invH;
+        Ax *= invA;
+        Ay *= invA;
+        Az *= invA;
+        const float Mx = Ay*Hz - Az*Hy;
+        const float My = Az*Hx - Ax*Hz;
+        const float Mz = Ax*Hy - Ay*Hx;
+
+        // matrix to rotation vector (normalized quaternion)
+        float qw = sqrtf( clamp( Hx + My + Az + 1) * 0.25f );
+        float qx = sqrtf( clamp( Hx - My - Az + 1) * 0.25f );
+        float qy = sqrtf( clamp(-Hx + My - Az + 1) * 0.25f );
+        float qz = sqrtf( clamp(-Hx - My + Az + 1) * 0.25f );
+        const float n = 1.0f / (qw*qw + qx*qx + qy*qy + qz*qz);
+        qx = copysignf(qx, Ay - Mz) * n;
+        qy = copysignf(qy, Hz - Ax) * n;
+        qz = copysignf(qz, Mx - Hy) * n;
+
+        *outEvent = event;
+        outEvent->data[0] = qx;
+        outEvent->data[1] = qy;
+        outEvent->data[2] = qz;
+        outEvent->sensor = '_rov';
+        outEvent->type = SENSOR_TYPE_ROTATION_VECTOR;
+        return true;
+    }
+    return false;
+}
+
+bool RotationVectorSensor::isEnabled() const {
+    return mEnabled;
+}
+
+status_t RotationVectorSensor::activate(void* ident, bool enabled) {
+    if (mEnabled != enabled) {
+        mSensorDevice.activate(this, mAcc.getHandle(), enabled);
+        mSensorDevice.activate(this, mMag.getHandle(), enabled);
+        mEnabled = enabled;
+        if (enabled) {
+            mMagTime = 0;
+            mAccTime = 0;
+        }
+    }
+    return NO_ERROR;
+}
+
+status_t RotationVectorSensor::setDelay(void* ident, int handle, int64_t ns)
+{
+    mSensorDevice.setDelay(this, mAcc.getHandle(), ns);
+    mSensorDevice.setDelay(this, mMag.getHandle(), ns);
+    return NO_ERROR;
+}
+
+Sensor RotationVectorSensor::getSensor() const {
+    sensor_t hwSensor;
+    hwSensor.name       = "Rotation Vector Sensor";
+    hwSensor.vendor     = "Google Inc.";
+    hwSensor.version    = 1;
+    hwSensor.handle     = '_rov';
+    hwSensor.type       = SENSOR_TYPE_ROTATION_VECTOR;
+    hwSensor.maxRange   = 1;
+    hwSensor.resolution = 1.0f / (1<<24);
+    hwSensor.power      = mAcc.getPowerUsage() + mMag.getPowerUsage();
+    hwSensor.minDelay   = mAcc.getMinDelay();
+    Sensor sensor(&hwSensor);
+    return sensor;
+}
+
+// ---------------------------------------------------------------------------
+}; // namespace android
+
diff --git a/services/sensorservice/RotationVectorSensor.h b/services/sensorservice/RotationVectorSensor.h
new file mode 100644
index 0000000..e7f28c9
--- /dev/null
+++ b/services/sensorservice/RotationVectorSensor.h
@@ -0,0 +1,60 @@
+/*
+ * 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 ANDROID_ROTATION_VECTOR_SENSOR_H
+#define ANDROID_ROTATION_VECTOR_SENSOR_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <gui/Sensor.h>
+
+#include "SensorDevice.h"
+#include "SensorInterface.h"
+#include "SecondOrderLowPassFilter.h"
+
+// ---------------------------------------------------------------------------
+namespace android {
+// ---------------------------------------------------------------------------
+
+class RotationVectorSensor : public SensorInterface {
+    SensorDevice& mSensorDevice;
+    Sensor mAcc;
+    Sensor mMag;
+    bool mEnabled;
+    float mMagData[3];
+    double mAccTime;
+    double mMagTime;
+    SecondOrderLowPassFilter mALowPass;
+    BiquadFilter mAX, mAY, mAZ;
+    SecondOrderLowPassFilter mMLowPass;
+    BiquadFilter mMX, mMY, mMZ;
+
+public:
+    RotationVectorSensor(sensor_t const* list, size_t count);
+    virtual bool process(sensors_event_t* outEvent,
+            const sensors_event_t& event);
+    virtual bool isEnabled() const;
+    virtual status_t activate(void* ident, bool enabled);
+    virtual status_t setDelay(void* ident, int handle, int64_t ns);
+    virtual Sensor getSensor() const;
+    virtual bool isVirtual() const { return true; }
+};
+
+// ---------------------------------------------------------------------------
+}; // namespace android
+
+#endif // ANDROID_ROTATION_VECTOR_SENSOR_H
diff --git a/services/sensorservice/SecondOrderLowPassFilter.cpp b/services/sensorservice/SecondOrderLowPassFilter.cpp
new file mode 100644
index 0000000..e13e1362
--- /dev/null
+++ b/services/sensorservice/SecondOrderLowPassFilter.cpp
@@ -0,0 +1,70 @@
+/*
+ * 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.
+ */
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <math.h>
+
+#include <cutils/log.h>
+
+#include "SecondOrderLowPassFilter.h"
+
+// ---------------------------------------------------------------------------
+
+namespace android {
+// ---------------------------------------------------------------------------
+
+SecondOrderLowPassFilter::SecondOrderLowPassFilter(float Q, float fc)
+    : iQ(1.0f / Q), fc(fc)
+{
+}
+
+void SecondOrderLowPassFilter::setSamplingPeriod(float dT)
+{
+    K = tanf(float(M_PI) * fc * dT);
+    iD = 1.0f / (K*K + K*iQ + 1);
+    a0 = K*K*iD;
+    a1 = 2.0f * a0;
+    b1 = 2.0f*(K*K - 1)*iD;
+    b2 = (K*K - K*iQ + 1)*iD;
+}
+
+// ---------------------------------------------------------------------------
+
+BiquadFilter::BiquadFilter(const SecondOrderLowPassFilter& s)
+    : s(s)
+{
+}
+
+float BiquadFilter::init(float x)
+{
+    x1 = x2 = x;
+    y1 = y2 = x;
+    return x;
+}
+
+float BiquadFilter::operator()(float x)
+{
+    float y = (x + x2)*s.a0 + x1*s.a1 - y1*s.b1 - y2*s.b2;
+    x2 = x1;
+    y2 = y1;
+    x1 = x;
+    y1 = y;
+    return y;
+}
+
+// ---------------------------------------------------------------------------
+}; // namespace android
diff --git a/services/sensorservice/SecondOrderLowPassFilter.h b/services/sensorservice/SecondOrderLowPassFilter.h
new file mode 100644
index 0000000..998ca35b9
--- /dev/null
+++ b/services/sensorservice/SecondOrderLowPassFilter.h
@@ -0,0 +1,61 @@
+/*
+ * 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 ANDROID_SECOND_ORDER_LOW_PASS_FILTER_H
+#define ANDROID_SECOND_ORDER_LOW_PASS_FILTER_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+// ---------------------------------------------------------------------------
+
+namespace android {
+// ---------------------------------------------------------------------------
+
+class BiquadFilter;
+
+/*
+ * State of a 2nd order low-pass IIR filter
+ */
+class SecondOrderLowPassFilter {
+    friend class BiquadFilter;
+    float iQ, fc;
+    float K, iD;
+    float a0, a1;
+    float b1, b2;
+public:
+    SecondOrderLowPassFilter(float Q, float fc);
+    void setSamplingPeriod(float dT);
+};
+
+/*
+ * Implements a Biquad IIR filter
+ */
+class BiquadFilter {
+    float x1, x2;
+    float y1, y2;
+    const SecondOrderLowPassFilter& s;
+public:
+    BiquadFilter(const SecondOrderLowPassFilter& s);
+    float init(float in);
+    float operator()(float in);
+};
+
+
+// ---------------------------------------------------------------------------
+}; // namespace android
+
+#endif // ANDROID_SECOND_ORDER_LOW_PASS_FILTER_H
diff --git a/services/sensorservice/SensorDevice.cpp b/services/sensorservice/SensorDevice.cpp
new file mode 100644
index 0000000..73f85ba
--- /dev/null
+++ b/services/sensorservice/SensorDevice.cpp
@@ -0,0 +1,239 @@
+/*
+ * 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.
+ */
+
+#include <stdint.h>
+#include <math.h>
+#include <sys/types.h>
+
+#include <utils/Atomic.h>
+#include <utils/Errors.h>
+#include <utils/Singleton.h>
+
+#include <binder/BinderService.h>
+#include <binder/Parcel.h>
+#include <binder/IServiceManager.h>
+
+#include <hardware/sensors.h>
+
+#include "SensorDevice.h"
+
+namespace android {
+// ---------------------------------------------------------------------------
+class BatteryService : public Singleton<BatteryService> {
+    static const int TRANSACTION_noteStartSensor = IBinder::FIRST_CALL_TRANSACTION + 3;
+    static const int TRANSACTION_noteStopSensor = IBinder::FIRST_CALL_TRANSACTION + 4;
+    static const String16 DESCRIPTOR;
+
+    friend class Singleton<BatteryService>;
+    sp<IBinder> mBatteryStatService;
+
+    BatteryService() {
+        const sp<IServiceManager> sm(defaultServiceManager());
+        if (sm != NULL) {
+            const String16 name("batteryinfo");
+            mBatteryStatService = sm->getService(name);
+        }
+    }
+
+    status_t noteStartSensor(int uid, int handle) {
+        Parcel data, reply;
+        data.writeInterfaceToken(DESCRIPTOR);
+        data.writeInt32(uid);
+        data.writeInt32(handle);
+        status_t err = mBatteryStatService->transact(
+                TRANSACTION_noteStartSensor, data, &reply, 0);
+        err = reply.readExceptionCode();
+        return err;
+    }
+
+    status_t noteStopSensor(int uid, int handle) {
+        Parcel data, reply;
+        data.writeInterfaceToken(DESCRIPTOR);
+        data.writeInt32(uid);
+        data.writeInt32(handle);
+        status_t err = mBatteryStatService->transact(
+                TRANSACTION_noteStopSensor, data, &reply, 0);
+        err = reply.readExceptionCode();
+        return err;
+    }
+
+public:
+    void enableSensor(int handle) {
+        if (mBatteryStatService != 0) {
+            int uid = IPCThreadState::self()->getCallingUid();
+            int64_t identity = IPCThreadState::self()->clearCallingIdentity();
+            noteStartSensor(uid, handle);
+            IPCThreadState::self()->restoreCallingIdentity(identity);
+        }
+    }
+    void disableSensor(int handle) {
+        if (mBatteryStatService != 0) {
+            int uid = IPCThreadState::self()->getCallingUid();
+            int64_t identity = IPCThreadState::self()->clearCallingIdentity();
+            noteStopSensor(uid, handle);
+            IPCThreadState::self()->restoreCallingIdentity(identity);
+        }
+    }
+};
+
+const String16 BatteryService::DESCRIPTOR("com.android.internal.app.IBatteryStats");
+
+ANDROID_SINGLETON_STATIC_INSTANCE(BatteryService)
+
+// ---------------------------------------------------------------------------
+
+ANDROID_SINGLETON_STATIC_INSTANCE(SensorDevice)
+
+SensorDevice::SensorDevice()
+    :  mSensorDevice(0),
+       mSensorModule(0)
+{
+    status_t err = hw_get_module(SENSORS_HARDWARE_MODULE_ID,
+            (hw_module_t const**)&mSensorModule);
+
+    LOGE_IF(err, "couldn't load %s module (%s)",
+            SENSORS_HARDWARE_MODULE_ID, strerror(-err));
+
+    if (mSensorModule) {
+        err = sensors_open(&mSensorModule->common, &mSensorDevice);
+
+        LOGE_IF(err, "couldn't open device for module %s (%s)",
+                SENSORS_HARDWARE_MODULE_ID, strerror(-err));
+
+        if (mSensorDevice) {
+            sensor_t const* list;
+            ssize_t count = mSensorModule->get_sensors_list(mSensorModule, &list);
+            mActivationCount.setCapacity(count);
+            Info model;
+            for (size_t i=0 ; i<size_t(count) ; i++) {
+                mActivationCount.add(list[i].handle, model);
+                mSensorDevice->activate(mSensorDevice, list[i].handle, 0);
+            }
+        }
+    }
+}
+
+void SensorDevice::dump(String8& result, char* buffer, size_t SIZE)
+{
+    if (!mSensorModule) return;
+    sensor_t const* list;
+    ssize_t count = mSensorModule->get_sensors_list(mSensorModule, &list);
+
+    snprintf(buffer, SIZE, "%d h/w sensors:\n", int(count));
+    result.append(buffer);
+
+    Mutex::Autolock _l(mLock);
+    for (size_t i=0 ; i<size_t(count) ; i++) {
+        snprintf(buffer, SIZE, "handle=0x%08x, active-count=%d / %d\n",
+                list[i].handle,
+                mActivationCount.valueFor(list[i].handle).count,
+                mActivationCount.valueFor(list[i].handle).rates.size());
+        result.append(buffer);
+    }
+}
+
+ssize_t SensorDevice::getSensorList(sensor_t const** list) {
+    if (!mSensorModule) return NO_INIT;
+    ssize_t count = mSensorModule->get_sensors_list(mSensorModule, list);
+    return count;
+}
+
+status_t SensorDevice::initCheck() const {
+    return mSensorDevice && mSensorModule ? NO_ERROR : NO_INIT;
+}
+
+ssize_t SensorDevice::poll(sensors_event_t* buffer, size_t count) {
+    if (!mSensorDevice) return NO_INIT;
+    return mSensorDevice->poll(mSensorDevice, buffer, count);
+}
+
+status_t SensorDevice::activate(void* ident, int handle, int enabled)
+{
+    if (!mSensorDevice) return NO_INIT;
+    status_t err(NO_ERROR);
+    bool actuateHardware = false;
+
+    Info& info( mActivationCount.editValueFor(handle) );
+    int32_t& count(info.count);
+    if (enabled) {
+        if (android_atomic_inc(&count) == 0) {
+            actuateHardware = true;
+        }
+        Mutex::Autolock _l(mLock);
+        if (info.rates.indexOfKey(ident) < 0) {
+            info.rates.add(ident, DEFAULT_EVENTS_PERIOD);
+        }
+    } else {
+        if (android_atomic_dec(&count) == 1) {
+            actuateHardware = true;
+        }
+        Mutex::Autolock _l(mLock);
+        info.rates.removeItem(ident);
+    }
+    if (actuateHardware) {
+        err = mSensorDevice->activate(mSensorDevice, handle, enabled);
+        if (enabled) {
+            LOGE_IF(err, "Error activating sensor %d (%s)", handle, strerror(-err));
+            if (err == 0) {
+                BatteryService::getInstance().enableSensor(handle);
+            }
+        } else {
+            if (err == 0) {
+                BatteryService::getInstance().disableSensor(handle);
+            }
+        }
+    }
+
+    if (!actuateHardware || enabled) {
+        Mutex::Autolock _l(mLock);
+        nsecs_t ns = info.rates.valueAt(0);
+        for (size_t i=1 ; i<info.rates.size() ; i++) {
+            if (info.rates.valueAt(i) < ns) {
+                nsecs_t cur = info.rates.valueAt(i);
+                if (cur < ns) {
+                    ns = cur;
+                }
+            }
+        }
+        mSensorDevice->setDelay(mSensorDevice, handle, ns);
+    }
+
+    return err;
+}
+
+status_t SensorDevice::setDelay(void* ident, int handle, int64_t ns)
+{
+    if (!mSensorDevice) return NO_INIT;
+    Info& info( mActivationCount.editValueFor(handle) );
+    { // scope for lock
+        Mutex::Autolock _l(mLock);
+        ssize_t index = info.rates.indexOfKey(ident);
+        if (index < 0) return BAD_INDEX;
+        info.rates.editValueAt(index) = ns;
+        ns = info.rates.valueAt(0);
+        for (size_t i=1 ; i<info.rates.size() ; i++) {
+            nsecs_t cur = info.rates.valueAt(i);
+            if (cur < ns) {
+                ns = cur;
+            }
+        }
+    }
+    return mSensorDevice->setDelay(mSensorDevice, handle, ns);
+}
+
+// ---------------------------------------------------------------------------
+}; // namespace android
+
diff --git a/services/sensorservice/SensorDevice.h b/services/sensorservice/SensorDevice.h
new file mode 100644
index 0000000..63ecbcd
--- /dev/null
+++ b/services/sensorservice/SensorDevice.h
@@ -0,0 +1,62 @@
+/*
+ * 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 ANDROID_SENSOR_DEVICE_H
+#define ANDROID_SENSOR_DEVICE_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <utils/KeyedVector.h>
+#include <utils/Singleton.h>
+#include <utils/String8.h>
+
+#include <gui/Sensor.h>
+
+// ---------------------------------------------------------------------------
+
+namespace android {
+// ---------------------------------------------------------------------------
+
+static const nsecs_t DEFAULT_EVENTS_PERIOD = 200000000; //    5 Hz
+
+class SensorDevice : public Singleton<SensorDevice> {
+    friend class Singleton<SensorDevice>;
+    struct sensors_poll_device_t* mSensorDevice;
+    struct sensors_module_t* mSensorModule;
+    Mutex mLock; // protect mActivationCount[].rates
+    // fixed-size array after construction
+    struct Info {
+        Info() : count(0) { }
+        int32_t count;
+        KeyedVector<void*, nsecs_t> rates;
+    };
+    DefaultKeyedVector<int, Info> mActivationCount;
+
+    SensorDevice();
+public:
+    ssize_t getSensorList(sensor_t const** list);
+    status_t initCheck() const;
+    ssize_t poll(sensors_event_t* buffer, size_t count);
+    status_t activate(void* ident, int handle, int enabled);
+    status_t setDelay(void* ident, int handle, int64_t ns);
+    void dump(String8& result, char* buffer, size_t SIZE);
+};
+
+// ---------------------------------------------------------------------------
+}; // namespace android
+
+#endif // ANDROID_SENSOR_DEVICE_H
diff --git a/services/sensorservice/SensorInterface.cpp b/services/sensorservice/SensorInterface.cpp
new file mode 100644
index 0000000..93d23d9
--- /dev/null
+++ b/services/sensorservice/SensorInterface.cpp
@@ -0,0 +1,70 @@
+/*
+ * 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.
+ */
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <cutils/log.h>
+
+#include "SensorInterface.h"
+
+namespace android {
+// ---------------------------------------------------------------------------
+
+SensorInterface::~SensorInterface()
+{
+}
+
+// ---------------------------------------------------------------------------
+
+HardwareSensor::HardwareSensor(const sensor_t& sensor)
+    : mSensorDevice(SensorDevice::getInstance()),
+      mSensor(&sensor), mEnabled(false)
+{
+    LOGI("%s", sensor.name);
+}
+
+HardwareSensor::~HardwareSensor() {
+}
+
+bool HardwareSensor::process(sensors_event_t* outEvent,
+        const sensors_event_t& event) {
+    *outEvent = event;
+    return true;
+}
+
+bool HardwareSensor::isEnabled() const {
+    return mEnabled;
+}
+
+status_t HardwareSensor::activate(void* ident,bool enabled) {
+    status_t err = mSensorDevice.activate(ident, mSensor.getHandle(), enabled);
+    if (err == NO_ERROR)
+        mEnabled = enabled;
+    return err;
+}
+
+status_t HardwareSensor::setDelay(void* ident, int handle, int64_t ns) {
+    return mSensorDevice.setDelay(ident, handle, ns);
+}
+
+Sensor HardwareSensor::getSensor() const {
+    return mSensor;
+}
+
+
+// ---------------------------------------------------------------------------
+}; // namespace android
diff --git a/services/sensorservice/SensorInterface.h b/services/sensorservice/SensorInterface.h
new file mode 100644
index 0000000..eebd563
--- /dev/null
+++ b/services/sensorservice/SensorInterface.h
@@ -0,0 +1,75 @@
+/*
+ * 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 ANDROID_SENSOR_INTERFACE_H
+#define ANDROID_SENSOR_INTERFACE_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <utils/Singleton.h>
+
+#include <gui/Sensor.h>
+
+#include "SensorDevice.h"
+
+// ---------------------------------------------------------------------------
+
+namespace android {
+// ---------------------------------------------------------------------------
+
+class SensorInterface {
+public:
+    virtual ~SensorInterface();
+
+    virtual bool process(sensors_event_t* outEvent,
+            const sensors_event_t& event) = 0;
+
+    virtual bool isEnabled() const = 0;
+    virtual status_t activate(void* ident, bool enabled) = 0;
+    virtual status_t setDelay(void* ident, int handle, int64_t ns) = 0;
+    virtual Sensor getSensor() const = 0;
+    virtual bool isVirtual() const = 0;
+};
+
+// ---------------------------------------------------------------------------
+
+class HardwareSensor : public SensorInterface
+{
+    SensorDevice& mSensorDevice;
+    Sensor mSensor;
+    bool mEnabled;
+
+public:
+    HardwareSensor(const sensor_t& sensor);
+
+    virtual ~HardwareSensor();
+
+    virtual bool process(sensors_event_t* outEvent,
+            const sensors_event_t& event);
+
+    virtual bool isEnabled() const;
+    virtual status_t activate(void* ident, bool enabled);
+    virtual status_t setDelay(void* ident, int handle, int64_t ns);
+    virtual Sensor getSensor() const;
+    virtual bool isVirtual() const { return false; }
+};
+
+
+// ---------------------------------------------------------------------------
+}; // namespace android
+
+#endif // ANDROID_SENSOR_INTERFACE_H
diff --git a/services/sensorservice/SensorService.cpp b/services/sensorservice/SensorService.cpp
index e204e04..ea5e5cc 100644
--- a/services/sensorservice/SensorService.cpp
+++ b/services/sensorservice/SensorService.cpp
@@ -15,6 +15,7 @@
  */
 
 #include <stdint.h>
+#include <math.h>
 #include <sys/types.h>
 
 #include <utils/SortedVector.h>
@@ -35,80 +36,15 @@
 #include <hardware/sensors.h>
 
 #include "SensorService.h"
+#include "GravitySensor.h"
+#include "LinearAccelerationSensor.h"
+#include "RotationVectorSensor.h"
 
 namespace android {
 // ---------------------------------------------------------------------------
 
-class BatteryService : public Singleton<BatteryService> {
-    static const int TRANSACTION_noteStartSensor = IBinder::FIRST_CALL_TRANSACTION + 3;
-    static const int TRANSACTION_noteStopSensor = IBinder::FIRST_CALL_TRANSACTION + 4;
-    static const String16 DESCRIPTOR;
-
-    friend class Singleton<BatteryService>;
-    sp<IBinder> mBatteryStatService;
-
-    BatteryService() {
-        const sp<IServiceManager> sm(defaultServiceManager());
-        if (sm != NULL) {
-            const String16 name("batteryinfo");
-            mBatteryStatService = sm->getService(name);
-        }
-    }
-
-    status_t noteStartSensor(int uid, int handle) {
-        Parcel data, reply;
-        data.writeInterfaceToken(DESCRIPTOR);
-        data.writeInt32(uid);
-        data.writeInt32(handle);
-        status_t err = mBatteryStatService->transact(
-                TRANSACTION_noteStartSensor, data, &reply, 0);
-        err = reply.readExceptionCode();
-        return err;
-    }
-
-    status_t noteStopSensor(int uid, int handle) {
-        Parcel data, reply;
-        data.writeInterfaceToken(DESCRIPTOR);
-        data.writeInt32(uid);
-        data.writeInt32(handle);
-        status_t err = mBatteryStatService->transact(
-                TRANSACTION_noteStopSensor, data, &reply, 0);
-        err = reply.readExceptionCode();
-        return err;
-    }
-
-public:
-    void enableSensor(int handle) {
-        if (mBatteryStatService != 0) {
-            int uid = IPCThreadState::self()->getCallingUid();
-            int64_t identity = IPCThreadState::self()->clearCallingIdentity();
-            noteStartSensor(uid, handle);
-            IPCThreadState::self()->restoreCallingIdentity(identity);
-        }
-    }
-    void disableSensor(int handle) {
-        if (mBatteryStatService != 0) {
-            int uid = IPCThreadState::self()->getCallingUid();
-            int64_t identity = IPCThreadState::self()->clearCallingIdentity();
-            noteStopSensor(uid, handle);
-            IPCThreadState::self()->restoreCallingIdentity(identity);
-        }
-    }
-};
-
-const String16 BatteryService::DESCRIPTOR("com.android.internal.app.IBatteryStats");
-
-ANDROID_SINGLETON_STATIC_INSTANCE(BatteryService)
-
-// ---------------------------------------------------------------------------
-
-// 100 events/s max
-static const nsecs_t MINIMUM_EVENT_PERIOD = ms2ns(10);
-
 SensorService::SensorService()
     : Thread(false),
-      mSensorDevice(0),
-      mSensorModule(0),
       mDump("android.permission.DUMP"),
       mInitCheck(NO_INIT)
 {
@@ -118,43 +54,66 @@
 {
     LOGD("nuSensorService starting...");
 
-    status_t err = hw_get_module(SENSORS_HARDWARE_MODULE_ID,
-            (hw_module_t const**)&mSensorModule);
+    SensorDevice& dev(SensorDevice::getInstance());
 
-    LOGE_IF(err, "couldn't load %s module (%s)",
-            SENSORS_HARDWARE_MODULE_ID, strerror(-err));
-
-    if (mSensorModule) {
-        err = sensors_open(&mSensorModule->common, &mSensorDevice);
-
-        LOGE_IF(err, "couldn't open device for module %s (%s)",
-                SENSORS_HARDWARE_MODULE_ID, strerror(-err));
-
-        sensors_event_t event;
-        memset(&event, 0, sizeof(event));
-
-        struct sensor_t const* list;
-        int count = mSensorModule->get_sensors_list(mSensorModule, &list);
+    if (dev.initCheck() == NO_ERROR) {
+        uint32_t virtualSensorsNeeds =
+                (1<<SENSOR_TYPE_GRAVITY) |
+                (1<<SENSOR_TYPE_LINEAR_ACCELERATION) |
+                (1<<SENSOR_TYPE_ROTATION_VECTOR);
+        sensor_t const* list;
+        int count = dev.getSensorList(&list);
         mLastEventSeen.setCapacity(count);
         for (int i=0 ; i<count ; i++) {
-            Sensor sensor(list + i);
-            LOGI("%s", sensor.getName().string());
-            mSensorList.add(sensor);
-            if (mSensorDevice) {
-                mSensorDevice->activate(mSensorDevice, sensor.getHandle(), 0);
+            registerSensor( new HardwareSensor(list[i]) );
+            switch (list[i].type) {
+                case SENSOR_TYPE_GRAVITY:
+                case SENSOR_TYPE_LINEAR_ACCELERATION:
+                case SENSOR_TYPE_ROTATION_VECTOR:
+                    virtualSensorsNeeds &= ~(1<<list[i].type);
+                    break;
             }
-            mLastEventSeen.add(sensor.getHandle(), event);
         }
 
-        if (mSensorDevice) {
-            run("SensorService", PRIORITY_URGENT_DISPLAY);
-            mInitCheck = NO_ERROR;
+        if (virtualSensorsNeeds & (1<<SENSOR_TYPE_GRAVITY)) {
+            registerVirtualSensor( new GravitySensor(list, count) );
         }
+        if (virtualSensorsNeeds & (1<<SENSOR_TYPE_LINEAR_ACCELERATION)) {
+            registerVirtualSensor( new LinearAccelerationSensor(list, count) );
+        }
+        if (virtualSensorsNeeds & (1<<SENSOR_TYPE_ROTATION_VECTOR)) {
+            registerVirtualSensor( new RotationVectorSensor(list, count) );
+        }
+
+        run("SensorService", PRIORITY_URGENT_DISPLAY);
+        mInitCheck = NO_ERROR;
     }
 }
 
+void SensorService::registerSensor(SensorInterface* s)
+{
+    sensors_event_t event;
+    memset(&event, 0, sizeof(event));
+
+    const Sensor sensor(s->getSensor());
+    // add to the sensor list (returned to clients)
+    mSensorList.add(sensor);
+    // add to our handle->SensorInterface mapping
+    mSensorMap.add(sensor.getHandle(), s);
+    // create an entry in the mLastEventSeen array
+    mLastEventSeen.add(sensor.getHandle(), event);
+}
+
+void SensorService::registerVirtualSensor(SensorInterface* s)
+{
+    registerSensor(s);
+    mVirtualSensorList.add( s );
+}
+
 SensorService::~SensorService()
 {
+    for (size_t i=0 ; i<mSensorMap.size() ; i++)
+        delete mSensorMap.valueAt(i);
 }
 
 status_t SensorService::dump(int fd, const Vector<String16>& args)
@@ -175,13 +134,15 @@
         for (size_t i=0 ; i<mSensorList.size() ; i++) {
             const Sensor& s(mSensorList[i]);
             const sensors_event_t& e(mLastEventSeen.valueFor(s.getHandle()));
-            snprintf(buffer, SIZE, "%s (vendor=%s, handle=%d, last=<%5.1f,%5.1f,%5.1f>)\n",
+            snprintf(buffer, SIZE, "%-48s| %-32s | 0x%08x | maxRate=%7.2fHz | last=<%5.1f,%5.1f,%5.1f>\n",
                     s.getName().string(),
                     s.getVendor().string(),
                     s.getHandle(),
+                    s.getMinDelay() ? (1000000.0f / s.getMinDelay()) : 0.0f,
                     e.data[0], e.data[1], e.data[2]);
             result.append(buffer);
         }
+        SensorDevice::getInstance().dump(result, buffer, SIZE);
 
         snprintf(buffer, SIZE, "%d active connections\n",
                 mActiveConnections.size());
@@ -190,7 +151,7 @@
         result.append(buffer);
         for (size_t i=0 ; i<mActiveSensors.size() ; i++) {
             int handle = mActiveSensors.keyAt(i);
-            snprintf(buffer, SIZE, "%s (handle=%d, connections=%d)\n",
+            snprintf(buffer, SIZE, "%s (handle=0x%08x, connections=%d)\n",
                     getSensorName(handle).string(),
                     handle,
                     mActiveSensors.valueAt(i)->getNumConnections());
@@ -205,51 +166,96 @@
 {
     LOGD("nuSensorService thread starting...");
 
-    sensors_event_t buffer[16];
-    sensors_event_t scratch[16];
-    struct sensors_poll_device_t* device = mSensorDevice;
-    ssize_t count;
+    const size_t numEventMax = 16 * (1 + mVirtualSensorList.size());
+    sensors_event_t buffer[numEventMax];
+    sensors_event_t scratch[numEventMax];
+    SensorDevice& device(SensorDevice::getInstance());
+    const size_t vcount = mVirtualSensorList.size();
 
+    ssize_t count;
     do {
-        count = device->poll(device, buffer, sizeof(buffer)/sizeof(*buffer));
+        count = device.poll(buffer, numEventMax);
         if (count<0) {
             LOGE("sensor poll failed (%s)", strerror(-count));
             break;
         }
 
-        const SortedVector< wp<SensorEventConnection> > activeConnections(
-                getActiveConnections());
+        recordLastValue(buffer, count);
 
-        size_t numConnections = activeConnections.size();
-        if (numConnections) {
-            Mutex::Autolock _l(mLock);
-
-            // record the last event for each sensor
-            int32_t prev = buffer[0].sensor;
-            for (ssize_t i=1 ; i<count ; i++) {
-                // record the last event of each sensor type in this buffer
-                int32_t curr = buffer[i].sensor;
-                if (curr != prev) {
-                    mLastEventSeen.editValueFor(prev) = buffer[i-1];
-                    prev = curr;
+        // handle virtual sensors
+        if (count && vcount) {
+            const DefaultKeyedVector<int, SensorInterface*> virtualSensors(
+                    getActiveVirtualSensors());
+            const size_t activeVirtualSensorCount = virtualSensors.size();
+            if (activeVirtualSensorCount) {
+                size_t k = 0;
+                for (size_t i=0 ; i<size_t(count) ; i++) {
+                    sensors_event_t const * const event = buffer;
+                    for (size_t j=0 ; j<activeVirtualSensorCount ; j++) {
+                        sensors_event_t out;
+                        if (virtualSensors.valueAt(j)->process(&out, event[i])) {
+                            buffer[count + k] = out;
+                            k++;
+                        }
+                    }
                 }
-            }
-            mLastEventSeen.editValueFor(prev) = buffer[count-1];
-
-            for (size_t i=0 ; i<numConnections ; i++) {
-                sp<SensorEventConnection> connection(activeConnections[i].promote());
-                if (connection != 0) {
-                    connection->sendEvents(buffer, count, scratch);
+                if (k) {
+                    // record the last synthesized values
+                    recordLastValue(&buffer[count], k);
+                    count += k;
+                    // sort the buffer by time-stamps
+                    sortEventBuffer(buffer, count);
                 }
             }
         }
 
+        // send our events to clients...
+        const SortedVector< wp<SensorEventConnection> > activeConnections(
+                getActiveConnections());
+        size_t numConnections = activeConnections.size();
+        for (size_t i=0 ; i<numConnections ; i++) {
+            sp<SensorEventConnection> connection(
+                    activeConnections[i].promote());
+            if (connection != 0) {
+                connection->sendEvents(buffer, count, scratch);
+            }
+        }
     } while (count >= 0 || Thread::exitPending());
 
     LOGW("Exiting SensorService::threadLoop!");
     return false;
 }
 
+void SensorService::recordLastValue(
+        sensors_event_t const * buffer, size_t count)
+{
+    Mutex::Autolock _l(mLock);
+
+    // record the last event for each sensor
+    int32_t prev = buffer[0].sensor;
+    for (size_t i=1 ; i<count ; i++) {
+        // record the last event of each sensor type in this buffer
+        int32_t curr = buffer[i].sensor;
+        if (curr != prev) {
+            mLastEventSeen.editValueFor(prev) = buffer[i-1];
+            prev = curr;
+        }
+    }
+    mLastEventSeen.editValueFor(prev) = buffer[count-1];
+}
+
+void SensorService::sortEventBuffer(sensors_event_t* buffer, size_t count)
+{
+    struct compar {
+        static int cmp(void const* lhs, void const* rhs) {
+            sensors_event_t const* l = static_cast<sensors_event_t const*>(lhs);
+            sensors_event_t const* r = static_cast<sensors_event_t const*>(rhs);
+            return r->timestamp - l->timestamp;
+        }
+    };
+    qsort(buffer, count, sizeof(sensors_event_t), compar::cmp);
+}
+
 SortedVector< wp<SensorService::SensorEventConnection> >
 SensorService::getActiveConnections() const
 {
@@ -257,6 +263,13 @@
     return mActiveConnections;
 }
 
+DefaultKeyedVector<int, SensorInterface*>
+SensorService::getActiveVirtualSensors() const
+{
+    Mutex::Autolock _l(mLock);
+    return mActiveVirtualSensors;
+}
+
 String8 SensorService::getSensorName(int handle) const {
     size_t count = mSensorList.size();
     for (size_t i=0 ; i<count ; i++) {
@@ -287,8 +300,13 @@
     for (size_t i=0 ; i<size ; ) {
         SensorRecord* rec = mActiveSensors.valueAt(i);
         if (rec && rec->removeConnection(connection)) {
-            mSensorDevice->activate(mSensorDevice, mActiveSensors.keyAt(i), 0);
+            int handle = mActiveSensors.keyAt(i);
+            SensorInterface* sensor = mSensorMap.valueFor( handle );
+            if (sensor) {
+                sensor->activate(connection.unsafe_get(), false);
+            }
             mActiveSensors.removeItemsAt(i, 1);
+            mActiveVirtualSensors.removeItem(handle);
             delete rec;
             size--;
         } else {
@@ -304,39 +322,38 @@
     if (mInitCheck != NO_ERROR)
         return mInitCheck;
 
-    status_t err = NO_ERROR;
     Mutex::Autolock _l(mLock);
-    SensorRecord* rec = mActiveSensors.valueFor(handle);
-    if (rec == 0) {
-        rec = new SensorRecord(connection);
-        mActiveSensors.add(handle, rec);
-        err = mSensorDevice->activate(mSensorDevice, handle, 1);
-        LOGE_IF(err, "Error activating sensor %d (%s)", handle, strerror(-err));
-        if (err == 0) {
-            BatteryService::getInstance().enableSensor(handle);
-        }
-    } else {
-        if (rec->addConnection(connection)) {
-            // this sensor is already activated, but we are adding a
-            // connection that uses it. Immediately send down the last
-            // known value of the requested sensor.
-            sensors_event_t scratch;
-            sensors_event_t& event(mLastEventSeen.editValueFor(handle));
-            if (event.version == sizeof(sensors_event_t)) {
-                connection->sendEvents(&event, 1);
-            }
-        }
-    }
+    SensorInterface* sensor = mSensorMap.valueFor(handle);
+    status_t err = sensor ? sensor->activate(connection.get(), true) : status_t(BAD_VALUE);
     if (err == NO_ERROR) {
-        // connection now active
-        if (connection->addSensor(handle)) {
-            // the sensor was added (which means it wasn't already there)
-            // so, see if this connection becomes active
-            if (mActiveConnections.indexOf(connection) < 0) {
-                mActiveConnections.add(connection);
+        SensorRecord* rec = mActiveSensors.valueFor(handle);
+        if (rec == 0) {
+            rec = new SensorRecord(connection);
+            mActiveSensors.add(handle, rec);
+            if (sensor->isVirtual()) {
+                mActiveVirtualSensors.add(handle, sensor);
             }
-            // this could change the sensor event delivery speed
-            recomputeEventsPeriodLocked(handle);
+        } else {
+            if (rec->addConnection(connection)) {
+                // this sensor is already activated, but we are adding a
+                // connection that uses it. Immediately send down the last
+                // known value of the requested sensor.
+                sensors_event_t scratch;
+                sensors_event_t& event(mLastEventSeen.editValueFor(handle));
+                if (event.version == sizeof(sensors_event_t)) {
+                    connection->sendEvents(&event, 1);
+                }
+            }
+        }
+        if (err == NO_ERROR) {
+            // connection now active
+            if (connection->addSensor(handle)) {
+                // the sensor was added (which means it wasn't already there)
+                // so, see if this connection becomes active
+                if (mActiveConnections.indexOf(connection) < 0) {
+                    mActiveConnections.add(connection);
+                }
+            }
         }
     }
     return err;
@@ -360,15 +377,11 @@
         // see if this sensor becomes inactive
         if (rec->removeConnection(connection)) {
             mActiveSensors.removeItem(handle);
+            mActiveVirtualSensors.removeItem(handle);
             delete rec;
-            err = mSensorDevice->activate(mSensorDevice, handle, 0);
-            if (err == 0) {
-                BatteryService::getInstance().disableSensor(handle);
-            }
         }
-    }
-    if (err == NO_ERROR) {
-        recomputeEventsPeriodLocked(handle);
+        SensorInterface* sensor = mSensorMap.valueFor(handle);
+        err = sensor ? sensor->activate(connection.get(), false) : status_t(BAD_VALUE);
     }
     return err;
 }
@@ -385,30 +398,9 @@
     if (ns < MINIMUM_EVENTS_PERIOD)
         ns = MINIMUM_EVENTS_PERIOD;
 
-    Mutex::Autolock _l(mLock);
-    status_t err = connection->setEventRateLocked(handle, ns);
-    if (err == NO_ERROR) {
-        recomputeEventsPeriodLocked(handle);
-    }
-    return err;
-}
-
-status_t SensorService::recomputeEventsPeriodLocked(int32_t handle)
-{
-    status_t err = NO_ERROR;
-    nsecs_t wanted = ms2ns(1000);
-    size_t count = mActiveConnections.size();
-    for (size_t i=0 ; i<count ; i++) {
-        sp<SensorEventConnection> connection(mActiveConnections[i].promote());
-        if (connection != NULL) {
-            nsecs_t ns = connection->getEventRateForSensor(handle);
-            if (ns) {
-                wanted = wanted < ns ? wanted : ns;
-            }
-        }
-    }
-    err = mSensorDevice->setDelay(mSensorDevice, handle, wanted);
-    return err;
+    SensorInterface* sensor = mSensorMap.valueFor(handle);
+    if (!sensor) return BAD_VALUE;
+    return sensor->setDelay(connection.get(), handle, ns);
 }
 
 // ---------------------------------------------------------------------------
@@ -457,41 +449,32 @@
 }
 
 bool SensorService::SensorEventConnection::addSensor(int32_t handle) {
-    if (mSensorInfo.indexOfKey(handle) <= 0) {
-        SensorInfo info;
-        mSensorInfo.add(handle, info);
+    Mutex::Autolock _l(mConnectionLock);
+    if (mSensorInfo.indexOf(handle) <= 0) {
+        mSensorInfo.add(handle);
         return true;
     }
     return false;
 }
 
 bool SensorService::SensorEventConnection::removeSensor(int32_t handle) {
-    if (mSensorInfo.removeItem(handle) >= 0) {
+    Mutex::Autolock _l(mConnectionLock);
+    if (mSensorInfo.remove(handle) >= 0) {
         return true;
     }
     return false;
 }
 
 bool SensorService::SensorEventConnection::hasSensor(int32_t handle) const {
-    return mSensorInfo.indexOfKey(handle) >= 0;
+    Mutex::Autolock _l(mConnectionLock);
+    return mSensorInfo.indexOf(handle) >= 0;
 }
 
 bool SensorService::SensorEventConnection::hasAnySensor() const {
+    Mutex::Autolock _l(mConnectionLock);
     return mSensorInfo.size() ? true : false;
 }
 
-status_t SensorService::SensorEventConnection::setEventRateLocked(
-        int handle, nsecs_t ns)
-{
-    ssize_t index = mSensorInfo.indexOfKey(handle);
-    if (index >= 0) {
-        SensorInfo& info = mSensorInfo.editValueFor(handle);
-        info.ns = ns;
-        return NO_ERROR;
-    }
-    return status_t(index);
-}
-
 status_t SensorService::SensorEventConnection::sendEvents(
         sensors_event_t const* buffer, size_t numEvents,
         sensors_event_t* scratch)
@@ -499,10 +482,11 @@
     // filter out events not for this connection
     size_t count = 0;
     if (scratch) {
+        Mutex::Autolock _l(mConnectionLock);
         size_t i=0;
         while (i<numEvents) {
             const int32_t curr = buffer[i].sensor;
-            if (mSensorInfo.indexOfKey(curr) >= 0) {
+            if (mSensorInfo.indexOf(curr) >= 0) {
                 do {
                     scratch[count++] = buffer[i++];
                 } while ((i<numEvents) && (buffer[i].sensor == curr));
diff --git a/services/sensorservice/SensorService.h b/services/sensorservice/SensorService.h
index 9f37799..540c7e2 100644
--- a/services/sensorservice/SensorService.h
+++ b/services/sensorservice/SensorService.h
@@ -34,6 +34,8 @@
 #include <gui/ISensorServer.h>
 #include <gui/ISensorEventConnection.h>
 
+#include "SensorInterface.h"
+
 // ---------------------------------------------------------------------------
 
 struct sensors_poll_device_t;
@@ -49,8 +51,7 @@
 {
    friend class BinderService<SensorService>;
 
-   static const nsecs_t MINIMUM_EVENTS_PERIOD = 10000000; // 10ms
-   static const nsecs_t DEFAULT_EVENTS_PERIOD = 200000000; // 200 ms
+   static const nsecs_t MINIMUM_EVENTS_PERIOD =   1000000; // 1000 Hz
 
             SensorService();
     virtual ~SensorService();
@@ -75,13 +76,10 @@
 
         sp<SensorService> const mService;
         sp<SensorChannel> const mChannel;
+        mutable Mutex mConnectionLock;
 
         // protected by SensorService::mLock
-        struct SensorInfo {
-            SensorInfo() : ns(DEFAULT_EVENTS_PERIOD) { }
-            nsecs_t ns;
-        };
-        DefaultKeyedVector<int32_t, SensorInfo> mSensorInfo;
+        SortedVector<int> mSensorInfo;
 
     public:
         SensorEventConnection(const sp<SensorService>& service);
@@ -92,10 +90,6 @@
         bool hasAnySensor() const;
         bool addSensor(int32_t handle);
         bool removeSensor(int32_t handle);
-        status_t setEventRateLocked(int handle, nsecs_t ns);
-        nsecs_t getEventRateForSensor(int32_t handle) const {
-            return mSensorInfo.valueFor(handle).ns;
-        }
     };
 
     class SensorRecord {
@@ -108,19 +102,25 @@
     };
 
     SortedVector< wp<SensorEventConnection> > getActiveConnections() const;
+    DefaultKeyedVector<int, SensorInterface*> getActiveVirtualSensors() const;
+
     String8 getSensorName(int handle) const;
-    status_t recomputeEventsPeriodLocked(int32_t handle);
+    void recordLastValue(sensors_event_t const * buffer, size_t count);
+    static void sortEventBuffer(sensors_event_t* buffer, size_t count);
+    void registerSensor(SensorInterface* sensor);
+    void registerVirtualSensor(SensorInterface* sensor);
 
     // constants
     Vector<Sensor> mSensorList;
-    struct sensors_poll_device_t* mSensorDevice;
-    struct sensors_module_t* mSensorModule;
+    DefaultKeyedVector<int, SensorInterface*> mSensorMap;
+    Vector<SensorInterface *> mVirtualSensorList;
     Permission mDump;
     status_t mInitCheck;
 
     // protected by mLock
     mutable Mutex mLock;
     DefaultKeyedVector<int, SensorRecord*> mActiveSensors;
+    DefaultKeyedVector<int, SensorInterface*> mActiveVirtualSensors;
     SortedVector< wp<SensorEventConnection> > mActiveConnections;
 
     // The size of this vector is constant, only the items are mutable
diff --git a/services/sensorservice/tests/sensorservicetest.cpp b/services/sensorservice/tests/sensorservicetest.cpp
index 42bf983..aea1062 100644
--- a/services/sensorservice/tests/sensorservicetest.cpp
+++ b/services/sensorservice/tests/sensorservicetest.cpp
@@ -27,15 +27,25 @@
     sp<SensorEventQueue> q((SensorEventQueue*)data);
     ssize_t n;
     ASensorEvent buffer[8];
+
+    static nsecs_t oldTimeStamp = 0;
+
     while ((n = q->read(buffer, 8)) > 0) {
         for (int i=0 ; i<n ; i++) {
-            if (buffer[i].type == Sensor::TYPE_ACCELEROMETER) {
+            if (buffer[i].type == Sensor::TYPE_GYROSCOPE) {
                 printf("time=%lld, value=<%5.1f,%5.1f,%5.1f>\n",
                         buffer[i].timestamp,
                         buffer[i].acceleration.x,
                         buffer[i].acceleration.y,
                         buffer[i].acceleration.z);
             }
+
+            if (oldTimeStamp) {
+                float t = float(buffer[i].timestamp - oldTimeStamp) / s2ns(1);
+                printf("%f ms (%f Hz)\n", t*1000, 1.0/t);
+            }
+            oldTimeStamp = buffer[i].timestamp;
+
         }
     }
     if (n<0 && n != -EAGAIN) {
@@ -56,7 +66,7 @@
     sp<SensorEventQueue> q = mgr.createEventQueue();
     printf("queue=%p\n", q.get());
 
-    Sensor const* accelerometer = mgr.getDefaultSensor(Sensor::TYPE_ACCELEROMETER);
+    Sensor const* accelerometer = mgr.getDefaultSensor(Sensor::TYPE_GYROSCOPE);
     printf("accelerometer=%p (%s)\n",
             accelerometer, accelerometer->getName().string());
     q->enableSensor(accelerometer);
diff --git a/telephony/java/com/android/internal/telephony/CallManager.java b/telephony/java/com/android/internal/telephony/CallManager.java
index 5f9a3e7..d74a547 100644
--- a/telephony/java/com/android/internal/telephony/CallManager.java
+++ b/telephony/java/com/android/internal/telephony/CallManager.java
@@ -380,7 +380,11 @@
                 break;
             case OFFHOOK:
                 Phone fgPhone = getFgPhone();
-                if (hasActiveFgCall() && !(fgPhone instanceof SipPhone)) {
+                // Enable IN_CALL mode while foreground call is in DIALING,
+                // ALERTING, ACTIVE and DISCONNECTING state and not from sipPhone
+                if (getActiveFgCallState() != Call.State.IDLE
+                        && getActiveFgCallState() != Call.State.DISCONNECTED
+                        && !(fgPhone instanceof SipPhone)) {
                     mode = AudioManager.MODE_IN_CALL;
                 }
                 break;
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp
index ad0465d..661ecb1 100644
--- a/tools/aapt/Command.cpp
+++ b/tools/aapt/Command.cpp
@@ -1139,8 +1139,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/voip/jni/rtp/EchoSuppressor.cpp b/voip/jni/rtp/EchoSuppressor.cpp
index d5cff6e8..f9508d8 100644
--- a/voip/jni/rtp/EchoSuppressor.cpp
+++ b/voip/jni/rtp/EchoSuppressor.cpp
@@ -160,22 +160,27 @@
     }
 
     // Compute correlations.
-    float corr2 = 0.0f;
     int latency = 0;
+    float corr2 = 0.0f;
+    float varX = 0.0f;
     float varY = mY2Sum - mWeight * mYSum * mYSum;
     for (int i = mTailLength - 1; i >= 0; --i) {
-        float varX = mX2Sums[i] - mWeight * mXSums[i] * mXSums[i];
         float cov = mXYSums[i] - mWeight * mXSums[i] * mYSum;
-        float c2 = cov * cov / (varX * varY + 1);
-        if (c2 > corr2) {
-            corr2 = c2;
-            latency = i;
+        if (cov > 0.0f) {
+            float varXi = mX2Sums[i] - mWeight * mXSums[i] * mXSums[i];
+            float corr2i = cov * cov / (varXi * varY + 1);
+            if (corr2i > corr2) {
+                varX = varXi;
+                corr2 = corr2i;
+                latency = i;
+            }
         }
     }
-    //LOGI("correlation^2 = %.10f, latency = %d", corr2, latency * mScale);
+    //LOGI("corr^2 %.5f, var %8.0f %8.0f, latency %d", corr2, varX, varY,
+    //        latency * mScale);
 
     // Do echo suppression.
-    if (corr2 > 0.1f) {
+    if (corr2 > 0.1f && varX > 10000.0f) {
         int factor = (corr2 > 1.0f) ? 0 : (1.0f - sqrtf(corr2)) * 4096;
         for (int i = 0; i < mSampleCount; ++i) {
             recorded[i] = recorded[i] * factor >> 16;
diff --git a/wifi/java/android/net/wifi/WifiStateTracker.java b/wifi/java/android/net/wifi/WifiStateTracker.java
index 8028fe7..a0e588d 100644
--- a/wifi/java/android/net/wifi/WifiStateTracker.java
+++ b/wifi/java/android/net/wifi/WifiStateTracker.java
@@ -601,8 +601,6 @@
      * Send the tracker a notification that the Wi-Fi driver has been stopped.
      */
     void notifyDriverStopped() {
-        mRunState = RUN_STATE_STOPPED;
-
         // Send a driver stopped message to our handler
         Message.obtain(this, EVENT_DRIVER_STATE_CHANGED, DRIVER_STOPPED, 0).sendToTarget();
     }
@@ -1301,6 +1299,9 @@
                         }
                     }
                     break;
+                case DRIVER_STOPPED:
+                    mRunState = RUN_STATE_STOPPED;
+                    break;
                 case DRIVER_HUNG:
                     Log.e(TAG, "Wifi Driver reports HUNG - reloading.");
                     /**