Merge "Returning EOS in SurfaceMediaSource:read" into ics-factoryrom
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index 58f7869..5951195 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -480,6 +480,12 @@
     public final void stopPreview() {
         _stopPreview();
         mFaceDetectionRunning = false;
+
+        mShutterCallback = null;
+        mRawImageCallback = null;
+        mPostviewCallback = null;
+        mJpegCallback = null;
+        mAutoFocusCallback = null;
     }
 
     private native final void _stopPreview();
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index 4d828c4..e3a4df9 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -936,9 +936,11 @@
      *
      * If there's currently a call in progress, the button will take them to the call
      * @param button the button to update
+     * @param showIfCapable indicates whether the button should be shown if emergency calls are
+     *                      possible on the device
      */
-    public void updateEmergencyCallButtonState(Button button) {
-        if (isEmergencyCallCapable()) {
+    public void updateEmergencyCallButtonState(Button button, boolean showIfCapable) {
+        if (isEmergencyCallCapable() && showIfCapable) {
             button.setVisibility(View.VISIBLE);
         } else {
             button.setVisibility(View.GONE);
diff --git a/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java b/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java
index cc2ed7f..c03f91cc 100644
--- a/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java
+++ b/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java
@@ -71,7 +71,7 @@
 
     // Tune-able parameters
     private static final int CHEVRON_INCREMENTAL_DELAY = 160;
-    private static final int CHEVRON_ANIMATION_DURATION = 650;
+    private static final int CHEVRON_ANIMATION_DURATION = 850;
     private static final int RETURN_TO_HOME_DELAY = 1200;
     private static final int RETURN_TO_HOME_DURATION = 300;
     private static final int HIDE_ANIMATION_DELAY = 200;
@@ -297,7 +297,7 @@
      */
     private void startChevronAnimation() {
         final float r = mHandleDrawable.getWidth() * 0.4f;
-        final float chevronAnimationDistance = mOuterRadius * 0.8f;
+        final float chevronAnimationDistance = mOuterRadius * 0.9f;
         final float from[][] = {
                 {mWaveCenterX - r, mWaveCenterY},  // left
                 {mWaveCenterX + r, mWaveCenterY},  // right
@@ -310,6 +310,8 @@
                 {mWaveCenterX, mWaveCenterY + chevronAnimationDistance} }; // bottom
 
         mChevronAnimations.clear();
+        final float startScale = 0.5f;
+        final float endScale = 2.0f;
         for (int direction = 0; direction < 4; direction++) {
             for (int count = 0; count < mFeedbackCount; count++) {
                 int delay = count * CHEVRON_INCREMENTAL_DELAY;
@@ -323,6 +325,8 @@
                         "x", new float[] { from[direction][0], to[direction][0] },
                         "y", new float[] { from[direction][1], to[direction][1] },
                         "alpha", new float[] {1.0f, 0.0f},
+                        "scaleX", new float[] {startScale, endScale},
+                        "scaleY", new float[] {startScale, endScale},
                         "onUpdate", mUpdateListener));
             }
         }
diff --git a/core/res/res/drawable-hdpi/ic_emergency.png b/core/res/res/drawable-hdpi/ic_emergency.png
index 89c05e3..09bcbda 100644
--- a/core/res/res/drawable-hdpi/ic_emergency.png
+++ b/core/res/res/drawable-hdpi/ic_emergency.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_down.png b/core/res/res/drawable-hdpi/ic_lockscreen_chevron_down.png
index 620844e..bc718b5 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_down.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_chevron_down.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_left.png b/core/res/res/drawable-hdpi/ic_lockscreen_chevron_left.png
index d008afa..0892c31 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_left.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_chevron_left.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_right.png b/core/res/res/drawable-hdpi/ic_lockscreen_chevron_right.png
index e508900..04cc0a2 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_right.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_chevron_right.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_up.png b/core/res/res/drawable-hdpi/ic_lockscreen_chevron_up.png
index 4ffa833..bb553b1 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_up.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_chevron_up.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_copy_holo_dark.png b/core/res/res/drawable-hdpi/ic_menu_copy_holo_dark.png
index d1e1337..d37d0a3 100644
--- a/core/res/res/drawable-hdpi/ic_menu_copy_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_menu_copy_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_copy_holo_light.png b/core/res/res/drawable-hdpi/ic_menu_copy_holo_light.png
index 5d02660..0dd8865 100644
--- a/core/res/res/drawable-hdpi/ic_menu_copy_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_menu_copy_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_cut_holo_dark.png b/core/res/res/drawable-hdpi/ic_menu_cut_holo_dark.png
index bd28a859..81c52b0 100644
--- a/core/res/res/drawable-hdpi/ic_menu_cut_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_menu_cut_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_cut_holo_light.png b/core/res/res/drawable-hdpi/ic_menu_cut_holo_light.png
index 037c362..15500c3 100644
--- a/core/res/res/drawable-hdpi/ic_menu_cut_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_menu_cut_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_paste_holo_dark.png b/core/res/res/drawable-hdpi/ic_menu_paste_holo_dark.png
index e9514b8..eb701f2 100644
--- a/core/res/res/drawable-hdpi/ic_menu_paste_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_menu_paste_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_paste_holo_light.png b/core/res/res/drawable-hdpi/ic_menu_paste_holo_light.png
index b02aa09..886c493 100644
--- a/core/res/res/drawable-hdpi/ic_menu_paste_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_menu_paste_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_selectall_holo_dark.png b/core/res/res/drawable-hdpi/ic_menu_selectall_holo_dark.png
index b161361..c2cec7f 100644
--- a/core/res/res/drawable-hdpi/ic_menu_selectall_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_menu_selectall_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_selectall_holo_light.png b/core/res/res/drawable-hdpi/ic_menu_selectall_holo_light.png
index 0a7b364..902402e 100644
--- a/core/res/res/drawable-hdpi/ic_menu_selectall_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_menu_selectall_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_emergency.png b/core/res/res/drawable-mdpi/ic_emergency.png
old mode 100755
new mode 100644
index c6faf1e..dfa17c6
--- a/core/res/res/drawable-mdpi/ic_emergency.png
+++ b/core/res/res/drawable-mdpi/ic_emergency.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_down.png b/core/res/res/drawable-mdpi/ic_lockscreen_chevron_down.png
index d3cfd17..308fe8a 100644
--- a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_down.png
+++ b/core/res/res/drawable-mdpi/ic_lockscreen_chevron_down.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_left.png b/core/res/res/drawable-mdpi/ic_lockscreen_chevron_left.png
index e5ef113..9a25634 100644
--- a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_left.png
+++ b/core/res/res/drawable-mdpi/ic_lockscreen_chevron_left.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_right.png b/core/res/res/drawable-mdpi/ic_lockscreen_chevron_right.png
index ab723b7..77240d0 100644
--- a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_right.png
+++ b/core/res/res/drawable-mdpi/ic_lockscreen_chevron_right.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_up.png b/core/res/res/drawable-mdpi/ic_lockscreen_chevron_up.png
index 35aca4e..e0b0134 100644
--- a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_up.png
+++ b/core/res/res/drawable-mdpi/ic_lockscreen_chevron_up.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_copy_holo_dark.png b/core/res/res/drawable-mdpi/ic_menu_copy_holo_dark.png
index cb19fea..97e8ac1 100644
--- a/core/res/res/drawable-mdpi/ic_menu_copy_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_menu_copy_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_copy_holo_light.png b/core/res/res/drawable-mdpi/ic_menu_copy_holo_light.png
index e353d46..74cb920 100644
--- a/core/res/res/drawable-mdpi/ic_menu_copy_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_menu_copy_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_cut_holo_dark.png b/core/res/res/drawable-mdpi/ic_menu_cut_holo_dark.png
index 66a750d..85f3cb2 100644
--- a/core/res/res/drawable-mdpi/ic_menu_cut_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_menu_cut_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_cut_holo_light.png b/core/res/res/drawable-mdpi/ic_menu_cut_holo_light.png
index e7e8c54..77f92fb 100644
--- a/core/res/res/drawable-mdpi/ic_menu_cut_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_menu_cut_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_paste_holo_dark.png b/core/res/res/drawable-mdpi/ic_menu_paste_holo_dark.png
index 23f3a32..093496d 100644
--- a/core/res/res/drawable-mdpi/ic_menu_paste_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_menu_paste_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_paste_holo_light.png b/core/res/res/drawable-mdpi/ic_menu_paste_holo_light.png
index c9d571c..61fd91c 100644
--- a/core/res/res/drawable-mdpi/ic_menu_paste_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_menu_paste_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_selectall_holo_dark.png b/core/res/res/drawable-mdpi/ic_menu_selectall_holo_dark.png
index caec299..da64c75 100644
--- a/core/res/res/drawable-mdpi/ic_menu_selectall_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_menu_selectall_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_selectall_holo_light.png b/core/res/res/drawable-mdpi/ic_menu_selectall_holo_light.png
index 434f5d1..e0dd67c 100644
--- a/core/res/res/drawable-mdpi/ic_menu_selectall_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_menu_selectall_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_emergency.png b/core/res/res/drawable-xhdpi/ic_emergency.png
index f5df6cd..0e97549 100644
--- a/core/res/res/drawable-xhdpi/ic_emergency.png
+++ b/core/res/res/drawable-xhdpi/ic_emergency.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_down.png b/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_down.png
index c655d93..b8e5733 100644
--- a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_down.png
+++ b/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_down.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_left.png b/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_left.png
index 75173cb..ce5da43 100644
--- a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_left.png
+++ b/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_left.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_right.png b/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_right.png
index 9f6da72..c16f143 100644
--- a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_right.png
+++ b/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_right.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_up.png b/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_up.png
index 53794fd..9bed39a 100644
--- a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_up.png
+++ b/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_up.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_copy_holo_dark.png b/core/res/res/drawable-xhdpi/ic_menu_copy_holo_dark.png
index 8014345..ba883ae 100644
--- a/core/res/res/drawable-xhdpi/ic_menu_copy_holo_dark.png
+++ b/core/res/res/drawable-xhdpi/ic_menu_copy_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_copy_holo_light.png b/core/res/res/drawable-xhdpi/ic_menu_copy_holo_light.png
index b5359a1..364b169 100644
--- a/core/res/res/drawable-xhdpi/ic_menu_copy_holo_light.png
+++ b/core/res/res/drawable-xhdpi/ic_menu_copy_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_cut_holo_dark.png b/core/res/res/drawable-xhdpi/ic_menu_cut_holo_dark.png
index 180365f..16632b1 100644
--- a/core/res/res/drawable-xhdpi/ic_menu_cut_holo_dark.png
+++ b/core/res/res/drawable-xhdpi/ic_menu_cut_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_cut_holo_light.png b/core/res/res/drawable-xhdpi/ic_menu_cut_holo_light.png
index a31a06f..6e007c7 100644
--- a/core/res/res/drawable-xhdpi/ic_menu_cut_holo_light.png
+++ b/core/res/res/drawable-xhdpi/ic_menu_cut_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_paste_holo_dark.png b/core/res/res/drawable-xhdpi/ic_menu_paste_holo_dark.png
index 6e7273f..4c5f7f20 100644
--- a/core/res/res/drawable-xhdpi/ic_menu_paste_holo_dark.png
+++ b/core/res/res/drawable-xhdpi/ic_menu_paste_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_paste_holo_light.png b/core/res/res/drawable-xhdpi/ic_menu_paste_holo_light.png
index b7eedd9..6edd4b2 100644
--- a/core/res/res/drawable-xhdpi/ic_menu_paste_holo_light.png
+++ b/core/res/res/drawable-xhdpi/ic_menu_paste_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_selectall_holo_dark.png b/core/res/res/drawable-xhdpi/ic_menu_selectall_holo_dark.png
index 7125557..8eef37d 100644
--- a/core/res/res/drawable-xhdpi/ic_menu_selectall_holo_dark.png
+++ b/core/res/res/drawable-xhdpi/ic_menu_selectall_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_selectall_holo_light.png b/core/res/res/drawable-xhdpi/ic_menu_selectall_holo_light.png
index c7728d4..2e1cf86 100644
--- a/core/res/res/drawable-xhdpi/ic_menu_selectall_holo_light.png
+++ b/core/res/res/drawable-xhdpi/ic_menu_selectall_holo_light.png
Binary files differ
diff --git a/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml b/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml
index 07b4837..dd29164 100644
--- a/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml
+++ b/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml
@@ -80,7 +80,8 @@
             android:layout_alignParentBottom="true"
             android:drawableLeft="@drawable/ic_emergency"
             style="@style/Widget.Button.Transparent"
-            android:drawablePadding="8dip"/>
+            android:drawablePadding="8dip"
+            android:visibility="gone"/>
 
     </RelativeLayout>>
 
diff --git a/core/res/res/layout/keyguard_screen_sim_puk_portrait.xml b/core/res/res/layout/keyguard_screen_sim_puk_portrait.xml
index e5e0459..8b039f7 100644
--- a/core/res/res/layout/keyguard_screen_sim_puk_portrait.xml
+++ b/core/res/res/layout/keyguard_screen_sim_puk_portrait.xml
@@ -34,6 +34,9 @@
             android:layout_height="wrap_content"
             android:gravity="center"
             android:singleLine="true"
+            android:ellipsize="marquee"
+            android:layout_marginRight="6dip"
+            android:layout_marginLeft="6dip"
             android:textAppearance="?android:attr/textAppearanceLarge"/>
 
         <!-- Carrier info -->
@@ -44,6 +47,8 @@
             android:gravity="center"
             android:singleLine="true"
             android:ellipsize="marquee"
+            android:layout_marginRight="6dip"
+            android:layout_marginLeft="6dip"
             android:textAppearance="?android:attr/textAppearanceMedium"/>
 
         <LinearLayout
@@ -52,28 +57,6 @@
             android:layout_height="wrap_content">
 
             <LinearLayout
-                android:orientation="vertical"
-                android:layout_width="wrap_content"
-                android:layout_height="match_parent"
-                android:layout_marginRight="10dip"
-                android:layout_marginLeft="10dip">
-                <TextView android:id="@+id/enter_puk"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:gravity="center_vertical"
-                    android:text="@android:string/keyguard_password_enter_puk_prompt"
-                    android:textSize="30sp"
-                    android:layout_marginBottom="10dip"/>
-                <TextView android:id="@+id/enter_pin"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:gravity="center_vertical"
-                    android:text="@android:string/keyguard_password_enter_pin_prompt"
-                    android:textSize="30sp"
-                    android:layout_marginTop="10dip"/>
-            </LinearLayout>
-
-            <LinearLayout
                   android:orientation="vertical"
                   android:layout_width="wrap_content"
                   android:layout_weight="1"
@@ -92,14 +75,15 @@
                       android:background="@android:drawable/edit_text">
 
                       <!-- displays dots as user enters puk -->
-                      <TextView android:id="@+id/pukDisplay"
+                      <EditText android:id="@+id/pukDisplay"
                           android:layout_width="0dip"
                           android:layout_height="wrap_content"
                           android:layout_weight="1"
                           android:maxLines="1"
-                          android:textAppearance="?android:attr/textAppearanceLargeInverse"
                           android:textStyle="bold"
                           android:inputType="textPassword"
+                          android:textColor="#000"
+                          android:hint="@android:string/keyguard_password_enter_puk_prompt"
                       />
 
                       <ImageButton android:id="@+id/pukDel"
@@ -122,14 +106,15 @@
                       android:background="@android:drawable/edit_text">
 
                       <!-- displays dots as user enters new pin -->
-                      <TextView android:id="@+id/pinDisplay"
+                      <EditText android:id="@+id/pinDisplay"
                           android:layout_width="0dip"
                           android:layout_height="wrap_content"
                           android:layout_weight="1"
                           android:maxLines="1"
-                          android:textAppearance="?android:attr/textAppearanceLargeInverse"
                           android:textStyle="bold"
                           android:inputType="textPassword"
+                          android:textColor="#000"
+                          android:hint="@android:string/keyguard_password_enter_pin_prompt"
                       />
 
                       <ImageButton android:id="@+id/pinDel"
@@ -177,7 +162,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:drawableLeft="@android:drawable/ic_emergency"
-            android:drawablePadding="8dip"
+            android:drawablePadding="4dip"
             android:text="@android:string/lockscreen_emergency_call"
         />
     </LinearLayout>
diff --git a/data/fonts/Roboto-Bold.ttf b/data/fonts/Roboto-Bold.ttf
index c716bbb..e5d828d 100644
--- a/data/fonts/Roboto-Bold.ttf
+++ b/data/fonts/Roboto-Bold.ttf
Binary files differ
diff --git a/data/fonts/Roboto-BoldItalic.ttf b/data/fonts/Roboto-BoldItalic.ttf
index eeb5120..d8fa3ae 100644
--- a/data/fonts/Roboto-BoldItalic.ttf
+++ b/data/fonts/Roboto-BoldItalic.ttf
Binary files differ
diff --git a/data/fonts/Roboto-Italic.ttf b/data/fonts/Roboto-Italic.ttf
index 1e88d3e..6682d17 100644
--- a/data/fonts/Roboto-Italic.ttf
+++ b/data/fonts/Roboto-Italic.ttf
Binary files differ
diff --git a/data/fonts/Roboto-Regular.ttf b/data/fonts/Roboto-Regular.ttf
index 3033027..153c608 100644
--- a/data/fonts/Roboto-Regular.ttf
+++ b/data/fonts/Roboto-Regular.ttf
Binary files differ
diff --git a/policy/src/com/android/internal/policy/impl/AccountUnlockScreen.java b/policy/src/com/android/internal/policy/impl/AccountUnlockScreen.java
index 6ff9a60..f7d936c 100644
--- a/policy/src/com/android/internal/policy/impl/AccountUnlockScreen.java
+++ b/policy/src/com/android/internal/policy/impl/AccountUnlockScreen.java
@@ -112,7 +112,7 @@
         mUpdateMonitor = updateMonitor;
 
         mKeyguardStatusViewManager = new KeyguardStatusViewManager(this, updateMonitor,
-                lockPatternUtils, callback);
+                lockPatternUtils, callback, true);
     }
 
     public void afterTextChanged(Editable s) {
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java b/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java
index 8654a25..61e30bf 100644
--- a/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java
+++ b/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java
@@ -87,7 +87,7 @@
     private LockPatternUtils mLockPatternUtils;
     private KeyguardUpdateMonitor mUpdateMonitor;
     private Button mEmergencyCallButton;
-    private boolean mShouldEnableUnlock;
+    private boolean mUnlockDisabledDueToSimState;
 
     // Shadowed text values
     private CharSequence mCarrierText;
@@ -97,7 +97,7 @@
     private CharSequence mOwnerInfoText;
     private boolean mShowingStatus;
     private KeyguardScreenCallback mCallback;
-    private boolean mHideEmergencyCallButton = false;
+    private final boolean mShowEmergencyButtonByDefault;
 
     private class TransientTextManager {
         private TextView mTextView;
@@ -149,7 +149,8 @@
     };
 
     public KeyguardStatusViewManager(View view, KeyguardUpdateMonitor updateMonitor,
-                LockPatternUtils lockPatternUtils, KeyguardScreenCallback callback) {
+                LockPatternUtils lockPatternUtils, KeyguardScreenCallback callback,
+                boolean showEmergencyButtonByDefault) {
         mContainer = view;
         mDateFormatString = getContext().getString(R.string.full_wday_month_day_no_year);
         mLockPatternUtils = lockPatternUtils;
@@ -163,6 +164,7 @@
         mOwnerInfoView = (TextView) findViewById(R.id.propertyOf);
         mTransportView = (TransportControlView) findViewById(R.id.transport);
         mEmergencyCallButton = (Button) findViewById(R.id.emergencyCallButton);
+        mShowEmergencyButtonByDefault = showEmergencyButtonByDefault;
         if (mEmergencyCallButton != null) {
             mEmergencyCallButton.setText(R.string.lockscreen_emergency_call);
             mEmergencyCallButton.setOnClickListener(this);
@@ -393,10 +395,6 @@
         }
     }
 
-    boolean shouldEnableUnlock() {
-        return mShouldEnableUnlock;
-    }
-
     /**
      * Determine the current status of the lock screen given the sim state and other stuff.
      */
@@ -443,9 +441,8 @@
 
         CharSequence carrierText = null;
         int carrierHelpTextId = 0;
-        mShouldEnableUnlock = true;
+        mUnlockDisabledDueToSimState = false;
         mStatus = getStatusForIccState(simState);
-
         switch (mStatus) {
             case Normal:
                 carrierText = LockPatternUtils.getCarrierString(mUpdateMonitor.getTelephonyPlmn(),
@@ -466,13 +463,14 @@
             case SimPermDisabled:
                 carrierText = getContext().getText(R.string.lockscreen_missing_sim_message_short);
                 carrierHelpTextId = R.string.lockscreen_permanent_disabled_sim_instructions;
+                mUnlockDisabledDueToSimState = true;
                 break;
 
             case SimMissingLocked:
                 carrierText = LockPatternUtils.getCarrierString(mUpdateMonitor.getTelephonyPlmn(),
                         getContext().getText(R.string.lockscreen_missing_sim_message_short));
                 carrierHelpTextId = R.string.lockscreen_missing_sim_instructions;
-                mShouldEnableUnlock = false;
+                mUnlockDisabledDueToSimState = true;
                 break;
 
             case SimLocked:
@@ -484,7 +482,7 @@
                 carrierText = LockPatternUtils.getCarrierString(mUpdateMonitor.getTelephonyPlmn(),
                         getContext().getText(R.string.lockscreen_sim_puk_locked_message));
                 if (!mLockPatternUtils.isPukUnlockScreenEnable()) {
-                    mShouldEnableUnlock = false;
+                    mUnlockDisabledDueToSimState = true;
                 }
                 break;
         }
@@ -556,10 +554,8 @@
 
     private void updateEmergencyCallButtonState() {
         if (mEmergencyCallButton != null) {
-            mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton);
-            if (mHideEmergencyCallButton) {
-                mEmergencyCallButton.setVisibility(View.GONE);
-            }
+            boolean showIfCapable = mShowEmergencyButtonByDefault || mUnlockDisabledDueToSimState;
+            mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton, showIfCapable);
         }
     }
 
@@ -608,9 +604,4 @@
             mCallback.takeEmergencyCallAction();
         }
     }
