Merge change 2520 into donut

* changes:
  Cause the icon drawables to animate automatically by calling setVisible false and then true on the drawables. For an AnimationDrawable, this will trigger the desired behavior of 'automatically' starting the animation, which should have been working to begin with according to the intended design of AnimationDrawable (see http://b/1878430 for my description of my correspondence with Romain). For Donut we'll just do this to work around it, but for a later release we need to decide a better story.
diff --git a/api/current.xml b/api/current.xml
index 53e268b..ce1b726 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -3518,72 +3518,6 @@
  visibility="public"
 >
 </field>
-<field name="donut_resource_pad33"
- type="int"
- transient="false"
- volatile="false"
- value="16843391"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="donut_resource_pad34"
- type="int"
- transient="false"
- volatile="false"
- value="16843390"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="donut_resource_pad35"
- type="int"
- transient="false"
- volatile="false"
- value="16843389"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="donut_resource_pad36"
- type="int"
- transient="false"
- volatile="false"
- value="16843388"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="donut_resource_pad37"
- type="int"
- transient="false"
- volatile="false"
- value="16843387"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="donut_resource_pad38"
- type="int"
- transient="false"
- volatile="false"
- value="16843386"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
 <field name="donut_resource_pad4"
  type="int"
  transient="false"
@@ -3947,6 +3881,17 @@
  visibility="public"
 >
 </field>
+<field name="eventsInterceptionEnabled"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843390"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="excludeFromRecents"
  type="int"
  transient="false"
@@ -4079,6 +4024,17 @@
  visibility="public"
 >
 </field>
+<field name="fadeEnabled"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843391"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="fadeOffset"
  type="int"
  transient="false"
@@ -4420,6 +4376,50 @@
  visibility="public"
 >
 </field>
+<field name="gestureStrokeAngleThreshold"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843389"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="gestureStrokeLengthThreshold"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843387"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="gestureStrokeSquarenessThreshold"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843388"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="gestureStrokeType"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843386"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="gestureStrokeWidth"
  type="int"
  transient="false"
@@ -46303,6 +46303,70 @@
 <parameter name="color" type="int">
 </parameter>
 </method>
+<method name="toPath"
+ return="android.graphics.Path"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="toPath"
+ return="android.graphics.Path"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="android.graphics.Path">
+</parameter>
+</method>
+<method name="toPath"
+ return="android.graphics.Path"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="edge" type="int">
+</parameter>
+<parameter name="numSample" type="int">
+</parameter>
+</method>
+<method name="toPath"
+ return="android.graphics.Path"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="path" type="android.graphics.Path">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="edge" type="int">
+</parameter>
+<parameter name="numSample" type="int">
+</parameter>
+</method>
 <method name="writeToParcel"
  return="void"
  abstract="false"
@@ -46543,7 +46607,7 @@
 </field>
 </class>
 <class name="GestureOverlayView"
- extends="android.view.View"
+ extends="android.widget.FrameLayout"
  abstract="false"
  static="false"
  final="false"
@@ -46599,7 +46663,31 @@
 <parameter name="listener" type="android.gesture.GestureOverlayView.OnGestureListener">
 </parameter>
 </method>
-<method name="cancelFadingOut"
+<method name="addOnGesturePerformedListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.gesture.GestureOverlayView.OnGesturePerformedListener">
+</parameter>
+</method>
+<method name="cancelClearAnimation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="cancelGesture"
  return="void"
  abstract="false"
  native="false"
@@ -46620,11 +46708,11 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<parameter name="fadeOut" type="boolean">
+<parameter name="animated" type="boolean">
 </parameter>
 </method>
-<method name="getCurrentGesture"
- return="android.gesture.Gesture"
+<method name="getCurrentStroke"
+ return="java.util.ArrayList&lt;android.gesture.GesturePoint&gt;"
  abstract="false"
  native="false"
  synchronized="false"
@@ -46634,8 +46722,8 @@
  visibility="public"
 >
 </method>
-<method name="getCurrentStroke"
- return="java.util.ArrayList&lt;android.gesture.GesturePoint&gt;"
+<method name="getGesture"
+ return="android.gesture.Gesture"
  abstract="false"
  native="false"
  synchronized="false"
@@ -46656,7 +46744,7 @@
  visibility="public"
 >
 </method>
-<method name="getGestureStroke"
+<method name="getGestureStrokeAngleThreshold"
  return="float"
  abstract="false"
  native="false"
@@ -46667,6 +46755,61 @@
  visibility="public"
 >
 </method>
+<method name="getGestureStrokeLengthThreshold"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGestureStrokeSquarenessTreshold"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGestureStrokeType"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGestureStrokeWidth"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getOrientation"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
 <method name="getUncertainGestureColor"
  return="int"
  abstract="false"
@@ -46678,7 +46821,40 @@
  visibility="public"
 >
 </method>
-<method name="processEvent"
+<method name="isEventsInterceptionEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isFadeEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isGesturing"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeAllOnGestureListeners"
  return="void"
  abstract="false"
  native="false"
@@ -46688,10 +46864,8 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<parameter name="event" type="android.view.MotionEvent">
-</parameter>
 </method>
-<method name="removeAllOnGestureListeners"
+<method name="removeAllOnGesturePerformedListeners"
  return="void"
  abstract="false"
  native="false"
@@ -46715,7 +46889,46 @@
 <parameter name="listener" type="android.gesture.GestureOverlayView.OnGestureListener">
 </parameter>
 </method>
-<method name="setCurrentGesture"
+<method name="removeOnGesturePerformedListener"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="listener" type="android.gesture.GestureOverlayView.OnGesturePerformedListener">
+</parameter>
+</method>
+<method name="setEventsInterceptionEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enabled" type="boolean">
+</parameter>
+</method>
+<method name="setFadeEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fadeEnabled" type="boolean">
+</parameter>
+</method>
+<method name="setGesture"
  return="void"
  abstract="false"
  native="false"
@@ -46741,7 +46954,7 @@
 <parameter name="color" type="int">
 </parameter>
 </method>
-<method name="setGestureDrawingColor"
+<method name="setGestureStrokeAngleThreshold"
  return="void"
  abstract="false"
  native="false"
@@ -46751,10 +46964,10 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<parameter name="color" type="int">
+<parameter name="gestureStrokeAngleThreshold" type="float">
 </parameter>
 </method>
-<method name="setGestureStroke"
+<method name="setGestureStrokeLengthThreshold"
  return="void"
  abstract="false"
  native="false"
@@ -46764,7 +46977,59 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<parameter name="gestureStroke" type="float">
+<parameter name="gestureStrokeLengthThreshold" type="float">
+</parameter>
+</method>
+<method name="setGestureStrokeSquarenessTreshold"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gestureStrokeSquarenessTreshold" type="float">
+</parameter>
+</method>
+<method name="setGestureStrokeType"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gestureStrokeType" type="int">
+</parameter>
+</method>
+<method name="setGestureStrokeWidth"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="gestureStrokeWidth" type="float">
+</parameter>
+</method>
+<method name="setOrientation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="orientation" type="int">
 </parameter>
 </method>
 <method name="setUncertainGestureColor"
@@ -46780,6 +47045,50 @@
 <parameter name="color" type="int">
 </parameter>
 </method>
+<field name="GESTURE_STROKE_TYPE_MULTIPLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GESTURE_STROKE_TYPE_SINGLE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORIENTATION_HORIZONTAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ORIENTATION_VERTICAL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 </class>
 <interface name="GestureOverlayView.OnGestureListener"
  abstract="true"
@@ -46849,6 +47158,29 @@
 </parameter>
 </method>
 </interface>
+<interface name="GestureOverlayView.OnGesturePerformedListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onGesturePerformed"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="overlay" type="android.gesture.GestureOverlayView">
+</parameter>
+<parameter name="gesture" type="android.gesture.Gesture">
+</parameter>
+</method>
+</interface>
 <class name="GesturePoint"
  extends="java.lang.Object"
  abstract="false"
@@ -46942,6 +47274,17 @@
  visibility="public"
 >
 </method>
+<method name="getPath"
+ return="android.graphics.Path"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
 <method name="toPath"
  return="android.graphics.Path"
  abstract="false"
@@ -47152,194 +47495,6 @@
 >
 </field>
 </class>
-<class name="TouchThroughGestureListener"
- extends="java.lang.Object"
- abstract="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<implements name="android.gesture.GestureOverlayView.OnGestureListener">
-</implements>
-<constructor name="TouchThroughGestureListener"
- type="android.gesture.TouchThroughGestureListener"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="model" type="android.view.View">
-</parameter>
-</constructor>
-<constructor name="TouchThroughGestureListener"
- type="android.gesture.TouchThroughGestureListener"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="model" type="android.view.View">
-</parameter>
-<parameter name="stealEvents" type="boolean">
-</parameter>
-</constructor>
-<method name="addOnGestureActionListener"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="listener" type="android.gesture.TouchThroughGestureListener.OnGesturePerformedListener">
-</parameter>
-</method>
-<method name="isGesturing"
- return="boolean"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="onGesture"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="overlay" type="android.gesture.GestureOverlayView">
-</parameter>
-<parameter name="event" type="android.view.MotionEvent">
-</parameter>
-</method>
-<method name="onGestureCancelled"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="overlay" type="android.gesture.GestureOverlayView">
-</parameter>
-<parameter name="event" type="android.view.MotionEvent">
-</parameter>
-</method>
-<method name="onGestureEnded"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="overlay" type="android.gesture.GestureOverlayView">
-</parameter>
-<parameter name="event" type="android.view.MotionEvent">
-</parameter>
-</method>
-<method name="onGestureStarted"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="overlay" type="android.gesture.GestureOverlayView">
-</parameter>
-<parameter name="event" type="android.view.MotionEvent">
-</parameter>
-</method>
-<method name="removeOnGestureActionListener"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="listener" type="android.gesture.TouchThroughGestureListener.OnGesturePerformedListener">
-</parameter>
-</method>
-<method name="setGestureType"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="type" type="int">
-</parameter>
-</method>
-<field name="MULTIPLE_STROKE"
- type="int"
- transient="false"
- volatile="false"
- value="1"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="SINGLE_STROKE"
- type="int"
- transient="false"
- volatile="false"
- value="0"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-</class>
-<interface name="TouchThroughGestureListener.OnGesturePerformedListener"
- abstract="true"
- static="true"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<method name="onGesturePerformed"
- return="void"
- abstract="true"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="overlay" type="android.gesture.GestureOverlayView">
-</parameter>
-<parameter name="gesture" type="android.gesture.Gesture">
-</parameter>
-</method>
-</interface>
 </package>
 <package name="android.graphics"
 >
@@ -70910,6 +71065,17 @@
  visibility="public"
 >
 </constructor>
+<method name="getAudioSourceMax"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
 <method name="getMaxAmplitude"
  return="int"
  abstract="false"
@@ -71311,6 +71477,39 @@
  visibility="public"
 >
 </field>
+<field name="VOICE_CALL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VOICE_DOWNLINK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="VOICE_UPLINK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 </class>
 <interface name="MediaRecorder.OnErrorListener"
  abstract="true"
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 1e15d14..06e0a453 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -1513,6 +1513,18 @@
             queueOrSendMessage(H.PROFILER_CONTROL, path, start ? 1 : 0);
         }
 
+        public void setSchedulingGroup(int group) {
+            // Note: do this immediately, since going into the foreground
+            // should happen regardless of what pending work we have to do
+            // and the activity manager will wait for us to report back that
+            // we are done before sending us to the background.
+            try {
+                Process.setProcessGroup(Process.myPid(), group);
+            } catch (Exception e) {
+                Log.w(TAG, "Failed setting process group to " + group, e);
+            }
+        }
+        
         @Override
         protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
             long nativeMax = Debug.getNativeHeapSize() / 1024;
diff --git a/core/java/android/app/ApplicationErrorReport.java b/core/java/android/app/ApplicationErrorReport.java
index 72cbff4..0c8f95d 100644
--- a/core/java/android/app/ApplicationErrorReport.java
+++ b/core/java/android/app/ApplicationErrorReport.java
@@ -18,7 +18,6 @@
 
 import android.os.Parcel;
 import android.os.Parcelable;
-import android.util.Log;
 import android.util.Printer;
 
 /**
@@ -103,20 +102,7 @@
      * a parcel.
      */
     ApplicationErrorReport(Parcel in) {
-        type = in.readInt();
-        packageName = in.readString();
-        installerPackageName = in.readString();
-        processName = in.readString();
-        time = in.readLong();
-
-        switch (type) {
-            case TYPE_CRASH:
-                crashInfo = new CrashInfo(in);
-                break;
-            case TYPE_ANR:
-                anrInfo = new AnrInfo(in);
-                break;
-        }
+        readFromParcel(in);
     }
 
     public void writeToParcel(Parcel dest, int flags) {
@@ -136,6 +122,25 @@
         }
     }
 
+    public void readFromParcel(Parcel in) {
+        type = in.readInt();
+        packageName = in.readString();
+        installerPackageName = in.readString();
+        processName = in.readString();
+        time = in.readLong();
+
+        switch (type) {
+            case TYPE_CRASH:
+                crashInfo = new CrashInfo(in);
+                anrInfo = null;
+                break;
+            case TYPE_ANR:
+                anrInfo = new AnrInfo(in);
+                crashInfo = null;
+                break;
+        }
+    }
+
     /**
      * Describes an application crash.
      */
diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java
index bcc9302..f243185 100644
--- a/core/java/android/app/ApplicationThreadNative.java
+++ b/core/java/android/app/ApplicationThreadNative.java
@@ -331,6 +331,14 @@
             profilerControl(start, path);
             return true;
         }
+        
+        case SET_SCHEDULING_GROUP_TRANSACTION:
+        {
+            data.enforceInterface(IApplicationThread.descriptor);
+            int group = data.readInt();
+            setSchedulingGroup(group);
+            return true;
+        }
         }
 
         return super.onTransact(code, data, reply, flags);
@@ -672,5 +680,14 @@
                 IBinder.FLAG_ONEWAY);
         data.recycle();
     }
+    
+    public void setSchedulingGroup(int group) throws RemoteException {
+        Parcel data = Parcel.obtain();
+        data.writeInterfaceToken(IApplicationThread.descriptor);
+        data.writeInt(group);
+        mRemote.transact(SET_SCHEDULING_GROUP_TRANSACTION, data, null,
+                IBinder.FLAG_ONEWAY);
+        data.recycle();
+    }
 }
 
diff --git a/core/java/android/app/IApplicationThread.java b/core/java/android/app/IApplicationThread.java
index 9f3534b..ec03d3a 100644
--- a/core/java/android/app/IApplicationThread.java
+++ b/core/java/android/app/IApplicationThread.java
@@ -87,7 +87,8 @@
     void scheduleActivityConfigurationChanged(IBinder token) throws RemoteException;
     void requestPss() throws RemoteException;
     void profilerControl(boolean start, String path) throws RemoteException;
-
+    void setSchedulingGroup(int group) throws RemoteException;
+    
     String descriptor = "android.app.IApplicationThread";
 
     int SCHEDULE_PAUSE_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION;
@@ -117,4 +118,5 @@
     int SCHEDULE_RELAUNCH_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+25;
     int REQUEST_PSS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+26;
     int PROFILER_CONTROL_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+27;
+    int SET_SCHEDULING_GROUP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+28;
 }
diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java
index aaaf7bf..ff110c8 100644
--- a/core/java/android/app/SearchDialog.java
+++ b/core/java/android/app/SearchDialog.java
@@ -49,6 +49,7 @@
 import android.text.TextWatcher;
 import android.util.AttributeSet;
 import android.util.Log;
+import android.view.ContextThemeWrapper;
 import android.view.Gravity;
 import android.view.KeyEvent;
 import android.view.MotionEvent;
@@ -165,7 +166,7 @@
      * @param context Application Context we can use for system acess
      */
     public SearchDialog(Context context) {
-        super(context, com.android.internal.R.style.Theme_SearchBar);
+        super(context, com.android.internal.R.style.Theme_GlobalSearchBar);
     }
 
     /**
@@ -393,6 +394,21 @@
                 getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
                         inputManager.showSoftInputUnchecked(0, null);
             }
+            
+            // The Dialog uses a ContextThemeWrapper for the context; use this to change the
+            // theme out from underneath us, between the global search theme and the in-app
+            // search theme. They are identical except that the global search theme does not
+            // dim the background of the window (because global search is full screen so it's
+            // not needed and this should save a little bit of time on global search invocation).
+            Object context = getContext();
+            if (context instanceof ContextThemeWrapper) {
+                ContextThemeWrapper wrapper = (ContextThemeWrapper) context;
+                if (globalSearch) {
+                    wrapper.setTheme(com.android.internal.R.style.Theme_GlobalSearchBar);
+                } else {
+                    wrapper.setTheme(com.android.internal.R.style.Theme_SearchBar);
+                }
+            }
             show();
         }
 
diff --git a/core/java/android/gesture/Gesture.java b/core/java/android/gesture/Gesture.java
index 14530a1..6aca105 100755
--- a/core/java/android/gesture/Gesture.java
+++ b/core/java/android/gesture/Gesture.java
@@ -57,6 +57,11 @@
         mGestureID = GESTURE_ID_BASE + sGestureCount++;
     }
 
+    void recycle() {
+        mStrokes.clear();
+        mBoundingBox.setEmpty();
+    }
+
     /**
      * @return all the strokes of the gesture
      */
@@ -111,6 +116,40 @@
         return mBoundingBox;
     }
 
+    public Path toPath() {
+        return toPath(null);
+    }
+
+    public Path toPath(Path path) {
+        if (path == null) path = new Path();
+
+        final ArrayList<GestureStroke> strokes = mStrokes;
+        final int count = strokes.size();
+
+        for (int i = 0; i < count; i++) {
+            path.addPath(strokes.get(i).getPath());
+        }
+
+        return path;
+    }
+
+    public Path toPath(int width, int height, int edge, int numSample) {
+        return toPath(null, width, height, edge, numSample);
+    }
+
+    public Path toPath(Path path, int width, int height, int edge, int numSample) {
+        if (path == null) path = new Path();
+
+        final ArrayList<GestureStroke> strokes = mStrokes;
+        final int count = strokes.size();
+
+        for (int i = 0; i < count; i++) {
+            path.addPath(strokes.get(i).toPath(width - 2 * edge, height - 2 * edge, numSample));
+        }
+
+        return path;
+    }
+
     /**
      * Set the id of the gesture
      * 
diff --git a/core/java/android/gesture/GestureOverlayView.java b/core/java/android/gesture/GestureOverlayView.java
index 64ddbbd..c21cc55 100755
--- a/core/java/android/gesture/GestureOverlayView.java
+++ b/core/java/android/gesture/GestureOverlayView.java
@@ -18,51 +18,69 @@
 
 import android.content.Context;
 import android.content.res.TypedArray;
-import android.graphics.Bitmap;
 import android.graphics.Canvas;
 import android.graphics.Paint;
 import android.graphics.Path;
 import android.graphics.Rect;
+import android.graphics.RectF;
 import android.util.AttributeSet;
 import android.view.MotionEvent;
-import android.view.View;
 import android.view.animation.AnimationUtils;
 import android.view.animation.AccelerateDecelerateInterpolator;
+import android.widget.FrameLayout;
+import android.os.SystemClock;
 import com.android.internal.R;
 
 import java.util.ArrayList;
 
 /**
- * A (transparent) overlay for gesture input that can be placed on top of other
- * widgets.
+ * A transparent overlay for gesture input that can be placed on top of other
+ * widgets or contain other widgets.
  *
- * @attr ref android.R.styleable#GestureOverlayView_gestureStrokeWidth
- * @attr ref android.R.styleable#GestureOverlayView_gestureColor
- * @attr ref android.R.styleable#GestureOverlayView_uncertainGestureColor
+ * @attr ref android.R.styleable#GestureOverlayView_eventsInterceptionEnabled
  * @attr ref android.R.styleable#GestureOverlayView_fadeDuration
  * @attr ref android.R.styleable#GestureOverlayView_fadeOffset
+ * @attr ref android.R.styleable#GestureOverlayView_fadeEnabled
+ * @attr ref android.R.styleable#GestureOverlayView_gestureStrokeWidth
+ * @attr ref android.R.styleable#GestureOverlayView_gestureStrokeAngleThreshold
+ * @attr ref android.R.styleable#GestureOverlayView_gestureStrokeLengthThreshold
+ * @attr ref android.R.styleable#GestureOverlayView_gestureStrokeSquarenessThreshold
+ * @attr ref android.R.styleable#GestureOverlayView_gestureStrokeType 
+ * @attr ref android.R.styleable#GestureOverlayView_gestureColor
+ * @attr ref android.R.styleable#GestureOverlayView_uncertainGestureColor
  */
