Merge "Guard against NPE in SearchManagerService" into froyo
diff --git a/core/res/res/color/secondary_text_nofocus.xml b/core/res/res/color/secondary_text_nofocus.xml
new file mode 100644
index 0000000..b6cbfb5
--- /dev/null
+++ b/core/res/res/color/secondary_text_nofocus.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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:color="#eeeeee"/> <!-- not selected -->
+</selector>
+
diff --git a/core/res/res/drawable-hdpi/recent_dialog_background.9.png b/core/res/res/drawable-hdpi/recent_dialog_background.9.png
new file mode 100644
index 0000000..bebcc40
--- /dev/null
+++ b/core/res/res/drawable-hdpi/recent_dialog_background.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/recent_dialog_background.9.png b/core/res/res/drawable-mdpi/recent_dialog_background.9.png
new file mode 100644
index 0000000..18ed3ff
--- /dev/null
+++ b/core/res/res/drawable-mdpi/recent_dialog_background.9.png
Binary files differ
diff --git a/core/res/res/drawable/btn_application_selector.xml b/core/res/res/drawable/btn_application_selector.xml
deleted file mode 100644
index 5575b85..0000000
--- a/core/res/res/drawable/btn_application_selector.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2007, 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_pressed="true" 
-          android:drawable="@drawable/pressed_application_background_static" />
-    <item android:state_focused="true" 
-          android:drawable="@drawable/focused_application_background_static" />
-</selector>
diff --git a/core/res/res/layout/recent_apps_dialog.xml b/core/res/res/layout/recent_apps_dialog.xml
index 4e416e1..6bacc58 100644
--- a/core/res/res/layout/recent_apps_dialog.xml
+++ b/core/res/res/layout/recent_apps_dialog.xml
@@ -17,17 +17,19 @@
 */
 -->
 
-<LinearLayout
+<com.android.internal.policy.impl.RecentApplicationsBackground
     xmlns:android="http://schemas.android.com/apk/res/android"
+    android:background="@drawable/recent_dialog_background"
     android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:padding="3dip"
+    android:layout_height="match_parent"
+    android:paddingTop="3dip"
+    android:paddingBottom="3dip"
     android:orientation="vertical">
 
     <!-- This is only intended to be visible when all buttons (below) are invisible -->
     <TextView
         android:id="@+id/no_applications_message"
-        android:layout_width="285dip"
+        android:layout_width="320dip"
         android:layout_height="wrap_content"
         android:layout_marginTop="15dip"
         android:layout_marginBottom="15dip"
@@ -40,12 +42,16 @@
          adjust height based on number of rows. -->
     <!-- TODO Adjust all sizes, padding, etc. to meet pixel-perfect specs -->
     <LinearLayout
-        android:layout_width="285dip"
+        android:layout_width="320dip"
         android:layout_height="wrap_content"
         android:orientation="horizontal" >
 
         <include
             layout="@android:layout/recent_apps_icon"
+            android:id="@+id/button0" />
+
+        <include
+            layout="@android:layout/recent_apps_icon"
             android:id="@+id/button1" />
 
         <include
@@ -59,7 +65,7 @@
     </LinearLayout>
 
     <LinearLayout
-        android:layout_width="wrap_content"
+        android:layout_width="320dp"
         android:layout_height="wrap_content"
         android:orientation="horizontal" >
 
@@ -75,5 +81,9 @@
             layout="@android:layout/recent_apps_icon"
             android:id="@+id/button6" />
 
+        <include
+            layout="@android:layout/recent_apps_icon"
+            android:id="@+id/button7" />
+
     </LinearLayout>
-</LinearLayout>
\ No newline at end of file
+</com.android.internal.policy.impl.RecentApplicationsBackground>
diff --git a/core/res/res/layout/recent_apps_icon.xml b/core/res/res/layout/recent_apps_icon.xml
index d32643c..f73aec3 100644
--- a/core/res/res/layout/recent_apps_icon.xml
+++ b/core/res/res/layout/recent_apps_icon.xml
@@ -22,11 +22,12 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/label"
     style="?android:attr/buttonStyle"
-    android:background="@drawable/btn_application_selector"
-    android:layout_width="87dip"
-    android:layout_height="88dip"
-    android:layout_margin="3dip"
-    android:textColor="@color/primary_text_dark_focused"
+    android:background="#00000000"
+    android:layout_width="80dip"
+    android:layout_height="wrap_content"
+    android:layout_marginTop="3dip"
+    android:layout_marginBottom="3dip"
+    android:textColor="@color/bright_foreground_dark"
 
     android:paddingTop="5dip"
     android:paddingBottom="2dip"
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index 1287669..b5fff96 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -181,8 +181,8 @@
     <!-- A special animation we can use for recent applications,
          for devices that can support it (do alpha transformations). -->
     <style name="Animation.RecentApplications">
-        <item name="windowEnterAnimation">@anim/recent_enter</item>
-        <item name="windowExitAnimation">@anim/recent_exit</item>
+        <item name="windowEnterAnimation">@anim/fade_in</item>
+        <item name="windowExitAnimation">@anim/fade_out</item>
     </style>
 
     <!-- Status Bar Styles -->
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index 6dae8b8..d585d9e 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -516,6 +516,10 @@
     <!-- Special theme for the recent apps dialog, to allow customization
          with overlays. -->
     <style name="Theme.Dialog.RecentApplications">
+        <item name="windowFrame">@null</item>
+        <item name="windowBackground">@android:color/transparent</item>
+        <item name="android:windowAnimationStyle">@android:style/Animation.RecentApplications</item>
+        <item name="android:textColor">@android:color/secondary_text_nofocus</item>
     </style>
     
 </resources>