-
-    public void hideEmergencyCallButton() {
-        mHideEmergencyCallButton = true;
-    }
-
 }
diff --git a/policy/src/com/android/internal/policy/impl/LockScreen.java b/policy/src/com/android/internal/policy/impl/LockScreen.java
index 4f6df36..3469483 100644
--- a/policy/src/com/android/internal/policy/impl/LockScreen.java
+++ b/policy/src/com/android/internal/policy/impl/LockScreen.java
@@ -336,10 +336,7 @@
         }
 
         mStatusViewManager = new KeyguardStatusViewManager(this, mUpdateMonitor, mLockPatternUtils,
-                mCallback);
-
-        // LockScreen doesn't show the emergency call button by default
-        mStatusViewManager.hideEmergencyCallButton();
+                mCallback, false);
 
         setFocusable(true);
         setFocusableInTouchMode(true);
diff --git a/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java b/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java
index 2f2d3b7..6d2f2f2 100644
--- a/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java
+++ b/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java
@@ -98,7 +98,7 @@
         }
 
         mStatusViewManager = new KeyguardStatusViewManager(this, mUpdateMonitor, mLockPatternUtils,
-                mCallback);
+                mCallback, true);
 
         final int quality = lockPatternUtils.getKeyguardStoredPasswordQuality();
         mIsAlpha = DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC == quality
