Merge "Import translations. DO NOT MERGE" into jb-dev
diff --git a/res/layout-sw580dp-w1000dp/contact_editor_activity.xml b/res/layout-sw580dp-w940dp/contact_editor_activity.xml
similarity index 99%
rename from res/layout-sw580dp-w1000dp/contact_editor_activity.xml
rename to res/layout-sw580dp-w940dp/contact_editor_activity.xml
index e5f00dd..5c405d5 100644
--- a/res/layout-sw580dp-w1000dp/contact_editor_activity.xml
+++ b/res/layout-sw580dp-w940dp/contact_editor_activity.xml
@@ -46,4 +46,4 @@
 
     </LinearLayout>
 
-</ScrollView>
\ No newline at end of file
+</ScrollView>
diff --git a/res/layout-sw580dp-w940dp/people_activity.xml b/res/layout-sw580dp-w940dp/people_activity.xml
new file mode 100644
index 0000000..44e740e
--- /dev/null
+++ b/res/layout-sw580dp-w940dp/people_activity.xml
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<FrameLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <LinearLayout
+        android:id="@+id/main_view"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="horizontal"
+        android:splitMotionEvents="true"
+        android:baselineAligned="false">
+
+        <!-- Left panel browse list for Groups or All tabs -->
+        <FrameLayout
+            android:id="@+id/browse_view"
+            android:layout_width="0dip"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:background="@drawable/list_background_holo"
+            android:visibility="gone">
+
+            <!-- All -->
+            <fragment
+                android:id="@+id/all_fragment"
+                class="com.android.contacts.list.DefaultContactBrowseListFragment"
+                android:layout_height="match_parent"
+                android:layout_width="match_parent" />
+
+            <!-- Groups -->
+            <fragment
+                android:id="@+id/groups_fragment"
+                class="com.android.contacts.group.GroupBrowseListFragment"
+                android:layout_height="match_parent"
+                android:layout_width="match_parent" />
+        </FrameLayout>
+
+        <!-- Right panel detail view for All tab -->
+        <view
+            class="com.android.contacts.widget.TransitionAnimationView"
+            android:id="@+id/contact_details_view"
+            android:layout_width="0dip"
+            android:layout_height="match_parent"
+            android:layout_weight="2"
+            android:background="@color/background_primary"
+            android:visibility="gone">
+
+            <!-- This layout includes all possible views needed for a contact detail page -->
+            <include
+                android:id="@+id/contact_detail_container"
+                layout="@layout/contact_detail_container"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="16dip"
+                android:layout_marginTop="16dip"
+                android:layout_marginRight="16dip" />
+
+            <!-- This invisible worker fragment loads the contact's details -->
+            <fragment
+                android:id="@+id/contact_detail_loader_fragment"
+                class="com.android.contacts.detail.ContactLoaderFragment"
+                android:layout_height="0dip"
+                android:layout_width="0dip"
+                android:visibility="gone"/>
+        </view>
+
+        <!-- Right panel detail view for Groups tab -->
+        <view
+            class="com.android.contacts.widget.TransitionAnimationView"
+            android:id="@+id/group_details_view"
+            android:layout_width="0dip"
+            android:layout_height="match_parent"
+            android:layout_weight="2"
+            android:background="@color/background_primary"
+            android:visibility="gone">
+
+            <!-- This is the group detail page -->
+            <fragment
+                android:id="@+id/group_detail_fragment"
+                class="com.android.contacts.group.GroupDetailFragment"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:visibility="gone" />
+        </view>
+
+        <!-- Two-panel view under the Favorites tab -->
+        <LinearLayout
+            android:id="@+id/favorites_view"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@drawable/list_background_holo"
+            android:baselineAligned="false">
+
+            <!-- Starred -->
+            <FrameLayout
+                android:layout_width="0dip"
+                android:layout_height="match_parent"
+                android:layout_weight="2"
+                android:background="@drawable/panel_favorites_holo_light">
+
+                <fragment
+                    android:id="@+id/favorites_fragment"
+                    class="com.android.contacts.list.ContactTileListFragment"
+                    android:layout_height="match_parent"
+                    android:layout_width="match_parent"
+                    android:layout_marginRight="16dip"
+                    android:layout_marginLeft="16dip"/>
+
+            </FrameLayout>
+
+            <!-- Most Frequent -->
+            <fragment
+                android:id="@+id/frequent_fragment"
+                class="com.android.contacts.list.ContactTileFrequentFragment"
+                android:layout_width="0dip"
+                android:layout_height="match_parent"
+                android:layout_weight="1"
+                android:layout_marginTop="16dip"
+                android:layout_marginRight="16dip"/>
+
+        </LinearLayout>
+
+    </LinearLayout>
+
+    <com.android.contacts.widget.InterpolatingLayout
+        android:id="@+id/contacts_unavailable_view"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:visibility="gone">
+
+        <FrameLayout
+            android:id="@+id/contacts_unavailable_container"
+            android:layout_height="match_parent"
+            android:layout_width="match_parent"
+            ex:layout_narrowParentWidth="800dip"
+            ex:layout_narrowMarginLeft="80dip"
+            ex:layout_narrowMarginRight="80dip"
+            ex:layout_wideParentWidth="1280dip"
+            ex:layout_wideMarginLeft="200dip"
+            ex:layout_wideMarginRight="200dip"
+            android:paddingBottom="20dip" />
+
+    </com.android.contacts.widget.InterpolatingLayout>
+</FrameLayout>
diff --git a/res/layout-sw580dp-w1000dp/quickcontact_list_fragment_bottom.xml b/res/layout-sw580dp-w940dp/quickcontact_list_fragment_bottom.xml
similarity index 100%
rename from res/layout-sw580dp-w1000dp/quickcontact_list_fragment_bottom.xml
rename to res/layout-sw580dp-w940dp/quickcontact_list_fragment_bottom.xml
diff --git a/res/layout-sw580dp/people_activity.xml b/res/layout-sw580dp/people_activity.xml
index f93e55e..93f7795 100644
--- a/res/layout-sw580dp/people_activity.xml
+++ b/res/layout-sw580dp/people_activity.xml
@@ -28,6 +28,7 @@
         android:splitMotionEvents="true"
         android:baselineAligned="false">
 