-public class GestureOverlayView extends View {
-    private static final int TRANSPARENT_BACKGROUND = 0x00000000;
+public class GestureOverlayView extends FrameLayout {
+    public static final int GESTURE_STROKE_TYPE_SINGLE = 0;
+    public static final int GESTURE_STROKE_TYPE_MULTIPLE = 1;
+
+    public static final int ORIENTATION_HORIZONTAL = 0;
+    public static final int ORIENTATION_VERTICAL = 1;
+
+    private static final int FADE_ANIMATION_RATE = 16;
     private static final boolean GESTURE_RENDERING_ANTIALIAS = true;
     private static final boolean DITHER_FLAG = true;
 
-    private Paint mGesturePaint;
+    private final Paint mGesturePaint = new Paint();
 
-    private final Paint mBitmapPaint = new Paint(Paint.DITHER_FLAG);
-    private Bitmap mBitmap;
-    private Canvas mBitmapCanvas;
-
-    private long mFadeDuration = 300;
-    private long mFadeOffset = 300;
+    private long mFadeDuration = 150;
+    private long mFadeOffset = 420;
     private long mFadingStart;
+    private boolean mFadingHasStarted;
+    private boolean mFadeEnabled = true;
 
-    private float mGestureStroke = 12.0f;
+    private int mCurrentColor;
     private int mCertainGestureColor = 0xFFFFFF00;
-    private int mUncertainGestureColor = 0x3CFFFF00;
+    private int mUncertainGestureColor = 0x48FFFF00;
+    private float mGestureStrokeWidth = 12.0f;
     private int mInvalidateExtraBorder = 10;
 
-    // for rendering immediate ink feedback
+    private int mGestureStrokeType = GESTURE_STROKE_TYPE_SINGLE;
+    private float mGestureStrokeLengthThreshold = 30.0f;
+    private float mGestureStrokeSquarenessTreshold = 0.275f;
+    private float mGestureStrokeAngleThreshold = 40.0f;
+
+    private int mOrientation = ORIENTATION_VERTICAL;
+
     private final Rect mInvalidRect = new Rect();
     private final Path mPath = new Path();
 
@@ -72,41 +90,31 @@
     private float mCurveEndX;
     private float mCurveEndY;
 
+    private float mTotalLength;
+    private boolean mIsGesturing = false;
+    private boolean mInterceptEvents = true;
+    private boolean mIsListeningForGestures;
+
     // current gesture
-    private Gesture mCurrentGesture = null;
+    private Gesture mCurrentGesture;
+    private final ArrayList<GesturePoint> mStrokeBuffer = new ArrayList<GesturePoint>(100);
 
     // TODO: Make this a list of WeakReferences
     private final ArrayList<OnGestureListener> mOnGestureListeners =
             new ArrayList<OnGestureListener>();
-    private final ArrayList<GesturePoint> mPointBuffer = new ArrayList<GesturePoint>(100);
+    // TODO: Make this a list of WeakReferences
+    private final ArrayList<OnGesturePerformedListener> mOnGesturePerformedListeners =
+            new ArrayList<OnGesturePerformedListener>();
+
+    private boolean mHandleGestureActions;
 
     // fading out effect
     private boolean mIsFadingOut = false;
-    private float mFadingAlpha = 1;
+    private float mFadingAlpha = 1.0f;
     private final AccelerateDecelerateInterpolator mInterpolator =
             new AccelerateDecelerateInterpolator();
 
-    private final Runnable mFadingOut = new Runnable() {
-        public void run() {
-            if (mIsFadingOut) {
-                final long now = AnimationUtils.currentAnimationTimeMillis();
-                final long duration = now - mFadingStart;
-
-                if (duration > mFadeDuration) {
-                    mIsFadingOut = false;
-                    mPath.rewind();
-                    mCurrentGesture = null;
-                    mBitmap.eraseColor(TRANSPARENT_BACKGROUND);
-                } else {
-                    float interpolatedTime = Math.max(0.0f,
-                            Math.min(1.0f, duration / (float) mFadeDuration));
-                    mFadingAlpha = 1.0f - mInterpolator.getInterpolation(interpolatedTime);
-                    postDelayed(this, 16);
-                }
-                invalidate();
-            }
-        }
-    };
+    private final FadeOutRunnable mFadingOut = new FadeOutRunnable();
 
     public GestureOverlayView(Context context) {
         super(context);
@@ -123,41 +131,63 @@
         TypedArray a = context.obtainStyledAttributes(attrs,
                 R.styleable.GestureOverlayView, defStyle, 0);
 
-        mGestureStroke = a.getFloat(R.styleable.GestureOverlayView_gestureStrokeWidth,
-                mGestureStroke);
-        mInvalidateExtraBorder = Math.max(1, ((int) mGestureStroke) - 1);
+        mGestureStrokeWidth = a.getFloat(R.styleable.GestureOverlayView_gestureStrokeWidth,
+                mGestureStrokeWidth);
+        mInvalidateExtraBorder = Math.max(1, ((int) mGestureStrokeWidth) - 1);
         mCertainGestureColor = a.getColor(R.styleable.GestureOverlayView_gestureColor,
                 mCertainGestureColor);
         mUncertainGestureColor = a.getColor(R.styleable.GestureOverlayView_uncertainGestureColor,
                 mUncertainGestureColor);
         mFadeDuration = a.getInt(R.styleable.GestureOverlayView_fadeDuration, (int) mFadeDuration);
         mFadeOffset = a.getInt(R.styleable.GestureOverlayView_fadeOffset, (int) mFadeOffset);
+        mGestureStrokeType = a.getInt(R.styleable.GestureOverlayView_gestureStrokeType,
+                mGestureStrokeType);
+        mGestureStrokeLengthThreshold = a.getFloat(
+                R.styleable.GestureOverlayView_gestureStrokeLengthThreshold,
+                mGestureStrokeLengthThreshold);
+        mGestureStrokeAngleThreshold = a.getFloat(
+                R.styleable.GestureOverlayView_gestureStrokeAngleThreshold,
+                mGestureStrokeAngleThreshold);
+        mGestureStrokeSquarenessTreshold = a.getFloat(
+                R.styleable.GestureOverlayView_gestureStrokeSquarenessThreshold,
+                mGestureStrokeSquarenessTreshold);
+        mInterceptEvents = a.getBoolean(R.styleable.GestureOverlayView_eventsInterceptionEnabled,
+                mInterceptEvents);
+        mFadeEnabled = a.getBoolean(R.styleable.GestureOverlayView_fadeEnabled,
+                mFadeEnabled);
+        mOrientation = a.getInt(R.styleable.GestureOverlayView_orientation, mOrientation);
 
         a.recycle();
 
         init();
     }
 
+    private void init() {
+        setWillNotDraw(false);
+
+        final Paint gesturePaint = mGesturePaint;
+        gesturePaint.setAntiAlias(GESTURE_RENDERING_ANTIALIAS);
+        gesturePaint.setColor(mCertainGestureColor);
+        gesturePaint.setStyle(Paint.Style.STROKE);
+        gesturePaint.setStrokeJoin(Paint.Join.ROUND);
+        gesturePaint.setStrokeCap(Paint.Cap.ROUND);
+        gesturePaint.setStrokeWidth(mGestureStrokeWidth);
+        gesturePaint.setDither(DITHER_FLAG);
+
+        mCurrentColor = mCertainGestureColor;
+        setPaintAlpha(255);
+    }
+
     public ArrayList<GesturePoint> getCurrentStroke() {
-        return mPointBuffer;
+        return mStrokeBuffer;
     }
 
-    public Gesture getCurrentGesture() {
-        return mCurrentGesture;
+    public int getOrientation() {
+        return mOrientation;
     }
 
-    /**
-     * Set Gesture color
-     * 
-     * @param color
-     */
-    public void setGestureDrawingColor(int color) {
-        mGesturePaint.setColor(color);
-        if (mCurrentGesture != null) {
-            mBitmap.eraseColor(TRANSPARENT_BACKGROUND);
-            mCurrentGesture.draw(mBitmapCanvas, mGesturePaint);
-        }
-        invalidate();
+    public void setOrientation(int orientation) {
+        mOrientation = orientation;
     }
 
     public void setGestureColor(int color) {
@@ -176,73 +206,85 @@
         return mCertainGestureColor;
     }
 
-    public float getGestureStroke() {
-        return mGestureStroke;
+    public float getGestureStrokeWidth() {
+        return mGestureStrokeWidth;
     }
 
-    public void setGestureStroke(float gestureStroke) {
-        mGestureStroke = gestureStroke;
-        mInvalidateExtraBorder = Math.max(1, ((int) mGestureStroke) - 1);
-        mGesturePaint.setStrokeWidth(mGestureStroke);
+    public void setGestureStrokeWidth(float gestureStrokeWidth) {
+        mGestureStrokeWidth = gestureStrokeWidth;
+        mInvalidateExtraBorder = Math.max(1, ((int) gestureStrokeWidth) - 1);
+        mGesturePaint.setStrokeWidth(gestureStrokeWidth);
     }
 
-    /**
-     * Set the gesture to be shown in the view
-     * 
-     * @param gesture
-     */
-    public void setCurrentGesture(Gesture gesture) {
+    public int getGestureStrokeType() {
+        return mGestureStrokeType;
+    }
+
+    public void setGestureStrokeType(int gestureStrokeType) {
+        mGestureStrokeType = gestureStrokeType;
+    }
+
+    public float getGestureStrokeLengthThreshold() {
+        return mGestureStrokeLengthThreshold;
+    }
+
+    public void setGestureStrokeLengthThreshold(float gestureStrokeLengthThreshold) {
+        mGestureStrokeLengthThreshold = gestureStrokeLengthThreshold;
+    }
+
+    public float getGestureStrokeSquarenessTreshold() {
+        return mGestureStrokeSquarenessTreshold;
+    }
+
+    public void setGestureStrokeSquarenessTreshold(float gestureStrokeSquarenessTreshold) {
+        mGestureStrokeSquarenessTreshold = gestureStrokeSquarenessTreshold;
+    }
+
+    public float getGestureStrokeAngleThreshold() {
+        return mGestureStrokeAngleThreshold;
+    }
+
+    public void setGestureStrokeAngleThreshold(float gestureStrokeAngleThreshold) {
+        mGestureStrokeAngleThreshold = gestureStrokeAngleThreshold;
+    }
+
+    public boolean isEventsInterceptionEnabled() {
+        return mInterceptEvents;
+    }
+
+    public void setEventsInterceptionEnabled(boolean enabled) {
+        mInterceptEvents = enabled;
+    }
+
+    public boolean isFadeEnabled() {
+        return mFadeEnabled;
+    }
+
+    public void setFadeEnabled(boolean fadeEnabled) {
+        mFadeEnabled = fadeEnabled;
+    }
+
+    public Gesture getGesture() {
+        return mCurrentGesture;
+    }
+
+    public void setGesture(Gesture gesture) {
         if (mCurrentGesture != null) {
             clear(false);
         }
 
+        setCurrentColor(mCertainGestureColor);
         mCurrentGesture = gesture;
 
-        if (gesture != null) {
-            if (mBitmapCanvas != null) {
-                gesture.draw(mBitmapCanvas, mGesturePaint);
-                invalidate();
-            }
-        }
-    }
+        final Path path = mCurrentGesture.toPath();
+        final RectF bounds = new RectF();
+        path.computeBounds(bounds, true);
 
-    private void init() {
-        mGesturePaint = new Paint();
+        mPath.rewind();
+        mPath.addPath(path, (getWidth() - bounds.width()) / 2.0f,
+                (getHeight() - bounds.height()) / 2.0f);
 
-        final Paint gesturePaint = mGesturePaint;
-        gesturePaint.setAntiAlias(GESTURE_RENDERING_ANTIALIAS);
-        gesturePaint.setColor(mCertainGestureColor);
-        gesturePaint.setStyle(Paint.Style.STROKE);
-        gesturePaint.setStrokeJoin(Paint.Join.ROUND);
-        gesturePaint.setStrokeCap(Paint.Cap.ROUND);
-        gesturePaint.setStrokeWidth(mGestureStroke);
-        gesturePaint.setDither(DITHER_FLAG);
-    }
-
-    @Override
-    protected void onSizeChanged(int width, int height, int oldWidth, int oldHeight) {
-        super.onSizeChanged(width, height, oldWidth, oldHeight);
-
-        if (width <= 0 || height <= 0) {
-            return;
-        }
-
-        int targetWidth = width > oldWidth ? width : oldWidth;
-        int targetHeight = height > oldHeight ? height : oldHeight;
-
-        if (mBitmap != null) mBitmap.recycle();
-
-        mBitmap = Bitmap.createBitmap(targetWidth, targetHeight, Bitmap.Config.ARGB_8888);
-        if (mBitmapCanvas != null) {
-            mBitmapCanvas.setBitmap(mBitmap);
-        } else {
-            mBitmapCanvas = new Canvas(mBitmap);
-        }
-        mBitmapCanvas.drawColor(TRANSPARENT_BACKGROUND);
-
-        if (mCurrentGesture != null) {
-            mCurrentGesture.draw(mBitmapCanvas, mGesturePaint);
-        }
+        invalidate();
     }
 
     public void addOnGestureListener(OnGestureListener listener) {
@@ -257,124 +299,224 @@
         mOnGestureListeners.clear();
     }
 
-    @Override
-    protected void onDraw(Canvas canvas) {
-        super.onDraw(canvas);
-
-        // draw double buffer
-        if (mIsFadingOut) {
-            mBitmapPaint.setAlpha((int) (255 * mFadingAlpha));
-            canvas.drawBitmap(mBitmap, 0, 0, mBitmapPaint);
-        } else {
-            mBitmapPaint.setAlpha(255);
-            canvas.drawBitmap(mBitmap, 0, 0, mBitmapPaint);
+    public void addOnGesturePerformedListener(OnGesturePerformedListener listener) {
+        mOnGesturePerformedListeners.add(listener);
+        if (mOnGesturePerformedListeners.size() > 0) {
+            mHandleGestureActions = true;
         }
-
-        // draw the current stroke
-        canvas.drawPath(mPath, mGesturePaint);
     }
 
-    /**
-     * Clear up the overlay
-     * 
-     * @param fadeOut whether the gesture on the overlay should fade out
-     *        gradually or disappear immediately
-     */
-    public void clear(boolean fadeOut) {
-        if (fadeOut) {
+    public void removeOnGesturePerformedListener(OnGesturePerformedListener listener) {
+        mOnGesturePerformedListeners.remove(listener);
+        if (mOnGesturePerformedListeners.size() <= 0) {
+            mHandleGestureActions = false;
+        }
+    }
+
+    public void removeAllOnGesturePerformedListeners() {
+        mOnGesturePerformedListeners.clear();
+        mHandleGestureActions = false;
+    }
+
+    public boolean isGesturing() {
+        return mIsGesturing;
+    }
+
+    private void setCurrentColor(int color) {
+        mCurrentColor = color;
+        if (mFadingHasStarted) {
+            setPaintAlpha((int) (255 * mFadingAlpha));
+        } else {
+            setPaintAlpha(255);
+        }
+        invalidate();
+    }
+
+    @Override
+    public void draw(Canvas canvas) {
+        super.draw(canvas);
+
+        if (mCurrentGesture != null) {
+            canvas.drawPath(mPath, mGesturePaint);
+        }
+    }
+
+    private void setPaintAlpha(int alpha) {
+        alpha += alpha >> 7;
+        final int baseAlpha = mCurrentColor >>> 24;
+        final int useAlpha = baseAlpha * alpha >> 8;
+        mGesturePaint.setColor((mCurrentColor << 8 >>> 8) | (useAlpha << 24));
+    }
+
+    public void clear(boolean animated) {
+        clear(animated, false);
+    }
+
+    private void clear(boolean animated, boolean fireActionPerformed) {
+        setPaintAlpha(255);
+        removeCallbacks(mFadingOut);
+        mFadingOut.fireActionPerformed = fireActionPerformed;
+
+        if (animated && mCurrentGesture != null) {
             mFadingAlpha = 1.0f;
             mIsFadingOut = true;
-            removeCallbacks(mFadingOut);
+            mFadingHasStarted = false;
             mFadingStart = AnimationUtils.currentAnimationTimeMillis() + mFadeOffset;
+
             postDelayed(mFadingOut, mFadeOffset);
         } else {
-            mPath.rewind();
-            mCurrentGesture = null;
-            if (mBitmap != null) {
-                mBitmap.eraseColor(TRANSPARENT_BACKGROUND);
+            mFadingAlpha = 1.0f;
+            mIsFadingOut = false;
+            mFadingHasStarted = false;
+
+            if (fireActionPerformed) {
+                post(mFadingOut);
+            } else {
+                mCurrentGesture = null;
+                mPath.rewind();
                 invalidate();
             }
         }
     }
 
-    public void cancelFadingOut() {
+    public void cancelClearAnimation() {
+        setPaintAlpha(255);
         mIsFadingOut = false;
+        mFadingHasStarted = false;
         removeCallbacks(mFadingOut);
+        mPath.rewind();
+        mCurrentGesture = null;
     }
 
-    @Override
-    public boolean onTouchEvent(MotionEvent event) {
-        if (!isEnabled()) {
-            return true;
-        }
+    public void cancelGesture() {
+        mIsListeningForGestures = false;
 
-        processEvent(event);
+        // add the stroke to the current gesture
+        mCurrentGesture.addStroke(new GestureStroke(mStrokeBuffer));
 
-        return true;
-    }
-
-    public void processEvent(MotionEvent event) {
-        switch (event.getAction()) {
-            case MotionEvent.ACTION_DOWN:
-                Rect rect = touchStart(event);
-                invalidate(rect);
-                break;
-            case MotionEvent.ACTION_MOVE:
-                rect = touchMove(event);
-                if (rect != null) {
-                    invalidate(rect);
-                }
-                break;
-            case MotionEvent.ACTION_UP:
-                touchUp(event, false);
-                invalidate();
-                break;
-            case MotionEvent.ACTION_CANCEL:
-                touchUp(event, true);
-                invalidate();
-                break;
-        }
-    }
-
-    private Rect touchStart(MotionEvent event) {
         // pass the event to handlers
+        final long now = SystemClock.uptimeMillis();
+        final MotionEvent event = MotionEvent.obtain(now, now,
+                MotionEvent.ACTION_CANCEL, 0.0f, 0.0f, 0);
+
         final ArrayList<OnGestureListener> listeners = mOnGestureListeners;
         final int count = listeners.size();
         for (int i = 0; i < count; i++) {
-            OnGestureListener listener = listeners.get(i);
-            listener.onGestureStarted(this, event);
+            listeners.get(i).onGestureCancelled(this, event);
         }
 
-        // if there is fading out going on, stop it.
-        if (mIsFadingOut) {
-            mIsFadingOut = false;
-            removeCallbacks(mFadingOut);
-            mBitmap.eraseColor(TRANSPARENT_BACKGROUND);
-            mCurrentGesture = null;
+        event.recycle();
+
+        clear(false);
+        mIsGesturing = false;
+        mStrokeBuffer.clear();
+    }
+
+    @Override
+    protected void onDetachedFromWindow() {
+        cancelClearAnimation();
+    }
+
+    @Override
+    public boolean dispatchTouchEvent(MotionEvent event) {
+        if (isEnabled()) {
+            boolean cancelDispatch = (mIsGesturing || (mCurrentGesture != null &&
+                    mCurrentGesture.getStrokesCount() > 0)) && mInterceptEvents;
+            processEvent(event);
+
+            if (cancelDispatch) {
+                event.setAction(MotionEvent.ACTION_CANCEL);
+            }
+
+            super.dispatchTouchEvent(event);
+            return true;
         }
 
+        return super.dispatchTouchEvent(event);
+    }
+
+    private boolean processEvent(MotionEvent event) {
+        switch (event.getAction()) {
+            case MotionEvent.ACTION_DOWN:
+                touchDown(event);
+                invalidate();
+                return true;
+            case MotionEvent.ACTION_MOVE:
+                if (mIsListeningForGestures) {
+                    Rect rect = touchMove(event);
+                    if (rect != null) {
+                        invalidate(rect);
+                    }
+                    return true;
+                }
+                break;
+            case MotionEvent.ACTION_UP:
+                if (mIsListeningForGestures) {
+                    touchUp(event, false);
+                    invalidate();
+                    return true;
+                }
+                break;
+            case MotionEvent.ACTION_CANCEL:
+                if (mIsListeningForGestures) {
+                    touchUp(event, true);
+                    invalidate();
+                    return true;
+                }
+        }
+
+        return false;
+    }
+
+    private void touchDown(MotionEvent event) {
+        mIsListeningForGestures = true;
+
         float x = event.getX();
         float y = event.getY();
 
         mX = x;
         mY = y;
 
+        mTotalLength = 0;
+        mIsGesturing = false;
+
+        if (mGestureStrokeType == GESTURE_STROKE_TYPE_SINGLE) {
+            if (mHandleGestureActions) setCurrentColor(mUncertainGestureColor);
+            mCurrentGesture = null;
+            mPath.rewind();
+        } else if (mCurrentGesture == null || mCurrentGesture.getStrokesCount() == 0) {
+            if (mHandleGestureActions) setCurrentColor(mUncertainGestureColor);
+        }
+
+        // if there is fading out going on, stop it.
+        if (mFadingHasStarted) {
+            cancelClearAnimation();
+        } else if (mIsFadingOut) {
+            setPaintAlpha(255);
+            mIsFadingOut = false;
+            mFadingHasStarted = false;
+            removeCallbacks(mFadingOut);
+        }
+
         if (mCurrentGesture == null) {
             mCurrentGesture = new Gesture();
         }
 
-        mPointBuffer.add(new GesturePoint(x, y, event.getEventTime()));
-
-        mPath.rewind();
+        mStrokeBuffer.add(new GesturePoint(x, y, event.getEventTime()));
         mPath.moveTo(x, y);
 
-        mInvalidRect.set((int) x - mInvalidateExtraBorder, (int) y - mInvalidateExtraBorder,
-                (int) x + mInvalidateExtraBorder, (int) y + mInvalidateExtraBorder);
-        
+        final int border = mInvalidateExtraBorder;
+        mInvalidRect.set((int) x - border, (int) y - border, (int) x + border, (int) y + border);
+
         mCurveEndX = x;
         mCurveEndY = y;
-        
-        return mInvalidRect;
+
+        // pass the event to handlers
+        final ArrayList<OnGestureListener> listeners = mOnGestureListeners;
+        final int count = listeners.size();
+        for (int i = 0; i < count; i++) {
+            listeners.get(i).onGestureStarted(this, event);
+        }        
     }
 
     private Rect touchMove(MotionEvent event) {
@@ -393,61 +535,80 @@
             areaToRefresh = mInvalidRect;
 
             // start with the curve end
-            areaToRefresh.set(
-                    (int) mCurveEndX - mInvalidateExtraBorder,
-                    (int) mCurveEndY - mInvalidateExtraBorder,
-                    (int) mCurveEndX + mInvalidateExtraBorder,
-                    (int) mCurveEndY + mInvalidateExtraBorder);
+            final int border = mInvalidateExtraBorder;
+            areaToRefresh.set((int) mCurveEndX - border, (int) mCurveEndY - border,
+                    (int) mCurveEndX + border, (int) mCurveEndY + border);
             
-            mCurveEndX = (x + previousX) / 2;
-            mCurveEndY = (y + previousY) / 2;
+            float cX = mCurveEndX = (x + previousX) / 2;
+            float cY = mCurveEndY = (y + previousY) / 2;
 
-            mPath.quadTo(previousX, previousY, mCurveEndX, mCurveEndY);
+            mPath.quadTo(previousX, previousY, cX, cY);
             
             // union with the control point of the new curve
-            areaToRefresh.union(
-                    (int) previousX - mInvalidateExtraBorder,
-                    (int) previousY - mInvalidateExtraBorder,
-                    (int) previousX + mInvalidateExtraBorder,
-                    (int) previousY + mInvalidateExtraBorder);
+            areaToRefresh.union((int) previousX - border, (int) previousY - border,
+                    (int) previousX + border, (int) previousY + border);
             
             // union with the end point of the new curve
-            areaToRefresh.union(
-                    (int) mCurveEndX - mInvalidateExtraBorder,
-                    (int) mCurveEndY - mInvalidateExtraBorder,
-                    (int) mCurveEndX + mInvalidateExtraBorder,
-                    (int) mCurveEndY + mInvalidateExtraBorder);
+            areaToRefresh.union((int) cX - border, (int) cY - border,
+                    (int) cX + border, (int) cY + border);
 
             mX = x;
             mY = y;
         }
 
-        mPointBuffer.add(new GesturePoint(x, y, event.getEventTime()));
+        mStrokeBuffer.add(new GesturePoint(x, y, event.getEventTime()));
+
+        if (mHandleGestureActions && !mIsGesturing) {
+            mTotalLength += (float) Math.sqrt(dx * dx + dy * dy);
+
+            if (mTotalLength > mGestureStrokeLengthThreshold) {
+                final OrientedBoundingBox box =
+                        GestureUtilities.computeOrientedBoundingBox(mStrokeBuffer);
+
+                float angle = Math.abs(box.orientation);
+                if (angle > 90) {
+                    angle = 180 - angle;
+                }
+
+                if (box.squareness > mGestureStrokeSquarenessTreshold ||
+                        (mOrientation == ORIENTATION_VERTICAL ?
+                                angle < mGestureStrokeAngleThreshold :
+                                angle > mGestureStrokeAngleThreshold)) {
+
+                    mIsGesturing = true;
+                    setCurrentColor(mCertainGestureColor);
+                }
+            }
+        }
 
         // pass the event to handlers
         final ArrayList<OnGestureListener> listeners = mOnGestureListeners;
         final int count = listeners.size();
         for (int i = 0; i < count; i++) {
             listeners.get(i).onGesture(this, event);
-        }
-        
+        }        
+
         return areaToRefresh;
     }
 
     private void touchUp(MotionEvent event, boolean cancel) {
-        // add the stroke to the current gesture
-        mCurrentGesture.addStroke(new GestureStroke(mPointBuffer));
+        mIsListeningForGestures = false;
 
-        // add the stroke to the double buffer
-        mBitmapCanvas.drawPath(mPath, mGesturePaint);
+        // add the stroke to the current gesture
+        mCurrentGesture.addStroke(new GestureStroke(mStrokeBuffer));
+        mStrokeBuffer.clear();
 
         if (!cancel) {
             // pass the event to handlers
             final ArrayList<OnGestureListener> listeners = mOnGestureListeners;
-            final int count = listeners.size();
+            int count = listeners.size();
             for (int i = 0; i < count; i++) {
                 listeners.get(i).onGestureEnded(this, event);
             }
+
+            if (mHandleGestureActions) {
+                clear(mFadeEnabled, mIsGesturing);
+            }
         } else {
             // pass the event to handlers
             final ArrayList<OnGestureListener> listeners = mOnGestureListeners;
@@ -455,15 +616,62 @@
             for (int i = 0; i < count; i++) {
                 listeners.get(i).onGestureCancelled(this, event);
             }
+
+            clear(false);
         }
 
-        mPath.rewind();
-        mPointBuffer.clear();
+        mIsGesturing = false;
     }
 
-    /**
-     * An interface for processing gesture events
-     */
+    private void fireOnGesturePerformed() {
+        final ArrayList<OnGesturePerformedListener> actionListeners =
+                mOnGesturePerformedListeners;
+        final int count = actionListeners.size();
+        for (int i = 0; i < count; i++) {
+            actionListeners.get(i).onGesturePerformed(GestureOverlayView.this,
+                    mCurrentGesture);
+        }
+    }
+
+    private class FadeOutRunnable implements Runnable {
+        boolean fireActionPerformed;
+
+        public void run() {
+            if (mIsFadingOut) {
+                final long now = AnimationUtils.currentAnimationTimeMillis();
+                final long duration = now - mFadingStart;
+
+                if (duration > mFadeDuration) {
+                    if (fireActionPerformed) {
+                        fireOnGesturePerformed();
+                    }
+
+                    mIsFadingOut = false;
+                    mFadingHasStarted = false;
+                    mPath.rewind();
+                    mCurrentGesture = null;
+                    setPaintAlpha(255);
+                } else {
+                    mFadingHasStarted = true;
+                    float interpolatedTime = Math.max(0.0f,
+                            Math.min(1.0f, duration / (float) mFadeDuration));
+                    mFadingAlpha = 1.0f - mInterpolator.getInterpolation(interpolatedTime);
+                    setPaintAlpha((int) (255 * mFadingAlpha));
+                    postDelayed(this, FADE_ANIMATION_RATE);
+                }
+            } else {
+                fireOnGesturePerformed();
+
+                mFadingHasStarted = false;
+                mPath.rewind();
+                mCurrentGesture = null;
+                setPaintAlpha(255);
+            }
+
+            invalidate();            
+        }
+    }
+
     public static interface OnGestureListener {
         void onGestureStarted(GestureOverlayView overlay, MotionEvent event);
 
@@ -473,4 +681,8 @@
 
         void onGestureCancelled(GestureOverlayView overlay, MotionEvent event);
     }
+
+    public static interface OnGesturePerformedListener {
+        void onGesturePerformed(GestureOverlayView overlay, Gesture gesture);
+    }
 }
diff --git a/core/java/android/gesture/GestureStroke.java b/core/java/android/gesture/GestureStroke.java
index 6d022b4..0d7bc2d0 100644
--- a/core/java/android/gesture/GestureStroke.java
+++ b/core/java/android/gesture/GestureStroke.java
@@ -89,39 +89,51 @@
      */
     void draw(Canvas canvas, Paint paint) {
         if (mCachedPath == null) {
-            final float[] localPoints = points;
-            final int count = localPoints.length;
-
-            Path path = null;
-
-            float mX = 0;
-            float mY = 0;
-
-            for (int i = 0; i < count; i += 2) {
-                float x = localPoints[i];
-                float y = localPoints[i + 1];
-                if (path == null) {
-                    path = new Path();
-                    path.moveTo(x, y);
-                    mX = x;
-                    mY = y;
-                } else {
-                    float dx = Math.abs(x - mX);
-                    float dy = Math.abs(y - mY);
-                    if (dx >= 3 || dy >= 3) {
-                        path.quadTo(mX, mY, (x + mX) / 2, (y + mY) / 2);
-                        mX = x;
-                        mY = y;
-                    }
-                }
-            }
-
-            mCachedPath = path;
+            makePath();
         }
 
         canvas.drawPath(mCachedPath, paint);
     }
 
+    public Path getPath() {
+        if (mCachedPath == null) {
+            makePath();
+        }
+
+        return mCachedPath;
+    }
+
+    private void makePath() {
+        final float[] localPoints = points;
+        final int count = localPoints.length;
+
+        Path path = null;
+
+        float mX = 0;
+        float mY = 0;
+
+        for (int i = 0; i < count; i += 2) {
+            float x = localPoints[i];
+            float y = localPoints[i + 1];
+            if (path == null) {
+                path = new Path();
+                path.moveTo(x, y);
+                mX = x;
+                mY = y;
+            } else {
+                float dx = Math.abs(x - mX);
+                float dy = Math.abs(y - mY);
+                if (dx >= TOUCH_TOLERANCE || dy >= TOUCH_TOLERANCE) {
+                    path.quadTo(mX, mY, (x + mX) / 2, (y + mY) / 2);
+                    mX = x;
+                    mY = y;
+                }
+            }
+        }
+
+        mCachedPath = path;
+    }
+
     /**
      * Convert the stroke to a Path based on the number of points
      * 
@@ -158,8 +170,7 @@
             } else {
                 float dx = Math.abs(x - mX);
                 float dy = Math.abs(y - mY);
-                if (dx >= TOUCH_TOLERANCE ||
-                        dy >= TOUCH_TOLERANCE) {
+                if (dx >= TOUCH_TOLERANCE || dy >= TOUCH_TOLERANCE) {
                     path.quadTo(mX, mY, (x + mX) / 2, (y + mY) / 2);
                     mX = x;
                     mY = y;
diff --git a/core/java/android/gesture/GestureUtilities.java b/core/java/android/gesture/GestureUtilities.java
index e47856c..4a3144c2 100755
--- a/core/java/android/gesture/GestureUtilities.java
+++ b/core/java/android/gesture/GestureUtilities.java
@@ -58,10 +58,10 @@
         float sy = targetPatchSize / rect.height();
         float scale = sx < sy ? sx : sy;
 
-        Matrix trans = new Matrix();
-        trans.setScale(scale, scale);
-        trans.preTranslate(-rect.centerX(), -rect.centerY());
-        trans.postTranslate(targetPatchSize / 2, targetPatchSize / 2);
+        float preDx = -rect.centerX();
+        float preDy = -rect.centerY();
+        float postDx = targetPatchSize / 2;
+        float postDy = targetPatchSize / 2;
 
         final ArrayList<GestureStroke> strokes = gesture.getStrokes();
         final int count = strokes.size();
@@ -72,11 +72,16 @@
 
         for (int index = 0; index < count; index++) {
             final GestureStroke stroke = strokes.get(index);
-            size = stroke.points.length;
+            float[] strokepoints = stroke.points;
+            size = strokepoints.length;
 
             final float[] pts = new float[size];
-
-            trans.mapPoints(pts, 0, stroke.points, 0, size / 2);
+             
+            for (int i = 0; i < size; i += 2) {
+                pts[i] = (strokepoints[i] + preDx) * scale + postDx;
+                pts[i + 1] = (strokepoints[i + 1] + preDy) * scale + postDy;
+            }
+        
             float segmentEndX = -1;
             float segmentEndY = -1;
             
@@ -388,7 +393,7 @@
         } else { // -PI<alpha<PI
             angle = (float) Math.atan2(targetVector[1], targetVector[0]);
             angle = (float) (180 * angle / Math.PI);
-            android.graphics.Matrix trans = new android.graphics.Matrix();
+            Matrix trans = new Matrix();
             trans.setRotate(-angle);
             trans.mapPoints(points);
         }
diff --git a/core/java/android/gesture/TouchThroughGestureListener.java b/core/java/android/gesture/TouchThroughGestureListener.java
deleted file mode 100644
index 09a528d..0000000
--- a/core/java/android/gesture/TouchThroughGestureListener.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright (C) 2008-2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.gesture;
-
-import android.view.MotionEvent;
-import android.view.View;
-
-import java.util.ArrayList;
-import java.lang.ref.WeakReference;
-
-/**
- * TouchThroughGesturing implements the interaction behavior that allows a user
- * to gesture over a regular UI widget such as ListView and at the same time,
- * still allows a user to perform basic interactions (clicking, scrolling and panning) 
- * with the underlying widget.
- */
-public class TouchThroughGestureListener implements GestureOverlayView.OnGestureListener {
-    public static final int SINGLE_STROKE = 0;
-    public static final int MULTIPLE_STROKE = 1;
-
-    // TODO: Add properties for all these
-    private static final float STROKE_LENGTH_THRESHOLD = 30;
-    private static final float SQUARENESS_THRESHOLD = 0.275f;
-    private static final float ANGLE_THRESHOLD = 40;
-
-    private boolean mIsGesturing = false;
-
-    private float mTotalLength;
-
-    private float mX;
-    private float mY;
-
-    private WeakReference<View> mModel;
-
-    private int mGestureType = SINGLE_STROKE;
-
-    // TODO: Use WeakReferences
-    private final ArrayList<OnGesturePerformedListener> mPerformedListeners =
-            new ArrayList<OnGesturePerformedListener>();
-
-    private boolean mStealEvents = false;
-
-    public TouchThroughGestureListener(View model) {
-        this(model, true);
-    }
-
-    public TouchThroughGestureListener(View model, boolean stealEvents) {
-        mModel = new WeakReference<View>(model);
-        mStealEvents = stealEvents;
-    }
-
-    /**
-     * 
-     * @param type SINGLE_STROKE or MULTIPLE_STROKE
-     */
-    public void setGestureType(int type) {
-        mGestureType = type;
-    }
-    
-    public void onGestureStarted(GestureOverlayView overlay, MotionEvent event) {
-        if (mGestureType == MULTIPLE_STROKE) {
-            overlay.cancelFadingOut();
-        }
-
-        mX = event.getX();
-        mY = event.getY();
-        mTotalLength = 0;
-        mIsGesturing = false;
-
-        if (mGestureType == SINGLE_STROKE || overlay.getCurrentGesture() == null
-                || overlay.getCurrentGesture().getStrokesCount() == 0) {
-            overlay.setGestureDrawingColor(overlay.getUncertainGestureColor());
-        }
-
-        dispatchEventToModel(event);
-    }
-
-    private void dispatchEventToModel(MotionEvent event) {
-        View v = mModel.get();
-        if (v != null) v.dispatchTouchEvent(event);
-    }
-
-    public void onGesture(GestureOverlayView overlay, MotionEvent event) {
-        //noinspection PointlessBooleanExpression
-        if (!mStealEvents) {
-            dispatchEventToModel(event);
-        }
-
-        if (mIsGesturing) {
-            return;
-        }
-
-        final float x = event.getX();
-        final float y = event.getY();
-        final float dx = x - mX;
-        final float dy = y - mY;
-
-        mTotalLength += (float) Math.sqrt(dx * dx + dy * dy);
-        mX = x;
-        mY = y;
-
-        if (mTotalLength > STROKE_LENGTH_THRESHOLD) {
-            final OrientedBoundingBox box =
-                    GestureUtilities.computeOrientedBoundingBox(overlay.getCurrentStroke());
-            float angle = Math.abs(box.orientation);
-            if (angle > 90) {
-                angle = 180 - angle;
-            }
-            if (box.squareness > SQUARENESS_THRESHOLD || angle < ANGLE_THRESHOLD) {
-                mIsGesturing = true;
-                overlay.setGestureDrawingColor(overlay.getGestureColor());
-                if (mStealEvents) {
-                    event = MotionEvent.obtain(event.getDownTime(), System.currentTimeMillis(),
-                            MotionEvent.ACTION_CANCEL, x, y, event.getPressure(), event.getSize(),
-                            event.getMetaState(), event.getXPrecision(), event.getYPrecision(),
-                            event.getDeviceId(), event.getEdgeFlags());
-                }
-            }
-        }
-
-        if (mStealEvents) {
-            dispatchEventToModel(event);
-        }
-    }
-
-    public void onGestureEnded(GestureOverlayView overlay, MotionEvent event) {
-        if (mIsGesturing) {
-            overlay.clear(true);
-
-            final ArrayList<OnGesturePerformedListener> listeners = mPerformedListeners;
-            final int count = listeners.size();
-
-            for (int i = 0; i < count; i++) {
-                listeners.get(i).onGesturePerformed(overlay, overlay.getCurrentGesture());
-            }
-        } else {
-            dispatchEventToModel(event);
-            overlay.clear(false);
-        }
-    }
-
-    public void onGestureCancelled(GestureOverlayView overlay, MotionEvent event) {
-        overlay.clear(mIsGesturing);
-        if (!mIsGesturing) {
-            dispatchEventToModel(event);            
-        }
-    }
-
-    public void addOnGestureActionListener(OnGesturePerformedListener listener) {
-        mPerformedListeners.add(listener);
-    }
-
-    public void removeOnGestureActionListener(OnGesturePerformedListener listener) {
-        mPerformedListeners.remove(listener);
-    }
-
-    public boolean isGesturing() {
-        return mIsGesturing;
-    }
-
-    public static interface OnGesturePerformedListener {
-        public void onGesturePerformed(GestureOverlayView overlay, Gesture gesture);
-    }
-}
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index bd45978..559f224 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -2593,6 +2593,16 @@
         public static final String GTALK_COMPRESS = "gtalk_compress";
 
         /**
+         * This is the timeout for which Google Talk will send the message using bareJID. In a
+         * established chat between two XMPP endpoints, Google Talk uses fullJID in the format
+         * of user@domain/resource in order to send the message to the specific client. However,
+         * if Google Talk hasn't received a message from that client after some time, it would
+         * fall back to use the bareJID, which would broadcast the message to all clients for
+         * the other user.
+         */
+        public static final String GTALK_USE_BARE_JID_TIMEOUT_MS = "gtalk_use_barejid_timeout_ms";
+
+        /**
          * Enable use of ssl session caching.
          * 'db' - save each session in a (per process) database
          * 'file' - save each session in a (per process) file
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index c6f36a0..8b0629c 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -2351,7 +2351,8 @@
             final boolean drawAnimation = (child.mPrivateFlags & DRAW_ANIMATION) == DRAW_ANIMATION;
 
             // Check whether the child that requests the invalidate is fully opaque
-            final boolean isOpaque = child.isOpaque();
+            final boolean isOpaque = child.isOpaque() && !drawAnimation &&
+                    child.getAnimation() != null;
             // Mark the child as dirty, using the appropriate flag
             // Make sure we do not set both flags at the same time
             final int opaqueFlag = isOpaque ? DIRTY_OPAQUE : DIRTY;
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index 105eacd..dcba943 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -123,7 +123,7 @@
     private String          mSerifFontFamily = "serif";
     private String          mCursiveFontFamily = "cursive";
     private String          mFantasyFontFamily = "fantasy";
-    private String          mDefaultTextEncoding = "Latin-1";
+    private String          mDefaultTextEncoding;
     private String          mUserAgent;
     private boolean         mUseDefaultUserAgent;
     private String          mAcceptLanguage;
@@ -240,6 +240,8 @@
     WebSettings(Context context) {   
         mEventHandler = new EventHandler();
         mContext = context;
+        mDefaultTextEncoding = context.getString(com.android.internal.
+                                                 R.string.default_text_encoding);
 
         if (sLockForLocaleSettings == null) {
             sLockForLocaleSettings = new Object();
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index 8a538d7..e896d58 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -49,7 +49,6 @@
 import android.view.inputmethod.InputMethodManager;
 import android.view.ContextMenu.ContextMenuInfo;
 import android.gesture.GestureOverlayView;
-import android.gesture.TouchThroughGestureListener;
 import android.gesture.Gesture;
 import android.gesture.LetterRecognizer;
 import android.gesture.Prediction;
@@ -472,7 +471,6 @@
     private ViewTreeObserver.OnGlobalLayoutListener mGesturesLayoutListener;
     private boolean mGlobalLayoutListenerAddedGestures;
     private boolean mInstallGesturesOverlay;
-    private TouchThroughGestureListener mGesturesListener;
     private boolean mPreviousGesturing;
 
     private boolean mGlobalLayoutListenerAddedFilter;
@@ -736,10 +734,8 @@
             mGesturesPopup = p;
 
             mGesturesOverlay.removeAllOnGestureListeners();
-            mGesturesListener = new TouchThroughGestureListener(null);
-            mGesturesListener.setGestureType(TouchThroughGestureListener.MULTIPLE_STROKE);
-            mGesturesListener.addOnGestureActionListener(new GesturesProcessor());
-            mGesturesOverlay.addOnGestureListener(mGesturesListener);
+            mGesturesOverlay.setGestureStrokeType(GestureOverlayView.GESTURE_STROKE_TYPE_MULTIPLE);
+            mGesturesOverlay.addOnGesturePerformedListener(new GesturesProcessor());
 
             mPreviousGesturing = false;            
         }
@@ -756,19 +752,25 @@
     @Override
     public boolean dispatchTouchEvent(MotionEvent ev) {
         if (mGestures != GESTURES_NONE) {
-            mGesturesOverlay.processEvent(ev);
+            if (ev.getAction() != MotionEvent.ACTION_DOWN || mFastScroller == null ||
+                    !mFastScroller.isPointInside(ev.getX(), ev.getY())) {
 
-            final boolean isGesturing = mGesturesListener.isGesturing();
+                if (mGesturesPopup.isShowing()) {
+                    mGesturesOverlay.dispatchTouchEvent(ev);
 
-            if (!isGesturing) {
-                mPreviousGesturing = isGesturing;
-                return super.dispatchTouchEvent(ev);                
-            } else if (!mPreviousGesturing){
-                mPreviousGesturing = isGesturing;
-                final MotionEvent event = MotionEvent.obtain(ev);
-                event.setAction(MotionEvent.ACTION_CANCEL);
-                super.dispatchTouchEvent(event);
-                return true;
+                    final boolean isGesturing = mGesturesOverlay.isGesturing();
+
+                    if (!isGesturing) {
+                        mPreviousGesturing = isGesturing;
+                        return super.dispatchTouchEvent(ev);
+                    } else if (!mPreviousGesturing){
+                        mPreviousGesturing = isGesturing;
+                        final MotionEvent event = MotionEvent.obtain(ev);
+                        event.setAction(MotionEvent.ACTION_CANCEL);
+                        super.dispatchTouchEvent(event);
+                        return true;
+                    }
+                }
             }
         }
 
@@ -1927,6 +1929,8 @@
             final int longPressPosition, final long longPressId) {
         boolean handled = false;
 
+        dismissGesturesPopup();
+        
         if (mOnItemLongClickListener != null) {
             handled = mOnItemLongClickListener.onItemLongClick(AbsListView.this, child,
                     longPressPosition, longPressId);
@@ -2130,13 +2134,13 @@
 
     @Override
     public boolean onTouchEvent(MotionEvent ev) {
-        
         if (mFastScroller != null) {
             boolean intercepted = mFastScroller.onTouchEvent(ev);
             if (intercepted) {
                 return true;
             }            
         }
+
         final int action = ev.getAction();
         final int x = (int) ev.getX();
         final int y = (int) ev.getY();
@@ -3848,8 +3852,7 @@
         }
     }
 
-    private class GesturesProcessor implements
-            TouchThroughGestureListener.OnGesturePerformedListener {
+    private class GesturesProcessor implements GestureOverlayView.OnGesturePerformedListener {
 
         private static final double SCORE_THRESHOLD = 0.1;
 
diff --git a/core/java/android/widget/FastScroller.java b/core/java/android/widget/FastScroller.java
index b9fd5a6..cd965fc6 100644
--- a/core/java/android/widget/FastScroller.java
+++ b/core/java/android/widget/FastScroller.java
@@ -402,8 +402,7 @@
     
     boolean onInterceptTouchEvent(MotionEvent ev) {
         if (mState > STATE_NONE && ev.getAction() == MotionEvent.ACTION_DOWN) {
-            if (ev.getX() > mList.getWidth() - mThumbW && ev.getY() >= mThumbY &&
-                    ev.getY() <= mThumbY + mThumbH) {
+            if (isPointInside(ev.getX(), ev.getY())) {
                 setState(STATE_DRAGGING);
                 return true;
             }
@@ -415,11 +414,11 @@
         if (mState == STATE_NONE) {
             return false;
         }
-        if (me.getAction() == MotionEvent.ACTION_DOWN) {
-            if (me.getX() > mList.getWidth() - mThumbW
-                    && me.getY() >= mThumbY 
-                    && me.getY() <= mThumbY + mThumbH) {
-                
+
+        final int action = me.getAction();
+
+        if (action == MotionEvent.ACTION_DOWN) {
+            if (isPointInside(me.getX(), me.getY())) {
                 setState(STATE_DRAGGING);
                 if (mListAdapter == null && mList != null) {
                     getSectionsFromIndexer();
@@ -428,7 +427,7 @@
                 cancelFling();
                 return true;
             }
-        } else if (me.getAction() == MotionEvent.ACTION_UP) {
+        } else if (action == MotionEvent.ACTION_UP) {
             if (mState == STATE_DRAGGING) {
                 setState(STATE_VISIBLE);
                 final Handler handler = mHandler;
@@ -436,7 +435,7 @@
                 handler.postDelayed(mScrollFade, 1000);
                 return true;
             }
-        } else if (me.getAction() == MotionEvent.ACTION_MOVE) {
+        } else if (action == MotionEvent.ACTION_MOVE) {
             if (mState == STATE_DRAGGING) {
                 final int viewHeight = mList.getHeight();
                 // Jitter
@@ -460,6 +459,10 @@
         return false;
     }
 
+    boolean isPointInside(float x, float y) {
+        return x > mList.getWidth() - mThumbW && y >= mThumbY && y <= mThumbY + mThumbH;
+    }
+
     public class ScrollFade implements Runnable {
         
         long mStartTime;
diff --git a/core/java/android/widget/FrameLayout.java b/core/java/android/widget/FrameLayout.java
index 80fbf9e..3afd5d4 100644
--- a/core/java/android/widget/FrameLayout.java
+++ b/core/java/android/widget/FrameLayout.java
@@ -353,25 +353,24 @@
 
         if (mForeground != null) {
             final Drawable foreground = mForeground;
+
             if (mForegroundBoundsChanged) {
                 mForegroundBoundsChanged = false;
-                if (foreground != null) {
-                    final Rect selfBounds = mSelfBounds;
-                    final Rect overlayBounds = mOverlayBounds;
+                final Rect selfBounds = mSelfBounds;
+                final Rect overlayBounds = mOverlayBounds;
 
-                    final int w = mRight-mLeft;
-                    final int h = mBottom-mTop;
-                    
-                    if (mForegroundInPadding) {
-                        selfBounds.set(0, 0, w, h);
-                    } else {
-                        selfBounds.set(mPaddingLeft, mPaddingTop, w - mPaddingRight, h - mPaddingBottom);
-                    }
+                final int w = mRight-mLeft;
+                final int h = mBottom-mTop;
 
-                    Gravity.apply(mForegroundGravity, foreground.getIntrinsicWidth(),
-                            foreground.getIntrinsicHeight(), selfBounds, overlayBounds);
-                    foreground.setBounds(overlayBounds);
+                if (mForegroundInPadding) {
+                    selfBounds.set(0, 0, w, h);
+                } else {
+                    selfBounds.set(mPaddingLeft, mPaddingTop, w - mPaddingRight, h - mPaddingBottom);
                 }
+
+                Gravity.apply(mForegroundGravity, foreground.getIntrinsicWidth(),
+                        foreground.getIntrinsicHeight(), selfBounds, overlayBounds);
+                foreground.setBounds(overlayBounds);
             }
             
             foreground.draw(canvas);
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index d46dd80..ed8deb1 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -165,8 +165,7 @@
 	libicui18n \
 	libicudata \
 	libmedia \
-	libwpa_client \
-	libemoji
+	libwpa_client
 
 ifeq ($(BOARD_HAVE_BLUETOOTH),true)
 LOCAL_C_INCLUDES += \
diff --git a/core/jni/android_emoji_EmojiFactory.cpp b/core/jni/android_emoji_EmojiFactory.cpp
index 59f63a8..7d6e24f 100644
--- a/core/jni/android_emoji_EmojiFactory.cpp
+++ b/core/jni/android_emoji_EmojiFactory.cpp
@@ -1,7 +1,7 @@
 #include "SkTypes.h"
 #include "SkImageDecoder.h"
 
-#define LOG_TAG "DoCoMoEmojiFactory_jni"
+#define LOG_TAG "EmojiFactory_jni"
 #include <utils/Log.h>
 #include <utils/String8.h>
 
@@ -13,15 +13,11 @@
 
 namespace android {
 
-// Note: This class is originally developed so that libandroid_runtime does
-// not have to depend on libemoji which is optional library. However, we
-// cannot use this class, since current (2009-02-16) bionic libc does not allow
-// dlopen()-ing inside dlopen(), while not only this class but also libemoji
-// uses dlopen().
 class EmojiFactoryCaller {
  public:
-  EmojiFactoryCaller();
+  EmojiFactoryCaller() {}
   virtual ~EmojiFactoryCaller();
+  bool Init();
   EmojiFactory *TryCallGetImplementation(const char* name);
   EmojiFactory *TryCallGetAvailableImplementation();
  private:
@@ -30,35 +26,45 @@
   EmojiFactory *(*m_get_available_implementation)();
 };
 
-EmojiFactoryCaller::EmojiFactoryCaller() {
+bool EmojiFactoryCaller::Init() {
+  const char* error_msg;
   m_handle = dlopen("libemoji.so", RTLD_LAZY | RTLD_LOCAL);
-  const char* error_str = dlerror();
-  if (error_str) {
-    LOGI("Failed to load libemoji.so: %s", error_str);
-    return;
+
+  if (m_handle == NULL) {
+    error_msg = "Failed to load libemoji.so";
+    goto FAIL;
   }
 
   m_get_implementation =
       reinterpret_cast<EmojiFactory *(*)(const char*)>(
           dlsym(m_handle, "GetImplementation"));
-  error_str = dlerror();
-  if (error_str) {
-    LOGE("Failed to get symbol of GetImplementation: %s", error_str);
-    dlclose(m_handle);
-    m_handle = NULL;
-    return;
+  if (m_get_implementation == NULL) {
+    error_msg = "Failed to get symbol of GetImplementation";
+    goto FAIL;
   }
 
   m_get_available_implementation =
       reinterpret_cast<EmojiFactory *(*)()>(
           dlsym(m_handle,"GetAvailableImplementation"));
-  error_str = dlerror();
-  if (error_str) {
-    LOGE("Failed to get symbol of GetAvailableImplementation: %s", error_str);
+  if (m_get_available_implementation == NULL) {
+    error_msg = "Failed to get symbol of GetAvailableImplementation";
+    goto FAIL;
+  }
+
+  return true;
+
+FAIL:
+  const char* error_str = dlerror();
+  if (error_str == NULL) {
+    error_str = "unknown reason";
+  }
+
+  LOGE("%s: %s", error_msg, error_str);
+  if (m_handle != NULL) {
     dlclose(m_handle);
     m_handle = NULL;
-    return;
   }
+  return false;
 }
 
 EmojiFactoryCaller::~EmojiFactoryCaller() {
@@ -82,10 +88,9 @@
   return m_get_available_implementation();
 }
 
-// Note: bionic libc's dlopen() does not allow recursive dlopen(). So currently
-// we cannot use EmojiFactoryCaller here.
-// static EmojiFactoryCaller* gCaller;
-// static pthread_once_t g_once = PTHREAD_ONCE_INIT;
+static EmojiFactoryCaller* gCaller;
+static pthread_once_t g_once = PTHREAD_ONCE_INIT;
+static bool lib_emoji_factory_is_ready;
 
 static jclass    gString_class;
 
@@ -95,9 +100,10 @@
 static jclass    gEmojiFactory_class;
 static jmethodID gEmojiFactory_constructorMethodID;
 
-// static void InitializeCaller() {
-//   gCaller = new EmojiFactoryCaller();
-// }
+static void InitializeCaller() {
+  gCaller = new EmojiFactoryCaller();
+  lib_emoji_factory_is_ready = gCaller->Init();
+}
 
 static jobject create_java_EmojiFactory(
     JNIEnv* env, EmojiFactory* factory, jstring name) {
@@ -116,19 +122,23 @@
 
 static jobject android_emoji_EmojiFactory_newInstance(
     JNIEnv* env, jobject clazz, jstring name) {
-  // pthread_once(&g_once, InitializeCaller);
-
   if (NULL == name) {
     return NULL;
   }
+  pthread_once(&g_once, InitializeCaller);
+  if (!lib_emoji_factory_is_ready) {
+    return NULL;
+  }
 
   const jchar* jchars = env->GetStringChars(name, NULL);
   jsize len = env->GetStringLength(name);
   String8 str(String16(jchars, len));
 
-  // EmojiFactory *factory = gCaller->TryCallGetImplementation(str.string());
-  EmojiFactory *factory = EmojiFactory::GetImplementation(str.string());
-
+  EmojiFactory *factory = gCaller->TryCallGetImplementation(str.string());
+  // EmojiFactory *factory = EmojiFactory::GetImplementation(str.string());
+  if (NULL == factory) {
+    return NULL;
+  }
   env->ReleaseStringChars(name, jchars);
 
   return create_java_EmojiFactory(env, factory, name);
@@ -136,10 +146,13 @@
 
 static jobject android_emoji_EmojiFactory_newAvailableInstance(
     JNIEnv* env, jobject clazz) {
-  // pthread_once(&g_once, InitializeCaller);
+  pthread_once(&g_once, InitializeCaller);
+  if (!lib_emoji_factory_is_ready) {
+    return NULL;
+  }
 
-  // EmojiFactory *factory = gCaller->TryCallGetAvailableImplementation();
-  EmojiFactory *factory = EmojiFactory::GetAvailableImplementation();
+  EmojiFactory *factory = gCaller->TryCallGetAvailableImplementation();
+  // EmojiFactory *factory = EmojiFactory::GetAvailableImplementation();
   if (NULL == factory) {
     return NULL;
   }
diff --git a/core/jni/android_media_AudioRecord.cpp b/core/jni/android_media_AudioRecord.cpp
index 288433a..e71e348 100644
--- a/core/jni/android_media_AudioRecord.cpp
+++ b/core/jni/android_media_AudioRecord.cpp
@@ -45,8 +45,6 @@
     jmethodID postNativeEventInJava; //... event post callback method
     int       PCM16;                 //...  format constants
     int       PCM8;                  //...  format constants
-    int       SOURCE_DEFAULT;        //...  record source constants
-    int       SOURCE_MIC;            //...  record source constants
     jfieldID  nativeRecorderInJavaObj; // provides access to the C++ AudioRecord object
     jfieldID  nativeCallbackCookie;    // provides access to the AudioRecord callback data
 };
@@ -66,7 +64,7 @@
 #define AUDIORECORD_ERROR_SETUP_ZEROFRAMECOUNT      -16
 #define AUDIORECORD_ERROR_SETUP_INVALIDCHANNELCOUNT -17
 #define AUDIORECORD_ERROR_SETUP_INVALIDFORMAT       -18
-#define AUDIORECORD_ERROR_SETUP_INVALIDSTREAMTYPE   -19
+#define AUDIORECORD_ERROR_SETUP_INVALIDSOURCE       -19
 #define AUDIORECORD_ERROR_SETUP_NATIVEINITFAILED    -20
 
 jint android_media_translateRecorderErrorCode(int code) {
@@ -154,17 +152,16 @@
     int frameSize = nbChannels * bytesPerSample;
     size_t frameCount = buffSizeInBytes / frameSize;
     
-    // compare the source against the Java constants
-    AudioRecord::stream_type arSource;
-    if (source == javaAudioRecordFields.SOURCE_DEFAULT) {
-        arSource = AudioRecord::DEFAULT_INPUT;
-    } else if (source == javaAudioRecordFields.SOURCE_MIC) {
-        arSource = AudioRecord::MIC_INPUT;
-    } else {
+    // convert and check input source value
+    // input_source values defined in AudioRecord.h are equal to
+    // JAVA MediaRecord.AudioSource values minus 1.
+    AudioRecord::input_source arSource = (AudioRecord::input_source)(source - 1);
+    if (arSource < AudioRecord::DEFAULT_INPUT ||
+        arSource >= AudioRecord::NUM_INPUT_SOURCES) {
         LOGE("Error creating AudioRecord: unknown source.");
-        return AUDIORECORD_ERROR_SETUP_INVALIDSTREAMTYPE;
+        return AUDIORECORD_ERROR_SETUP_INVALIDSOURCE;
     }
-     
+
     audiorecord_callback_cookie *lpCallbackData = NULL;
     AudioRecord* lpRecorder = NULL;
 
@@ -511,8 +508,6 @@
 #define JAVA_POSTEVENT_CALLBACK_NAME  "postEventFromNative"
 #define JAVA_CONST_PCM16_NAME         "ENCODING_PCM_16BIT"
 #define JAVA_CONST_PCM8_NAME          "ENCODING_PCM_8BIT"
-#define JAVA_CONST_SOURCEDEFAULT_NAME "SOURCE_DEFAULT"
-#define JAVA_CONST_SOURCEMIC_NAME     "SOURCE_MIC"
 #define JAVA_NATIVERECORDERINJAVAOBJ_FIELD_NAME  "mNativeRecorderInJavaObj"
 #define JAVA_NATIVECALLBACKINFO_FIELD_NAME       "mNativeCallbackCookie"
 
@@ -583,17 +578,6 @@
         return -1;
     }
 
-    // Get the recording source constants from the AudioRecord class
-    if ( !android_media_getIntConstantFromClass(env, javaAudioRecordFields.audioRecordClass, 
-                kClassPathName,
-                JAVA_CONST_SOURCEDEFAULT_NAME, &(javaAudioRecordFields.SOURCE_DEFAULT))
-        || !android_media_getIntConstantFromClass(env, javaAudioRecordFields.audioRecordClass, 
-                kClassPathName,
-                JAVA_CONST_SOURCEMIC_NAME, &(javaAudioRecordFields.SOURCE_MIC)) ) {
-        // error log performed in getIntConstantFromClass() 
-        return -1;
-    }
-
     return AndroidRuntime::registerNativeMethods(env,
             kClassPathName, gMethods, NELEM(gMethods));
 }
diff --git a/core/jni/android_net_wifi_Wifi.cpp b/core/jni/android_net_wifi_Wifi.cpp
index 25670df..9f93e2f 100644
--- a/core/jni/android_net_wifi_Wifi.cpp
+++ b/core/jni/android_net_wifi_Wifi.cpp
@@ -317,8 +317,13 @@
     }
     // reply comes back in the form "<SSID> rssi XX" where XX is the
     // number we're interested in.  if we're associating, it returns "OK".
+    // beware - <SSID> can contain spaces.
     if (strcmp(reply, "OK") != 0) {
-    	sscanf(reply, "%*s %*s %d", &rssi);
+        char* lastSpace = strrchr(reply, ' ');
+        // lastSpace should be preceded by "rssi" and followed by the value
+        if (lastSpace && !strncmp(lastSpace - 4, "rssi", 4)) {
+            sscanf(lastSpace + 1, "%d", &rssi);
+        }
     }
     return (jint)rssi;
 }
diff --git a/core/res/res/raw/latin_lowercase b/core/res/res/raw/latin_lowercase
index fd67333..17cfaf0 100644
--- a/core/res/res/raw/latin_lowercase
+++ b/core/res/res/raw/latin_lowercase
Binary files differ
diff --git a/core/res/res/values-ja/donottranslate.xml b/core/res/res/values-ja/donottranslate.xml
new file mode 100644
index 0000000..f7c3566
--- /dev/null
+++ b/core/res/res/values-ja/donottranslate.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2009, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- Default text encoding for WebSettings. -->
+    <string name="default_text_encoding">Shift_JIS</string>
+</resources>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index c4c2446..cda7431 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -2091,6 +2091,27 @@
         <!-- Duration, in milliseconds, of the fade out effect after the user is done
              drawing a gesture. -->
         <attr name="fadeDuration" format="integer" />
+        <!-- Defines the type of strokes that define a gesture. -->
+        <attr name="gestureStrokeType">
+            <!-- A gesture is made of only one stroke. -->
+            <enum name="single" value="0" />
+            <!-- A gesture is made of multiple strokes. -->
+            <enum name="multiple" value="1" />
+        </attr>
+        <!-- Minimum length of a stroke before it is recognized as a gesture. -->
+        <attr name="gestureStrokeLengthThreshold" format="float" />
+        <!-- Squareness threshold of a stroke before it is recognized as a gesture. -->
+        <attr name="gestureStrokeSquarenessThreshold" format="float" />
+        <!-- Minimum curve angle a stroke must contain before it is recognized as a gesture. -->
+        <attr name="gestureStrokeAngleThreshold" format="float" />
+        <!-- Defines whether the overlay should intercept the motion events when a gesture
+             is recognized. -->
+        <attr name="eventsInterceptionEnabled" format="boolean" />
+        <!-- Defines whether the gesture will automatically fade out after being recognized. -->
+        <attr name="fadeEnabled" format="boolean" />
+        <!-- Indicates whether horizontal (when the orientation is vertical) or vertical
+             (when orientation is horizontal) strokes automatically define a gesture. -->
+        <attr name="orientation" />
     </declare-styleable>
 
     <!-- ======================================= -->
diff --git a/core/res/res/values/donottranslate.xml b/core/res/res/values/donottranslate.xml
new file mode 100644
index 0000000..6def3bf
--- /dev/null
+++ b/core/res/res/values/donottranslate.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2009, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- Default text encoding for WebSettings. -->
+    <string name="default_text_encoding">Latin-1</string>
+</resources>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 55aecc4..621270e 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -1107,6 +1107,12 @@
   <public type="attr" name="fadeOffset" />
   <public type="attr" name="fadeDuration" />
   <public type="attr" name="gestures" />
+  <public type="attr" name="gestureStrokeType" />
+  <public type="attr" name="gestureStrokeLengthThreshold" />
+  <public type="attr" name="gestureStrokeSquarenessThreshold" />
+  <public type="attr" name="gestureStrokeAngleThreshold" />
+  <public type="attr" name="eventsInterceptionEnabled" />
+  <public type="attr" name="fadeEnabled" />
 
   <public-padding type="attr" name="donut_resource_pad" end="0x0101029f" />
 
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index 09e299a..490abde 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -174,14 +174,18 @@
     <style name="Widget.GestureOverlayView">
         <item name="android:gestureStrokeWidth">12.0</item>
         <item name="android:gestureColor">#ffffff00</item>
-        <item name="android:uncertainGestureColor">#3cffff00</item>
-        <item name="android:fadeOffset">300</item>
-        <item name="android:fadeDuration">300</item>
+        <item name="android:uncertainGestureColor">#48ffff00</item>
+        <item name="android:fadeOffset">420</item>
+        <item name="android:fadeDuration">150</item>
+        <item name="android:gestureStrokeLengthThreshold">30.0</item>
+        <item name="android:gestureStrokeSquarenessThreshold">0.275</item>
+        <item name="android:gestureStrokeAngleThreshold">40.0</item>
+        <item name="android:eventsInterceptionEnabled">true</item>
     </style>
 
     <style name="Widget.GestureOverlayView.White">
         <item name="android:gestureColor">#ff00ff00</item>
-        <item name="android:uncertainGestureColor">#3c00ff00</item>
+        <item name="android:uncertainGestureColor">#4800ff00</item>
     </style>
 
     <style name="Widget.Button">
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index 00dc6fa..1c87220 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -368,6 +368,12 @@
         <item name="android:backgroundDimEnabled">true</item>
         <item name="windowContentOverlay">@null</item>        
     </style>
+    
+    <!-- Theme for the search input bar when doing global search. The only
+         difference from non-global search is that we do not dim the background. -->
+    <style name="Theme.GlobalSearchBar" parent="Theme.Panel">
+        <item name="windowContentOverlay">@null</item>
+    </style>
 
     <!-- Menu Themes -->
     <eat-comment />
diff --git a/data/fonts/DroidSansJapanese.ttf b/data/fonts/DroidSansJapanese.ttf
index ca79221..412fa3d 100755
--- a/data/fonts/DroidSansJapanese.ttf
+++ b/data/fonts/DroidSansJapanese.ttf
Binary files differ
diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs
index a044cea..da5192a 100644
--- a/docs/html/guide/guide_toc.cs
+++ b/docs/html/guide/guide_toc.cs
@@ -146,6 +146,7 @@
       <li class="toggle-list">
         <div><a href="<?cs var:toroot ?>guide/practices/ui_guidelines/index.html">UI Guidelines</a></div>
           <ul>
+            <li><a href="<?cs var:toroot ?>guide/practices/ui_guidelines/icon_design.html">Icon Design</a></li>
             <li><a href="<?cs var:toroot ?>guide/practices/ui_guidelines/widget_design.html">App Widget Design</a></li>
           </ul>
       </li>
diff --git a/docs/html/guide/practices/ui_guidelines/icon_design.jd b/docs/html/guide/practices/ui_guidelines/icon_design.jd
new file mode 100644
index 0000000..155684a
--- /dev/null
+++ b/docs/html/guide/practices/ui_guidelines/icon_design.jd
@@ -0,0 +1,1406 @@
+page.title=Icon Design Guidelines
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>Icon design quickview</h2>
+
+<ul>
+<li>You can use several types of icons in an Android application.</li>
+<li>Your icons should follow the specification in this document.</li>
+<li>A set of standard icons is provided by the Android platform. Your
+application can use the standard icons by referencing them as resources.</li>
+</ul>
+
+<h2>In this document</h2>
+
+<ol>
+<li><a href="#launcherstructure">Launcher icon</a></li>
+<li><a href="#menustructure">Menu icon</a></li>
+<li><a href="#statusbarstructure">Status bar icon</a></li>
+<li><a href="#tabstructure">Tab icon</a></li>
+<li><a href="#dialogstructure">Dialog icon</a></li>
+<li><a href="#listviewstructure">List view icon</a></li>
+
+<li style="margin-top:4px;"><a href="#dodonts">General guidelines</a></li>
+<li><a href="#templatespack">Using the Icon Templates Pack</a></li>
+<li><a href="#file">Icon appendix</a>
+	<ol>
+	<li><a href="#launcherapx">Launcher icons</a></li>
+	<li><a href="#menuapx">Menu icons</a></li>
+	<li><a href="#statusbarapx">Status bar icons</a></li>
+	</ol>
+</li>
+
+</ol>
+
+<h2>See also</h2>
+
+<ol>
+<li><a href="{@docRoot}shareables/icon_templates-v1.0.zip">Android Icon
+Templates Pack &raquo;</a></li>
+</ol>
+
+</div>
+</div>
+
+<p>Creating a unified look and feel throughout a user interface adds value to
+your product. Streamlining the graphic style will also make the UI seem more
+professional to the user.</p>
+
+<p>This document shows you how to create icons for various parts
+of your application’s user interface that fit the style set by the Android UI
+team. Following these guidelines will help you to create a polished and unified
+experience for the user.</p>
+
+<p>To get started creating conforming icons more quickly, you can download 
+the Android Icon Templates Pack. For more information, see 
+<a href="#templatespack">Using the Android Icon Template Pack</a>.</p>
+
+<h2 id="launcherstructure">Launcher icon</h2>
+
+<p>A launcher icon is the graphic that represents your application on an Android
+device’s Home screen. It is a simplified 3D icon with a fixed perspective. The
+required perspective is shown in Figure 1.</p>
+
+<h4 id="launcherstructure">Structure</h4>
+
+<ul>
+<li>The base of a launcher icon can face either the top view or the front
+view.</li>
+
+<li>The majority of a launcher icon’s surface should be created using the
+launcher icon <a href="#launcherpalette">color palette</a>. To add emphasis, use
+one or more bright accent colors to highlight specific characteristics.</li>
+
+<li>All launcher icons must be created with rounded corners to make them look
+friendly and simple—as shown in Figure 2.</li>
+
+<li>All dimensions specified are based on a 250x250 pixel artboard size
+in a vector graphics editor like Adobe Illustrator, where the icon fits within
+the artboard boundaries.</li>
+
+<li><strong>Final art must be scaled down and exported as a transparent 48x48 px
+PNG file using a raster image editor such as Adobe Photoshop.</strong></li>
+
+<li>Templates for creating launcher icons in Adobe Illustrator and Photoshop are
+available in the Icon Templates Pack.</li>
+</ul>
+
+<table class="image-caption">
+<tr>
+<td class="image-caption-i" style="padding-right:0">
+  <img src="{@docRoot}images/icon_design/launcher_structure.png" alt="A view of
+launcher icon corners and perspective angles" />
+</td>
+<td class="image-caption-c">
+  <div class="caption grad-rule-top">
+    <p><strong>Figure 1.</strong> Perspective angles for launcher icons (90° is
+vertical).</p>
+    <div class="image-caption-nested">
+      <table style="margin-top:0;">
+      <tr><td style="padding-right:1em"><em>1.</em></td><td>92°</td></tr>
+      <tr><td><em>2.</em></td><td>92°</td></tr>
+      <tr><td><em>3.</em></td><td>173°</td></tr>
+      <tr><td><em>4.</em></td><td>171°</td></tr>
+      <tr><td><em>5.</em></td><td>49°</td></tr>
+      <tr><td><em>6.</em></td><td>171°</td></tr>
+      <tr><td><em>7.</em></td><td>64°</td></tr>
+      <tr><td><em>8.</em></td><td>97°</td></tr>
+      <tr><td><em>9.</em></td><td>75°</td></tr>
+      <tr><td><em>10.</em></td><td>93°</td></tr>
+      <tr><td><em>11.</em></td><td>169°</td></tr>
+      </table>
+    </div>
+  </div>
+  <div class="caption grad-rule-top">
+    <p><strong>Figure 2.</strong> Rounded corners for launcher icons.</p>
+  </div>
+</td>
+</tr>
+</table>
+
+<h4 id="launcherlight">Light, effects, and shadows</h4>
+
+<p>Launcher icons are simplified 3D icons using light and shadows for
+definition. A light source is placed slightly to the left in front of the icon,
+and therefore the shadow expands to the right and back.</p>
+
+<table class="image-caption">
+<tr>
+<td class="image-caption-i">
+  <img src="{@docRoot}images/icon_design/launcher_light.png" alt="A view of
+light, effects, and shadows for launcher icons."/>
+</td>
+<td class="image-caption-c">
+  <div class="caption grad-rule-top">
+    <p><strong>Figure 3. </strong>Light, effects, and shadows for launcher icons.</p>
+    <div class="image-caption-nested">
+    <table style="margin-top:0;">
+    <tr><td style="padding-right:1em"><em>1.</em></td><td>Edge highlight:</td><td>white</td></tr>
+    <tr><td><em>2.</em></td><td>Icon shadow:</td><td>black | 20px blur<br>50% opacity | angle 67°</td></tr>
+    <tr><td><em>3.</em></td><td>Front part:</td><td>Use light gradient from color palette</td></tr>
+    <tr><td><em>4.</em></td><td>Detail shadow:</td><td>black | 10px blur<br>75% opacity</td></tr>
+    <tr><td><em>5.</em></td><td> Side part:</td><td>Use medium gradient from color palette</td></tr>
+    </table>
+    </div>
+  </div>
+</td>
+</tr>
+</table>
+
+<table style="margin:0px;padding:0px;">
+<tr>
+<td style="border:0;width:350px;">
+
+<h4 id="launcherpalette">Launcher icon color palette</h4>
+
+<table style="margin:0px;padding:0px;">
+<tr>
+<td class="image-caption-i"><img src="{@docRoot}images/icon_design/launcher_palette_white.png" alt="Color palette, white" style="margin:.5em 0 0 0;" /></td>
+<td class="image-caption-c" style="padding-top:.5em;">White<br>r 0 | g 0 | b 0<br>Used for highlights on edges.</td>
+</tr>
+
+<tr>
+<td class="image-caption-i"><img src="{@docRoot}images/icon_design/launcher_palette_gradient_light.png" alt="Color palette, light gradient" style="margin:.5em 0 0 0;" /></td>
+<td class="image-caption-c" style="padding-top:.5em;">Light gradient<br><em>1:&nbsp;&nbsp;</em>r 0  | g 0  | b 0<br><em>2:&nbsp;&nbsp;</em>r 217 | g 217 | b 217<br>Used on the front (lit) part of the icon.</td>
+</tr>
+
+<tr>
+<td class="image-caption-i"><img src="{@docRoot}images/icon_design/launcher_palette_gradient_medium.png" alt="Color palette, medium gradien" style="margin:.5em 0 0 0;" /></td>
+<td class="image-caption-c" style="padding-top:.5em;">Medium gradient<br><em>1:&nbsp;&nbsp;</em>r 190 | g 190 | b 190<br><em>2:&nbsp;&nbsp;</em>r 115 | g 115 | b 115<br>Used on the side (shaded) part of the icon.</td>
+</tr>
+
+<tr>
+<td class="image-caption-i"><img src="{@docRoot}images/icon_design/launcher_palette_gradient_dark.png" alt="Color palette, dark gradient" style="margin:.5em 0 0 0;" /></td>
+<td class="image-caption-c" style="padding-top:.5em;">Dark gradient<br><em>1:&nbsp;&nbsp;</em>r 100 | g 100 | b 100<br><em>2:&nbsp;&nbsp;</em>r 25  | g 25  | b 25<br>Used on details and parts in the shade of the icon.</td>
+</tr>
+
+<tr>
+<td class="image-caption-i"><img src="{@docRoot}images/icon_design/launcher_palette_black.png" alt="Color palette, black" style="margin:.5em 0 0 0;" /></td>
+<td class="image-caption-c" style="padding-top:.5em;">Black<br>r 255 | g 255 | b 255<br>Used as base color in shadows.</td>
+</tr>
+
+</table>
+
+</td>
+
+<td style="border:0;width:350px">
+
+<h4 id="launchersteps">Step by step</h4>
+
+<ol>
+  <li>Create the basic shapes with a tool like Adobe Illustrator, using the
+angles described in <a href="#launcherstructure">Launcher icon: structure</a>.
+The shapes and effects must fit within a 250x250 pixel artboard.</li>
+  <li>Add depth to shapes by extruding them and create the rounded corners as
+described for the launcher icon structure.</li>
+  <li>Add details and colors. Gradients should be treated as if there is a light
+source placed slightly to the left in front of the icon.</li>
+  <li>Create the shadows with the correct angle and blur effect.</li>
+  <li>Import the icon into a tool like Adobe Photoshop and scale to fit an image
+size of 48x48 px on a transparent background.</li>
+  <li>Export the icon at 48x48 as a PNG file with transparency enabled.</li>
+</ol>
+
+</td>
+</tr>
+</table>
+
+<h2 id="menustructure">Menu icon</h2>
+
+<p>Menu icons are graphical elements placed in the pop-up menu shown to users
+when they press the Menu button. They are drawn in a flat-front perspective.
+Elements in a menu icon must not be visualized in 3D or perspective.</p>
+
+<h4>Structure</h4>
+
+<ul>
+<li>In order to maintain consistency, all menu icons must use the same
+primary palette and the same effects. For more information, see the
+menu icon <a href="#menupalette">color palette</a>. </li>
+
+<li>Menu icons should include rounded corners, but only when logically
+appropriate. For example, in Figure 3 the logical place for rounded corners is
+the roof and not the rest of the building.</span></li>
+
+<li>All dimensions specified on this page are based on a 48x48 pixel artboard 
+size with a 6 pixel safeframe.</li>
+
+<li>The menu icon effect (the outer glow) described in <a
+href="#menulight">Light, effects, and shadows</a> can overlap the 6px safeframe,
+but only when necessary. The base shape must always stay inside the
+safeframe.</li>
+
+<li><strong>Final art must be exported as a transparent PNG file.</strong></li>
+
+<li>Templates for creating menu icons in Adobe Photoshop are available in the 
+Icon Templates Pack.</li>
+</ul>
+
+<table class="image-caption">
+<tr>
+<td class="image-caption-i" style="padding-right:0">
+  <img src="{@docRoot}images/icon_design/menu_structure.png" alt="A view of menu
+icon structure." />
+</td>
+<td class="image-caption-c">
+  <div class="caption grad-rule-top">
+    <p><strong>Figure 4. </strong>Safeframe and corner-rounding for menu
+icons. Icon size is 48x48.</p>
+  </div>
+</td>
+</tr>
+</table>
+
+
+<h4 id="menulight">Light, effects, and shadows</h4>
+
+<p>Menu icons are flat and pictured face on. A slight deboss and some other
+effects, which are shown below, are used to create depth.</p>
+
+<table class="image-caption">
+<tr>
+<td class="image-caption-i">
+  <img src="{@docRoot}images/icon_design/menu_light.png" alt="A view of light, effects, and shadows for launcher icons."/>
+</td>
+<td class="image-caption-c">
+  <div class="caption grad-rule-top">
+    <p><strong>Figure 5. </strong>Light, effects, and shadows for launcher icons.</p>
+    <div class="image-caption-nested">
+    <table style="margin-top:0;">
+    <tr><td style="padding-right:1em"><em>1.</em></td><td>Front part:</td><td>Use fill gradient from primary color palette</td></tr>
+    <tr><td><em>2.</em></td><td>Inner shadow:</td><td>black | 20 % opacity<br>angle 90° | distance 2px<br>size 2px</td></tr>
+    <tr><td><em>3.</em></td><td>Outer glow:</td><td>white | 55% opacity <br>spread 10% | size 3px</td></tr>
+    <tr><td><em>5.</em></td><td>Inner bevel:</td><td>depth 1% | direction down size 0px<br>angle 90° | altitude 10°<br>highlight white 70% opacity<br>shadow black 25% opacity</td></tr>
+    </table>
+    </div>
+  </div>
+</td>
+</tr>
+</table>
+
+<table style="margin:0px;padding:0px;">
+<tr>
+<td style="border:0;width:350px;">
+
+<h4 id="menupalette">Color palette</h4>
+
+<table style="margin:0px;padding:0px;">
+<tr>
+<td class="image-caption-i"><img src="{@docRoot}images/icon_design/menu_palette_white.png" alt="Color palette, white" style="margin:.5em 0 0 0;" /></td>
+<td class="image-caption-c" style="padding-top:.5em;">White<br>r 0 | g 0 | b 0<br>Used for outer glow and bevel highlight.</td>
+</tr>
+
+<tr>
+<td class="image-caption-i"><img src="{@docRoot}images/icon_design/menu_palette_gradient_medium.png" alt="Color palette, medium gradient" style="margin:.5em 0 0 0;" /></td>
+<td class="image-caption-c" style="padding-top:.5em;">Fill gradient<br><em>1:&nbsp;&nbsp;</em>r 163 | g 163 | b 163<br><em>2:&nbsp;&nbsp;</em>r 120 | g 120 | b 120<br>Used as color fill.</td>
+</tr>
+
+<tr>
+<td class="image-caption-i"><img src="{@docRoot}images/icon_design/menu_palette_black.png" alt="Color palette, black" style="margin:.5em 0 0 0;" /></td>
+<td class="image-caption-c" style="padding-top:.5em;">Black<br>r 255 | g 255 | b 255<br>Used for inner shadow and bevel shadow.</td>
+</tr>
+
+</table>
+
+</td>
+
+<td style="border:0;width:350px">
+
+<h4 id="menusteps">Step by step</h4>
+
+<ol>
+<li>Create the basic shapes using a tool like Adobe Illustrator.</li>
+<li>Import the shape into a tool like Adobe Photoshop and scale to fit an image
+of 48x48 px on a transparent background. Mind the safeframe.</li>
+<li>Add the effects seen as described in Figure 5.</li>
+<li>Export the icon at 48x48 as a PNG file with transparency enabled.</li>
+</ol>
+
+</td>
+</tr>
+</table>
+
+
+<h2 id="statusbarstructure">Status bar icon</h2>
+
+<p>Status bar icons are used to represent notifications from your application in
+the status bar. Graphically, they are very similar to menu icons, but are
+smaller and higher in contrast.</p>
+
+<h4>Structure</h4>
+
+<ul>
+<li>Rounded corners must always be applied to the base shape and to the details
+of a status bar icon shown Figure 7.</li>
+
+<li>All dimensions specified are based on a 25x25 pixel artboard size with a 2
+pixel safeframe.</li>
+
+<li>Status bar icons can overlap the safeframe to the left and right when
+necessary, but must not overlap the safeframe at the top and bottom.</li>
+
+<li><strong>Final art must be exported as a transparent PNG file.</strong></li>
+
+<li>Templates for creating status bar icons using Adobe Photoshop are available
+in the Icon Templates Pack.</li>
+</ul>
+
+<table class="image-caption">
+<tr>
+<td class="image-caption-i" style="padding-right:0">
+  <img src="{@docRoot}images/icon_design/statusbar_structure.png" alt="A view of
+status bar icon structure." />
+</td>
+<td class="image-caption-c">
+  <div class="caption grad-rule-top">
+    <p><strong>Figure 6. </strong>Safeframe and corner-rounding for status bar
+icons. Icon size is 25x25.</p>
+  </div>
+</td>
+</tr>
+</table>
+
+
+<h4 id="statusbarlight">Light, effects, and shadows</h4>
+
+<p>Status bar icons are slightly debossed, high in contrast, and pictured
+face-on to enhance clarity at small sizes.</p>
+
+<table class="image-caption">
+<tr>
+<td class="image-caption-i">
+  <img src="{@docRoot}images/icon_design/statusbar_light.png" alt="A view of
+light, effects, and shadows for launcher icons."/>
+</td>
+<td class="image-caption-c">
+  <div class="caption grad-rule-top">
+    <p><strong>Figure 7. </strong>Light, effects, and shadows for launcher icons.</p>
+    <div class="image-caption-nested">
+    <table style="margin-top:0;">
+    <tr><td style="padding-right:1em"><em>1.</em></td><td>Front part:</td><td>Use fill gradient from primary color palette</td></tr>
+    <tr><td><em>2.</em></td><td>Inner bevel:</td><td>depth 100% | direction down<br>size 0px | angle 90° |<br>altitude 30°<br>highlight white 75% opacity<br>shadow black 75% opacity</td></tr>
+    <tr><td><em>3.</em></td><td>Detail:</td><td>white</td></tr>
+    <tr><td><em>4.</em></td><td>Disabled detail:</td><td>grey gradient from palette<br>+ inner bevel: smooth | depth 1% | direction down | size 0px | angle 117° | <br>altitude 42° | highlight white 70% | no shadow</td></tr>
+    </table>
+    </div>
+  </div>
+</td>
+</tr>
+</table>
+
+<table style="margin:0px;padding:0px;">
+<tr>
+<td style="border:0;width:350px;">
+
+<h4 id="menupalette">Color palette</h4>
+
+<p>Only status bar icons related to the phone function use full color; all other status bar icons should remain monochromatic.</p>
+
+<table style="margin:0px;padding:0px;">
+<tr>
+<td class="image-caption-i"><img src="{@docRoot}images/icon_design/statusbar_palette_white.png" alt="Color palette, white" style="margin:.5em 0 0 0;" /></td>
+<td class="image-caption-c" style="padding-top:.5em;">White<br>r 0 | g 0 | b 0<br>Used for details within the icons and bevel highlight.</td>
+</tr>
+
+<tr>
+<td class="image-caption-i"><img src="{@docRoot}images/icon_design/statusbar_palette_fill.png" alt="Color palette, grey gradient" style="margin:.5em 0 0 0;" /></td>
+<td class="image-caption-c" style="padding-top:.5em;">Grey gradient<br><em>1:&nbsp;&nbsp;</em>r 169 | g 169 | b 169<br><em>2:&nbsp;&nbsp;</em>r 126 | g 126 | b 126<br>Used for disabled details within the icon.</td>
+</tr>
+
+<tr>
+<td class="image-caption-i"><img src="{@docRoot}images/icon_design/statusbar_palette_grey.png" alt="Color palette, fill gradient" style="margin:.5em 0 0 0;" /></td>
+<td class="image-caption-c" style="padding-top:.5em;">Fill gradient<br><em>1:&nbsp;&nbsp;</em>1 r 105 | g 105 | b 105<br><em>2:&nbsp;&nbsp;</em>r 10   | g 10   | b 10<br>Used as color fill.</td>
+</tr>
+
+<tr>
+<td class="image-caption-i"><img src="{@docRoot}images/icon_design/statusbar_palette_black.png" alt="Color palette, black" style="margin:.5em 0 0 0;" /></td>
+<td class="image-caption-c" style="padding-top:.5em;">Black<br>r 255 | g 255 | b 255<br>Used for bevel shadow.</td>
+</tr>
+
+</table>
+
+</td>
+
+<td style="border:0;width:350px">
+
+<h4 id="menusteps">Step by step</h4>
+
+<ol>
+<li>In a tool like Adobe Photoshop, create the base shape within a 25x25 px
+image on a transparent background. Mind the safeframe, and keep the upper and
+lower 2 pixels free.</li>
+<li>Add rounded corners as specified in Figure 6.</li>
+<li>Add light, effects, and shadows as specified in Figure 7.</li>
+<li>Export the icon at 25x25 as a PNG file with transparency enabled.</li>
+</ol>
+
+</td>
+</tr>
+</table>
+
+
+<h2 id="tabstructure">Tab icon</h2>
+
+<p>Tab icons are graphical elements used to represent individual tabs in a
+multi-tab interface. Each tab icon has two states: unselected and selected.</p>
+
+<h4>Structure</h4>
+
+<ul>
+<li>Unselected tab icons have the same fill gradient and effects as menu icons,
+but with no outer glow.</li>
+
+<li>Selected tab icons look just like unselected tab icons, but with a fainter
+inner shadow, and have the same front part gradient as dialog icons.</li>
+
+<li>Tab icons have a 1 px safeframe which should only be overlapped for the edge
+of the anti-alias of a round shape.</li>
+
+<li>All dimensions specified on this page are based on a 32x32 px artboard size.
+Keep 1 px of padding around the bounding box inside the Photoshop template.</li>
+
+<li><strong>Final art must be exported as a 32x32 px transparent PNG
+file.</strong></li>
+
+<li>Templates for creating tab icons in Adobe Photoshop are available in the
+Icon Templates Pack.</li>
+</ul>
+
+<table class="image-caption">
+<tr>
+<td class="image-caption-i" style="padding-right:0">
+  <img src="{@docRoot}images/icon_design/tab_icon_unselected.png" alt="A view of
+unselected tab icon structure." />
+</td>
+<td class="image-caption-c">
+  <div class="caption grad-rule-top">
+    <p><strong>Figure 8. </strong>Safeframe and fill gradient for unselected tab
+icons. Icon size is 32x32.</p>
+  </div>
+</td>
+</tr>
+<tr>
+<td class="image-caption-i" style="padding-right:0">
+  <img src="{@docRoot}images/icon_design/tab_icon_selected.png" alt="A view of
+selected tab icon structure." />
+</td>
+<td class="image-caption-c">
+  <div class="caption grad-rule-top">
+    <p><strong>Figure 9. </strong>Safeframe and fill gradient for tab icons in
+selected state. Icon size is 32x32.</p>
+  </div>
+</td>
+</tr>
+</table>
+
+<h3 id="unselectedtabdetails">Unselected tab icon</h3>
+
+<h4 id="unselectedtablight">Light, effects, and shadows</h4>
+
+<p>Unselected tab icons look just like the selected tab icons, but with a
+fainter inner shadow, and the same front part gradient as the dialog icons.</p>
+
+<table class="image-caption">
+<tr>
+<td class="image-caption-i">
+  <img src="{@docRoot}images/icon_design/tab_unselected_light.png" alt="A view
+of light, effects, and shadows for unselected tab icons."/>
+</td>
+<td class="image-caption-c">
+  <div class="caption grad-rule-top">
+    <p><strong>Figure 10. </strong>Light, effects, and shadows for unselected
+tab icons.</p>
+    <div class="image-caption-nested">
+    <table style="margin-top:0;">
+    <tr><td style="padding-right:1em"><em>1.</em></td><td>Front part:</td><td>gradient overlay | angle 90°<br>bottom color: r 223 | g 223 | b 223<br>top color: r 249 | g 249 | b 249<br>bottom color location: 0%<br>top color location: 75%</td></tr>
+    <tr><td><em>2.</em></td><td>Inner shadow:</td><td>black | 10 % opacity | angle 90° distance 2px | size 2px</td></tr>
+    <tr><td><em>3.</em></td><td>Inner bevel:</td><td>depth 1% | direction down | size 0px | angle 90° | altitude 10°<br>highlight white 70% opacity<br>shadow black 25% opacity</td></tr>
+    </table>
+    </div>
+  </div>
+</td>
+</tr>
+</table>
+
+
+<table style="margin:0px;padding:0px;">
+<tr>
+<td style="border:0;width:350px;">
+
+<h4 id="menusteps">Step by step</h4>
+
+<ol>
+<li>Create the basic shapes using a tool like Adobe Illustrator.</li>
+<li>Import the shape to a tool like Adobe Photoshop and scale to fit an image of
+32x32 px on a transparent background.</li>
+<li>Add the effects seen in Figure 10 for the unselected state filter.</li>
+<li>Export the icon at 32x32 as a PNG file with transparency enabled.</li>
+</ol>
+
+</td>
+</tr>
+</table>
+
+<h3 id="selectedtabdetails">Selected tab icon</h3>
+
+<p>The selected tab icons have the same fill gradient and effects as the menu
+icon, but with no outer glow.</p>
+
+<table class="image-caption">
+<tr>
+<td class="image-caption-i">
+  <img src="{@docRoot}images/icon_design/tab_selected_light.png" alt="A view of
+light, effects, and shadows for selected tab icons."/>
+</td>
+<td class="image-caption-c">
+  <div class="caption grad-rule-top">
+    <p><strong>Figure 11. </strong>Light, effects, and shadows for selected tab
+icons.</p>
+    <div class="image-caption-nested">
+    <table style="margin-top:0;">
+    <tr><td style="padding-right:1em"><em>1.</em></td><td>Front part:</td><td>Use fill gradient from color palette.</td></tr>
+    <tr><td><em>2.</em></td><td>Inner shadow:</td><td>black | 20% opacity | <br>angle 90° | distance 2px | <br>size 2px</td></tr>
+    <tr><td><em>3.</em></td><td>Inner bevel:</td><td>depth 1% | direction down | size 0px | angle 90° | <br>altitude 10°<br>highlight white 70% opacity<br>shadow black 25% opacity</td></tr>
+    </table>
+    </div>
+  </div>
+</td>
+</tr>
+</table>
+
+<table style="margin:0px;padding:0px;">
+<tr>
+<td style="border:0;width:350px;">
+
+<h4 id="menupalette">Color palette</h4>
+
+<table style="margin:0px;padding:0px;">
+<tr>
+<td class="image-caption-i"><img src="{@docRoot}images/icon_design/menu_palette_gradient_medium.png" alt="Color palette, fill gradient" style="margin:.5em 0 0 0;" /></td>
+<td class="image-caption-c" style="padding-top:.5em;">Fill gradient<br><em>1:&nbsp;&nbsp;</em>r 163 | g 163 | b 163<br><em>2:&nbsp;&nbsp;</em>r 120 | g 120 | b 120<br>Used as color fill on unselected tab icons.</td>
+</tr>
+
+</table>
+
+</td>
+
+<td style="border:0;width:350px">
+
+<h4 id="menusteps">Step by step</h4>
+
+<ol>
+<li>Create the basic shape using a tool like Adobe Illustrator.</li>
+<li>Import the shape into a tool like Adobe Photoshop and scale to fit a 32x32
+px artboard with a transparent background. </li>
+<li>Add the effects seen in Figure 11 for the selected state filter.</li>
+<li>Export the icon at 32x32 as a PNG file with transparency enabled.</li>
+</ol>
+
+</td>
+</tr>
+</table>
+
+
+<h2 id="dialogstructure">Dialog icon</h2>
+
+<p>Dialog icons are shown in pop-up dialog boxes that prompt the user for
+interaction. They use a light gradient and inner
+shadow in order to stand out against a dark background.</p>
+
+<h4>Structure</h4>
+
+<ul>
+<li>Dialog icons have a 1 pixel safeframe. The base shape must fit within the
+safeframe, but the anti-alias of a round shape can overlap the safeframe. <span
+class="body-copy"></li>
+
+<li>All dimensions specified on this page are based on a 32x32 pixel artboard size
+in Adobe Photoshop. Keep 1 pixel of padding around the bounding box inside the
+Photoshop template.</li>
+
+<li><strong>Final art must be exported as a transparent PNG file.</strong></li>
+
+<li>Templates for creating dialog icons in Adobe Photoshop are available in the
+Icon Templates Pack.</li>
+</ul>
+
+<table class="image-caption">
+<tr>
+<td class="image-caption-i" style="padding-right:0">
+  <img src="{@docRoot}images/icon_design/dialog_icon.png" alt="A view of dialog
+icon structure." />
+</td>
+<td class="image-caption-c">
+  <div class="caption grad-rule-top">
+    <p><strong>Figure 12. </strong>Safeframe and fill gradient for dialog icons.
+Icon size is 32x32.</p>
+  </div>
+</td>
+</tr>
+</table>
+
+
+<h4 id="dialoglight">Light, effects, and shadows</h4>
+
+<p>Dialog icons are flat and pictured face-on. In order to stand out against a
+dark background, they are built up using a light gradient and inner shadow.</p>
+
+<table class="image-caption">
+<tr>
+<td class="image-caption-i">
+  <img src="{@docRoot}images/icon_design/dialog_light.png" alt="A view of light,
+effects, and shadows for dialog icons."/>
+</td>
+<td class="image-caption-c">
+  <div class="caption grad-rule-top">
+    <p><strong>Figure 13. </strong>Light, effects, and shadows for dialog
+icons.</p>
+    <div class="image-caption-nested">
+    <table style="margin-top:0;">
+    <tr><td style="padding-right:1em"><em>1.</em></td><td>Front part:</td><td>gradient overlay | angle 90°<br>bottom: r 223 | g 223 | b 223<br>top: r 249 | g 249 | b 249<br>bottom color location: 0%<br>top color location: 75%</td></tr>
+    <tr><td><em>2.</em></td><td>Inner shadow:</td><td>black | 25% opacity | <br>angle -90° | distance 1px | size 0px</td></tr>
+    </table>
+    </div>
+  </div>
+</td>
+</tr>
+</table>
+
+
+<table style="margin:0px;padding:0px;">
+<tr>
+<td style="border:0;width:350px;">
+
+<h4 id="menusteps">Step by step</h4>
+
+<ol>
+<li>Create the basic shapes using a tool like Adobe Illustrator.</li>
+<li>Import the shape into a tool like Adobe Photoshop and scale to fit an image
+of 32x32 px on a transparent background. </li>
+<li>Add the effects seen in Figure 13 for the proper filter.</li>
+<li>Export the icon at 32x32 as a PNG file with transparency enabled.</li>
+</ol>
+
+</td>
+</tr>
+</table>
+
+
+<h2 id="listviewstructure">List view icon</h2>
+
+<p>List view icons look a lot like dialog icons, but they use an inner shadow
+effect where the light source is above the object. They are also designed to be
+used only in a list view. Examples include the Android Market application home
+screen and the driving directions screen in the Maps application.</p>
+
+<h4>Structure</h4>
+
+<ul>
+<li>A list view icon normally has a 1 px safeframe, but it is OK to use the
+safeframe area for the edge of the anti-alias of a round shape. </li>
+
+<li>All dimensions specified are based on a 32x32 pixel artboard size in
+Photoshop. Keep 1 pixel of padding around the bounding box inside the template.
+ </li>
+
+<li><strong>Final art must be exported as a transparent PNG file.</strong></li>
+
+<li>Templates for creating list view icons in Adobe Photoshop are available in
+the Icon Templates Pack. </li>
+</ul>
+
+<table class="image-caption">
+<tr>
+<td class="image-caption-i" style="padding-right:0">
+  <img src="{@docRoot}images/icon_design/listview_icon.png" alt="A view of list
+view icon structure." />
+</td>
+<td class="image-caption-c">
+  <div class="caption grad-rule-top">
+    <p><strong>Figure 14. </strong>Safeframe and fill gradient for list view
+icons. Icon size is 32x32.</p>
+  </div>
+</td>
+</tr>
+</table>
+
+<h4 id="listviewlight">Light, effects, and shadows</h4>
+
+<p>List view icons are flat and pictured face-on with an inner shadow. Built up
+by a light gradient and inner shadow, they stand out well on a dark
+background.</p>
+
+<table class="image-caption">
+<tr>
+<td class="image-caption-i">
+  <img src="{@docRoot}images/icon_design/listview_icon_details.png" alt="A view
+of light, effects, and shadows for list view icons."/>
+</td>
+<td class="image-caption-c">
+  <div class="caption grad-rule-top">
+    <p><strong>Figure 15. </strong>Light, effects, and shadows for list view
+icons.</p>
+    <div class="image-caption-nested">
+    <table style="margin-top:0;">
+    <tr><td style="padding-right:1em"><em>1.</em></td><td>Inner shadow:</td><td>black | 57 % opacity | angle 120° | blend mode normal | distance 1px | size 1px <td></tr>
+    <tr><td><em>2.</em></td><td>Background:</td><td>black | standard system color <br>These icons are displayed in list views only.</td></tr>
+    <tr><td colspan="2">Note: The list view icon sits on 32x32 px artboard in Photoshop, without a safeframe.</td></tr>
+    </table>
+    </div>
+  </div>
+</td>
+</tr>
+</table>
+
+<table style="margin:0px;padding:0px;">
+<tr>
+<td style="border:0;width:350px;">
+
+<h4 id="menusteps">Step by step</h4>
+
+<ol>
+<li>Add the effects seen in Figure 15 for the proper filter.</li>
+<li>Export the icon at 32x32 as a PNG file with transparency enabled.</li>
+<li>Create the basic shapes using a tool like Adobe Illustrator.</li>
+<li>Import the shape into a tool like Adobe Photoshop and scale to fit an image
+of 32x32 px on a transparent background. </li>
+</ol>
+
+</td>
+</tr>
+</table>
+
+
+<h2 id="dodonts">General guidelines</h2>
+
+<p>Below are some "do and don't" guidelines to consider when creating icons for
+your application. By following the guidelines, you can ensure that your icons
+will work well with other parts of the Android platform UI and will meet the
+expectations of your application's users. </p>
+
+<table style="margin:0px;padding:0px;">
+<tr>
+<td style="border:0;width:350px;">
+
+<h4>Do...</h4>
+
+<ul>
+<li>Use a normal perspective. The depth of an object should be realistic.</li>
+<li>Keep it simple! By overdoing an icon, it loses it purpose and
+readability.</li>
+<li>Use colors only when necessary. Mind that the base of a launcher icon should
+be grey and feel solid. </li>
+<li>Use the correct angles for the specific icon types.</li>
+</ul>
+</td>
+<td style="border:0;width:350px;">
+
+<h4>Don’t...</h4>
+
+<ul>
+<li>Use open elements like text alone as icons. Instead place those elements on
+a base shape.</li>
+<li>Use colors for your status bar notifications. Those are reserved for
+specific phone-only functions.</li>
+</ul>
+</td>
+</tr>
+<tr>
+<td colspan="2" style="border:0;">
+<img src="{@docRoot}images/icon_design/do_dont.png" alt="Side-by-side examples
+of good/bad icon design."/>
+</td>
+</table>
+
+<h2 id="templatespack">Using the Android Icon Templates Pack</h2>
+
+<p>The Android Icon Templates Pack is a collection of template designs, filters,
+and settings that make it easier for you to create icons that conform to the
+general specifications given in this document. We recommend downloading the
+template pack archive before you get started with your icon design.</p>
+
+<p>The icon templates are provided in Adobe Photoshop and Adobe Illustrator file
+formats, which preserves the layers and design treatments we used when creating the
+standard icons for the Android platform. You can load the template files into any 
+compatible image-editing program, although your ability to work directly with the 
+layers and treatments may vary based on the program you are using.</p>
+
+<p>You can obtain the Icon Templates Pack archive using the link below: </p>
+
+<p style="margin-left:2em"><a
+href="{@docRoot}shareables/icon_templates-v1.0.zip">Download the Icon Templates
+Pack &raquo;</a>
+
+
+<h2 id="iconappendix">Icon appendix</p>
+
+<h3 id="launcherapx">Standard launcher icons</h3>
+
+<p>Shown below are examples of launcher icons used by Android applications. The
+icons are provided for your reference only &mdash; please do not reuse these
+icons in your applications.</code>.
+
+<table class="image-caption">
+<tr>
+
+<td class="image-caption-i image-list">
+  <img src="/images/icon_design/ic_launcher_alarmclock.png" alt="Android asset" />
+  <div class="caption">Alarm Clock</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="/images/icon_design/ic_launcher_browser.png" alt="Android asset" />
+  <div class="caption">Browser</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="/images/icon_design/ic_launcher_calculator.png" alt="Android asset" />
+  <div class="caption">Calculator</div></td>
+	
+
+<td class="image-caption-i image-list">
+  <img src="/images/icon_design/ic_launcher_calendar.png" alt="Android asset" />
+  <div class="caption">Calendar</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="/images/icon_design/ic_launcher_video_camera.png" alt="Android asset" />
+  <div class="caption">Camcorder</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="/images/icon_design/ic_launcher_camera.png" alt="Android asset" />
+  <div class="caption">Camera</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="/images/icon_design/ic_launcher_contacts.png" alt="Android asset" />
+  <div class="caption">Contacts</div></td>
+
+</tr>
+<tr>
+
+<td class="image-caption-i image-list">
+  <img src="/images/icon_design/ic_launcher_phone_dialer.png" alt="Android asset" />
+  <div class="caption">Dialer</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="/images/icon_design/ic_launcher_email_generic.png" alt="Android asset" />
+  <div class="caption">Email</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="/images/icon_design/ic_launcher_gallery.png" alt="Android asset" />
+  <div class="caption">Gallery</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="/images/icon_design/ic_launcher_generic_application.png" alt="Android asset" />
+  <div class="caption">Generic application</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="/images/icon_design/ic_launcher_email.png" alt="Android asset" />
+  <div class="caption">Gmail</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="/images/icon_design/ic_launcher_google_talk.png" alt="Android asset" />
+  <div class="caption">Google Talk</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="/images/icon_design/ic_launcher_IM.png" alt="Android asset" />
+  <div class="caption">IM</div></td>
+
+</tr>
+<tr>
+
+<td class="image-caption-i image-list">
+  <img src="/images/icon_design/ic_launcher_maps.png" alt="Android asset" />
+  <div class="caption">Maps</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="/images/icon_design/ic_launcher_marketplace.png" alt="Android asset" />
+  <div class="caption">Market </div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="/images/icon_design/ic_launcher_sms_mms.png" alt="Android asset" />
+  <div class="caption">Messaging </div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="/images/icon_design/ic_launcher_musicplayer_2.png" alt="Android asset" />
+  <div class="caption">Music</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="/images/icon_design/ic_launcher_settings.png" alt="Android asset" />
+  <div class="caption">Settings</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="/images/icon_design/ic_launcher_voicedial.png" alt="Android asset" />
+  <div class="caption">Voice Dialer</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="/images/icon_design/ic_launcher_voicesearch.png" alt="Android asset" />
+  <div class="caption">Voice Search</div></td>
+
+</tr>
+<tr>
+
+<td class="image-caption-i image-list">
+  <img src="/images/icon_design/ic_launcher_youtube.png" alt="Android asset" />
+  <div class="caption">YouTube</div></td>
+</tr>
+</table>
+
+<h3 id="menuapx">Standard menu icons</h3>
+
+<p>Shown below are standard menu icons that are included in the Android platform
+(as of Android 1.5). You can reference any of these icon resources from your
+application as needed, but make sure that the action you assign to the icon is
+consistent with that listed. Note that this is not a complete list of icons and
+that the actual appearance of standard icons may change across platform
+versions.</p>
+
+<p>To reference one of the icons from your code, use
+<code>android.R.drawable.&lt;icon_resource_identifier&gt;</code>. For example,
+you can call a menu item's {@link android.view.MenuItem#setIcon(android.graphics.drawable.Drawable) setIcon()}
+method and pass the resource name:</p> 
+
+<p style="margin-left:2em"><code>.setIcon(android.R.drawable.ic_menu_more);</code>.
+
+<p>You could reference the same icon from a layout file using
+<code>android:icon="@android:drawable/ic_menu_more"></code>.</p>
+
+<p>To determine the resource ID for an icon listed below, hover over the icon or
+simply look at image filenames, which use the format
+"&lt;icon_resource_identifier&gt;.png".</p>
+
+<table class="image-caption">
+<tr>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_add.png" title="ic_menu_add" alt="Android asset" />
+  <div class="caption">Add</div></td>
+	
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_archive.png" title="ic_menu_archive" alt="Android asset" />
+  <div class="caption">Archive</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_attachment.png" title="ic_menu_attachment" alt="Android asset" />
+  <div class="caption">Attach</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_back.png" title="ic_menu_back" alt="Android asset" />
+  <div class="caption">Back</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_call.png" title="ic_menu_call" alt="Android asset" />
+  <div class="caption">Call</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_camera.png" title="ic_menu_camera" alt="Android asset" />
+  <div class="caption">Camera</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_close_clear_cancel.png" title="ic_menu_close_clear_cancel" alt="Android asset" />
+  <div class="caption">Clear / Close / Cancel / Discard </div></td>
+
+</tr>
+<tr>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_compass.png" title="ic_menu_compass" alt="Android asset" />
+  <div class="caption">Compass</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_delete.png" title="ic_menu_delete" alt="Android asset" />
+  <div class="caption">Delete</div></td>
+	
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_directions.png" title="ic_menu_directions" alt="Android asset" />
+  <div class="caption">Directions</div></td>
+	
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_edit.png" title="ic_menu_edit" alt="Android asset" />
+  <div class="caption">Edit</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_favorite.png" title="ic_menu_favorite" alt="Android asset" />
+  <div class="caption">Favorite</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_forward.png" title="ic_menu_forward" alt="Android asset" />
+  <div class="caption">Forward</div></td>
+	
+
+<td class="image-caption-i image-list">	
+  <img src="{@docRoot}images/icon_design/ic_menu_gallery.png" title="ic_menu_gallery" alt="Android asset" />
+  <div class="caption">Gallery</div></td>
+
+</tr>
+<tr>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_goto.png" title="ic_menu_goto" alt="Android asset" />
+  <div class="caption">Go to</div></td>
+	
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_help.png" title="ic_menu_help" alt="Android asset" />
+  <div class="caption">Help</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_recent_history.png" title="ic_menu_recent_history" alt="Android asset" />
+  <div class="caption">History</div></td>
+	
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_home.png" title="ic_menu_home" alt="Android asset" />
+  <div class="caption">Home</div></td>
+	
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_info_details.png" title="ic_menu_info_details" alt="Android asset" />
+  <div class="caption">Info / details</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_mapmode.png" title="ic_menu_mapmode" alt="Android asset" />
+  <div class="caption">Map mode</div></td>
+	
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_mark.png" title="ic_menu_mark" alt="Android asset" />
+  <div class="caption">Mark</div></td>
+
+</tr>
+<tr>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_mylocation.png" title="ic_menu_mylocation" alt="Android asset" />
+  <div class="caption">My Location</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_more.png" title="ic_menu_more" alt="Android asset" />
+  <div class="caption">More</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_play_clip.png" title="ic_menu_play_clip" alt="Android asset" />
+  <div class="caption">Play</div></td>
+	
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_preferences.png" title="ic_menu_preferences" alt="Android asset" />
+  <div class="caption">Preferences</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_refresh.png" title="ic_menu_refresh" alt="Android asset" />
+  <div class="caption">Refresh</div></td>
+	
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_rotate.png" title="ic_menu_rotate" alt="Android asset" />
+  <div class="caption">Rotate</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_save.png" title="ic_menu_save" alt="Android asset" />
+  <div class="caption">Save</div></td>
+
+</tr>
+<tr>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_send.png" title="ic_menu_send" alt="Android asset" />
+  <div class="caption">Send</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_search.png" title="ic_menu_search" alt="Android asset" />
+  <div class="caption">Search</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_share.png" title="ic_menu_share" alt="Android asset" />
+  <div class="caption">Share</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_shuffle.png" title="ic_menu_shuffle" alt="Android asset" />
+  <div class="caption">Shuffle</div></td>
+	
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_upload.png" title="ic_menu_upload" alt="Android asset" />
+  <div class="caption">Upload</div></td>
+	
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_view.png" title="ic_menu_view" alt="Android asset" />
+  <div class="caption">View</div></td>
+	
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_camera_video_view.png" title="ic_menu_camera_video_view" alt="Android asset" />
+  <div class="caption">Video</div></td>
+
+</tr>
+<tr>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/ic_menu_zoom.png" title="ic_menu_zoom" alt="Android asset" />
+  <div class="caption">Zoom</div></td>
+
+</tr>
+</table>
+
+
+<h3 id="statusbarapx">Standard status bar icons</h3>
+
+<p>Shown below are standard status bar icons included in the Android platform
+(as of Android 1.5). You can reference any of these icon resources from your
+application as needed, but make sure that the meaning of the icon is consistent
+with the standard meaning listed. Note that this is not a complete list of icons
+and that the actual appearance of standard icons may change across platform
+versions.</p>
+
+<p>To reference one of the icons from your code, use
+<code>android.R.drawable.&lt;icon_resource_identifier&gt;</code>. For example,
+you can construct a simple notification that references one of the icons like
+this: </p>
+
+<p style="margin-left:2em"><code>new Notification(R.drawable.stat_notify_calendar, 
+"sample text", System.currentTimeMillis());</code></p>
+
+<p>To determine the resource ID for an icon listed below, hover over the icon 
+or simply look at the image filename, which use the format 
+"&lt;icon_resource_identifier&gt;.png".</p>
+
+
+<table class="image-caption">
+<tr>
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_sys_data_connected_3g.png" title="stat_sys_data_connected_3g" alt="Android asset" />
+  <div class="caption">3G</div></td>
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_sys_signal_flightmode.png" title="stat_sys_signal_flightmode" alt="Android asset" />
+  <div class="caption">Airplane mode</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_notify_alarm.png" title="stat_notify_alarm" alt="Android asset" />
+  <div class="caption">Alarm</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_sys_data_bluetooth.png" title="stat_sys_data_bluetooth" alt="Android asset" />
+  <div class="caption">Bluetooth</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_sys_data_bluetooth_connected.png" title="stat_sys_data_bluetooth_connected" alt="Android asset" />
+  <div class="caption">Bluetooth connected</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_notify_calendar.png" title="stat_notify_calendar" alt="Android asset" />
+  <div class="caption">Calendar</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_notify_disk_full.png" title="stat_notify_disk_full" alt="Android asset" />
+  <div class="caption">Disk full</div></td>
+
+</tr>
+<tr>
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_sys_data_connected_e.png" title="stat_sys_data_connected_e" alt="Android asset" />
+  <div class="caption">EDGE</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_notify_email_generic.png" title="stat_notify_email_generic" alt="Android asset" />
+  <div class="caption">Email</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_notify_email.png" title="stat_notify_email" alt="Android asset" />
+  <div class="caption">Gmail</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_sys_data_connected_g.png" title="stat_sys_data_connected_g" alt="Android asset" />
+  <div class="caption">GPRS</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_notify_chat.png" title="stat_notify_chat" alt="Android asset" />
+  <div class="caption">IM</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_sys_install_complete.png" title="stat_sys_install_complete" alt="Android asset" />
+  <div class="caption">Installation complete</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_notify_musicplayer.png" title="stat_notify_musicplayer" alt="Android asset" />
+  <div class="caption">Music</div></td>
+
+</tr>
+<tr>
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_sys_r_signal_4.png" title="stat_sys_r_signal_4" alt="Android asset" />
+  <div class="caption">Roaming</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_sys_signal_4.png" title="stat_sys_signal_4" alt="Android asset" />
+  <div class="caption">Signal</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_sys_signal_null.png" title="stat_sys_signal_null" alt="Android asset" />
+  <div class="caption">Signal unavailable</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_sys_ringer_silent_old.png" title="stat_sys_ringer_silent_old" alt="Android asset" />
+  <div class="caption">Silent mode</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_notify_sms.png" title="stat_notify_sms" alt="Android asset" />
+  <div class="caption">SMS/MMS</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_sys_speakerphone.png" title="stat_sys_speakerphone" alt="Android asset" />
+  <div class="caption">Speaker phone</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_notify_sync_anim0.png" title="stat_notify_sync_anim0" alt="Android asset" />
+  <div class="caption">Sync</div></td>
+
+</tr>
+<tr>
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_notify_sync_error.png" title="stat_notify_sync_error" alt="Android asset" />
+  <div class="caption">Sync error</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_sys_data_usb.png" title="stat_sys_data_usb" alt="Android asset" />
+  <div class="caption">USB connected</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_sys_ringer_vibrate.png" title="stat_sys_ringer_vibrate" alt="Android asset" />
+  <div class="caption">Vibrate</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_notify_voicemail.png" title="stat_notify_voicemail" alt="Android asset" />
+  <div class="caption">Voicemail</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_sys_warning.png" title="stat_sys_warning" alt="Android asset" />
+  <div class="caption">Warning</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_sys_wifi_signal_4.png" title="stat_sys_wifi_signal_4" alt="Android asset" />
+  <div class="caption">WiFi</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_notify_wifi_in_range.png" title="stat_notify_wifi_in_range" alt="Android asset" />
+  <div class="caption">WiFi network available</div></td>
+
+</tr>
+<tr>
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_sys_wifi_unavailable.png" title="stat_sys_wifi_unavailable" alt="Android asset" />
+  <div class="caption">WiFi unavailable</div></td>
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_sys_battery_100.png" title="stat_sys_battery_100" alt="Android asset" />
+  <div class="caption">Battery 100%</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_sys_battery_empty.png" title="stat_sys_battery_empty" alt="Android asset" />
+  <div class="caption">Battery empty</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_sys_phone_call.png" title="stat_sys_phone_call" alt="Android asset" />
+  <div class="caption">Call</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_sys_phone_call_forward.png" title="stat_sys_phone_call_forward" alt="Android asset" />
+  <div class="caption">Call forward</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_sys_phone_call_on_hold.png" title="stat_sys_phone_call_on_hold" alt="Android asset" />
+  <div class="caption">Call on hold</div></td>
+
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_sys_gps_on.png" title="stat_sys_gps_on" alt="Android asset" />
+  <div class="caption">GPS on</div></td>
+
+</tr>
+<tr>
+
+<td class="image-caption-i image-list">
+  <img src="{@docRoot}images/icon_design/stat_notify_missed_call.png" title="stat_notify_missed_call" alt="Android asset" />
+  <div class="caption">Missed call</div></td>
+
+</tr>
+</table>
+
+
diff --git a/docs/html/guide/practices/ui_guidelines/index.jd b/docs/html/guide/practices/ui_guidelines/index.jd
index e19d5b4..61e310a 100644
--- a/docs/html/guide/practices/ui_guidelines/index.jd
+++ b/docs/html/guide/practices/ui_guidelines/index.jd
@@ -6,18 +6,27 @@
 
 
 <p>The Android UI team has begun developing guidelines for the interaction and
-design of Android applications. Look here for articles that describe these
-visual guidelines as we release them.</p>
+visual design of Android applications. Look here for articles that describe
+these guidelines as we release them.</p>
 
-    
+ <dl>
+  <dt><a href="{@docRoot}guide/practices/ui_guidelines/icon_design.html">Icon
+Design Guidelines</a> and <a
+href="{@docRoot}shareables/icon_templates-v1.0.zip">Android Icon Templates Pack
+&raquo; </a></dt>
+  <dd>Your applications need a wide variety of icons, from a launcher icon to
+icons in menus, dialogs, tabs, the status bar, and lists. The Icon Guidelines
+describe each kind of icon in detail, with specifications for the size, color,
+shading, and other details for making all your icons fit in the Android system.
+The Icon Templates Pack is an archive of Photoshop and Illustrator templates and
+filters that make it much simpler to create conforming icons.</dd>
+</dl>
  <dl>
   <dt><a href="widget_design.html">Widget Design Guidelines</a> </dt>
-  <dd>Widgets are a new feature introduced in Cupcake. A widget displays
-an application's most important or timely information at a glance, on a user's
-Home screen. These design guidelines describe how to design widgets that fit
-with others on the Home screen. They include links to graphics files and
-templates that will make your designer's life easier.</dd>
-
+  <dd>A widget displays an application's most important or timely information
+at a glance, on a user's Home screen. These design guidelines describe how to
+design widgets that fit with others on the Home screen. They include links to
+graphics files and templates that will make your designer's life easier.</dd>
 </dl>
 
 
diff --git a/docs/html/images/icon_design/dialog_icon.png b/docs/html/images/icon_design/dialog_icon.png
new file mode 100644
index 0000000..9f92422
--- /dev/null
+++ b/docs/html/images/icon_design/dialog_icon.png
Binary files differ
diff --git a/docs/html/images/icon_design/dialog_light.png b/docs/html/images/icon_design/dialog_light.png
new file mode 100644
index 0000000..85056a9
--- /dev/null
+++ b/docs/html/images/icon_design/dialog_light.png
Binary files differ
diff --git a/docs/html/images/icon_design/do_dont.png b/docs/html/images/icon_design/do_dont.png
new file mode 100644
index 0000000..bc6d649
--- /dev/null
+++ b/docs/html/images/icon_design/do_dont.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_launcher_IM.png b/docs/html/images/icon_design/ic_launcher_IM.png
new file mode 100644
index 0000000..afc35a2
--- /dev/null
+++ b/docs/html/images/icon_design/ic_launcher_IM.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_launcher_alarmclock.png b/docs/html/images/icon_design/ic_launcher_alarmclock.png
new file mode 100644
index 0000000..30ff267
--- /dev/null
+++ b/docs/html/images/icon_design/ic_launcher_alarmclock.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_launcher_browser.png b/docs/html/images/icon_design/ic_launcher_browser.png
new file mode 100644
index 0000000..f58b84a
--- /dev/null
+++ b/docs/html/images/icon_design/ic_launcher_browser.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_launcher_calculator.png b/docs/html/images/icon_design/ic_launcher_calculator.png
new file mode 100644
index 0000000..298c267
--- /dev/null
+++ b/docs/html/images/icon_design/ic_launcher_calculator.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_launcher_calendar.png b/docs/html/images/icon_design/ic_launcher_calendar.png
new file mode 100644
index 0000000..9241090
--- /dev/null
+++ b/docs/html/images/icon_design/ic_launcher_calendar.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_launcher_camera.png b/docs/html/images/icon_design/ic_launcher_camera.png
new file mode 100644
index 0000000..c2d7606
--- /dev/null
+++ b/docs/html/images/icon_design/ic_launcher_camera.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_launcher_contacts.png b/docs/html/images/icon_design/ic_launcher_contacts.png
new file mode 100644
index 0000000..826656f
--- /dev/null
+++ b/docs/html/images/icon_design/ic_launcher_contacts.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_launcher_email.png b/docs/html/images/icon_design/ic_launcher_email.png
new file mode 100644
index 0000000..2fb2637
--- /dev/null
+++ b/docs/html/images/icon_design/ic_launcher_email.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_launcher_email_generic.png b/docs/html/images/icon_design/ic_launcher_email_generic.png
new file mode 100644
index 0000000..590ed70
--- /dev/null
+++ b/docs/html/images/icon_design/ic_launcher_email_generic.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_launcher_gallery.png b/docs/html/images/icon_design/ic_launcher_gallery.png
new file mode 100644
index 0000000..965fb71
--- /dev/null
+++ b/docs/html/images/icon_design/ic_launcher_gallery.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_launcher_generic_application.png b/docs/html/images/icon_design/ic_launcher_generic_application.png
new file mode 100644
index 0000000..75024841
--- /dev/null
+++ b/docs/html/images/icon_design/ic_launcher_generic_application.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_launcher_google_talk.png b/docs/html/images/icon_design/ic_launcher_google_talk.png
new file mode 100644
index 0000000..1618eb3
--- /dev/null
+++ b/docs/html/images/icon_design/ic_launcher_google_talk.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_launcher_maps.png b/docs/html/images/icon_design/ic_launcher_maps.png
new file mode 100644
index 0000000..f436b56
--- /dev/null
+++ b/docs/html/images/icon_design/ic_launcher_maps.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_launcher_marketplace.png b/docs/html/images/icon_design/ic_launcher_marketplace.png
new file mode 100644
index 0000000..f1f578d
--- /dev/null
+++ b/docs/html/images/icon_design/ic_launcher_marketplace.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_launcher_musicplayer_2.png b/docs/html/images/icon_design/ic_launcher_musicplayer_2.png
new file mode 100644
index 0000000..0353b91
--- /dev/null
+++ b/docs/html/images/icon_design/ic_launcher_musicplayer_2.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_launcher_phone_dialer.png b/docs/html/images/icon_design/ic_launcher_phone_dialer.png
new file mode 100644
index 0000000..4e613ec
--- /dev/null
+++ b/docs/html/images/icon_design/ic_launcher_phone_dialer.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_launcher_settings.png b/docs/html/images/icon_design/ic_launcher_settings.png
new file mode 100644
index 0000000..16db056
--- /dev/null
+++ b/docs/html/images/icon_design/ic_launcher_settings.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_launcher_sms_mms.png b/docs/html/images/icon_design/ic_launcher_sms_mms.png
new file mode 100644
index 0000000..e2ac784
--- /dev/null
+++ b/docs/html/images/icon_design/ic_launcher_sms_mms.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_launcher_video_camera.png b/docs/html/images/icon_design/ic_launcher_video_camera.png
new file mode 100644
index 0000000..e80255a
--- /dev/null
+++ b/docs/html/images/icon_design/ic_launcher_video_camera.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_launcher_voicedial.png b/docs/html/images/icon_design/ic_launcher_voicedial.png
new file mode 100644
index 0000000..0c84fba
--- /dev/null
+++ b/docs/html/images/icon_design/ic_launcher_voicedial.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_launcher_voicesearch.png b/docs/html/images/icon_design/ic_launcher_voicesearch.png
new file mode 100644
index 0000000..09d5199
--- /dev/null
+++ b/docs/html/images/icon_design/ic_launcher_voicesearch.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_launcher_youtube.png b/docs/html/images/icon_design/ic_launcher_youtube.png
new file mode 100644
index 0000000..48d268d
--- /dev/null
+++ b/docs/html/images/icon_design/ic_launcher_youtube.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_add.png b/docs/html/images/icon_design/ic_menu_add.png
new file mode 100644
index 0000000..6752bfd
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_add.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_archive.png b/docs/html/images/icon_design/ic_menu_archive.png
new file mode 100644
index 0000000..a4599e3
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_archive.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_attachment.png b/docs/html/images/icon_design/ic_menu_attachment.png
new file mode 100644
index 0000000..89d626f
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_attachment.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_back.png b/docs/html/images/icon_design/ic_menu_back.png
new file mode 100644
index 0000000..5ce50eb
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_back.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_call.png b/docs/html/images/icon_design/ic_menu_call.png
new file mode 100644
index 0000000..a63f86b
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_call.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_camera.png b/docs/html/images/icon_design/ic_menu_camera.png
new file mode 100644
index 0000000..cdf7ca3
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_camera.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_camera_video_view.png b/docs/html/images/icon_design/ic_menu_camera_video_view.png
new file mode 100644
index 0000000..f7e52c2
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_camera_video_view.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_close_clear_cancel.png b/docs/html/images/icon_design/ic_menu_close_clear_cancel.png
new file mode 100644
index 0000000..619858c
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_close_clear_cancel.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_compass.png b/docs/html/images/icon_design/ic_menu_compass.png
new file mode 100644
index 0000000..7717dde
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_compass.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_delete.png b/docs/html/images/icon_design/ic_menu_delete.png
new file mode 100644
index 0000000..7d95494
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_delete.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_directions.png b/docs/html/images/icon_design/ic_menu_directions.png
new file mode 100644
index 0000000..67d3ff2
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_directions.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_edit.png b/docs/html/images/icon_design/ic_menu_edit.png
new file mode 100644
index 0000000..41a9c2e
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_edit.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_favorite.png b/docs/html/images/icon_design/ic_menu_favorite.png
new file mode 100644
index 0000000..527d74a
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_favorite.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_forward.png b/docs/html/images/icon_design/ic_menu_forward.png
new file mode 100644
index 0000000..0936fac
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_forward.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_gallery.png b/docs/html/images/icon_design/ic_menu_gallery.png
new file mode 100644
index 0000000..f61bbd8
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_gallery.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_goto.png b/docs/html/images/icon_design/ic_menu_goto.png
new file mode 100644
index 0000000..40183eb
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_goto.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_help.png b/docs/html/images/icon_design/ic_menu_help.png
new file mode 100644
index 0000000..7c55dfd
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_help.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_home.png b/docs/html/images/icon_design/ic_menu_home.png
new file mode 100644
index 0000000..34943f6
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_home.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_info_details.png b/docs/html/images/icon_design/ic_menu_info_details.png
new file mode 100644
index 0000000..1786d1e
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_info_details.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_mapmode.png b/docs/html/images/icon_design/ic_menu_mapmode.png
new file mode 100644
index 0000000..d85cab5
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_mapmode.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_mark.png b/docs/html/images/icon_design/ic_menu_mark.png
new file mode 100644
index 0000000..5e95da7
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_mark.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_more.png b/docs/html/images/icon_design/ic_menu_more.png
new file mode 100644
index 0000000..2091527
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_more.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_mylocation.png b/docs/html/images/icon_design/ic_menu_mylocation.png
new file mode 100644
index 0000000..14b0af8
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_mylocation.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_play_clip.png b/docs/html/images/icon_design/ic_menu_play_clip.png
new file mode 100644
index 0000000..4669947
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_play_clip.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_preferences.png b/docs/html/images/icon_design/ic_menu_preferences.png
new file mode 100644
index 0000000..b8e7141
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_preferences.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_recent_history.png b/docs/html/images/icon_design/ic_menu_recent_history.png
new file mode 100644
index 0000000..4ccae5d
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_recent_history.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_refresh.png b/docs/html/images/icon_design/ic_menu_refresh.png
new file mode 100644
index 0000000..77d70dd
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_refresh.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_rotate.png b/docs/html/images/icon_design/ic_menu_rotate.png
new file mode 100644
index 0000000..27368b2
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_rotate.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_save.png b/docs/html/images/icon_design/ic_menu_save.png
new file mode 100644
index 0000000..36d50b3
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_save.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_search.png b/docs/html/images/icon_design/ic_menu_search.png
new file mode 100644
index 0000000..94446db
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_search.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_send.png b/docs/html/images/icon_design/ic_menu_send.png
new file mode 100644
index 0000000..74c096d
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_send.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_share.png b/docs/html/images/icon_design/ic_menu_share.png
new file mode 100644
index 0000000..44db9b1
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_share.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_shuffle.png b/docs/html/images/icon_design/ic_menu_shuffle.png
new file mode 100644
index 0000000..cb7009d
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_shuffle.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_upload.png b/docs/html/images/icon_design/ic_menu_upload.png
new file mode 100644
index 0000000..1c0dd3f
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_upload.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_view.png b/docs/html/images/icon_design/ic_menu_view.png
new file mode 100644
index 0000000..69828a9
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_view.png
Binary files differ
diff --git a/docs/html/images/icon_design/ic_menu_zoom.png b/docs/html/images/icon_design/ic_menu_zoom.png
new file mode 100644
index 0000000..0b8c4e8
--- /dev/null
+++ b/docs/html/images/icon_design/ic_menu_zoom.png
Binary files differ
diff --git a/docs/html/images/icon_design/icon_guidelines_logo.png b/docs/html/images/icon_design/icon_guidelines_logo.png
new file mode 100644
index 0000000..9362c8f
--- /dev/null
+++ b/docs/html/images/icon_design/icon_guidelines_logo.png
Binary files differ
diff --git a/docs/html/images/icon_design/launcher_light.png b/docs/html/images/icon_design/launcher_light.png
new file mode 100644
index 0000000..8a94e1d
--- /dev/null
+++ b/docs/html/images/icon_design/launcher_light.png
Binary files differ
diff --git a/docs/html/images/icon_design/launcher_palette_black.png b/docs/html/images/icon_design/launcher_palette_black.png
new file mode 100644
index 0000000..fba096f
--- /dev/null
+++ b/docs/html/images/icon_design/launcher_palette_black.png
Binary files differ
diff --git a/docs/html/images/icon_design/launcher_palette_dark.png b/docs/html/images/icon_design/launcher_palette_dark.png
new file mode 100644
index 0000000..3735542
--- /dev/null
+++ b/docs/html/images/icon_design/launcher_palette_dark.png
Binary files differ
diff --git a/docs/html/images/icon_design/launcher_palette_gradient_dark.png b/docs/html/images/icon_design/launcher_palette_gradient_dark.png
new file mode 100644
index 0000000..3735542
--- /dev/null
+++ b/docs/html/images/icon_design/launcher_palette_gradient_dark.png
Binary files differ
diff --git a/docs/html/images/icon_design/launcher_palette_gradient_light.png b/docs/html/images/icon_design/launcher_palette_gradient_light.png
new file mode 100644
index 0000000..f1121eb
--- /dev/null
+++ b/docs/html/images/icon_design/launcher_palette_gradient_light.png
Binary files differ
diff --git a/docs/html/images/icon_design/launcher_palette_gradient_medium.png b/docs/html/images/icon_design/launcher_palette_gradient_medium.png
new file mode 100644
index 0000000..1442b17
--- /dev/null
+++ b/docs/html/images/icon_design/launcher_palette_gradient_medium.png
Binary files differ
diff --git a/docs/html/images/icon_design/launcher_palette_light.png b/docs/html/images/icon_design/launcher_palette_light.png
new file mode 100644
index 0000000..f1121eb
--- /dev/null
+++ b/docs/html/images/icon_design/launcher_palette_light.png
Binary files differ
diff --git a/docs/html/images/icon_design/launcher_palette_medium.png b/docs/html/images/icon_design/launcher_palette_medium.png
new file mode 100644
index 0000000..1442b17
--- /dev/null
+++ b/docs/html/images/icon_design/launcher_palette_medium.png
Binary files differ
diff --git a/docs/html/images/icon_design/launcher_palette_white.png b/docs/html/images/icon_design/launcher_palette_white.png
new file mode 100644
index 0000000..8d7ac41
--- /dev/null
+++ b/docs/html/images/icon_design/launcher_palette_white.png
Binary files differ
diff --git a/docs/html/images/icon_design/launcher_structure.png b/docs/html/images/icon_design/launcher_structure.png
new file mode 100644
index 0000000..53e4d9a
--- /dev/null
+++ b/docs/html/images/icon_design/launcher_structure.png
Binary files differ
diff --git a/docs/html/images/icon_design/listview_icon.png b/docs/html/images/icon_design/listview_icon.png
new file mode 100644
index 0000000..5711d88
--- /dev/null
+++ b/docs/html/images/icon_design/listview_icon.png
Binary files differ
diff --git a/docs/html/images/icon_design/listview_icon_details.png b/docs/html/images/icon_design/listview_icon_details.png
new file mode 100644
index 0000000..5a68416
--- /dev/null
+++ b/docs/html/images/icon_design/listview_icon_details.png
Binary files differ
diff --git a/docs/html/images/icon_design/menu_light.png b/docs/html/images/icon_design/menu_light.png
new file mode 100644
index 0000000..93ed38b
--- /dev/null
+++ b/docs/html/images/icon_design/menu_light.png
Binary files differ
diff --git a/docs/html/images/icon_design/menu_palette_black.png b/docs/html/images/icon_design/menu_palette_black.png
new file mode 100644
index 0000000..fba096f
--- /dev/null
+++ b/docs/html/images/icon_design/menu_palette_black.png
Binary files differ
diff --git a/docs/html/images/icon_design/menu_palette_fill.png b/docs/html/images/icon_design/menu_palette_fill.png
new file mode 100644
index 0000000..7079bda
--- /dev/null
+++ b/docs/html/images/icon_design/menu_palette_fill.png
Binary files differ
diff --git a/docs/html/images/icon_design/menu_palette_gradient_medium.png b/docs/html/images/icon_design/menu_palette_gradient_medium.png
new file mode 100644
index 0000000..a806adb
--- /dev/null
+++ b/docs/html/images/icon_design/menu_palette_gradient_medium.png
Binary files differ
diff --git a/docs/html/images/icon_design/menu_palette_white.png b/docs/html/images/icon_design/menu_palette_white.png
new file mode 100644
index 0000000..8d7ac41
--- /dev/null
+++ b/docs/html/images/icon_design/menu_palette_white.png
Binary files differ
diff --git a/docs/html/images/icon_design/menu_structure.png b/docs/html/images/icon_design/menu_structure.png
new file mode 100644
index 0000000..ab14015
--- /dev/null
+++ b/docs/html/images/icon_design/menu_structure.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_notify_alarm.png b/docs/html/images/icon_design/stat_notify_alarm.png
new file mode 100644
index 0000000..1b01b85
--- /dev/null
+++ b/docs/html/images/icon_design/stat_notify_alarm.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_notify_calendar.png b/docs/html/images/icon_design/stat_notify_calendar.png
new file mode 100644
index 0000000..4433a16
--- /dev/null
+++ b/docs/html/images/icon_design/stat_notify_calendar.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_notify_chat.png b/docs/html/images/icon_design/stat_notify_chat.png
new file mode 100644
index 0000000..238f043
--- /dev/null
+++ b/docs/html/images/icon_design/stat_notify_chat.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_notify_disk_full.png b/docs/html/images/icon_design/stat_notify_disk_full.png
new file mode 100644
index 0000000..9120f00
--- /dev/null
+++ b/docs/html/images/icon_design/stat_notify_disk_full.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_notify_email.png b/docs/html/images/icon_design/stat_notify_email.png
new file mode 100644
index 0000000..d84a247
--- /dev/null
+++ b/docs/html/images/icon_design/stat_notify_email.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_notify_email_generic.png b/docs/html/images/icon_design/stat_notify_email_generic.png
new file mode 100644
index 0000000..686033f
--- /dev/null
+++ b/docs/html/images/icon_design/stat_notify_email_generic.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_notify_missed_call.png b/docs/html/images/icon_design/stat_notify_missed_call.png
new file mode 100644
index 0000000..fe746b3
--- /dev/null
+++ b/docs/html/images/icon_design/stat_notify_missed_call.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_notify_musicplayer.png b/docs/html/images/icon_design/stat_notify_musicplayer.png
new file mode 100644
index 0000000..fd92c18
--- /dev/null
+++ b/docs/html/images/icon_design/stat_notify_musicplayer.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_notify_sms.png b/docs/html/images/icon_design/stat_notify_sms.png
new file mode 100644
index 0000000..b437d5b
--- /dev/null
+++ b/docs/html/images/icon_design/stat_notify_sms.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_notify_sync_anim0.png b/docs/html/images/icon_design/stat_notify_sync_anim0.png
new file mode 100644
index 0000000..0edf692
--- /dev/null
+++ b/docs/html/images/icon_design/stat_notify_sync_anim0.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_notify_sync_error.png b/docs/html/images/icon_design/stat_notify_sync_error.png
new file mode 100644
index 0000000..3078b8c
--- /dev/null
+++ b/docs/html/images/icon_design/stat_notify_sync_error.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_notify_voicemail.png b/docs/html/images/icon_design/stat_notify_voicemail.png
new file mode 100644
index 0000000..658fa05
--- /dev/null
+++ b/docs/html/images/icon_design/stat_notify_voicemail.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_notify_wifi_in_range.png b/docs/html/images/icon_design/stat_notify_wifi_in_range.png
new file mode 100644
index 0000000..e9c74b4
--- /dev/null
+++ b/docs/html/images/icon_design/stat_notify_wifi_in_range.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_sys_battery_100.png b/docs/html/images/icon_design/stat_sys_battery_100.png
new file mode 100644
index 0000000..d280aeb
--- /dev/null
+++ b/docs/html/images/icon_design/stat_sys_battery_100.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_sys_battery_empty.png b/docs/html/images/icon_design/stat_sys_battery_empty.png
new file mode 100644
index 0000000..4a5e99e
--- /dev/null
+++ b/docs/html/images/icon_design/stat_sys_battery_empty.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_sys_data_bluetooth.png b/docs/html/images/icon_design/stat_sys_data_bluetooth.png
new file mode 100644
index 0000000..7a8b78f
--- /dev/null
+++ b/docs/html/images/icon_design/stat_sys_data_bluetooth.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_sys_data_bluetooth_connected.png b/docs/html/images/icon_design/stat_sys_data_bluetooth_connected.png
new file mode 100644
index 0000000..f09b83b
--- /dev/null
+++ b/docs/html/images/icon_design/stat_sys_data_bluetooth_connected.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_sys_data_connected_3g.png b/docs/html/images/icon_design/stat_sys_data_connected_3g.png
new file mode 100644
index 0000000..a109280
--- /dev/null
+++ b/docs/html/images/icon_design/stat_sys_data_connected_3g.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_sys_data_connected_e.png b/docs/html/images/icon_design/stat_sys_data_connected_e.png
new file mode 100644
index 0000000..c552644
--- /dev/null
+++ b/docs/html/images/icon_design/stat_sys_data_connected_e.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_sys_data_connected_g.png b/docs/html/images/icon_design/stat_sys_data_connected_g.png
new file mode 100644
index 0000000..f7edb49
--- /dev/null
+++ b/docs/html/images/icon_design/stat_sys_data_connected_g.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_sys_data_usb.png b/docs/html/images/icon_design/stat_sys_data_usb.png
new file mode 100644
index 0000000..2d0da4c
--- /dev/null
+++ b/docs/html/images/icon_design/stat_sys_data_usb.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_sys_gps_on.png b/docs/html/images/icon_design/stat_sys_gps_on.png
new file mode 100644
index 0000000..a2c677d
--- /dev/null
+++ b/docs/html/images/icon_design/stat_sys_gps_on.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_sys_install_complete.png b/docs/html/images/icon_design/stat_sys_install_complete.png
new file mode 100644
index 0000000..62dba5b
--- /dev/null
+++ b/docs/html/images/icon_design/stat_sys_install_complete.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_sys_phone_call.png b/docs/html/images/icon_design/stat_sys_phone_call.png
new file mode 100644
index 0000000..ad53693
--- /dev/null
+++ b/docs/html/images/icon_design/stat_sys_phone_call.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_sys_phone_call_forward.png b/docs/html/images/icon_design/stat_sys_phone_call_forward.png
new file mode 100644
index 0000000..ed4b6ec
--- /dev/null
+++ b/docs/html/images/icon_design/stat_sys_phone_call_forward.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_sys_phone_call_on_hold.png b/docs/html/images/icon_design/stat_sys_phone_call_on_hold.png
new file mode 100644
index 0000000..9216447
--- /dev/null
+++ b/docs/html/images/icon_design/stat_sys_phone_call_on_hold.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_sys_r_signal_4.png b/docs/html/images/icon_design/stat_sys_r_signal_4.png
new file mode 100644
index 0000000..f04fb11
--- /dev/null
+++ b/docs/html/images/icon_design/stat_sys_r_signal_4.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_sys_ringer_silent_old.png b/docs/html/images/icon_design/stat_sys_ringer_silent_old.png
new file mode 100644
index 0000000..d125ce5
--- /dev/null
+++ b/docs/html/images/icon_design/stat_sys_ringer_silent_old.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_sys_ringer_vibrate.png b/docs/html/images/icon_design/stat_sys_ringer_vibrate.png
new file mode 100644
index 0000000..665ca38
--- /dev/null
+++ b/docs/html/images/icon_design/stat_sys_ringer_vibrate.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_sys_signal_4.png b/docs/html/images/icon_design/stat_sys_signal_4.png
new file mode 100644
index 0000000..a3320cb
--- /dev/null
+++ b/docs/html/images/icon_design/stat_sys_signal_4.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_sys_signal_flightmode.png b/docs/html/images/icon_design/stat_sys_signal_flightmode.png
new file mode 100644
index 0000000..516ec2f
--- /dev/null
+++ b/docs/html/images/icon_design/stat_sys_signal_flightmode.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_sys_signal_null.png b/docs/html/images/icon_design/stat_sys_signal_null.png
new file mode 100644
index 0000000..5aa23f6
--- /dev/null
+++ b/docs/html/images/icon_design/stat_sys_signal_null.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_sys_speakerphone.png b/docs/html/images/icon_design/stat_sys_speakerphone.png
new file mode 100644
index 0000000..642dfd4
--- /dev/null
+++ b/docs/html/images/icon_design/stat_sys_speakerphone.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_sys_warning.png b/docs/html/images/icon_design/stat_sys_warning.png
new file mode 100644
index 0000000..be00f47
--- /dev/null
+++ b/docs/html/images/icon_design/stat_sys_warning.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_sys_wifi_signal_4.png b/docs/html/images/icon_design/stat_sys_wifi_signal_4.png
new file mode 100644
index 0000000..2062aad
--- /dev/null
+++ b/docs/html/images/icon_design/stat_sys_wifi_signal_4.png
Binary files differ
diff --git a/docs/html/images/icon_design/stat_sys_wifi_unavailable.png b/docs/html/images/icon_design/stat_sys_wifi_unavailable.png
new file mode 100644
index 0000000..53dd45b
--- /dev/null
+++ b/docs/html/images/icon_design/stat_sys_wifi_unavailable.png
Binary files differ
diff --git a/docs/html/images/icon_design/statusbar_light.png b/docs/html/images/icon_design/statusbar_light.png
new file mode 100644
index 0000000..ddebc2d
--- /dev/null
+++ b/docs/html/images/icon_design/statusbar_light.png
Binary files differ
diff --git a/docs/html/images/icon_design/statusbar_palette_black.png b/docs/html/images/icon_design/statusbar_palette_black.png
new file mode 100644
index 0000000..fba096f
--- /dev/null
+++ b/docs/html/images/icon_design/statusbar_palette_black.png
Binary files differ
diff --git a/docs/html/images/icon_design/statusbar_palette_fill.png b/docs/html/images/icon_design/statusbar_palette_fill.png
new file mode 100644
index 0000000..bbf652c
--- /dev/null
+++ b/docs/html/images/icon_design/statusbar_palette_fill.png
Binary files differ
diff --git a/docs/html/images/icon_design/statusbar_palette_grey.png b/docs/html/images/icon_design/statusbar_palette_grey.png
new file mode 100644
index 0000000..0abb7f4
--- /dev/null
+++ b/docs/html/images/icon_design/statusbar_palette_grey.png
Binary files differ
diff --git a/docs/html/images/icon_design/statusbar_palette_white.png b/docs/html/images/icon_design/statusbar_palette_white.png
new file mode 100644
index 0000000..8d7ac41
--- /dev/null
+++ b/docs/html/images/icon_design/statusbar_palette_white.png
Binary files differ
diff --git a/docs/html/images/icon_design/statusbar_structure.png b/docs/html/images/icon_design/statusbar_structure.png
new file mode 100644
index 0000000..e7243ee
--- /dev/null
+++ b/docs/html/images/icon_design/statusbar_structure.png
Binary files differ
diff --git a/docs/html/images/icon_design/tab_icon_selected.png b/docs/html/images/icon_design/tab_icon_selected.png
new file mode 100644
index 0000000..66a8475
--- /dev/null
+++ b/docs/html/images/icon_design/tab_icon_selected.png
Binary files differ
diff --git a/docs/html/images/icon_design/tab_icon_unselected.png b/docs/html/images/icon_design/tab_icon_unselected.png
new file mode 100644
index 0000000..80ae9c1
--- /dev/null
+++ b/docs/html/images/icon_design/tab_icon_unselected.png
Binary files differ
diff --git a/docs/html/images/icon_design/tab_palette_selected_fill.png b/docs/html/images/icon_design/tab_palette_selected_fill.png
new file mode 100644
index 0000000..7079bda
--- /dev/null
+++ b/docs/html/images/icon_design/tab_palette_selected_fill.png
Binary files differ
diff --git a/docs/html/images/icon_design/tab_selected_light.png b/docs/html/images/icon_design/tab_selected_light.png
new file mode 100644
index 0000000..3a87c5b
--- /dev/null
+++ b/docs/html/images/icon_design/tab_selected_light.png
Binary files differ
diff --git a/docs/html/images/icon_design/tab_unselected_light.png b/docs/html/images/icon_design/tab_unselected_light.png
new file mode 100644
index 0000000..f888161
--- /dev/null
+++ b/docs/html/images/icon_design/tab_unselected_light.png
Binary files differ
diff --git a/docs/html/robots.txt b/docs/html/robots.txt
index 085b79d..7046373 100644
--- a/docs/html/robots.txt
+++ b/docs/html/robots.txt
@@ -1,7 +1,8 @@
-User-Agent: *

-Allow: /

-Disallow: /gae_shell/

-Disallow: /assets/

-Disallow: /images/

-Disallow: /sdk/preview/

-Sitemap: http://developer.android.com/sitemap.txt

+User-Agent: *
+Allow: /
+Disallow: /gae_shell/
+Disallow: /assets/
+Disallow: /images/
+Disallow: /sdk/preview/
+Disallow: /shareables/
+Sitemap: http://developer.android.com/sitemap.txt
diff --git a/docs/html/sdk/1.5_r1/index.jd b/docs/html/sdk/1.5_r1/index.jd
index 438ee4b..405f56c 100644
--- a/docs/html/sdk/1.5_r1/index.jd
+++ b/docs/html/sdk/1.5_r1/index.jd
@@ -1,6 +1,7 @@
 sdk.version=1.5
 sdk.rel.id=1
 sdk.date=April 2009
+sdk.not_latest_version=true
 
 sdk.win_download=android-sdk-windows-1.5_r1.zip
 sdk.win_bytes=176263368
diff --git a/docs/html/shareables/icon_templates-v1.0.zip b/docs/html/shareables/icon_templates-v1.0.zip
new file mode 100644
index 0000000..3e64f9aa
--- /dev/null
+++ b/docs/html/shareables/icon_templates-v1.0.zip
Binary files differ
diff --git a/docs/html/sitemap.txt b/docs/html/sitemap.txt
index 5bb8cae..a227d09 100644
--- a/docs/html/sitemap.txt
+++ b/docs/html/sitemap.txt
@@ -75,6 +75,7 @@
 http://developer.android.com/guide/publishing/preparing.html
 http://developer.android.com/guide/publishing/publishing.html
 http://developer.android.com/guide/practices/ui_guidelines/index.html
+http://developer.android.com/guide/practices/ui_guidelines/icon_design.html
 http://developer.android.com/guide/practices/ui_guidelines/widget_design.html
 http://developer.android.com/guide/practices/design/performance.html
 http://developer.android.com/guide/practices/design/responsiveness.html
diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h
index 6aa40d00..3694803 100644
--- a/include/media/AudioRecord.h
+++ b/include/media/AudioRecord.h
@@ -39,10 +39,15 @@
 {
 public:
 
-    enum stream_type {
+    // input sources values must always be defined in the range
+    // [AudioRecord::DEFAULT_INPUT, AudioRecord::NUM_INPUT_SOURCES[
+    enum input_source {
         DEFAULT_INPUT   =-1,
         MIC_INPUT       = 0,
-        NUM_STREAM_TYPES
+        VOICE_UPLINK_INPUT = 1,
+        VOICE_DOWNLINK_INPUT = 2,
+        VOICE_CALL_INPUT = 3,
+        NUM_INPUT_SOURCES
     };
 
     static const int DEFAULT_SAMPLE_RATE = 8000;
@@ -118,7 +123,7 @@
      *
      * Parameters:
      *
-     * streamType:         Select the audio input to record to (e.g. AudioRecord::MIC_INPUT).
+     * inputSource:        Select the audio input to record to (e.g. AudioRecord::MIC_INPUT).
      * sampleRate:         Track sampling rate in Hz.
      * format:             PCM sample format (e.g AudioSystem::PCM_16_BIT for signed
      *                     16 bits per sample).
@@ -140,7 +145,7 @@
          RECORD_IIR_ENABLE = AudioSystem::TX_IIR_ENABLE
      };
 
-                        AudioRecord(int streamType,
+                        AudioRecord(int inputSource,
                                     uint32_t sampleRate = 0,
                                     int format          = 0,
                                     int channelCount    = 0,
@@ -165,7 +170,7 @@
      *  - NO_INIT: audio server or audio hardware not initialized
      *  - PERMISSION_DENIED: recording is not allowed for the requesting process
      * */
-            status_t    set(int streamType      = 0,
+            status_t    set(int inputSource     = 0,
                             uint32_t sampleRate = 0,
                             int format          = 0,
                             int channelCount    = 0,
@@ -197,6 +202,7 @@
             int         channelCount() const;
             uint32_t    frameCount() const;
             int         frameSize() const;
+            int         inputSource() const;
 
 
     /* After it's created the track is not active. Call start() to
@@ -323,7 +329,8 @@
     audio_track_cblk_t*     mCblk;
     uint8_t                 mFormat;
     uint8_t                 mChannelCount;
-    uint8_t                 mReserved[2];
+    uint8_t                 mInputSource;
+    uint8_t                 mReserved;
     status_t                mStatus;
     uint32_t                mLatency;
 
diff --git a/include/media/IAudioFlinger.h b/include/media/IAudioFlinger.h
index 6f13fe0..3e59d85 100644
--- a/include/media/IAudioFlinger.h
+++ b/include/media/IAudioFlinger.h
@@ -54,7 +54,7 @@
 
     virtual sp<IAudioRecord> openRecord(
                                 pid_t pid,
-                                int streamType,
+                                int inputSource,
                                 uint32_t sampleRate,
                                 int format,
                                 int channelCount,
diff --git a/include/media/mediarecorder.h b/include/media/mediarecorder.h
index b9ea0c6..aebe191 100644
--- a/include/media/mediarecorder.h
+++ b/include/media/mediarecorder.h
@@ -35,6 +35,10 @@
 enum audio_source {
     AUDIO_SOURCE_DEFAULT = 0,
     AUDIO_SOURCE_MIC = 1,
+    AUDIO_SOURCE_VOICE_UPLINK = 2,
+    AUDIO_SOURCE_VOICE_DOWNLINK = 3,
+    AUDIO_SOURCE_VOICE_CALL = 4,
+    AUDIO_SOURCE_MAX = AUDIO_SOURCE_VOICE_CALL
 };
 
 enum video_source {
diff --git a/include/ui/Point.h b/include/ui/Point.h
index dbbad1e..1653120 100644
--- a/include/ui/Point.h
+++ b/include/ui/Point.h
@@ -31,12 +31,9 @@
     // because we want the compiler generated versions
 
     // Default constructor doesn't initialize the Point
-    inline Point()
-    {
+    inline Point() {
     }
-
-    inline Point(int _x, int _y) : x(_x), y(_y)
-    {
+    inline Point(int x, int y) : x(x), y(y) {
     }
 
     inline bool operator == (const Point& rhs) const {
@@ -57,8 +54,8 @@
     }
 
     inline Point& operator - () {
-        x=-x;
-        y=-y;
+        x = -x;
+        y = -y;
         return *this;
     }
     
@@ -73,11 +70,13 @@
         return *this;
     }
     
-    Point operator + (const Point& rhs) const {
-        return Point(x+rhs.x, y+rhs.y);
+    const Point operator + (const Point& rhs) const {
+        const Point result(x+rhs.x, y+rhs.y);
+        return result;
     }
-    Point operator - (const Point& rhs) const {
-        return Point(x-rhs.x, y-rhs.y);
+    const Point operator - (const Point& rhs) const {
+        const Point result(x-rhs.x, y-rhs.y);
+        return result;
     }    
 };
 
diff --git a/include/ui/Rect.h b/include/ui/Rect.h
index d232847..da72944 100644
--- a/include/ui/Rect.h
+++ b/include/ui/Rect.h
@@ -33,23 +33,16 @@
     // we don't provide copy-ctor and operator= on purpose
     // because we want the compiler generated versions
 
-    inline Rect()
-    {
+    inline Rect() {
     }
-
     inline Rect(int w, int h)
-        : left(0), top(0), right(w), bottom(h)
-    {
+        : left(0), top(0), right(w), bottom(h) {
     }
-
     inline Rect(int l, int t, int r, int b)
-        : left(l), top(t), right(r), bottom(b)
-    {
+        : left(l), top(t), right(r), bottom(b) {
     }
-
     inline Rect(const Point& lt, const Point& rb) 
-        : left(lt.x), top(lt.y), right(rb.x), bottom(rb.y)
-    {
+        : left(lt.x), top(lt.y), right(rb.x), bottom(rb.y) {
     }
 
     void makeInvalid();
@@ -78,21 +71,22 @@
         return bottom-top;
     }
 
-    // returns left-top Point non-const reference, can be assigned
-    inline Point& leftTop() {
-        return reinterpret_cast<Point&>(left);
+    void setLeftTop(const Point& lt) {
+        left = lt.x;
+        top  = lt.y;
     }
-    // returns right bottom non-const reference, can be assigned
-    inline Point& rightBottom() {
-        return reinterpret_cast<Point&>(right);
+
+    void setRightBottom(const Point& rb) {
+        right = rb.x;
+        bottom  = rb.y;
     }
     
     // the following 4 functions return the 4 corners of the rect as Point
-    inline const Point& leftTop() const {
-        return reinterpret_cast<const Point&>(left);
+    Point leftTop() const {
+        return Point(left, top);
     }
-    inline const Point& rightBottom() const {
-        return reinterpret_cast<const Point&>(right);
+    Point rightBottom() const {
+        return Point(right, bottom);
     }
     Point rightTop() const {
         return Point(right, top);
@@ -133,8 +127,8 @@
     Rect& operator -= (const Point& rhs) {
         return offsetBy(-rhs.x, -rhs.y);
     }
-    Rect operator + (const Point& rhs) const;
-    Rect operator - (const Point& rhs) const;
+    const Rect operator + (const Point& rhs) const;
+    const Rect operator - (const Point& rhs) const;
 
     void translate(int dx, int dy) { // legacy, don't use.
         offsetBy(dx, dy);
diff --git a/libs/audioflinger/AudioFlinger.cpp b/libs/audioflinger/AudioFlinger.cpp
index e4f4aad..13e457f 100644
--- a/libs/audioflinger/AudioFlinger.cpp
+++ b/libs/audioflinger/AudioFlinger.cpp
@@ -1553,7 +1553,6 @@
 AudioFlinger::MixerThread::TrackBase::TrackBase(
             const sp<MixerThread>& mixerThread,
             const sp<Client>& client,
-            int streamType,
             uint32_t sampleRate,
             int format,
             int channelCount,
@@ -1563,7 +1562,6 @@
     :   RefBase(),
         mMixerThread(mixerThread),
         mClient(client),
-        mStreamType(streamType),
         mFrameCount(0),
         mState(IDLE),
         mClientTid(-1),
@@ -1713,12 +1711,13 @@
             int channelCount,
             int frameCount,
             const sp<IMemory>& sharedBuffer)
-    :   TrackBase(mixerThread, client, streamType, sampleRate, format, channelCount, frameCount, 0, sharedBuffer)
+    :   TrackBase(mixerThread, client, sampleRate, format, channelCount, frameCount, 0, sharedBuffer)
 {
     mVolume[0] = 1.0f;
     mVolume[1] = 1.0f;
     mMute = false;
     mSharedBuffer = sharedBuffer;
+    mStreamType = streamType;
 }
 
 AudioFlinger::MixerThread::Track::~Track()
@@ -1902,15 +1901,15 @@
 AudioFlinger::MixerThread::RecordTrack::RecordTrack(
             const sp<MixerThread>& mixerThread,
             const sp<Client>& client,
-            int streamType,
+            int inputSource,
             uint32_t sampleRate,
             int format,
             int channelCount,
             int frameCount,
             uint32_t flags)
-    :   TrackBase(mixerThread, client, streamType, sampleRate, format,
+    :   TrackBase(mixerThread, client, sampleRate, format,
                   channelCount, frameCount, flags, 0),
-        mOverflow(false)
+        mOverflow(false), mInputSource(inputSource)
 {
 }
 
@@ -2235,7 +2234,7 @@
 
 sp<IAudioRecord> AudioFlinger::openRecord(
         pid_t pid,
-        int streamType,
+        int inputSource,
         uint32_t sampleRate,
         int format,
         int channelCount,
@@ -2258,7 +2257,7 @@
         goto Exit;
     }
 
-    if (uint32_t(streamType) >= AudioRecord::NUM_STREAM_TYPES) {
+    if (uint32_t(inputSource) >= AudioRecord::NUM_INPUT_SOURCES) {
         LOGE("invalid stream type");
         lStatus = BAD_VALUE;
         goto Exit;
@@ -2301,7 +2300,7 @@
         frameCount = ((frameCount - 1)/inFrameCount + 1) * inFrameCount;
     
         // create new record track. The record track uses one track in mHardwareMixerThread by convention.
-        recordTrack = new MixerThread::RecordTrack(mHardwareMixerThread, client, streamType, sampleRate,
+        recordTrack = new MixerThread::RecordTrack(mHardwareMixerThread, client, inputSource, sampleRate,
                                                    format, channelCount, frameCount, flags);
     }
     if (recordTrack->getCblk() == NULL) {
@@ -2408,7 +2407,7 @@
                 LOGV("AudioRecordThread: loop starting");
                 if (mRecordTrack != 0) {
                     input = mAudioHardware->openInputStream(
-                                    mRecordTrack->type(),
+                                    mRecordTrack->inputSource(),
                                     mRecordTrack->format(), 
                                     mRecordTrack->channelCount(), 
                                     mRecordTrack->sampleRate(), 
diff --git a/libs/audioflinger/AudioFlinger.h b/libs/audioflinger/AudioFlinger.h
index c7ca9ec..8e47b29 100644
--- a/libs/audioflinger/AudioFlinger.h
+++ b/libs/audioflinger/AudioFlinger.h
@@ -139,7 +139,7 @@
     // record interface
     virtual sp<IAudioRecord> openRecord(
                                 pid_t pid,
-                                int streamType,
+                                int inputSource,
                                 uint32_t sampleRate,
                                 int format,
                                 int channelCount,
@@ -232,7 +232,6 @@
 
                                 TrackBase(const sp<MixerThread>& mixerThread,
                                         const sp<Client>& client,
-                                        int streamType,
                                         uint32_t sampleRate,
                                         int format,
                                         int channelCount,
@@ -260,10 +259,6 @@
                 return mCblk;
             }
 
-            int type() const {
-                return mStreamType;
-            }
-
             int format() const {
                 return mFormat;
             }
@@ -293,7 +288,6 @@
             sp<Client>          mClient;
             sp<IMemory>         mCblkMemory;
             audio_track_cblk_t* mCblk;
-            int                 mStreamType;
             void*               mBuffer;
             void*               mBufferEnd;
             uint32_t            mFrameCount;
@@ -328,6 +322,11 @@
                     void        mute(bool);
                     void        setVolume(float left, float right);
 
+                    int type() const {
+                        return mStreamType;
+                    }
+
+
         protected:
             friend class MixerThread;
             friend class AudioFlinger;
@@ -364,6 +363,7 @@
             int8_t              mRetryCount;
             sp<IMemory>         mSharedBuffer;
             bool                mResetDone;
+            int                 mStreamType;
         };  // end of Track
 
         // record track
@@ -371,7 +371,7 @@
         public:
                                 RecordTrack(const sp<MixerThread>& mixerThread,
                                         const sp<Client>& client,
-                                        int streamType,
+                                        int inputSource,
                                         uint32_t sampleRate,
                                         int format,
                                         int channelCount,
@@ -385,6 +385,8 @@
                     bool        overflow() { bool tmp = mOverflow; mOverflow = false; return tmp; }
                     bool        setOverflow() { bool tmp = mOverflow; mOverflow = true; return tmp; }
 
+                    int         inputSource() const { return mInputSource; }
+
         private:
             friend class AudioFlinger;
             friend class AudioFlinger::RecordHandle;
@@ -397,6 +399,7 @@
             virtual status_t getNextBuffer(AudioBufferProvider::Buffer* buffer);
 
             bool                mOverflow;
+            int                 mInputSource;
         };
 
         // playback track
diff --git a/libs/audioflinger/AudioHardwareGeneric.cpp b/libs/audioflinger/AudioHardwareGeneric.cpp
index a97c0bc..1e159b8 100644
--- a/libs/audioflinger/AudioHardwareGeneric.cpp
+++ b/libs/audioflinger/AudioHardwareGeneric.cpp
@@ -98,8 +98,8 @@
         status_t *status, AudioSystem::audio_in_acoustics acoustics)
 {
     // check for valid input source
-    if ((inputSource != AudioRecord::DEFAULT_INPUT) &&
-            (inputSource != AudioRecord::MIC_INPUT)) {
+    if ((inputSource < AudioRecord::DEFAULT_INPUT) ||
+        (inputSource >= AudioRecord::NUM_INPUT_SOURCES)) {
         return 0;
     }
 
diff --git a/libs/audioflinger/AudioHardwareStub.cpp b/libs/audioflinger/AudioHardwareStub.cpp
index c61e6e6..0ab4c60 100644
--- a/libs/audioflinger/AudioHardwareStub.cpp
+++ b/libs/audioflinger/AudioHardwareStub.cpp
@@ -61,8 +61,8 @@
         status_t *status, AudioSystem::audio_in_acoustics acoustics)
 {
     // check for valid input source
-    if ((inputSource != AudioRecord::DEFAULT_INPUT) &&
-            (inputSource != AudioRecord::MIC_INPUT)) {
+    if ((inputSource < AudioRecord::DEFAULT_INPUT) ||
+        (inputSource >= AudioRecord::NUM_INPUT_SOURCES)) {
         return 0;
     }
 
diff --git a/libs/ui/Android.mk b/libs/ui/Android.mk
index f944357..b3b2104b 100644
--- a/libs/ui/Android.mk
+++ b/libs/ui/Android.mk
@@ -20,7 +20,6 @@
 	LayerState.cpp \
 	Overlay.cpp \
 	PixelFormat.cpp \
-	Point.cpp \
 	Rect.cpp \
 	Region.cpp \
 	Surface.cpp \
diff --git a/libs/ui/Point.cpp b/libs/ui/Point.cpp
deleted file mode 100644
index 438d49f..0000000
--- a/libs/ui/Point.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
- *  Point.cpp
- *  Android
- *
- *  Created on 11/16/2006.
- *  Copyright 2005 The Android Open Source Project
- *
- */
-
-#include <ui/Point.h>
-
diff --git a/libs/ui/Rect.cpp b/libs/ui/Rect.cpp
index 99e68bb..66b9576 100644
--- a/libs/ui/Rect.cpp
+++ b/libs/ui/Rect.cpp
@@ -1,21 +1,28 @@
 /*
- *  Rect.cpp
- *  Android
+ * Copyright (C) 2009 The Android Open Source Project
  *
- *  Created on 10/14/05.
- *  Copyright 2005 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 <ui/Rect.h>
 
 namespace android {
 
-inline int min(int a, int b) {
+static inline int min(int a, int b) {
     return (a<b) ? a : b;
 }
 
-inline int max(int a, int b) {
+static inline int max(int a, int b) {
     return (a>b) ? a : b;
 }
 
@@ -64,14 +71,16 @@
     return *this;
 }
 
-Rect Rect::operator + (const Point& rhs) const
+const Rect Rect::operator + (const Point& rhs) const
 {
-    return Rect(left+rhs.x, top+rhs.y, right+rhs.x, bottom+rhs.y); 
+    const Rect result(left+rhs.x, top+rhs.y, right+rhs.x, bottom+rhs.y);
+    return result;
 }
 
-Rect Rect::operator - (const Point& rhs) const
+const Rect Rect::operator - (const Point& rhs) const
 {
-    return Rect(left-rhs.x, top-rhs.y, right-rhs.x, bottom-rhs.y); 
+    const Rect result(left-rhs.x, top-rhs.y, right-rhs.x, bottom-rhs.y);
+    return result;
 }
 
 bool Rect::intersect(const Rect& with, Rect* result) const
diff --git a/media/java/android/media/AudioRecord.java b/media/java/android/media/AudioRecord.java
index 3346bed..4d1535f9 100644
--- a/media/java/android/media/AudioRecord.java
+++ b/media/java/android/media/AudioRecord.java
@@ -88,7 +88,7 @@
     private static final int AUDIORECORD_ERROR_SETUP_ZEROFRAMECOUNT      = -16;
     private static final int AUDIORECORD_ERROR_SETUP_INVALIDCHANNELCOUNT = -17;
     private static final int AUDIORECORD_ERROR_SETUP_INVALIDFORMAT       = -18;
-    private static final int AUDIORECORD_ERROR_SETUP_INVALIDSTREAMTYPE   = -19;
+    private static final int AUDIORECORD_ERROR_SETUP_INVALIDSOURCE       = -19;
     private static final int AUDIORECORD_ERROR_SETUP_NATIVEINITFAILED    = -20;
     
     // Events:
@@ -113,13 +113,7 @@
      */
     @SuppressWarnings("unused")
     private int mNativeRecorderInJavaObj;
-    /** 
-     * Accessed by native methods: provides access to record source constants 
-     */
-    @SuppressWarnings("unused")
-    private final static int SOURCE_DEFAULT = MediaRecorder.AudioSource.DEFAULT;
-    @SuppressWarnings("unused")
-    private final static int SOURCE_MIC = MediaRecorder.AudioSource.MIC;
+
     /** 
      * Accessed by native methods: provides access to the callback data.
      */
@@ -252,8 +246,8 @@
 
         //--------------
         // audio source
-        if ( (audioSource != MediaRecorder.AudioSource.DEFAULT)
-                && (audioSource != MediaRecorder.AudioSource.MIC) ) {
+        if ( (audioSource < MediaRecorder.AudioSource.DEFAULT) ||
+             (audioSource > MediaRecorder.getAudioSourceMax()) )  {
             throw (new IllegalArgumentException("Invalid audio source."));
         } else {
             mRecordSource = audioSource;
diff --git a/media/java/android/media/MediaRecorder.java b/media/java/android/media/MediaRecorder.java
index 5d90e62..44f21c8 100644
--- a/media/java/android/media/MediaRecorder.java
+++ b/media/java/android/media/MediaRecorder.java
@@ -125,6 +125,15 @@
         public static final int DEFAULT = 0;
         /** Microphone audio source */
         public static final int MIC = 1;
+
+        /** Voice call uplink (Tx) audio source */
+        public static final int VOICE_UPLINK = 2;
+
+        /** Voice call downlink (Rx) audio source */
+        public static final int VOICE_DOWNLINK = 3;
+
+        /** Voice call uplink + downlink audio source */
+        public static final int VOICE_CALL = 4;
     }
 
     /**
@@ -203,6 +212,12 @@
             throws IllegalStateException;
 
     /**
+     * Gets the maximum value for audio sources.
+     * @see android.media.MediaRecorder.AudioSource
+     */
+    public static final int getAudioSourceMax() { return AudioSource.VOICE_CALL; }
+
+    /**
      * Sets the video source to be used for recording. If this method is not
      * called, the output file will not contain an video track. The source needs
      * to be specified before setting recording-parameters or encoders. Call
diff --git a/media/jni/android_media_MediaRecorder.cpp b/media/jni/android_media_MediaRecorder.cpp
index cac65d6..7561af1 100644
--- a/media/jni/android_media_MediaRecorder.cpp
+++ b/media/jni/android_media_MediaRecorder.cpp
@@ -177,7 +177,7 @@
 android_media_MediaRecorder_setAudioSource(JNIEnv *env, jobject thiz, jint as)
 {
     LOGV("setAudioSource(%d)", as);
-    if (as < AUDIO_SOURCE_DEFAULT || as > AUDIO_SOURCE_MIC) {
+    if (as < AUDIO_SOURCE_DEFAULT || as > AUDIO_SOURCE_MAX) {
         jniThrowException(env, "java/lang/IllegalArgumentException", "Invalid audio source");
         return;
     }
diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp
index 1720af0..4c8b02a 100644
--- a/media/libmedia/AudioRecord.cpp
+++ b/media/libmedia/AudioRecord.cpp
@@ -50,7 +50,7 @@
 }
 
 AudioRecord::AudioRecord(
-        int streamType,
+        int inputSource,
         uint32_t sampleRate,
         int format,
         int channelCount,
@@ -61,7 +61,7 @@
         int notificationFrames)
     : mStatus(NO_INIT)
 {
-    mStatus = set(streamType, sampleRate, format, channelCount,
+    mStatus = set(inputSource, sampleRate, format, channelCount,
             frameCount, flags, cbf, user, notificationFrames);
 }
 
@@ -82,7 +82,7 @@
 }
 
 status_t AudioRecord::set(
-        int streamType,
+        int inputSource,
         uint32_t sampleRate,
         int format,
         int channelCount,
@@ -104,8 +104,8 @@
         return NO_INIT;
     }
 
-    if (streamType == DEFAULT_INPUT) {
-        streamType = MIC_INPUT;
+    if (inputSource == DEFAULT_INPUT) {
+        inputSource = MIC_INPUT;
     }
 
     if (sampleRate == 0) {
@@ -157,7 +157,7 @@
 
     // open record channel
     status_t status;
-    sp<IAudioRecord> record = audioFlinger->openRecord(getpid(), streamType,
+    sp<IAudioRecord> record = audioFlinger->openRecord(getpid(), inputSource,
                                                        sampleRate, format,
                                                        channelCount,
                                                        frameCount,
@@ -201,6 +201,7 @@
     mMarkerReached = false;
     mNewPosition = 0;
     mUpdatePeriod = 0;
+    mInputSource = (uint8_t)inputSource;
 
     return NO_ERROR;
 }
@@ -242,6 +243,11 @@
     return channelCount()*((format() == AudioSystem::PCM_8_BIT) ? sizeof(uint8_t) : sizeof(int16_t));
 }
 
+int AudioRecord::inputSource() const
+{
+    return (int)mInputSource;
+}
+
 // -------------------------------------------------------------------------
 
 status_t AudioRecord::start()
diff --git a/media/libmedia/IAudioFlinger.cpp b/media/libmedia/IAudioFlinger.cpp
index 52bd7d4..eeaa54f 100644
--- a/media/libmedia/IAudioFlinger.cpp
+++ b/media/libmedia/IAudioFlinger.cpp
@@ -99,7 +99,7 @@
 
     virtual sp<IAudioRecord> openRecord(
                                 pid_t pid,
-                                int streamType,
+                                int inputSource,
                                 uint32_t sampleRate,
                                 int format,
                                 int channelCount,
@@ -110,7 +110,7 @@
         Parcel data, reply;
         data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
         data.writeInt32(pid);
-        data.writeInt32(streamType);
+        data.writeInt32(inputSource);
         data.writeInt32(sampleRate);
         data.writeInt32(format);
         data.writeInt32(channelCount);
@@ -384,14 +384,14 @@
         case OPEN_RECORD: {
             CHECK_INTERFACE(IAudioFlinger, data, reply);
             pid_t pid = data.readInt32();
-            int streamType = data.readInt32();
+            int inputSource = data.readInt32();
             uint32_t sampleRate = data.readInt32();
             int format = data.readInt32();
             int channelCount = data.readInt32();
             size_t bufferCount = data.readInt32();
             uint32_t flags = data.readInt32();
             status_t status;
-            sp<IAudioRecord> record = openRecord(pid, streamType,
+            sp<IAudioRecord> record = openRecord(pid, inputSource,
                     sampleRate, format, channelCount, bufferCount, flags, &status);
             reply->writeInt32(status);
             reply->writeStrongBinder(record->asBinder());
diff --git a/media/libmedia/IMediaPlayer.cpp b/media/libmedia/IMediaPlayer.cpp
index f37519f..f18765a 100644
--- a/media/libmedia/IMediaPlayer.cpp
+++ b/media/libmedia/IMediaPlayer.cpp
@@ -164,6 +164,7 @@
     status_t setVolume(float leftVolume, float rightVolume)
     {
         Parcel data, reply;
+        data.writeInterfaceToken(IMediaPlayer::getInterfaceDescriptor());
         data.writeFloat(leftVolume);
         data.writeFloat(rightVolume);
         remote()->transact(SET_VOLUME, data, &reply);
@@ -261,6 +262,7 @@
             return NO_ERROR;
         } break;
         case SET_VOLUME: {
+            CHECK_INTERFACE(IMediaPlayer, data, reply);
             reply->writeInt32(setVolume(data.readFloat(), data.readFloat()));
             return NO_ERROR;
         } break;
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index f2959e3..d1c40b4 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -4733,6 +4733,7 @@
         
         app.thread = thread;
         app.curAdj = app.setAdj = -100;
+        app.curSchedGroup = app.setSchedGroup = Process.THREAD_GROUP_DEFAULT;
         app.forcingToForeground = null;
         app.foregroundServices = false;
         app.debugging = false;
@@ -8802,9 +8803,9 @@
                       + " #" + i + ":");
                 r.dump(pw, prefix + "  ");
             } else if (inclOomAdj) {
-                pw.println(String.format("%s%s #%2d: oom_adj=%3d %s",
+                pw.println(String.format("%s%s #%2d: adj=%3d/%d %s",
                         prefix, (r.persistent ? persistentLabel : normalLabel),
-                        i, r.setAdj, r.toString()));
+                        i, r.setAdj, r.setSchedGroup, r.toString()));
             } else {
                 pw.println(String.format("%s%s #%2d: %s",
                         prefix, (r.persistent ? persistentLabel : normalLabel),
@@ -11830,7 +11831,10 @@
         }
 
         app.curAdj = adj;
-
+        app.curSchedGroup = (adj > VISIBLE_APP_ADJ && !app.persistent)
+                ? Process.THREAD_GROUP_BG_NONINTERACTIVE
+                : Process.THREAD_GROUP_DEFAULT;
+        
         return adj;
     }
 
@@ -11975,6 +11979,28 @@
                     return false;
                 }
             }
+            if (app.setSchedGroup != app.curSchedGroup) {
+                app.setSchedGroup = app.curSchedGroup;
+                if (DEBUG_SWITCH || DEBUG_OOM_ADJ) Log.v(TAG,
+                        "Setting process group of " + app.processName
+                        + " to " + app.curSchedGroup);
+                if (true) {
+                    try {
+                        Process.setProcessGroup(app.pid, app.curSchedGroup);
+                    } catch (Exception e) {
+                        Log.w(TAG, "Failed setting process group of " + app.pid
+                                + " to " + app.curSchedGroup);
+                    }
+                }
+                if (false) {
+                    if (app.thread != null) {
+                        try {
+                            app.thread.setSchedulingGroup(app.curSchedGroup);
+                        } catch (RemoteException e) {
+                        }
+                    }
+                }
+            }
         }
 
         return true;
diff --git a/services/java/com/android/server/am/ProcessRecord.java b/services/java/com/android/server/am/ProcessRecord.java
index 419dadf..3f59710 100644
--- a/services/java/com/android/server/am/ProcessRecord.java
+++ b/services/java/com/android/server/am/ProcessRecord.java
@@ -56,6 +56,8 @@
     int setRawAdj;              // Last set OOM unlimited adjustment for this process
     int curAdj;                 // Current OOM adjustment for this process
     int setAdj;                 // Last set OOM adjustment for this process
+    int curSchedGroup;          // Currently desired scheduling class
+    int setSchedGroup;          // Last set to background scheduling class
     boolean isForeground;       // Is this app running the foreground UI?
     boolean setIsForeground;    // Running foreground UI when last set?
     boolean foregroundServices; // Running any services that are foreground?
@@ -147,6 +149,8 @@
                 pw.print(" setRaw="); pw.print(setRawAdj);
                 pw.print(" cur="); pw.print(curAdj);
                 pw.print(" set="); pw.println(setAdj);
+        pw.print(prefix); pw.print("curSchedGroup="); pw.print(curSchedGroup);
+                pw.print(" setSchedGroup="); pw.println(setSchedGroup);
         pw.print(prefix); pw.print("isForeground="); pw.print(isForeground);
                 pw.print(" setIsForeground="); pw.print(setIsForeground);
                 pw.print(" foregroundServices="); pw.print(foregroundServices);
diff --git a/telephony/java/com/android/internal/telephony/ServiceStateTracker.java b/telephony/java/com/android/internal/telephony/ServiceStateTracker.java
index 5112ba0..bdcf3f7 100644
--- a/telephony/java/com/android/internal/telephony/ServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/ServiceStateTracker.java
@@ -156,6 +156,9 @@
 
     }
 
+    public boolean getDesiredPowerState() {
+        return mDesiredPowerState;
+    }
 
     /**
      * Registration point for combined roaming on
diff --git a/telephony/java/com/android/internal/telephony/SmsHeader.java b/telephony/java/com/android/internal/telephony/SmsHeader.java
index d220648..7872eec 100644
--- a/telephony/java/com/android/internal/telephony/SmsHeader.java
+++ b/telephony/java/com/android/internal/telephony/SmsHeader.java
@@ -111,7 +111,10 @@
             /**
              * NOTE: as defined in the spec, ConcatRef and PortAddr
              * fields should not reoccur, but if they do the last
-             * occurrence is to be used.
+             * occurrence is to be used.  Also, for ConcatRef
+             * elements, if the count is zero, sequence is zero, or
+             * sequence is larger than count, the entire element is to
+             * be ignored.
              */
             int id = inStream.read();
             int length = inStream.read();
@@ -124,7 +127,10 @@
                 concatRef.msgCount = inStream.read();
                 concatRef.seqNumber = inStream.read();
                 concatRef.isEightBits = true;
-                smsHeader.concatRef = concatRef;
+                if (concatRef.msgCount != 0 && concatRef.seqNumber != 0 &&
+                        concatRef.seqNumber <= concatRef.msgCount) {
+                    smsHeader.concatRef = concatRef;
+                }
                 break;
             case ELT_ID_CONCATENATED_16_BIT_REFERENCE:
                 concatRef = new ConcatRef();
@@ -132,7 +138,10 @@
                 concatRef.msgCount = inStream.read();
                 concatRef.seqNumber = inStream.read();
                 concatRef.isEightBits = false;
-                smsHeader.concatRef = concatRef;
+                if (concatRef.msgCount != 0 && concatRef.seqNumber != 0 &&
+                        concatRef.seqNumber <= concatRef.msgCount) {
+                    smsHeader.concatRef = concatRef;
+                }
                 break;
             case ELT_ID_APPLICATION_PORT_ADDRESSING_8_BIT:
                 portAddrs = new PortAddrs();
diff --git a/telephony/java/com/android/internal/telephony/TelephonyEventLog.java b/telephony/java/com/android/internal/telephony/TelephonyEventLog.java
index 97f9d7d..cdce488 100644
--- a/telephony/java/com/android/internal/telephony/TelephonyEventLog.java
+++ b/telephony/java/com/android/internal/telephony/TelephonyEventLog.java
@@ -30,4 +30,6 @@
     public static final int EVENT_LOG_CGREG_FAIL = 50107;
     public static final int EVENT_LOG_DATA_STATE_RADIO_OFF = 50108;
     public static final int EVENT_LOG_PDP_NETWORK_DROP = 50109;
+    public static final int EVENT_LOG_CDMA_DATA_SETUP_FAILED = 50110;
+    public static final int EVENT_LOG_CDMA_DATA_DROP = 50111;
 }
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnection.java b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnection.java
index 2cbad78..a9c0f46 100644
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnection.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnection.java
@@ -146,12 +146,16 @@
                 null, obtainMessage(EVENT_SETUP_DATA_CONNECTION_DONE));
     }
 
+    private void tearDownData(Message msg) {
+        if (phone.mCM.getRadioState().isOn()) {
+            phone.mCM.deactivateDataCall(cid, obtainMessage(EVENT_DEACTIVATE_DONE, msg));
+        }
+    }
+
     protected void disconnect(Message msg) {
         onDisconnect = msg;
         if (state == State.ACTIVE) {
-            if (phone.mCM.getRadioState().isOn()) {
-                phone.mCM.deactivateDataCall(cid, obtainMessage(EVENT_DEACTIVATE_DONE, msg));
-            }
+            tearDownData(msg);
         } else if (state == State.ACTIVATING) {
             receivedDisconnectReq = true;
         } else {
@@ -280,7 +284,7 @@
                 // Don't bother reporting success if there's already a
                 // pending disconnect request, since DataConnectionTracker
                 // has already updated its state.
-                disconnect(onDisconnect);
+                tearDownData(onDisconnect);
             } else {
                 String[] response = ((String[]) ar.result);
                 cid = Integer.parseInt(response[0]);
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
index 64f9387..bf58ab7 100644
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
@@ -39,6 +39,7 @@
 import android.provider.Settings.SettingNotFoundException;
 import android.telephony.ServiceState;
 import android.telephony.TelephonyManager;
+import android.telephony.cdma.CdmaCellLocation;
 import android.util.EventLog;
 import android.text.TextUtils;
 import android.util.Log;
@@ -55,10 +56,6 @@
 import java.util.ArrayList;
 
 /**
- * WINK:TODO: In GsmDataConnectionTracker there are
- *            EventLog's used quite a few places maybe
- *            more need to be added in this file?
- *
  * {@hide}
  */
 public final class CdmaDataConnectionTracker extends DataConnectionTracker {
@@ -312,13 +309,11 @@
         Log.d(LOG_TAG, "setDataEnabled("+enable+") isEnabled=" + isEnabled);
         if (!isEnabled && enable) {
             setEnabled(EXTERNAL_NETWORK_DEFAULT_ID, true);
-            return trySetupData(Phone.REASON_DATA_ENABLED);
+            sendMessage(obtainMessage(EVENT_TRY_SETUP_DATA));
         } else if (!enable) {
             setEnabled(EXTERNAL_NETWORK_DEFAULT_ID, false);
             cleanUpConnection(true, Phone.REASON_DATA_DISABLED);
-            return true;
-        } else // isEnabled && enable
-
+        }
         return true;
     }
 
@@ -363,6 +358,7 @@
 
         int psState = mCdmaPhone.mSST.getCurrentCdmaDataConnectionState();
         boolean roaming = phone.getServiceState().getRoaming();
+        boolean desiredPowerState = mCdmaPhone.mSST.getDesiredPowerState();
 
         if ((state == State.IDLE || state == State.SCANNING)
                 && (psState == ServiceState.RADIO_TECHNOLOGY_1xRTT ||
@@ -372,7 +368,8 @@
                         mCdmaPhone.mRuimRecords.getRecordsLoaded())
                 && (mCdmaPhone.mSST.isConcurrentVoiceAndData() ||
                         phone.getState() == Phone.State.IDLE )
-                && isDataAllowed()) {
+                && isDataAllowed()
+                && desiredPowerState) {
 
             return setupData(reason);
 
@@ -387,7 +384,8 @@
                     " phoneState=" + phone.getState() +
                     " dataEnabled=" + getAnyDataEnabled() +
                     " roaming=" + roaming +
-                    " dataOnRoamingEnable=" + getDataOnRoamingEnabled());
+                    " dataOnRoamingEnable=" + getDataOnRoamingEnabled() +
+                    " desiredPowerState=" + desiredPowerState);
             }
             return false;
         }
@@ -578,7 +576,14 @@
                 }
 
                 if (sentSinceLastRecv >= NUMBER_SENT_PACKETS_OF_HANG) {
-                    // we already have NUMBER_SENT_PACKETS sent without ack
+                    // Packets sent without ack exceeded threshold.
+
+                    if (mNoRecvPollCount == 0) {
+                        EventLog.writeEvent(
+                                TelephonyEventLog.EVENT_LOG_RADIO_RESET_COUNTDOWN_TRIGGERED,
+                                sentSinceLastRecv);
+                    }
+
                     if (mNoRecvPollCount < NO_RECV_POLL_LIMIT) {
                         mNoRecvPollCount++;
                         // Slow down the poll interval to let things happen
@@ -590,6 +595,8 @@
                         netStatPollEnabled = false;
                         stopNetStatPoll();
                         restartRadio();
+                        EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_RADIO_RESET,
+                                NO_RECV_POLL_LIMIT);
                     }
                 } else {
                     mNoRecvPollCount = 0;
@@ -845,6 +852,13 @@
             if (state == State.FAILED) {
                 cleanUpConnection(false, Phone.REASON_CDMA_DATA_DETACHED);
                 nextReconnectDelay = RECONNECT_DELAY_INITIAL_MILLIS;
+
+                CdmaCellLocation loc = (CdmaCellLocation)(phone.getCellLocation());
+                int bsid = (loc != null) ? loc.getBaseStationId() : -1;
+
+                EventLog.List val = new EventLog.List(bsid,
+                        TelephonyManager.getDefault().getNetworkType());
+                EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_CDMA_DATA_SETUP_FAILED, val);
             }
             trySetupData(Phone.REASON_CDMA_DATA_DETACHED);
         }
@@ -870,10 +884,11 @@
             }
         } else {
 
-            int cid = -1;
-            EventLog.List val = new EventLog.List(cid,
+            CdmaCellLocation loc = (CdmaCellLocation)(phone.getCellLocation());
+            int bsid = (loc != null) ? loc.getBaseStationId() : -1;
+            EventLog.List val = new EventLog.List(bsid,
                     TelephonyManager.getDefault().getNetworkType());
-            EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_PDP_NETWORK_DROP, val);
+            EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_CDMA_DATA_DROP, val);
 
             cleanUpConnection(true, null);
         }
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
index 1d7aaf1..49e2daf 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
@@ -478,7 +478,8 @@
             setEnabled(Phone.APN_TYPE_DEFAULT, true);
             // trySetupData() will be a no-op if we are currently
             // connected to the MMS APN
-            return trySetupData(Phone.REASON_DATA_ENABLED);
+            sendMessage(obtainMessage(EVENT_TRY_SETUP_DATA));
+            return true;
         } else if (!enable) {
             setEnabled(Phone.APN_TYPE_DEFAULT, false);
             // Don't tear down if there is an active APN and it handles MMS or SUPL.
@@ -579,6 +580,7 @@
 
         int gprsState = ((GSMPhone) phone).mSST.getCurrentGprsState();
         boolean roaming = phone.getServiceState().getRoaming();
+        boolean desiredPowerState = ((GSMPhone) phone).mSST.getDesiredPowerState();
 
         if ((state == State.IDLE || state == State.SCANNING)
                 && (gprsState == ServiceState.STATE_IN_SERVICE || noAutoAttach)
@@ -586,7 +588,8 @@
                 && ( ((GSMPhone) phone).mSST.isConcurrentVoiceAndData() ||
                      phone.getState() == Phone.State.IDLE )
                 && isDataAllowed()
-                && !mIsPsRestricted ) {
+                && !mIsPsRestricted
+                && desiredPowerState ) {
 
             if (state == State.IDLE) {
                 waitingApns = buildWaitingApns();
@@ -614,7 +617,8 @@
                     " dataEnabled=" + getAnyDataEnabled() +
                     " roaming=" + roaming +
                     " dataOnRoamingEnable=" + getDataOnRoamingEnabled() +
-                    " ps restricted=" + mIsPsRestricted);
+                    " ps restricted=" + mIsPsRestricted +
+                    " desiredPowerState=" + desiredPowerState);
             return false;
         }
     }
diff --git a/tests/AndroidTests/src/com/android/unit_tests/CdmaSmsTest.java b/tests/AndroidTests/src/com/android/unit_tests/CdmaSmsTest.java
index f8d5d4d..75fd157 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/CdmaSmsTest.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/CdmaSmsTest.java
@@ -169,6 +169,43 @@
     }
 
     @SmallTest
+    public void testUserDataHeaderIllegalConcatRef() throws Exception {
+        BearerData bearerData = new BearerData();
+        bearerData.messageType = BearerData.MESSAGE_TYPE_DELIVER;
+        bearerData.messageId = 55;
+        SmsHeader.ConcatRef concatRef = new SmsHeader.ConcatRef();
+        concatRef.refNumber = 0x10;
+        concatRef.msgCount = 0;
+        concatRef.seqNumber = 2;
+        concatRef.isEightBits = true;
+        SmsHeader smsHeader = new SmsHeader();
+        smsHeader.concatRef = concatRef;
+        byte[] encodedHeader = SmsHeader.toByteArray(smsHeader);
+        SmsHeader decodedHeader = SmsHeader.fromByteArray(encodedHeader);
+        assertEquals(decodedHeader.concatRef, null);
+        concatRef.isEightBits = false;
+        encodedHeader = SmsHeader.toByteArray(smsHeader);
+        decodedHeader = SmsHeader.fromByteArray(encodedHeader);
+        assertEquals(decodedHeader.concatRef, null);
+        concatRef.msgCount = 1;
+        concatRef.seqNumber = 2;
+        encodedHeader = SmsHeader.toByteArray(smsHeader);
+        decodedHeader = SmsHeader.fromByteArray(encodedHeader);
+        assertEquals(decodedHeader.concatRef, null);
+        concatRef.msgCount = 1;
+        concatRef.seqNumber = 0;
+        encodedHeader = SmsHeader.toByteArray(smsHeader);
+        decodedHeader = SmsHeader.fromByteArray(encodedHeader);
+        assertEquals(decodedHeader.concatRef, null);
+        concatRef.msgCount = 2;
+        concatRef.seqNumber = 1;
+        encodedHeader = SmsHeader.toByteArray(smsHeader);
+        decodedHeader = SmsHeader.fromByteArray(encodedHeader);
+        assertEquals(decodedHeader.concatRef.msgCount, 2);
+        assertEquals(decodedHeader.concatRef.seqNumber, 1);
+    }
+
+    @SmallTest
     public void testUserDataHeaderMixedFeedback() throws Exception {
         BearerData bearerData = new BearerData();
         bearerData.messageType = BearerData.MESSAGE_TYPE_DELIVER;
diff --git a/tests/sketch/res/layout/demo.xml b/tests/sketch/res/layout/demo.xml
index 2ef291a..c3a78cf 100755
--- a/tests/sketch/res/layout/demo.xml
+++ b/tests/sketch/res/layout/demo.xml
@@ -17,7 +17,8 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:orientation="vertical"
     android:layout_width="fill_parent"
-    android:layout_height="wrap_content">
+    android:layout_height="fill_parent">
+
     <Spinner 
         android:id="@+id/spinner"
         android:layout_width="fill_parent"
@@ -29,6 +30,6 @@
         android:id="@+id/drawingpad"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
-        android:layout_weight="1"/>
+        android:layout_weight="1" />
     
 </LinearLayout>
diff --git a/tests/sketch/res/layout/gestureviewer.xml b/tests/sketch/res/layout/gestureviewer.xml
index 1503736..e4cca52 100755
--- a/tests/sketch/res/layout/gestureviewer.xml
+++ b/tests/sketch/res/layout/gestureviewer.xml
@@ -17,7 +17,7 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:orientation="vertical"
     android:layout_width="fill_parent"
-    android:layout_height="wrap_content">
+    android:layout_height="fill_parent">
     
     <Spinner 
         android:id="@+id/spinner"
@@ -30,7 +30,7 @@
         android:id="@+id/drawingpad"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
-        android:layout_weight="1"/>
+        android:layout_weight="1" />
 
     <LinearLayout 
         android:orientation="horizontal"
diff --git a/tests/sketch/res/layout/overlaydemo.xml b/tests/sketch/res/layout/overlaydemo.xml
index 75c86ed..4d5a657 100644
--- a/tests/sketch/res/layout/overlaydemo.xml
+++ b/tests/sketch/res/layout/overlaydemo.xml
@@ -14,7 +14,14 @@
      limitations under the License.
 -->
 
-<ListView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/list"
+<android.gesture.GestureOverlayView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/overlay"
     android:layout_width="fill_parent"
-    android:layout_height="fill_parent" />
+    android:layout_height="fill_parent">
+
+    <ListView
+        android:id="@+id/list"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent" />
+
+</android.gesture.GestureOverlayView>
diff --git a/tests/sketch/src/com/android/gesture/example/ContactListGestureOverlay.java b/tests/sketch/src/com/android/gesture/example/ContactListGestureOverlay.java
index f3081b7..6767de6 100644
--- a/tests/sketch/src/com/android/gesture/example/ContactListGestureOverlay.java
+++ b/tests/sketch/src/com/android/gesture/example/ContactListGestureOverlay.java
@@ -25,7 +25,6 @@
 import android.provider.Contacts.People;
 import android.util.Log;
 import android.view.View;
-import android.view.ViewGroup;
 import android.view.Window;
 import android.widget.AdapterView;
 import android.widget.ListView;
@@ -34,16 +33,12 @@
 import android.gesture.GestureOverlayView;
 import android.gesture.LetterRecognizer;
 import android.gesture.Prediction;
-import android.gesture.TouchThroughGestureListener;
 
 import java.util.ArrayList;
 
 public class ContactListGestureOverlay extends Activity {
-
-    private static final String LOGTAG = "ContactListGestureOverlay";
-    
+    private static final String LOG_TAG = "ContactListGestureOverlay";
     private static final String SORT_ORDER = People.DISPLAY_NAME + " COLLATE LOCALIZED ASC";
-
     private static final String[] CONTACTS_PROJECTION = new String[] {
             People._ID, // 0
             People.DISPLAY_NAME, // 1
@@ -51,11 +46,9 @@
 
     private ContactAdapter mContactAdapter;
 
-    private TouchThroughGestureListener mGestureProcessor;
-
-    private LetterRecognizer mRecognizer;
-
     private ListView mContactList;
+    private LetterRecognizer mRecognizer;
+    private GestureOverlayView mOverlay;
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
@@ -63,10 +56,10 @@
         requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
         setContentView(R.layout.overlaydemo);
 
-        setProgressBarIndeterminateVisibility(true);
-
         // create a letter recognizer
-        mRecognizer = LetterRecognizer.getLetterRecognizer(this, LetterRecognizer.RECOGNIZER_LATIN_LOWERCASE);
+        mRecognizer = LetterRecognizer.getLetterRecognizer(this,
+                LetterRecognizer.RECOGNIZER_LATIN_LOWERCASE);
+        mOverlay = (GestureOverlayView) findViewById(R.id.overlay);
 
         // load the contact list
         mContactList = (ListView) findViewById(R.id.list);
@@ -74,13 +67,14 @@
         mContactList.setTextFilterEnabled(true);
         mContactList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
-                if (!mGestureProcessor.isGesturing()) {
+                if (!mOverlay.isGesturing()) {
                     Intent intent = new Intent(Intent.ACTION_VIEW, ContentUris.withAppendedId(
                             People.CONTENT_URI, id));
                     startActivity(intent);
                 }
             }
         });
+
         ContentResolver resolver = getContentResolver();
         Cursor cursor = resolver.query(People.CONTENT_URI, CONTACTS_PROJECTION, null, null,
                 SORT_ORDER);
@@ -91,21 +85,16 @@
         mContactAdapter = new ContactAdapter(this, list);
         mContactList.setAdapter(mContactAdapter);
 
-        setProgressBarIndeterminateVisibility(false);
-
-        // add a gesture overlay on top of the ListView
-        GestureOverlayView overlay = new GestureOverlayView(this);
-        mGestureProcessor = new TouchThroughGestureListener(mContactList);
-        mGestureProcessor.setGestureType(TouchThroughGestureListener.MULTIPLE_STROKE);
-        mGestureProcessor.addOnGestureActionListener(new TouchThroughGestureListener.OnGesturePerformedListener() {
+        mOverlay.setGestureStrokeType(GestureOverlayView.GESTURE_STROKE_TYPE_MULTIPLE);
+        mOverlay.addOnGesturePerformedListener(new GestureOverlayView.OnGesturePerformedListener() {
             public void onGesturePerformed(GestureOverlayView overlay, Gesture gesture) {
                 ArrayList<Prediction> predictions = mRecognizer.recognize(gesture);
                 if (!predictions.isEmpty()) {
-                    Log.v(LOGTAG, "1st Prediction : " + predictions.get(0).name +
+                    Log.v(LOG_TAG, "1st Prediction : " + predictions.get(0).name +
                             " @" + predictions.get(0).score);
-                    Log.v(LOGTAG, "2nd Prediction : " + predictions.get(1).name +
+                    Log.v(LOG_TAG, "2nd Prediction : " + predictions.get(1).name +
                             " @" + predictions.get(1).score);
-                    Log.v(LOGTAG, "3rd Prediction : " + predictions.get(2).name +
+                    Log.v(LOG_TAG, "3rd Prediction : " + predictions.get(2).name +
                             " @" + predictions.get(2).score);
                     int index = mContactAdapter.search(predictions.get(0).name);
                     if (index != -1) {
@@ -114,9 +103,5 @@
                 }
             }
         });
-        overlay.addOnGestureListener(mGestureProcessor);
-        ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(
-                ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT);
-        this.addContentView(overlay, params);
     }
 }
diff --git a/tests/sketch/src/com/android/gesture/example/GestureEntry.java b/tests/sketch/src/com/android/gesture/example/GestureEntry.java
index bc2503c..3f86ed4 100644
--- a/tests/sketch/src/com/android/gesture/example/GestureEntry.java
+++ b/tests/sketch/src/com/android/gesture/example/GestureEntry.java
@@ -47,8 +47,9 @@
 
     private static final String PARCEL_KEY = "gesture";
 
-    static final String GESTURE_FILE_NAME = Environment.getExternalStorageDirectory().getAbsolutePath()
-            + File.separator + "demo_library.gestures";
+    static final String GESTURE_FILE_NAME =
+            Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator +
+                    "demo_library.gestures";
 
     private static final int DIALOG_NEW_ENTRY = 1;
 
@@ -82,7 +83,7 @@
                 // correct the recognition result by adding the new example
                 if (!mChangedByRecognizer) {
                     mGestureLibrary.addGesture(parent.getSelectedItem().toString(), mGesturePad
-                            .getCurrentGesture());
+                            .getGesture());
                 } else {
                     mChangedByRecognizer = false;
                 }
@@ -99,7 +100,7 @@
         mGesturePad.setBackgroundColor(Color.BLACK);
         mGesturePad.addOnGestureListener(new GestureOverlayView.OnGestureListener() {
             public void onGestureEnded(GestureOverlayView overlay, MotionEvent event) {
-                recognize(overlay.getCurrentGesture());
+                recognize(overlay.getGesture());
             }
 
             public void onGesture(GestureOverlayView overlay, MotionEvent event) {
@@ -116,7 +117,7 @@
         if (savedInstanceState != null) {
             Gesture gesture = (Gesture) savedInstanceState.getParcelable(PARCEL_KEY);
             if (gesture != null) {
-                mGesturePad.setCurrentGesture(gesture);
+                mGesturePad.setGesture(gesture);
             }
         }
     }
@@ -133,7 +134,7 @@
                                 .findViewById(R.id.gesturename_edit);
                         String text = edittext.getText().toString().trim();
                         if (text.length() > 0) {
-                            mGestureLibrary.addGesture(text, mGesturePad.getCurrentGesture());
+                            mGestureLibrary.addGesture(text, mGesturePad.getGesture());
                         }
                     }
                 }).setNegativeButton(R.string.newgesture_dialog_cancel,
@@ -157,7 +158,7 @@
     public boolean onOptionsItemSelected(MenuItem item) {
         switch (item.getItemId()) {
             case NEW_ID:
-                if (mGesturePad.getCurrentGesture() != null) {
+                if (mGesturePad.getGesture() != null) {
                     showDialog(DIALOG_NEW_ENTRY);
                 }
                 break;
@@ -190,7 +191,7 @@
     @Override
     protected void onSaveInstanceState(Bundle outState) {
         super.onSaveInstanceState(outState);
-        Gesture gesture = mGesturePad.getCurrentGesture();
+        Gesture gesture = mGesturePad.getGesture();
         if (gesture != null) {
             outState.putParcelable(PARCEL_KEY, gesture);
         }
diff --git a/tests/sketch/src/com/android/gesture/example/GestureLibViewer.java b/tests/sketch/src/com/android/gesture/example/GestureLibViewer.java
index aa07e7b..a561c96 100755
--- a/tests/sketch/src/com/android/gesture/example/GestureLibViewer.java
+++ b/tests/sketch/src/com/android/gesture/example/GestureLibViewer.java
@@ -78,7 +78,7 @@
                     mCurrentGestureIndex--;
                 }
                 gesture = mGestures.get(mCurrentGestureIndex);
-                mGesturePad.setCurrentGesture(gesture);
+                mGesturePad.setGesture(gesture);
                 mGesturePad.invalidate();
             }
         }
@@ -109,7 +109,7 @@
             mGestures = mGesureLibrary.getGestures(list.get(0));
             mCurrentGestureIndex = 0;
             Gesture gesture = mGestures.get(mCurrentGestureIndex);
-            mGesturePad.setCurrentGesture(gesture);
+            mGesturePad.setGesture(gesture);
         }
 
         mGestureCategory.setOnItemSelectedListener(new OnItemSelectedListener() {
@@ -118,7 +118,7 @@
                 if (!mGestures.isEmpty()) {
                     mCurrentGestureIndex = 0;
                     Gesture gesture = mGestures.get(mCurrentGestureIndex);
-                    mGesturePad.setCurrentGesture(gesture);
+                    mGesturePad.setGesture(gesture);
                 }
                 mGesturePad.invalidate();
             }
@@ -139,7 +139,7 @@
                 }
                 mCurrentGestureIndex++;
                 Gesture gesture = mGestures.get(mCurrentGestureIndex);
-                mGesturePad.setCurrentGesture(gesture);
+                mGesturePad.setGesture(gesture);
                 mGesturePad.invalidate();
             }
         });
@@ -150,7 +150,7 @@
                 if (mCurrentGestureIndex >= 1 && !mGestures.isEmpty()) {
                     mCurrentGestureIndex--;
                     Gesture gesture = mGestures.get(mCurrentGestureIndex);
-                    mGesturePad.setCurrentGesture(gesture);
+                    mGesturePad.setGesture(gesture);
                     mGesturePad.invalidate();
                 }
             }