diff --git a/core/java/android/app/AlertDialog.java b/core/java/android/app/AlertDialog.java index 4a629bbecf204..ac3ca55922f60 100644 --- a/core/java/android/app/AlertDialog.java +++ b/core/java/android/app/AlertDialog.java @@ -28,6 +28,7 @@ import android.util.Log; import android.util.TypedValue; import android.view.ContextThemeWrapper; import android.view.KeyEvent; +import android.view.MotionEvent; import android.view.View; import android.view.WindowManager; import android.widget.AdapterView; @@ -81,6 +82,24 @@ public class AlertDialog extends Dialog implements DialogInterface { return outValue.resourceId; } + @Override + public boolean onTouchEvent(MotionEvent ev) { + if (mCancelable) { + final View decor = mWindow.getDecorView(); + final int width = decor.getWidth(); + final int height = decor.getHeight(); + final float x = ev.getX(); + final float y = ev.getY(); + + if (mCancelable && (x < 0 || x > width || y < 0 || y > height)) { + cancel(); + return true; + } + } + + return super.onTouchEvent(ev); + } + /** * Gets one of the buttons used in the dialog. *
diff --git a/core/java/android/widget/ButtonGroup.java b/core/java/android/widget/ButtonGroup.java
index a9463ffb4620e..ce3decbb2e68f 100644
--- a/core/java/android/widget/ButtonGroup.java
+++ b/core/java/android/widget/ButtonGroup.java
@@ -125,7 +125,7 @@ public class ButtonGroup extends LinearLayout {
@Override
public void addView(View child, int index, ViewGroup.LayoutParams params) {
- if (mButtonBackgroundRes != 0) {
+ if (child instanceof Button && mButtonBackgroundRes != 0) {
// Preserve original padding as we change the background
final int paddingLeft = child.getPaddingLeft();
final int paddingRight = child.getPaddingRight();
diff --git a/core/res/res/drawable-hdpi/dialog_bottom_holo_dark.9.png b/core/res/res/drawable-hdpi/dialog_bottom_holo_dark.9.png
index 83c0852a4e71b..bbfb9f73e2d5a 100644
Binary files a/core/res/res/drawable-hdpi/dialog_bottom_holo_dark.9.png and b/core/res/res/drawable-hdpi/dialog_bottom_holo_dark.9.png differ
diff --git a/core/res/res/drawable-hdpi/dialog_bottom_holo_light.9.png b/core/res/res/drawable-hdpi/dialog_bottom_holo_light.9.png
index c4952164b3522..af69ee5e6e4be 100644
Binary files a/core/res/res/drawable-hdpi/dialog_bottom_holo_light.9.png and b/core/res/res/drawable-hdpi/dialog_bottom_holo_light.9.png differ
diff --git a/core/res/res/drawable-hdpi/dialog_full_holo_dark.9.png b/core/res/res/drawable-hdpi/dialog_full_holo_dark.9.png
index 620adaa4ec8e6..59b9b13769540 100644
Binary files a/core/res/res/drawable-hdpi/dialog_full_holo_dark.9.png and b/core/res/res/drawable-hdpi/dialog_full_holo_dark.9.png differ
diff --git a/core/res/res/drawable-hdpi/dialog_full_holo_light.9.png b/core/res/res/drawable-hdpi/dialog_full_holo_light.9.png
index b03d6cdc7ec67..e1ec9dc4deda1 100644
Binary files a/core/res/res/drawable-hdpi/dialog_full_holo_light.9.png and b/core/res/res/drawable-hdpi/dialog_full_holo_light.9.png differ
diff --git a/core/res/res/drawable-hdpi/dialog_ic_close_focused_holo_dark.png b/core/res/res/drawable-hdpi/dialog_ic_close_focused_holo_dark.png
index 785ae6eb4e14e..0b67f246ef131 100644
Binary files a/core/res/res/drawable-hdpi/dialog_ic_close_focused_holo_dark.png and b/core/res/res/drawable-hdpi/dialog_ic_close_focused_holo_dark.png differ
diff --git a/core/res/res/drawable-hdpi/dialog_ic_close_focused_holo_light.png b/core/res/res/drawable-hdpi/dialog_ic_close_focused_holo_light.png
index d96787b054eb7..107ffe418ebfb 100644
Binary files a/core/res/res/drawable-hdpi/dialog_ic_close_focused_holo_light.png and b/core/res/res/drawable-hdpi/dialog_ic_close_focused_holo_light.png differ
diff --git a/core/res/res/drawable-hdpi/dialog_ic_close_normal_holo_dark.png b/core/res/res/drawable-hdpi/dialog_ic_close_normal_holo_dark.png
index d042a81774737..27112844bad4b 100644
Binary files a/core/res/res/drawable-hdpi/dialog_ic_close_normal_holo_dark.png and b/core/res/res/drawable-hdpi/dialog_ic_close_normal_holo_dark.png differ
diff --git a/core/res/res/drawable-hdpi/dialog_ic_close_normal_holo_light.png b/core/res/res/drawable-hdpi/dialog_ic_close_normal_holo_light.png
index 677cf3dd26d85..1aca4b793fc80 100644
Binary files a/core/res/res/drawable-hdpi/dialog_ic_close_normal_holo_light.png and b/core/res/res/drawable-hdpi/dialog_ic_close_normal_holo_light.png differ
diff --git a/core/res/res/drawable-hdpi/dialog_ic_close_pressed_holo_dark.png b/core/res/res/drawable-hdpi/dialog_ic_close_pressed_holo_dark.png
index 9b13c5b32a83e..9e06c00bc9261 100644
Binary files a/core/res/res/drawable-hdpi/dialog_ic_close_pressed_holo_dark.png and b/core/res/res/drawable-hdpi/dialog_ic_close_pressed_holo_dark.png differ
diff --git a/core/res/res/drawable-hdpi/dialog_ic_close_pressed_holo_light.png b/core/res/res/drawable-hdpi/dialog_ic_close_pressed_holo_light.png
index 8e245fc13de35..f03251008c119 100644
Binary files a/core/res/res/drawable-hdpi/dialog_ic_close_pressed_holo_light.png and b/core/res/res/drawable-hdpi/dialog_ic_close_pressed_holo_light.png differ
diff --git a/core/res/res/drawable-hdpi/dialog_middle_holo_dark.9.png b/core/res/res/drawable-hdpi/dialog_middle_holo_dark.9.png
index cffae3e152b4c..a9f85eadd43be 100644
Binary files a/core/res/res/drawable-hdpi/dialog_middle_holo_dark.9.png and b/core/res/res/drawable-hdpi/dialog_middle_holo_dark.9.png differ
diff --git a/core/res/res/drawable-hdpi/dialog_middle_holo_light.9.png b/core/res/res/drawable-hdpi/dialog_middle_holo_light.9.png
index 0394885fb51f6..c4c46525514b2 100644
Binary files a/core/res/res/drawable-hdpi/dialog_middle_holo_light.9.png and b/core/res/res/drawable-hdpi/dialog_middle_holo_light.9.png differ
diff --git a/core/res/res/drawable-hdpi/dialog_top_holo_dark.9.png b/core/res/res/drawable-hdpi/dialog_top_holo_dark.9.png
index 6746ce8e99983..32c2cb4404616 100644
Binary files a/core/res/res/drawable-hdpi/dialog_top_holo_dark.9.png and b/core/res/res/drawable-hdpi/dialog_top_holo_dark.9.png differ
diff --git a/core/res/res/drawable-hdpi/dialog_top_holo_light.9.png b/core/res/res/drawable-hdpi/dialog_top_holo_light.9.png
index bdcdc718d83b7..7a8fb0e700bd5 100644
Binary files a/core/res/res/drawable-hdpi/dialog_top_holo_light.9.png and b/core/res/res/drawable-hdpi/dialog_top_holo_light.9.png differ
diff --git a/core/res/res/drawable-mdpi/dialog_bottom_holo_dark.9.png b/core/res/res/drawable-mdpi/dialog_bottom_holo_dark.9.png
index e3a30a99755ee..1e2d3270874ad 100644
Binary files a/core/res/res/drawable-mdpi/dialog_bottom_holo_dark.9.png and b/core/res/res/drawable-mdpi/dialog_bottom_holo_dark.9.png differ
diff --git a/core/res/res/drawable-mdpi/dialog_bottom_holo_light.9.png b/core/res/res/drawable-mdpi/dialog_bottom_holo_light.9.png
index f7f344af54ca2..ac2d7a3727c2e 100644
Binary files a/core/res/res/drawable-mdpi/dialog_bottom_holo_light.9.png and b/core/res/res/drawable-mdpi/dialog_bottom_holo_light.9.png differ
diff --git a/core/res/res/drawable-mdpi/dialog_full_holo_dark.9.png b/core/res/res/drawable-mdpi/dialog_full_holo_dark.9.png
index 26bf28a73049f..9d934034a6b60 100644
Binary files a/core/res/res/drawable-mdpi/dialog_full_holo_dark.9.png and b/core/res/res/drawable-mdpi/dialog_full_holo_dark.9.png differ
diff --git a/core/res/res/drawable-mdpi/dialog_full_holo_light.9.png b/core/res/res/drawable-mdpi/dialog_full_holo_light.9.png
index 0edfe85e7fd1f..1c08e6a06c89c 100644
Binary files a/core/res/res/drawable-mdpi/dialog_full_holo_light.9.png and b/core/res/res/drawable-mdpi/dialog_full_holo_light.9.png differ
diff --git a/core/res/res/drawable-mdpi/dialog_ic_close_focused_holo_dark.png b/core/res/res/drawable-mdpi/dialog_ic_close_focused_holo_dark.png
index 4f08fb4a62edd..cc5f4f47b240e 100644
Binary files a/core/res/res/drawable-mdpi/dialog_ic_close_focused_holo_dark.png and b/core/res/res/drawable-mdpi/dialog_ic_close_focused_holo_dark.png differ
diff --git a/core/res/res/drawable-mdpi/dialog_ic_close_focused_holo_light.png b/core/res/res/drawable-mdpi/dialog_ic_close_focused_holo_light.png
index cc535bd41e740..51b4e4d81f0d5 100644
Binary files a/core/res/res/drawable-mdpi/dialog_ic_close_focused_holo_light.png and b/core/res/res/drawable-mdpi/dialog_ic_close_focused_holo_light.png differ
diff --git a/core/res/res/drawable-mdpi/dialog_ic_close_normal_holo_dark.png b/core/res/res/drawable-mdpi/dialog_ic_close_normal_holo_dark.png
index 9d3e5b95299e1..503db7cfa29ed 100644
Binary files a/core/res/res/drawable-mdpi/dialog_ic_close_normal_holo_dark.png and b/core/res/res/drawable-mdpi/dialog_ic_close_normal_holo_dark.png differ
diff --git a/core/res/res/drawable-mdpi/dialog_ic_close_normal_holo_light.png b/core/res/res/drawable-mdpi/dialog_ic_close_normal_holo_light.png
index 74aff557a94de..6a2fb5e636f58 100644
Binary files a/core/res/res/drawable-mdpi/dialog_ic_close_normal_holo_light.png and b/core/res/res/drawable-mdpi/dialog_ic_close_normal_holo_light.png differ
diff --git a/core/res/res/drawable-mdpi/dialog_ic_close_pressed_holo_dark.png b/core/res/res/drawable-mdpi/dialog_ic_close_pressed_holo_dark.png
index c7f7699719c27..3463b66891341 100644
Binary files a/core/res/res/drawable-mdpi/dialog_ic_close_pressed_holo_dark.png and b/core/res/res/drawable-mdpi/dialog_ic_close_pressed_holo_dark.png differ
diff --git a/core/res/res/drawable-mdpi/dialog_ic_close_pressed_holo_light.png b/core/res/res/drawable-mdpi/dialog_ic_close_pressed_holo_light.png
index a10f9a6864075..55dedc62db61f 100644
Binary files a/core/res/res/drawable-mdpi/dialog_ic_close_pressed_holo_light.png and b/core/res/res/drawable-mdpi/dialog_ic_close_pressed_holo_light.png differ
diff --git a/core/res/res/drawable-mdpi/dialog_middle_holo_dark.9.png b/core/res/res/drawable-mdpi/dialog_middle_holo_dark.9.png
index 51e7ec3cb3333..741b8dcbfad4d 100644
Binary files a/core/res/res/drawable-mdpi/dialog_middle_holo_dark.9.png and b/core/res/res/drawable-mdpi/dialog_middle_holo_dark.9.png differ
diff --git a/core/res/res/drawable-mdpi/dialog_middle_holo_light.9.png b/core/res/res/drawable-mdpi/dialog_middle_holo_light.9.png
index c4b70625af3c5..0854fe5c2e2fd 100644
Binary files a/core/res/res/drawable-mdpi/dialog_middle_holo_light.9.png and b/core/res/res/drawable-mdpi/dialog_middle_holo_light.9.png differ
diff --git a/core/res/res/drawable-mdpi/dialog_top_holo_dark.9.png b/core/res/res/drawable-mdpi/dialog_top_holo_dark.9.png
index 7f97eaee075dc..43c0050f6d713 100644
Binary files a/core/res/res/drawable-mdpi/dialog_top_holo_dark.9.png and b/core/res/res/drawable-mdpi/dialog_top_holo_dark.9.png differ
diff --git a/core/res/res/drawable-mdpi/dialog_top_holo_light.9.png b/core/res/res/drawable-mdpi/dialog_top_holo_light.9.png
index 341bb4ba0ca1b..bc5fc92bdd260 100644
Binary files a/core/res/res/drawable-mdpi/dialog_top_holo_light.9.png and b/core/res/res/drawable-mdpi/dialog_top_holo_light.9.png differ
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index 06c502b8f4040..d7954a769b004 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -89,7 +89,7 @@