diff --git a/policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java b/policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java
index 0cafeb5a..e70892c 100644
--- a/policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java
+++ b/policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java
@@ -171,7 +171,7 @@
         }
 
         mKeyguardStatusViewManager = new KeyguardStatusViewManager(this, mUpdateMonitor,
-                mLockPatternUtils, mCallback);
+                mLockPatternUtils, mCallback, true);
 
         mLockPatternView = (LockPatternView) findViewById(R.id.lockPattern);
 
diff --git a/policy/src/com/android/internal/policy/impl/SimPukUnlockScreen.java b/policy/src/com/android/internal/policy/impl/SimPukUnlockScreen.java
index 520d302..6acd1c5 100644
--- a/policy/src/com/android/internal/policy/impl/SimPukUnlockScreen.java
+++ b/policy/src/com/android/internal/policy/impl/SimPukUnlockScreen.java
@@ -27,6 +27,7 @@
 import com.android.internal.widget.LockPatternUtils;
 
 import android.text.Editable;
+import android.util.Log;
 import android.view.KeyEvent;
 import android.view.LayoutInflater;
 import android.view.View;
@@ -40,21 +41,20 @@
  * Displays a dialer like interface to unlock the SIM PUK.
  */
 public class SimPukUnlockScreen extends LinearLayout implements KeyguardScreen,