+        <!-- Left panel browse list for Groups or All tabs -->
         <FrameLayout
             android:id="@+id/browse_view"
             android:layout_width="0dip"
@@ -51,12 +52,13 @@
                 android:layout_width="match_parent" />
         </FrameLayout>
 
+        <!-- Right panel detail view for All tab -->
         <view
             class="com.android.contacts.widget.TransitionAnimationView"
             android:id="@+id/contact_details_view"
             android:layout_width="0dip"
             android:layout_height="match_parent"
-            android:layout_weight="1"
+            android:layout_weight="2"
             android:background="@color/background_primary"
             android:visibility="gone">
 
@@ -79,12 +81,13 @@
                 android:visibility="gone"/>
         </view>
 
+        <!-- Right panel detail view for Groups tab -->
         <view
             class="com.android.contacts.widget.TransitionAnimationView"
             android:id="@+id/group_details_view"
             android:layout_width="0dip"
             android:layout_height="match_parent"
-            android:layout_weight="1"
+            android:layout_weight="2"
             android:background="@color/background_primary"
             android:visibility="gone">
 
@@ -97,6 +100,7 @@
                 android:visibility="gone" />
         </view>
 
+        <!-- Two-panel view under the Favorites tab -->
         <LinearLayout
             android:id="@+id/favorites_view"
             android:layout_width="match_parent"
