AI 143296: Merge from donut Change 143147

Automated import of CL 143296
diff --git a/api/current.xml b/api/current.xml
index a7ac744..90a061b 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -1553,7 +1553,7 @@
  type="int"
  transient="false"
  volatile="false"
- value="16843378"
+ value="16843372"
  static="true"
  final="true"
  deprecated="not deprecated"
@@ -3192,7 +3192,7 @@
  type="int"
  transient="false"
  volatile="false"
- value="16843377"
+ value="16843371"
  static="true"
  final="true"
  deprecated="not deprecated"
@@ -3852,7 +3852,7 @@
  type="int"
  transient="false"
  volatile="false"
- value="16843367"
+ value="16843308"
  static="true"
  final="true"
  deprecated="not deprecated"
@@ -6719,17 +6719,6 @@
  visibility="public"
 >
 </field>
-<field name="starStyleButtonless"
- type="int"
- transient="false"
- volatile="false"
- value="16843308"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
 <field name="startColor"
  type="int"
  transient="false"
@@ -7218,7 +7207,7 @@
  type="int"
  transient="false"
  volatile="false"
- value="16843376"
+ value="16843370"
  static="true"
  final="true"
  deprecated="not deprecated"
@@ -8881,7 +8870,7 @@
  type="int"
  transient="false"
  volatile="false"
- value="17301686"
+ value="17301669"
  static="true"
  final="true"
  deprecated="not deprecated"
@@ -8998,193 +8987,6 @@
  visibility="public"
 >
 </field>
-<field name="emo_im_angel"
- type="int"
- transient="false"
- volatile="false"
- value="17301668"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="emo_im_cool"
- type="int"
- transient="false"
- volatile="false"
- value="17301669"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="emo_im_crying"
- type="int"
- transient="false"
- volatile="false"
- value="17301670"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="emo_im_embarrassed"
- type="int"
- transient="false"
- volatile="false"
- value="17301671"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="emo_im_foot_in_mouth"
- type="int"
- transient="false"
- volatile="false"
- value="17301672"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="emo_im_happy"
- type="int"
- transient="false"
- volatile="false"
- value="17301673"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="emo_im_kissing"
- type="int"
- transient="false"
- volatile="false"
- value="17301674"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="emo_im_laughing"
- type="int"
- transient="false"
- volatile="false"
- value="17301675"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="emo_im_lips_are_sealed"
- type="int"
- transient="false"
- volatile="false"
- value="17301676"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="emo_im_money_mouth"
- type="int"
- transient="false"
- volatile="false"
- value="17301677"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="emo_im_sad"
- type="int"
- transient="false"
- volatile="false"
- value="17301678"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="emo_im_surprised"
- type="int"
- transient="false"
- volatile="false"
- value="17301679"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="emo_im_tongue_sticking_out"
- type="int"
- transient="false"
- volatile="false"
- value="17301680"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="emo_im_undecided"
- type="int"
- transient="false"
- volatile="false"
- value="17301681"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="emo_im_winking"
- type="int"
- transient="false"
- volatile="false"
- value="17301682"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="emo_im_wtf"
- type="int"
- transient="false"
- volatile="false"
- value="17301683"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="emo_im_yelling"
- type="int"
- transient="false"
- volatile="false"
- value="17301684"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
 <field name="gallery_thumb"
  type="int"
  transient="false"
@@ -9200,7 +9002,7 @@
  type="int"
  transient="false"
  volatile="false"
- value="17301685"
+ value="17301668"
  static="true"
  final="true"
  deprecated="not deprecated"
@@ -10597,7 +10399,7 @@
  type="int"
  transient="false"
  volatile="false"
- value="17301687"
+ value="17301670"
  static="true"
  final="true"
  deprecated="not deprecated"
@@ -10698,17 +10500,6 @@
  visibility="public"
 >
 </field>
-<field name="button_close"
- type="int"
- transient="false"
- volatile="false"
- value="16908327"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
 <field name="candidatesArea"
  type="int"
  transient="false"