-        View.OnClickListener {
+        View.OnClickListener, View.OnFocusChangeListener {
 
     private static final int DIGIT_PRESS_WAKE_MILLIS = 5000;
 
     private final KeyguardUpdateMonitor mUpdateMonitor;
     private final KeyguardScreenCallback mCallback;
+    private KeyguardStatusViewManager mKeyguardStatusViewManager;
 
     private TextView mHeaderText;
     private TextView mPukText;
     private TextView mPinText;
-
     private TextView mFocusedEntry;
 
-    private TextView mOkButton;
-
+    private View mOkButton;
     private View mDelPukButton;
     private View mDelPinButton;
 
@@ -66,8 +66,6 @@
 
     private int mKeyboardHidden;
 
-    private KeyguardStatusViewManager mKeyguardStatusViewManager;
-
     private static final char[] DIGITS = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
 
     public SimPukUnlockScreen(Context context, Configuration configuration,
@@ -92,44 +90,33 @@
         }
 
         mHeaderText = (TextView) findViewById(R.id.headerText);
+
         mPukText = (TextView) findViewById(R.id.pukDisplay);
-        mPukText.setOnClickListener(new OnClickListener() {
-           public void onClick(View v) {
-               requestFocus(mPukText);
-               mCallback.pokeWakelock();
-           }
-        });
         mPinText = (TextView) findViewById(R.id.pinDisplay);
-        mPinText.setOnClickListener(this);
-
         mDelPukButton = findViewById(R.id.pukDel);
-        mDelPukButton.setOnClickListener(this);
         mDelPinButton = findViewById(R.id.pinDel);
+        mOkButton = findViewById(R.id.ok);
+
         mDelPinButton.setOnClickListener(this);
-
-        mOkButton = (TextView) findViewById(R.id.ok);
-
-        mHeaderText.setText(R.string.keyguard_password_enter_puk_code);
-        mPukText.setFocusable(false);
-        mPinText.setFocusable(false);
+        mDelPukButton.setOnClickListener(this);
         mOkButton.setOnClickListener(this);
 
-        requestFocus(mPukText);
+        mHeaderText.setText(R.string.keyguard_password_enter_puk_code);
+        // To make marquee work
+        mHeaderText.setSelected(true);
 
         mKeyguardStatusViewManager = new KeyguardStatusViewManager(this, updateMonitor,
-                lockpatternutils, callback);
+                lockpatternutils, callback, true);
 
-        setFocusableInTouchMode(true);
-    }
-
-    private void requestFocus(TextView entry) {
-        mFocusedEntry = entry;
-        mFocusedEntry.setText("");
+        mPinText.setFocusableInTouchMode(true);
+        mPinText.setOnFocusChangeListener(this);
+        mPukText.setFocusableInTouchMode(true);
+        mPukText.setOnFocusChangeListener(this);
     }
 
     /** {@inheritDoc} */
     public boolean needsInput() {
-        return true;
+        return false;
     }
 
     /** {@inheritDoc} */