diff --git a/res/layout-sw680dp/people_activity.xml b/res/layout-sw680dp/people_activity.xml
new file mode 100644
index 0000000..f604f9b
--- /dev/null
+++ b/res/layout-sw680dp/people_activity.xml
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<FrameLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <LinearLayout
+        android:id="@+id/main_view"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="horizontal"
+        android:splitMotionEvents="true"
+        android:baselineAligned="false">
+
+        <!-- Left panel browse list for Groups or All tabs -->
+        <FrameLayout
+            android:id="@+id/browse_view"
+            android:layout_width="0dip"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:background="@drawable/list_background_holo"
+            android:visibility="gone">
+
+            <!-- All -->
+            <fragment
+                android:id="@+id/all_fragment"
+                class="com.android.contacts.list.DefaultContactBrowseListFragment"
+                android:layout_height="match_parent"
+                android:layout_width="match_parent" />
+
+            <!-- Groups -->
+            <fragment
+                android:id="@+id/groups_fragment"
+                class="com.android.contacts.group.GroupBrowseListFragment"
+                android:layout_height="match_parent"
+                android:layout_width="match_parent" />
+        </FrameLayout>
+
+        <!-- Right panel detail view for All tab -->
+        <view
+            class="com.android.contacts.widget.TransitionAnimationView"
+            android:id="@+id/contact_details_view"
+            android:layout_width="0dip"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:background="@color/background_primary"
+            android:visibility="gone">
+
+            <!-- This layout includes all possible views needed for a contact detail page -->
+            <include
+                android:id="@+id/contact_detail_container"
+                layout="@layout/contact_detail_container"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="16dip"
+                android:layout_marginTop="16dip"
+                android:layout_marginRight="16dip" />
+
+            <!-- This invisible worker fragment loads the contact's details -->
+            <fragment
+                android:id="@+id/contact_detail_loader_fragment"
+                class="com.android.contacts.detail.ContactLoaderFragment"
+                android:layout_height="0dip"
+                android:layout_width="0dip"
+                android:visibility="gone"/>
+        </view>
+
+        <!-- Right panel detail view for Groups tab -->
+        <view
+            class="com.android.contacts.widget.TransitionAnimationView"
+            android:id="@+id/group_details_view"
+            android:layout_width="0dip"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:background="@color/background_primary"
+            android:visibility="gone">
+
+            <!-- This is the group detail page -->
+            <fragment
+                android:id="@+id/group_detail_fragment"
+                class="com.android.contacts.group.GroupDetailFragment"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:visibility="gone" />
+        </view>
+
+        <!-- Two-panel view under the Favorites tab -->
+        <LinearLayout
+            android:id="@+id/favorites_view"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@drawable/list_background_holo"
+            android:baselineAligned="false">
+
+            <!-- Starred -->
+            <FrameLayout
+                android:layout_width="0dip"
+                android:layout_height="match_parent"
+                android:layout_weight="10"
+                android:background="@drawable/panel_favorites_holo_light">
+
+                <fragment
+                    android:id="@+id/favorites_fragment"
+                    class="com.android.contacts.list.ContactTileListFragment"
+                    android:layout_height="match_parent"
+                    android:layout_width="match_parent"
+                    android:layout_marginRight="16dip"
+                    android:layout_marginLeft="16dip"/>
+
+            </FrameLayout>
+
+            <!-- Most Frequent -->
+            <fragment
+                android:id="@+id/frequent_fragment"
+                class="com.android.contacts.list.ContactTileFrequentFragment"
+                android:layout_width="0dip"
+                android:layout_height="match_parent"
+                android:layout_weight="8"
+                android:layout_marginTop="16dip"
+                android:layout_marginRight="16dip"/>
+
+        </LinearLayout>
+
+    </LinearLayout>
+
+    <com.android.contacts.widget.InterpolatingLayout
+        android:id="@+id/contacts_unavailable_view"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:visibility="gone">
+
+        <FrameLayout
+            android:id="@+id/contacts_unavailable_container"
+            android:layout_height="match_parent"
+            android:layout_width="match_parent"
+            ex:layout_narrowParentWidth="800dip"
+            ex:layout_narrowMarginLeft="80dip"
+            ex:layout_narrowMarginRight="80dip"
+            ex:layout_wideParentWidth="1280dip"
+            ex:layout_wideMarginLeft="200dip"
+            ex:layout_wideMarginRight="200dip"
+            android:paddingBottom="20dip" />
+
+    </com.android.contacts.widget.InterpolatingLayout>
+</FrameLayout>
diff --git a/res/values-sw580dp-w1000dp/dimens.xml b/res/values-sw580dp-w940dp/dimens.xml
similarity index 92%
rename from res/values-sw580dp-w1000dp/dimens.xml
rename to res/values-sw580dp-w940dp/dimens.xml
index 5c4b240..4053a98 100644
--- a/res/values-sw580dp-w1000dp/dimens.xml
+++ b/res/values-sw580dp-w940dp/dimens.xml
@@ -16,4 +16,5 @@
 <resources>
     <dimen name="group_editor_side_padding">64dip</dimen>
     <dimen name="quick_contact_photo_container_height">180dip</dimen>
+    <dimen name="list_visible_scrollbar_padding">32dip</dimen>
 </resources>
diff --git a/res/values-sw580dp-w940dp/donottranslate_config.xml b/res/values-sw580dp-w940dp/donottranslate_config.xml
new file mode 100644
index 0000000..92d2780
--- /dev/null
+++ b/res/values-sw580dp-w940dp/donottranslate_config.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2011, 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.
+*/
+-->
+
+<resources>
+    <bool name="config_browse_list_show_images">true</bool>
+</resources>
diff --git a/res/values-sw580dp-w1000dp/integers.xml b/res/values-sw580dp-w940dp/integers.xml
similarity index 92%
rename from res/values-sw580dp-w1000dp/integers.xml
rename to res/values-sw580dp-w940dp/integers.xml
index c09a1f3..8ce96de 100644
--- a/res/values-sw580dp-w1000dp/integers.xml
+++ b/res/values-sw580dp-w940dp/integers.xml
@@ -14,5 +14,6 @@
      limitations under the License.
 -->
 <resources>