@@ -10731,6 +10522,17 @@
  visibility="public"
 >
 </field>
+<field name="closeButton"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16908327"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="content"
  type="int"
  transient="false"
@@ -29087,17 +28889,6 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<field name="ACTION_SYSTEM_TUTORIAL"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value="&quot;android.intent.action.SYSTEM_TUTORIAL&quot;"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
 <parameter name="name" type="java.lang.String">
 </parameter>
 </method>
@@ -31017,6 +30808,17 @@
  visibility="public"
 >
 </field>
+<field name="ACTION_SYSTEM_TUTORIAL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.intent.action.SYSTEM_TUTORIAL&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="ACTION_TIMEZONE_CHANGED"
  type="java.lang.String"
  transient="false"
diff --git a/core/java/android/inputmethodservice/KeyboardView.java b/core/java/android/inputmethodservice/KeyboardView.java
index 7a63c0c..9b8b5db 100755
--- a/core/java/android/inputmethodservice/KeyboardView.java
+++ b/core/java/android/inputmethodservice/KeyboardView.java
@@ -932,7 +932,7 @@
                 mMiniKeyboard = (KeyboardView) mMiniKeyboardContainer.findViewById(
                         com.android.internal.R.id.keyboardView);
                 View closeButton = mMiniKeyboardContainer.findViewById(
-                        com.android.internal.R.id.button_close);
+                        com.android.internal.R.id.closeButton);
                 if (closeButton != null) closeButton.setOnClickListener(this);
                 mMiniKeyboard.setOnKeyboardActionListener(new OnKeyboardActionListener() {
                     public void onKey(int primaryCode, int[] keyCodes) {
diff --git a/core/java/com/android/internal/widget/Smileys.java b/core/java/com/android/internal/widget/Smileys.java
new file mode 100644
index 0000000..d5e8d03
--- /dev/null
+++ b/core/java/com/android/internal/widget/Smileys.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.widget;
+
+import com.android.internal.R;
+
+/**
+ * Temp stupidity until we have a real emoticon API.
+ */
+public class Smileys {
+    private static final int[] sIconIds = {
+        R.drawable.emo_im_happy,
+        R.drawable.emo_im_sad,
+        R.drawable.emo_im_winking,
+        R.drawable.emo_im_tongue_sticking_out,
+        R.drawable.emo_im_surprised,
+        R.drawable.emo_im_kissing,
+        R.drawable.emo_im_yelling,
+        R.drawable.emo_im_cool,
+        R.drawable.emo_im_money_mouth,
+        R.drawable.emo_im_foot_in_mouth,
+        R.drawable.emo_im_embarrassed,
+        R.drawable.emo_im_angel,
+        R.drawable.emo_im_undecided,
+        R.drawable.emo_im_crying,
+        R.drawable.emo_im_lips_are_sealed,
+        R.drawable.emo_im_laughing,
+        R.drawable.emo_im_wtf
+    };
+
+    public static int HAPPY = 0;
+    public static int SAD = 1;
+    public static int WINKING = 2;
+    public static int TONGUE_STICKING_OUT = 3;
+    public static int SURPRISED = 4;
+    public static int KISSING = 5;
+    public static int YELLING = 6;
+    public static int COOL = 7;
+    public static int MONEY_MOUTH = 8;
+    public static int FOOT_IN_MOUTH = 9;
+    public static int EMBARRASSED = 10;
+    public static int ANGEL = 11;
+    public static int UNDECIDED = 12;
+    public static int CRYING = 13;
+    public static int LIPS_ARE_SEALED = 14;
+    public static int LAUGHING = 15;
+    public static int WTF = 16;
+    
+    public static int getSmileyResource(int which) {
+        return sIconIds[which];
+    }
+}
diff --git a/core/res/res/layout/keyboard_popup_keyboard.xml b/core/res/res/layout/keyboard_popup_keyboard.xml
index 0cdd9da..1092cc0 100644
--- a/core/res/res/layout/keyboard_popup_keyboard.xml
+++ b/core/res/res/layout/keyboard_popup_keyboard.xml
@@ -35,7 +35,7 @@
             android:popupLayout="@layout/keyboard_popup_keyboard"
             android:keyTextSize="22sp"
             />
-    <ImageButton android:id="@android:id/button_close"
+    <ImageButton android:id="@android:id/closeButton"
         android:background="@android:color/transparent"
         android:src="@drawable/btn_close" 
         android:layout_width="wrap_content"
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 5bc5cfd..7e2b4ee 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -353,8 +353,6 @@
         <attr name="spinnerStyle" format="reference" />
         <!-- Default Star style. -->
         <attr name="starStyle" format="reference" />
-        <!-- Buttonless Star style. -->
-        <attr name="starStyleButtonless" format="reference" />
         <!-- Default TabWidget style. -->
         <attr name="tabWidgetStyle" format="reference" />
         <!-- Default TextView style. -->
diff --git a/core/res/res/values/ids.xml b/core/res/res/values/ids.xml
index 7e9b7ea..6ef6f52 100644
--- a/core/res/res/values/ids.xml
+++ b/core/res/res/values/ids.xml
@@ -61,7 +61,7 @@
   <item type="id" name="copyUrl" />
   <item type="id" name="switchInputMethod" />
   <item type="id" name="keyboardView" />
-  <item type="id" name="button_close" />
+  <item type="id" name="closeButton" />
   <item type="id" name="startSelectingText" />
   <item type="id" name="stopSelectingText" />
   <item type="id" name="addToDictionary" />
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index f42d9eb..bfcb253 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -951,7 +951,7 @@
   <public type="attr" name="reqHardKeyboard" id="0x01010229" />
   <public type="attr" name="reqNavigation" id="0x0101022a" />
   <public type="attr" name="windowSoftInputMode" id="0x0101022b" />
-  <public type="attr" name="starStyleButtonless" id="0x0101022c" />
+  <public type="attr" name="imeFullscreenBackground" id="0x0101022c" />
   <public type="attr" name="noHistory" id="0x0101022d" />
   <public type="attr" name="headerDividersEnabled" id="0x0101022e" />
   <public type="attr" name="footerDividersEnabled" id="0x0101022f" />
@@ -1010,7 +1010,6 @@
   <public type="attr" name="imeOptions" id="0x01010264" />
   <public type="attr" name="imeActionLabel" id="0x01010265" />
   <public type="attr" name="imeActionId" id="0x01010266" />
-  <public type="attr" name="imeFullscreenBackground" id="0x01010267" />
   <public type="attr" name="imeExtractEnterAnimation" id="0x01010268" />
   <public type="attr" name="imeExtractExitAnimation" id="0x01010269" />
 
@@ -1055,7 +1054,7 @@
         an input method's input area. -->
   <public type="id" name="keyboardView" id="0x01020026" />
   <!-- View ID of a {@link android.view.View} to close a popup keyboard -->
-  <public type="id" name="button_close" id="0x01020027" />
+  <public type="id" name="closeButton" id="0x01020027" />
 
   <!-- Menu ID to perform a "start selecting text" operation. -->
   <public type="id" name="startSelectingText" id="0x01020028" />
@@ -1075,31 +1074,14 @@
   <public type="string" name="dialog_alert_title" id="0x01040014" />
   <public type="string" name="VideoView_error_text_invalid_progressive_playback" id="0x01040015" />
 
-  <public type="drawable" name="emo_im_angel"               id="0x010800a4" />
-  <public type="drawable" name="emo_im_cool"                id="0x010800a5" />
-  <public type="drawable" name="emo_im_crying"              id="0x010800a6" />
-  <public type="drawable" name="emo_im_embarrassed"         id="0x010800a7" />
-  <public type="drawable" name="emo_im_foot_in_mouth"       id="0x010800a8" />
-  <public type="drawable" name="emo_im_happy"               id="0x010800a9" />
-  <public type="drawable" name="emo_im_kissing"             id="0x010800aa" />
-  <public type="drawable" name="emo_im_laughing"            id="0x010800ab" />
-  <public type="drawable" name="emo_im_lips_are_sealed"     id="0x010800ac" />
-  <public type="drawable" name="emo_im_money_mouth"         id="0x010800ad" />
-  <public type="drawable" name="emo_im_sad"                 id="0x010800ae" />
-  <public type="drawable" name="emo_im_surprised"           id="0x010800af" />
-  <public type="drawable" name="emo_im_tongue_sticking_out" id="0x010800b0" />
-  <public type="drawable" name="emo_im_undecided"           id="0x010800b1" />
-  <public type="drawable" name="emo_im_winking"             id="0x010800b2" />
-  <public type="drawable" name="emo_im_wtf"                 id="0x010800b3" />
-  <public type="drawable" name="emo_im_yelling"             id="0x010800b4" />
-
-  <public type="drawable" name="ic_btn_speak_now" id="0x010800b5" />
+  <public type="drawable" name="ic_btn_speak_now" id="0x010800a4" />
 
   <!--  Drawable to use as a background for separators on a list with a dark background -->
-  <public type="drawable" name="dark_header" id="0x010800b6" />
+  <public type="drawable" name="dark_header" id="0x010800a5" />
 
   <!--  Drawable to use as a background for a taller version of the titlebar -->
-  <public type="drawable" name="title_bar_tall" id="0x010800b7" />
+  <public type="drawable" name="title_bar_tall" id="0x010800a6" />
+  
   <public type="integer" name="config_shortAnimTime" id="0x010e0000" />
   <public type="integer" name="config_mediumAnimTime" id="0x010e0001" />
   <public type="integer" name="config_longAnimTime" id="0x010e0002" />
@@ -1109,8 +1091,8 @@
      =============================================================== -->
   <eat-comment />
 
-   <public type="attr" name="tension" id="0x01010270" />
-   <public type="attr" name="extraTension" id="0x01010271" />
+   <public type="attr" name="tension" id="0x0101026a" />
+   <public type="attr" name="extraTension" id="0x0101026b" />
 
    <public type="anim" name="anticipate_interpolator" id="0x010a0007" />
    <public type="anim" name="overshoot_interpolator" id="0x010a0008" />
@@ -1122,5 +1104,5 @@
      =============================================================== -->
   <eat-comment />
 
-  <public type="attr" name="accountType" id="0x01010272" />
+  <public type="attr" name="accountType" id="0x0101026c" />
 </resources>
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index fb357a2..d7b654e 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -210,11 +210,6 @@
         <item name="android:button">@android:drawable/btn_star</item>
     </style>
 
-    <style name="Widget.CompoundButton.StarButtonless">
-        <item name="android:background">@android:drawable/btn_star_label_background</item>
-        <item name="android:button">@android:drawable/btn_star_buttonless</item>
-    </style>
-
     <style name="Widget.Button.Toggle">
         <item name="android:background">@android:drawable/btn_toggle_bg</item>
         <item name="android:textOn">@android:string/capital_on</item>
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index 23e9edb..6b3d740 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -153,7 +153,6 @@
         <item name="horizontalScrollViewStyle">@android:style/Widget.HorizontalScrollView</item>
         <item name="spinnerStyle">@android:style/Widget.Spinner</item>
         <item name="starStyle">@android:style/Widget.CompoundButton.Star</item>
-        <item name="starStyleButtonless">@android:style/Widget.CompoundButton.StarButtonless</item>
         <item name="tabWidgetStyle">@android:style/Widget.TabWidget</item>
         <item name="textViewStyle">@android:style/Widget.TextView</item>
         <item name="webViewStyle">@android:style/Widget.WebView</item>