@@ -141,9 +128,6 @@
     public void onResume() {
         // start fresh
         mHeaderText.setText(R.string.keyguard_password_enter_puk_code);
-        requestFocus(mPukText);
-        mPinText.setText("");
-
         mKeyguardStatusViewManager.onResume();
     }
 
@@ -196,25 +180,32 @@
 
     public void onClick(View v) {
         if (v == mDelPukButton) {
+            if (mFocusedEntry != mPukText)
+                mPukText.requestFocus();
             final Editable digits = mPukText.getEditableText();
             final int len = digits.length();
             if (len > 0) {
                 digits.delete(len-1, len);
             }
-            mCallback.pokeWakelock();
         } else if (v == mDelPinButton) {
+            if (mFocusedEntry != mPinText)
+                mPinText.requestFocus();
             final Editable digits = mPinText.getEditableText();
             final int len = digits.length();
             if (len > 0) {
                 digits.delete(len-1, len);
             }
-            mCallback.pokeWakelock();
-        } else if (v == mPinText) {
-            requestFocus(mPinText);
-            mCallback.pokeWakelock();
         } else if (v == mOkButton) {
             checkPuk();
         }
+        mCallback.pokeWakelock(DIGIT_PRESS_WAKE_MILLIS);
+
+    }
+
+    @Override
+    public void onFocusChange(View v, boolean hasFocus) {
+        if (hasFocus)
+            mFocusedEntry = (TextView)v;
     }
 
     private Dialog getSimUnlockProgressDialog() {
@@ -236,7 +227,6 @@
             // otherwise, display a message to the user, and don't submit.
             mHeaderText.setText(R.string.invalidPuk);
             mPukText.setText("");
-            mCallback.pokeWakelock();
             return;
         }
 