+    <integer name="contact_tile_column_count">3</integer>
     <integer name="updates_tab_snippet_max_lines">7</integer>
 </resources>
diff --git a/res/values-sw580dp/dimens.xml b/res/values-sw580dp/dimens.xml
index 78f662d..0c73fa4 100644
--- a/res/values-sw580dp/dimens.xml
+++ b/res/values-sw580dp/dimens.xml
@@ -36,7 +36,7 @@
     <dimen name="contact_browser_list_top_margin">16dip</dimen>
     <dimen name="contact_browser_list_header_left_margin">@dimen/list_visible_scrollbar_padding</dimen>
     <dimen name="contact_browser_list_header_right_margin">24dip</dimen>
-    <dimen name="list_visible_scrollbar_padding">48dip</dimen>
+    <dimen name="list_visible_scrollbar_padding">32dip</dimen>
     <dimen name="list_header_extra_top_padding">@dimen/contact_browser_list_top_margin</dimen>
 
     <dimen name="quick_contact_photo_container_height">360dip</dimen>
diff --git a/res/values-sw580dp/donottranslate_config.xml b/res/values-sw580dp/donottranslate_config.xml
index 4e17168..cf4286e 100644
--- a/res/values-sw580dp/donottranslate_config.xml
+++ b/res/values-sw580dp/donottranslate_config.xml
@@ -21,6 +21,7 @@
     <bool name="config_use_two_panes">true</bool>
     <bool name="show_home_icon">true</bool>
     <bool name="config_show_group_action_in_action_bar">false</bool>
+    <bool name="config_browse_list_show_images">false</bool>
     <item name="tab_width_screen_width_percentage" type="fraction">66.67%</item>
     <item name="tab_height_screen_width_percentage" type="fraction">66.67%</item>
 </resources>
diff --git a/res/values-sw680dp-w1000dp/dimens.xml b/res/values-sw680dp-w1000dp/dimens.xml
index 680bcee..661401a 100644
--- a/res/values-sw680dp-w1000dp/dimens.xml
+++ b/res/values-sw680dp-w1000dp/dimens.xml
@@ -19,4 +19,5 @@
     <dimen name="detail_contact_photo_margin">16dip</dimen>
     <dimen name="contact_detail_list_top_padding">32dip</dimen>
     <dimen name="contact_tile_list_padding_top">32dip</dimen>
+    <dimen name="list_visible_scrollbar_padding">48dip</dimen>
 </resources>
diff --git a/res/values-sw680dp-w1000dp/donottranslate_config.xml b/res/values-sw680dp-w1000dp/donottranslate_config.xml
new file mode 100644
index 0000000..92d2780
--- /dev/null
+++ b/res/values-sw680dp-w1000dp/donottranslate_config.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2011, 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.
+*/
+-->
+
+<resources>
+    <bool name="config_browse_list_show_images">true</bool>
+</resources>
diff --git a/res/values-sw680dp/dimens.xml b/res/values-sw680dp/dimens.xml
index 7c39689..495526d 100644
--- a/res/values-sw680dp/dimens.xml
+++ b/res/values-sw680dp/dimens.xml
@@ -20,4 +20,5 @@
     <dimen name="group_editor_side_padding">16dip</dimen>
     <dimen name="quick_contact_photo_container_height">360dip</dimen>
     <dimen name="contact_picker_contact_list_min_height">650dip</dimen>
+    <dimen name="list_visible_scrollbar_padding">48dip</dimen>
 </resources>
diff --git a/res/values-sw680dp/donottranslate_config.xml b/res/values-sw680dp/donottranslate_config.xml
new file mode 100644
index 0000000..92d2780
--- /dev/null
+++ b/res/values-sw680dp/donottranslate_config.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2011, 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.
+*/
+-->
+
+<resources>
+    <bool name="config_browse_list_show_images">true</bool>
+</resources>
diff --git a/res/values/donottranslate_config.xml b/res/values/donottranslate_config.xml
index d3b7420..64a1243 100644
--- a/res/values/donottranslate_config.xml
+++ b/res/values/donottranslate_config.xml
@@ -44,6 +44,9 @@
          resource. -->
     <bool name="config_enable_dialer_key_vibration">true</bool>
 
