Merge "Fix Caches singleton to avoid resource leaks"
diff --git a/core/res/res/color/primary_text_holo_dark.xml b/core/res/res/color/primary_text_holo_dark.xml
index 69ee309..6418664 100644
--- a/core/res/res/color/primary_text_holo_dark.xml
+++ b/core/res/res/color/primary_text_holo_dark.xml
@@ -15,10 +15,10 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_enabled="false" android:color="@android:color/bright_foreground_dark_disabled"/>
- <item android:state_window_focused="false" android:color="@android:color/bright_foreground_dark"/>
- <item android:state_pressed="true" android:color="@android:color/bright_foreground_dark"/>
- <item android:state_selected="true" android:color="@android:color/bright_foreground_dark"/>
- <item android:state_activated="true" android:color="@android:color/bright_foreground_dark"/>
- <item android:color="@android:color/bright_foreground_dark"/> <!-- not selected -->
+ <item android:state_enabled="false" android:color="@android:color/bright_foreground_disabled_holo_dark"/>
+ <item android:state_window_focused="false" android:color="@android:color/bright_foreground_holo_dark"/>
+ <item android:state_pressed="true" android:color="@android:color/bright_foreground_holo_dark"/>
+ <item android:state_selected="true" android:color="@android:color/bright_foreground_holo_dark"/>
+ <item android:state_activated="true" android:color="@android:color/bright_foreground_holo_dark"/>
+ <item android:color="@android:color/bright_foreground_holo_dark"/> <!-- not selected -->
</selector>
diff --git a/core/res/res/color/primary_text_holo_light.xml b/core/res/res/color/primary_text_holo_light.xml
index a8d31ce..86f8f86 100644
--- a/core/res/res/color/primary_text_holo_light.xml
+++ b/core/res/res/color/primary_text_holo_light.xml
@@ -15,12 +15,12 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_enabled="false" android:color="@android:color/bright_foreground_light_disabled"/>
- <item android:state_window_focused="false" android:color="@android:color/bright_foreground_light"/>
- <item android:state_pressed="true" android:color="@android:color/bright_foreground_light"/>
- <item android:state_selected="true" android:color="@android:color/bright_foreground_light"/>
- <item android:state_activated="true" android:color="@android:color/bright_foreground_light"/>
- <item android:color="@android:color/bright_foreground_light"/> <!-- not selected -->
+ <item android:state_enabled="false" android:color="@android:color/bright_foreground_disabled_holo_light"/>
+ <item android:state_window_focused="false" android:color="@android:color/bright_foreground_holo_light"/>
+ <item android:state_pressed="true" android:color="@android:color/bright_foreground_holo_light"/>
+ <item android:state_selected="true" android:color="@android:color/bright_foreground_holo_light"/>
+ <item android:state_activated="true" android:color="@android:color/bright_foreground_holo_light"/>
+ <item android:color="@android:color/bright_foreground_holo_light"/> <!-- not selected -->
</selector>
diff --git a/core/res/res/color/secondary_text_holo_dark.xml b/core/res/res/color/secondary_text_holo_dark.xml
index 376156e..881a1de3 100644
--- a/core/res/res/color/secondary_text_holo_dark.xml
+++ b/core/res/res/color/secondary_text_holo_dark.xml
@@ -15,13 +15,13 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_window_focused="false" android:state_enabled="false" android:color="@android:color/dim_foreground_dark_disabled"/>
- <item android:state_window_focused="false" android:color="@android:color/dim_foreground_dark"/>
- <item android:state_selected="true" android:state_enabled="false" android:color="@android:color/dim_foreground_dark_inverse_disabled"/>
- <item android:state_pressed="true" android:state_enabled="false" android:color="@android:color/dim_foreground_dark_inverse_disabled"/>
- <item android:state_selected="true" android:color="@android:color/dim_foreground_dark_inverse"/>
- <item android:state_activated="true" android:color="@android:color/bright_foreground_dark_inverse"/>
- <item android:state_pressed="true" android:color="@android:color/dim_foreground_dark_inverse"/>
- <item android:state_enabled="false" android:color="@android:color/dim_foreground_dark_disabled"/>
- <item android:color="@android:color/dim_foreground_dark"/> <!-- not selected -->
+ <item android:state_window_focused="false" android:state_enabled="false" android:color="@android:color/dim_foreground_disabled_holo_dark"/>
+ <item android:state_window_focused="false" android:color="@android:color/dim_foreground_holo_dark"/>
+ <item android:state_selected="true" android:state_enabled="false" android:color="@android:color/dim_foreground_inverse_disabled_holo_dark"/>
+ <item android:state_pressed="true" android:state_enabled="false" android:color="@android:color/dim_foreground_inverse_disabled_holo_dark"/>
+ <item android:state_selected="true" android:color="@android:color/dim_foreground_inverse_holo_dark"/>
+ <item android:state_activated="true" android:color="@android:color/bright_foreground_inverse_holo_dark"/>
+ <item android:state_pressed="true" android:color="@android:color/dim_foreground_inverse_holo_dark"/>
+ <item android:state_enabled="false" android:color="@android:color/dim_foreground_disabled_holo_dark"/>
+ <item android:color="@android:color/dim_foreground_holo_dark"/> <!-- not selected -->
</selector>
diff --git a/core/res/res/color/secondary_text_holo_light.xml b/core/res/res/color/secondary_text_holo_light.xml
index b791aeb..05721b2 100644
--- a/core/res/res/color/secondary_text_holo_light.xml
+++ b/core/res/res/color/secondary_text_holo_light.xml
@@ -15,14 +15,14 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_window_focused="false" android:state_enabled="false" android:color="@android:color/dim_foreground_light_disabled"/>
- <item android:state_window_focused="false" android:color="@android:color/dim_foreground_light"/>
+ <item android:state_window_focused="false" android:state_enabled="false" android:color="@android:color/dim_foreground_disabled_holo_light"/>
+ <item android:state_window_focused="false" android:color="@android:color/dim_foreground_holo_light"/>
<!-- Since there is only one selector (for both light and dark), the light's selected state shouldn't be inversed like the dark's. -->
- <item android:state_pressed="true" android:state_enabled="false" android:color="@android:color/dim_foreground_light_disabled"/>
- <item android:state_selected="true" android:state_enabled="false" android:color="@android:color/dim_foreground_light_disabled"/>
- <item android:state_pressed="true" android:color="@android:color/dim_foreground_light"/>
- <item android:state_selected="true" android:color="@android:color/dim_foreground_light"/>
- <item android:state_activated="true" android:color="@android:color/bright_foreground_light"/>
- <item android:state_enabled="false" android:color="@android:color/dim_foreground_light_disabled"/>
- <item android:color="@android:color/dim_foreground_light"/> <!-- not selected -->
+ <item android:state_pressed="true" android:state_enabled="false" android:color="@android:color/dim_foreground_disabled_holo_light"/>
+ <item android:state_selected="true" android:state_enabled="false" android:color="@android:color/dim_foreground_disabled_holo_light"/>
+ <item android:state_pressed="true" android:color="@android:color/dim_foreground_holo_light"/>
+ <item android:state_selected="true" android:color="@android:color/dim_foreground_holo_light"/>
+ <item android:state_activated="true" android:color="@android:color/bright_foreground_holo_light"/>
+ <item android:state_enabled="false" android:color="@android:color/dim_foreground_disabled_holo_light"/>
+ <item android:color="@android:color/dim_foreground_holo_light"/> <!-- not selected -->
</selector>
diff --git a/core/res/res/color/tertiary_text_holo_dark.xml b/core/res/res/color/tertiary_text_holo_dark.xml
index 269ff71..0718d7d 100644
--- a/core/res/res/color/tertiary_text_holo_dark.xml
+++ b/core/res/res/color/tertiary_text_holo_dark.xml
@@ -18,7 +18,7 @@
<item android:state_enabled="false" android:color="#808080"/>
<item android:state_window_focused="false" android:color="#808080"/>
<item android:state_pressed="true" android:color="#808080"/>
- <item android:state_selected="true" android:color="@android:color/dim_foreground_light"/>
+ <item android:state_selected="true" android:color="@android:color/dim_foreground_holo_light"/>
<item android:color="#808080"/> <!-- not selected -->
</selector>
diff --git a/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_dark.9.png
index 05d1668..19ad5c9 100644
--- a/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_light.9.png b/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_light.9.png
index 6f7eb42..180cdf5 100644
--- a/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_disabled_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_default_disabled_holo_dark.9.png
index 2c814f0..c66bb07 100644
--- a/core/res/res/drawable-hdpi/btn_default_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_disabled_holo_light.9.png b/core/res/res/drawable-hdpi/btn_default_disabled_holo_light.9.png
index a88bdf6..c0d3dd7 100644
--- a/core/res/res/drawable-hdpi/btn_default_disabled_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_default_focused_holo_dark.9.png
index 9a61d82..b440e15 100644
--- a/core/res/res/drawable-hdpi/btn_default_focused_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_focused_holo_light.9.png b/core/res/res/drawable-hdpi/btn_default_focused_holo_light.9.png
index 56ca528..8769d0a 100644
--- a/core/res/res/drawable-hdpi/btn_default_focused_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_normal_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_default_normal_holo_dark.9.png
index 6600035..7b8e9e8 100644
--- a/core/res/res/drawable-hdpi/btn_default_normal_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_normal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_normal_holo_light.9.png b/core/res/res/drawable-hdpi/btn_default_normal_holo_light.9.png
index 11d31bb..37c8028 100644
--- a/core/res/res/drawable-hdpi/btn_default_normal_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_normal_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_pressed_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_default_pressed_holo_dark.9.png
index 8c58c37..aa08f45 100644
--- a/core/res/res/drawable-hdpi/btn_default_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_default_pressed_holo_light.9.png b/core/res/res/drawable-hdpi/btn_default_pressed_holo_light.9.png
index d543c66..3e99cb6 100644
--- a/core/res/res/drawable-hdpi/btn_default_pressed_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_default_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_activated_holo.9.png b/core/res/res/drawable-hdpi/list_activated_holo.9.png
new file mode 100644
index 0000000..cd9a08e
--- /dev/null
+++ b/core/res/res/drawable-hdpi/list_activated_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_divider_holo_dark.9.png b/core/res/res/drawable-hdpi/list_divider_holo_dark.9.png
new file mode 100644
index 0000000..7b18202
--- /dev/null
+++ b/core/res/res/drawable-hdpi/list_divider_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_divider_holo_light.9.png b/core/res/res/drawable-hdpi/list_divider_holo_light.9.png
new file mode 100644
index 0000000..17bcbb4
--- /dev/null
+++ b/core/res/res/drawable-hdpi/list_divider_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_focused_holo.9.png b/core/res/res/drawable-hdpi/list_focused_holo.9.png
new file mode 100644
index 0000000..b91e9f2
--- /dev/null
+++ b/core/res/res/drawable-hdpi/list_focused_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_longpressed_holo.9.png b/core/res/res/drawable-hdpi/list_longpressed_holo.9.png
new file mode 100644
index 0000000..db4831d
--- /dev/null
+++ b/core/res/res/drawable-hdpi/list_longpressed_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_pressed_holo_dark.9.png b/core/res/res/drawable-hdpi/list_pressed_holo_dark.9.png
new file mode 100644
index 0000000..1ce1601
--- /dev/null
+++ b/core/res/res/drawable-hdpi/list_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_pressed_holo_light.9.png b/core/res/res/drawable-hdpi/list_pressed_holo_light.9.png
new file mode 100644
index 0000000..b36aa2c
--- /dev/null
+++ b/core/res/res/drawable-hdpi/list_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_section_divider_holo_dark.9.png b/core/res/res/drawable-hdpi/list_section_divider_holo_dark.9.png
new file mode 100644
index 0000000..2dabb5f
--- /dev/null
+++ b/core/res/res/drawable-hdpi/list_section_divider_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_section_divider_holo_light.9.png b/core/res/res/drawable-hdpi/list_section_divider_holo_light.9.png
new file mode 100644
index 0000000..763f4f6f
--- /dev/null
+++ b/core/res/res/drawable-hdpi/list_section_divider_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_selected_holo_dark.9.png b/core/res/res/drawable-hdpi/list_selected_holo_dark.9.png
new file mode 100644
index 0000000..c054e14
--- /dev/null
+++ b/core/res/res/drawable-hdpi/list_selected_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_selected_holo_light.9.png b/core/res/res/drawable-hdpi/list_selected_holo_light.9.png
new file mode 100644
index 0000000..77c4032
--- /dev/null
+++ b/core/res/res/drawable-hdpi/list_selected_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_dark.9.png
index 15003be..ca2271a 100644
--- a/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_light.9.png b/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_light.9.png
index 573f197..0d498e3 100644
--- a/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_default_disabled_holo_dark.9.png
index 953a553..ae922ce 100644
--- a/core/res/res/drawable-mdpi/btn_default_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_disabled_holo_light.9.png b/core/res/res/drawable-mdpi/btn_default_disabled_holo_light.9.png
index d79a61e..89aef31 100644
--- a/core/res/res/drawable-mdpi/btn_default_disabled_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_default_focused_holo_dark.9.png
index 897676e..1f4be44 100644
--- a/core/res/res/drawable-mdpi/btn_default_focused_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_focused_holo_light.9.png b/core/res/res/drawable-mdpi/btn_default_focused_holo_light.9.png
index b485925..e4d0ba0 100644
--- a/core/res/res/drawable-mdpi/btn_default_focused_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_normal_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_default_normal_holo_dark.9.png
index 1cdbf66..050fb19 100644
--- a/core/res/res/drawable-mdpi/btn_default_normal_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_normal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_normal_holo_light.9.png b/core/res/res/drawable-mdpi/btn_default_normal_holo_light.9.png
index ab7eb54..75651fc 100644
--- a/core/res/res/drawable-mdpi/btn_default_normal_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_normal_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_pressed_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_default_pressed_holo_dark.9.png
index d95ef6d..c7d02cf 100644
--- a/core/res/res/drawable-mdpi/btn_default_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_default_pressed_holo_light.9.png b/core/res/res/drawable-mdpi/btn_default_pressed_holo_light.9.png
index 60ed4fc..40c9f64 100644
--- a/core/res/res/drawable-mdpi/btn_default_pressed_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_default_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_activated_holo.9.png b/core/res/res/drawable-mdpi/list_activated_holo.9.png
new file mode 100644
index 0000000..01ec674
--- /dev/null
+++ b/core/res/res/drawable-mdpi/list_activated_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_divider_holo_dark.9.png b/core/res/res/drawable-mdpi/list_divider_holo_dark.9.png
new file mode 100644
index 0000000..7b18202
--- /dev/null
+++ b/core/res/res/drawable-mdpi/list_divider_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_divider_holo_light.9.png b/core/res/res/drawable-mdpi/list_divider_holo_light.9.png
new file mode 100644
index 0000000..17bcbb4
--- /dev/null
+++ b/core/res/res/drawable-mdpi/list_divider_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_focused_holo.9.png b/core/res/res/drawable-mdpi/list_focused_holo.9.png
new file mode 100644
index 0000000..23385df
--- /dev/null
+++ b/core/res/res/drawable-mdpi/list_focused_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_longpressed_holo.9.png b/core/res/res/drawable-mdpi/list_longpressed_holo.9.png
new file mode 100644
index 0000000..3312a51
--- /dev/null
+++ b/core/res/res/drawable-mdpi/list_longpressed_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_pressed_holo_dark.9.png b/core/res/res/drawable-mdpi/list_pressed_holo_dark.9.png
new file mode 100644
index 0000000..bbb14d8
--- /dev/null
+++ b/core/res/res/drawable-mdpi/list_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_pressed_holo_light.9.png b/core/res/res/drawable-mdpi/list_pressed_holo_light.9.png
new file mode 100644
index 0000000..72380d4
--- /dev/null
+++ b/core/res/res/drawable-mdpi/list_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_section_divider_holo_dark.9.png b/core/res/res/drawable-mdpi/list_section_divider_holo_dark.9.png
new file mode 100644
index 0000000..953d7bf
--- /dev/null
+++ b/core/res/res/drawable-mdpi/list_section_divider_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_section_divider_holo_light.9.png b/core/res/res/drawable-mdpi/list_section_divider_holo_light.9.png
new file mode 100644
index 0000000..e5fe664
--- /dev/null
+++ b/core/res/res/drawable-mdpi/list_section_divider_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_selected_holo_dark.9.png b/core/res/res/drawable-mdpi/list_selected_holo_dark.9.png
new file mode 100644
index 0000000..c453506
--- /dev/null
+++ b/core/res/res/drawable-mdpi/list_selected_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_selected_holo_light.9.png b/core/res/res/drawable-mdpi/list_selected_holo_light.9.png
new file mode 100644
index 0000000..58b6b3c
--- /dev/null
+++ b/core/res/res/drawable-mdpi/list_selected_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable/activated_background_holo_dark.xml b/core/res/res/drawable/activated_background_holo_dark.xml
index f71235e..febf2c4 100644
--- a/core/res/res/drawable/activated_background_holo_dark.xml
+++ b/core/res/res/drawable/activated_background_holo_dark.xml
@@ -15,6 +15,6 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_activated="true" android:drawable="@android:drawable/list_selector_activated_holo_dark" />
+ <item android:state_activated="true" android:drawable="@android:drawable/list_activated_holo" />
<item android:drawable="@color/transparent" />
</selector>
diff --git a/core/res/res/drawable/activated_background_holo_light.xml b/core/res/res/drawable/activated_background_holo_light.xml
index 615033d..febf2c4 100644
--- a/core/res/res/drawable/activated_background_holo_light.xml
+++ b/core/res/res/drawable/activated_background_holo_light.xml
@@ -15,6 +15,6 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_activated="true" android:drawable="@android:drawable/list_selector_activated_holo_light" />
+ <item android:state_activated="true" android:drawable="@android:drawable/list_activated_holo" />
<item android:drawable="@color/transparent" />
</selector>
diff --git a/core/res/res/drawable/btn_default_holo_light.xml b/core/res/res/drawable/btn_default_holo_light.xml
new file mode 100644
index 0000000..61bb1bd
--- /dev/null
+++ b/core/res/res/drawable/btn_default_holo_light.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_window_focused="false" android:state_enabled="true"
+ android:drawable="@drawable/btn_default_normal_holo_light" />
+ <item android:state_window_focused="false" android:state_enabled="false"
+ android:drawable="@drawable/btn_default_disabled_holo_light" />
+ <item android:state_pressed="true"
+ android:drawable="@drawable/btn_default_pressed_holo_light" />
+ <item android:state_focused="true" android:state_enabled="true"
+ android:drawable="@drawable/btn_default_focused_holo_light" />
+ <item android:state_enabled="true"
+ android:drawable="@drawable/btn_default_normal_holo_light" />
+ <item android:state_focused="true"
+ android:drawable="@drawable/btn_default_disabled_focused_holo_light" />
+ <item
+ android:drawable="@drawable/btn_default_disabled_holo_light" />
+</selector>
diff --git a/core/res/res/drawable/list_selector_background_transition_holo_dark.xml b/core/res/res/drawable/list_selector_background_transition_holo_dark.xml
new file mode 100644
index 0000000..7c68426
--- /dev/null
+++ b/core/res/res/drawable/list_selector_background_transition_holo_dark.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<transition xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@android:drawable/list_pressed_holo_dark" />
+ <item android:drawable="@android:drawable/list_longpressed_holo" />
+</transition>
diff --git a/core/res/res/drawable/list_selector_background_transition_holo_light.xml b/core/res/res/drawable/list_selector_background_transition_holo_light.xml
new file mode 100644
index 0000000..fc08a84
--- /dev/null
+++ b/core/res/res/drawable/list_selector_background_transition_holo_light.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<transition xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@android:drawable/list_pressed_holo_light" />
+ <item android:drawable="@android:drawable/list_longpressed_holo" />
+</transition>
diff --git a/core/res/res/drawable/list_selector_holo_dark.xml b/core/res/res/drawable/list_selector_holo_dark.xml
index 9cc993a..e4c5c524 100644
--- a/core/res/res/drawable/list_selector_holo_dark.xml
+++ b/core/res/res/drawable/list_selector_holo_dark.xml
@@ -21,7 +21,7 @@
<!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. -->
<item android:state_focused="true" android:state_enabled="false" android:state_pressed="true" android:drawable="@drawable/list_selector_disabled_holo_dark" />
<item android:state_focused="true" android:state_enabled="false" android:drawable="@drawable/list_selector_disabled_holo_dark" />
- <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/list_selector_background_transition" />
- <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/list_selector_background_transition" />
- <item android:state_focused="true" android:drawable="@drawable/list_selector_focused_holo_dark" />
+ <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/list_selector_background_transition_holo_dark" />
+ <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/list_selector_background_transition_holo_dark" />
+ <item android:state_focused="true" android:drawable="@drawable/list_focused_holo" />
</selector>
diff --git a/core/res/res/drawable/list_selector_holo_light.xml b/core/res/res/drawable/list_selector_holo_light.xml
index f2def40..17631bd 100644
--- a/core/res/res/drawable/list_selector_holo_light.xml
+++ b/core/res/res/drawable/list_selector_holo_light.xml
@@ -21,8 +21,8 @@
<!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. -->
<item android:state_focused="true" android:state_enabled="false" android:state_pressed="true" android:drawable="@drawable/list_selector_disabled_holo_light" />
<item android:state_focused="true" android:state_enabled="false" android:drawable="@drawable/list_selector_disabled_holo_light" />
- <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/list_selector_background_transition" />
- <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/list_selector_background_transition" />
- <item android:state_focused="true" android:drawable="@drawable/list_selector_focused_holo_light" />
+ <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/list_selector_background_transition_holo_light" />
+ <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/list_selector_background_transition_holo_light" />
+ <item android:state_focused="true" android:drawable="@drawable/list_focused_holo" />
</selector>
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index 5e77ee1..7ed5a1b 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -1289,7 +1289,7 @@
</style>
<style name="Widget.Holo.TextView.ListSeparator" parent="Widget.TextView.ListSeparator">
- <item name="android:background">@android:drawable/list_section_header_holo_dark</item>
+ <item name="android:background">@android:drawable/list_section_divider_holo_dark</item>
</style>
<style name="Widget.Holo.TextSelectHandle" parent="Widget.TextSelectHandle">
@@ -1521,6 +1521,12 @@
</style>
<style name="Widget.Holo.Light.Button" parent="Widget.Button">
+ <item name="android:background">@android:drawable/btn_default_holo_light</item>
+ <item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
+ <item name="android:textColor">@android:color/primary_text_holo_light</item>
+ <item name="android:minHeight">48dip</item>
+ <item name="android:paddingLeft">32dip</item>
+ <item name="android:paddingRight">32dip</item>
</style>
<style name="Widget.Holo.Light.Button.Small">
@@ -1556,7 +1562,7 @@
</style>
<style name="Widget.Holo.Light.TextView.ListSeparator" parent="Widget.TextView.ListSeparator">
- <item name="android:background">@android:drawable/list_section_header_holo_light</item>
+ <item name="android:background">@android:drawable/list_section_divider_holo_light</item>
</style>
<style name="Widget.Holo.Light.TextSelectHandle" parent="Widget.TextSelectHandle">
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index d698ab3..25951a1 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -703,7 +703,7 @@
<item name="listPreferredItemHeight">64dip</item>
<!-- @hide -->
<item name="searchResultListItemHeight">58dip</item>
- <item name="listDivider">@drawable/divider_horizontal_holo_dark</item>
+ <item name="listDivider">@drawable/list_divider_horizontal_holo_dark</item>
<item name="listSeparatorTextViewStyle">@android:style/Widget.Holo.TextView.ListSeparator</item>
<item name="listChoiceIndicatorSingle">@android:drawable/btn_radio_holo_dark</item>
@@ -713,7 +713,7 @@
<item name="activatedBackgroundIndicator">@android:drawable/activated_background_holo_dark</item>
- <item name="listDividerAlertDialog">@android:drawable/divider_horizontal_holo_dark</item>
+ <item name="listDividerAlertDialog">@android:drawable/list_divider_horizontal_holo_dark</item>
<item name="expandableListPreferredItemPaddingLeft">40dip</item>
<item name="expandableListPreferredChildPaddingLeft">
diff --git a/data/sounds/AllAudio.mk b/data/sounds/AllAudio.mk
new file mode 100644
index 0000000..4e7a403
--- /dev/null
+++ b/data/sounds/AllAudio.mk
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+$(call inherit-product, frameworks/base/data/sounds/OriginalAudio.mk)
+$(call inherit-product, frameworks/base/data/sounds/AudioPackage2.mk)
+$(call inherit-product, frameworks/base/data/sounds/AudioPackage3.mk)
+$(call inherit-product, frameworks/base/data/sounds/AudioPackage4.mk)
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index faad297..7495a06 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -353,19 +353,22 @@
// Window coordinates of the layer
Rect bounds(left, top, right, bottom);
- if (!fboLayer) {
+ if (fboLayer) {
+ // Clear the previous layer regions before we change the viewport
+ clearLayerRegions();
+ } else {
mSnapshot->transform->mapRect(bounds);
// Layers only make sense if they are in the framebuffer's bounds
bounds.intersect(*snapshot->clipRect);
+ // We cannot work with sub-pixels in this case
+ bounds.snapToPixelBoundaries();
+
// When the layer is not an FBO, we may use glCopyTexImage so we
// need to make sure the layer does not extend outside the bounds
// of the framebuffer
bounds.intersect(snapshot->previous->viewport);
-
- // We cannot work with sub-pixels in this case
- bounds.snapToPixelBoundaries();
}
if (bounds.isEmpty() || bounds.getWidth() > mMaxTextureSize ||
@@ -454,14 +457,14 @@
// Copy the framebuffer into the layer
glBindTexture(GL_TEXTURE_2D, layer->texture);
- if (layer->empty) {
- glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, bounds.left, mHeight - bounds.bottom,
- layer->width, layer->height, 0);
- layer->empty = false;
- } else {
- glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, bounds.left, mHeight - bounds.bottom,
- bounds.getWidth(), bounds.getHeight());
- }
+ if (layer->empty) {
+ glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, bounds.left,
+ snapshot->height - bounds.bottom, layer->width, layer->height, 0);
+ layer->empty = false;
+ } else {
+ glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, bounds.left,
+ snapshot->height - bounds.bottom, bounds.getWidth(), bounds.getHeight());
+ }
// Enqueue the buffer coordinates to clear the corresponding region later
mLayers.push(new Rect(bounds));
@@ -487,7 +490,8 @@
}
// Restore the clip from the previous snapshot
- const Rect& clip = *previous->clipRect;
+ Rect& clip(*previous->clipRect);
+ clip.snapToPixelBoundaries();
glScissor(clip.left, previous->height - clip.bottom, clip.getWidth(), clip.getHeight());
Layer* layer = current->layer;
@@ -795,7 +799,8 @@
}
void OpenGLRenderer::drawColor(int color, SkXfermode::Mode mode) {
- const Rect& clip = *mSnapshot->clipRect;
+ Rect& clip(*mSnapshot->clipRect);
+ clip.snapToPixelBoundaries();
drawColorRect(clip.left, clip.top, clip.right, clip.bottom, color, mode, true);
}
@@ -863,6 +868,7 @@
paint->getTextSize());
Rect clipRect(*mSnapshot->clipRect);
+ clipRect.snapToPixelBoundaries();
glScissor(clipRect.left, mSnapshot->height - clipRect.bottom,
clipRect.getWidth(), clipRect.getHeight());
diff --git a/libs/hwui/Rect.h b/libs/hwui/Rect.h
index c571ea1..8f3655c 100644
--- a/libs/hwui/Rect.h
+++ b/libs/hwui/Rect.h
@@ -149,10 +149,10 @@
}
void snapToPixelBoundaries() {
- left = floorf(left);
- top = floorf(top);
- right = ceilf(right);
- bottom = ceilf(bottom);
+ left = floorf(left + 0.5f);
+ top = floorf(top + 0.5f);
+ right = floorf(right + 0.5f);
+ bottom = floorf(bottom + 0.5f);
}
void dump() const {
diff --git a/libs/rs/Android.mk b/libs/rs/Android.mk
index 05c1a48..2ec003f 100644
--- a/libs/rs/Android.mk
+++ b/libs/rs/Android.mk
@@ -23,7 +23,13 @@
# TODO: This should go into build/core/config.mk
RSG_GENERATOR:=$(LOCAL_BUILT_MODULE)
-
+include $(CLEAR_VARS)
+input_data_file := $(LOCAL_PATH)/rslib.bc
+slangdata_output_var_name := rs_runtime_lib_bc
+LOCAL_MODULE := librslib_rt
+LOCAL_MODULE_TAGS := optional
+include frameworks/compile/slang/SlangData.mk
+include $(BUILD_STATIC_LIBRARY)
# Build render script lib ====================
@@ -109,7 +115,7 @@
LOCAL_SHARED_LIBRARIES += libcutils libutils libEGL libGLESv1_CM libGLESv2 libui libbcc
-LOCAL_STATIC_LIBRARIES := libft2
+LOCAL_STATIC_LIBRARIES := libft2 librslib_rt
LOCAL_C_INCLUDES += external/freetype/include
diff --git a/libs/rs/rsScriptC.cpp b/libs/rs/rsScriptC.cpp
index 165fa71..9dce158 100644
--- a/libs/rs/rsScriptC.cpp
+++ b/libs/rs/rsScriptC.cpp
@@ -390,6 +390,9 @@
return NULL;
}
+extern const char rs_runtime_lib_bc[];
+extern unsigned rs_runtime_lib_bc_size;
+
void ScriptCState::runCompiler(Context *rsc, ScriptC *s)
{
LOGV("%p ScriptCState::runCompiler ", rsc);
@@ -398,6 +401,7 @@
s->mBccScript = bccCreateScript();
s->mEnviroment.mIsThreadable = true;
bccScriptBitcode(s->mBccScript, s->mEnviroment.mScriptText, s->mEnviroment.mScriptTextLength);
+ //bccLinkBitcode(s->mBccScript, rs_runtime_lib_bc, rs_runtime_lib_bc_size);
bccRegisterSymbolCallback(s->mBccScript, symbolLookup, s);
bccCompileScript(s->mBccScript);
bccGetScriptLabel(s->mBccScript, "root", (BCCvoid**) &s->mProgram.mRoot);
@@ -533,5 +537,3 @@
}
}
-
-
diff --git a/libs/rs/rslib.bc b/libs/rs/rslib.bc
new file mode 100644
index 0000000..1897c3b
--- /dev/null
+++ b/libs/rs/rslib.bc
Binary files differ
diff --git a/services/java/com/android/server/PowerManagerService.java b/services/java/com/android/server/PowerManagerService.java
index 76588eb..b3e9f9d 100644
--- a/services/java/com/android/server/PowerManagerService.java
+++ b/services/java/com/android/server/PowerManagerService.java
@@ -1794,8 +1794,12 @@
private void updateLightsLocked(int newState, int forceState) {
final int oldState = mPowerState;
- newState = applyButtonState(newState);
- newState = applyKeyboardState(newState);
+ if ((newState & SCREEN_ON_BIT) != 0) {
+ // Only turn on the buttons or keyboard if the screen is also on.
+ // We should never see the buttons on but not the screen.
+ newState = applyButtonState(newState);
+ newState = applyKeyboardState(newState);
+ }
final int realDifference = (newState ^ oldState);
final int difference = realDifference | forceState;
if (difference == 0) {
@@ -1898,6 +1902,16 @@
INITIAL_SCREEN_BRIGHTNESS, nominalCurrentValue);
}
+ if (mSpew) {
+ Slog.d(TAG, "offMask=0x" + Integer.toHexString(offMask)
+ + " dimMask=0x" + Integer.toHexString(dimMask)
+ + " onMask=0x" + Integer.toHexString(onMask)
+ + " difference=0x" + Integer.toHexString(difference)
+ + " realDifference=0x" + Integer.toHexString(realDifference)
+ + " forceState=0x" + Integer.toHexString(forceState)
+ );
+ }
+
if (offMask != 0) {
if (mSpew) Slog.i(TAG, "Setting brightess off: " + offMask);
setLightBrightness(offMask, Power.BRIGHTNESS_OFF);