@@ -245,7 +235,6 @@
             // otherwise, display a message to the user, and don't submit.
             mHeaderText.setText(R.string.invalidPin);
             mPinText.setText("");
-            mCallback.pokeWakelock();
             return;
         }
 
@@ -267,7 +256,6 @@
                     mPukText.setText("");
                     mPinText.setText("");
                 }
-                mCallback.pokeWakelock();
             }
         }.start();
     }
@@ -290,7 +278,7 @@
             if (len > 0) {
                 digits.delete(len-1, len);
             }
-            mCallback.pokeWakelock();
+            mCallback.pokeWakelock(DIGIT_PRESS_WAKE_MILLIS);
             return true;
         }
 
diff --git a/policy/src/com/android/internal/policy/impl/SimUnlockScreen.java b/policy/src/com/android/internal/policy/impl/SimUnlockScreen.java
index 1acf681..184748a 100644
--- a/policy/src/com/android/internal/policy/impl/SimUnlockScreen.java
+++ b/policy/src/com/android/internal/policy/impl/SimUnlockScreen.java
@@ -100,7 +100,7 @@
         mOkButton.setOnClickListener(this);
 
         mKeyguardStatusViewManager = new KeyguardStatusViewManager(this, updateMonitor,
-                lockpatternutils, callback);
+                lockpatternutils, callback, true);
 
         setFocusableInTouchMode(true);
     }
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index e28c715..0153613 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -1974,7 +1974,8 @@
                     Integer pid = (Integer)pids.get(j);
                     if (pid.intValue() == myPid) {
                         Collection<InetAddress> dnses = p.getDnses();
-                        writePidDns(dnses, myPid);
+                        String proto = determineProto(p);
+                        writePidDns(dnses, myPid, proto);
                         if (doBump) {
                             bumpDns();
                         }
@@ -1984,6 +1985,9 @@
            }
         }
         // nothing found - delete