+    <!-- Flag indicating whether to show images in browse list -->
+    <bool name="config_browse_list_show_images">true</bool>
+
     <!-- The type of vcard for improt. If the vcard importer cannot guess the exact type
     of a vCard type, the improter uses this type. -->
     <string name="config_import_vcard_type" translatable="false">default</string>
diff --git a/src/com/android/contacts/detail/ContactDetailFragment.java b/src/com/android/contacts/detail/ContactDetailFragment.java
index 603d2fa..197ba4f 100644
--- a/src/com/android/contacts/detail/ContactDetailFragment.java
+++ b/src/com/android/contacts/detail/ContactDetailFragment.java
@@ -211,6 +211,8 @@
     private boolean mIsUniqueNumber;
     private boolean mIsUniqueEmail;
 
+    private ListPopupWindow mPopup;
+
     public ContactDetailFragment() {
         // Explicit constructor for inflation
     }
@@ -235,6 +237,7 @@
 
     @Override
     public void onPause() {
+        dismissPopupIfShown();
         super.onPause();
     }
 
@@ -288,10 +291,6 @@
         return mView;
     }
 
-    protected View inflate(int resource, ViewGroup root, boolean attachToRoot) {
-        return mInflater.inflate(resource, root, attachToRoot);
-    }
-
     public void setListener(Listener value) {
         mListener = value;
     }
@@ -1006,23 +1005,31 @@
      */
     private void showListPopup(View anchorView, ListAdapter adapter,
             final AdapterView.OnItemClickListener onItemClickListener) {
-        final ListPopupWindow popup = new ListPopupWindow(mContext, null);
-        popup.setAnchorView(anchorView);
-        popup.setWidth(anchorView.getWidth());
-        popup.setAdapter(adapter);
-        popup.setModal(true);
+        dismissPopupIfShown();
+        mPopup = new ListPopupWindow(mContext, null);
+        mPopup.setAnchorView(anchorView);
+        mPopup.setWidth(anchorView.getWidth());
+        mPopup.setAdapter(adapter);
+        mPopup.setModal(true);
 
         // We need to wrap the passed onItemClickListener here, so that we can dismiss() the
         // popup afterwards.  Otherwise we could directly use the passed listener.
-        popup.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+        mPopup.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override
             public void onItemClick(AdapterView<?> parent, View view, int position,
                     long id) {
                 onItemClickListener.onItemClick(parent, view, position, id);
-                popup.dismiss();
+                dismissPopupIfShown();
             }
         });
-        popup.show();
+        mPopup.show();
+    }
+
+    private void dismissPopupIfShown() {
+        if (mPopup != null && mPopup.isShowing()) {
+            mPopup.dismiss();
+        }
+        mPopup = null;
     }
 
     /**
diff --git a/src/com/android/contacts/list/DefaultContactBrowseListFragment.java b/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
index e8a6367..6e3cc05 100644
--- a/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
+++ b/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
@@ -28,6 +28,7 @@
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.View.OnClickListener;
+import android.view.View.OnLayoutChangeListener;
 import android.view.ViewGroup;
 import android.view.accessibility.AccessibilityEvent;
 import android.widget.Button;
@@ -87,7 +88,7 @@
     protected ContactListAdapter createListAdapter() {
         DefaultContactListAdapter adapter = new DefaultContactListAdapter(getContext());
         adapter.setSectionHeaderDisplayEnabled(isSectionHeaderDisplayEnabled());
-        adapter.setDisplayPhotos(true);
+        adapter.setDisplayPhotos(getResources().getBoolean(R.bool.config_browse_list_show_images));
         return adapter;
     }
 
diff --git a/src/com/android/contacts/list/DefaultContactListAdapter.java b/src/com/android/contacts/list/DefaultContactListAdapter.java
index 72a5c88..a53914d 100644
--- a/src/com/android/contacts/list/DefaultContactListAdapter.java
+++ b/src/com/android/contacts/list/DefaultContactListAdapter.java
@@ -199,7 +199,9 @@
                     ContactQuery.CONTACT_PHOTO_URI, ContactQuery.CONTACT_ID,
                     ContactQuery.CONTACT_LOOKUP_KEY);
         } else {
-            bindPhoto(view, partition, cursor);
+            if (getDisplayPhotos()) {
+                bindPhoto(view, partition, cursor);
+            }
         }
 
         bindName(view, cursor);