+        if (SystemProperties.get("net.dnsproto." + myPid).length() != 0) {
+            SystemProperties.set("net.dnsproto." + myPid, "");
+        }
         for (int i = 1; ; i++) {
             String prop = "net.dns" + i + "." + myPid;
             if (SystemProperties.get(prop).length() == 0) {
@@ -1997,7 +2001,7 @@
     }
 
     // return true if results in a change
-    private boolean writePidDns(Collection <InetAddress> dnses, int pid) {
+    private boolean writePidDns(Collection <InetAddress> dnses, int pid, String proto) {
         int j = 1;
         boolean changed = false;
         for (InetAddress dns : dnses) {
@@ -2007,6 +2011,11 @@
                 SystemProperties.set("net.dns" + j++ + "." + pid, dns.getHostAddress());
             }
         }
+        if (dnses.size() > 0 && (changed || !proto.equals(SystemProperties.get("net.dnsproto." +
+                pid)))) {
+            changed = true;
+            SystemProperties.set("net.dnsproto." + pid, proto);
+        }
         return changed;
     }
 
@@ -2037,7 +2046,7 @@
 
     // Caller must grab mDnsLock.
     private boolean updateDns(String network, String iface,
-            Collection<InetAddress> dnses, String domains) {
+            Collection<InetAddress> dnses, String domains, String proto) {
         boolean changed = false;
         int last = 0;
         if (dnses.size() == 0 && mDefaultDns != null) {
@@ -2073,6 +2082,11 @@
         }
         mNumDnsEntries = last;
 
+        if (changed || !proto.equals(SystemProperties.get("net.dnsproto"))) {
+            changed = true;
+            SystemProperties.set("net.dnsproto", proto);
+        }
+
         if (changed) {
             try {
                 mNetd.setDnsServersForInterface(iface, NetworkUtils.makeStrings(dnses));
@@ -2096,11 +2110,14 @@
             if (p == null) return;
             Collection<InetAddress> dnses = p.getDnses();
             boolean changed = false;
+            String proto = determineProto(p);
+
             if (mNetConfigs[netType].isDefault()) {
                 String network = nt.getNetworkInfo().getTypeName();
                 synchronized (mDnsLock) {
                     if (!mDnsOverridden) {
-                        changed = updateDns(network, p.getInterfaceName(), dnses, "");
+                        changed = updateDns(network, p.getInterfaceName(), dnses, "",
+                                proto);
                     }
                 }
             } else {
@@ -2114,13 +2131,35 @@
                 List pids = mNetRequestersPids[netType];
                 for (int y=0; y< pids.size(); y++) {
                     Integer pid = (Integer)pids.get(y);
-                    changed = writePidDns(dnses, pid.intValue());
+                    changed = writePidDns(dnses, pid.intValue(), proto);
                 }
             }
             if (changed) bumpDns();
         }
     }
 
+    private String determineProto(LinkProperties p) {
+        boolean v4 = false;
+        boolean v6 = false;
+        for (RouteInfo r : p.getRoutes()) {
+            if (r.getDestination().getAddress() instanceof Inet6Address) {
+                v6 = true;
+            } else {
+                v4 = true;
+            }
+        }
+        // secondary connections often don't have routes and we infer routes
+        // to the dns servers.  Look at the dns addrs too
+        for (InetAddress i : p.getDnses()) {
+            if (i instanceof Inet6Address) {
+                v6 = true;
+            } else {
+                v4 = true;
+            }
+        }
+        return (v4 ? "v4" : "") + (v6 ? "v6" : "");
+    }
+
     private int getRestoreDefaultNetworkDelay(int networkType) {
         String restoreDefaultNetworkDelayStr = SystemProperties.get(
                 NETWORK_RESTORE_DELAY_PROP_NAME);
@@ -2842,7 +2881,7 @@
             // Apply DNS changes.
             boolean changed = false;
             synchronized (mDnsLock) {
-                changed = updateDns("VPN", "VPN", addresses, domains);
+                changed = updateDns("VPN", "VPN", addresses, domains, "v4");
                 mDnsOverridden = true;
             }
             if (changed) {