diff --git a/res/color/tab_text_color.xml b/res/color/tab_text_color.xml
deleted file mode 100644
index 5ef1fe3..0000000
--- a/res/color/tab_text_color.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ~ Copyright (C) 2014 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="@color/actionbar_text_color" android:state_selected="true"/>
-    <item android:color="@color/actionbar_unselected_text_color" />
-</selector>
\ No newline at end of file
diff --git a/res/drawable-v21/view_pager_tab_background.xml b/res/drawable-v21/view_pager_tab_background.xml
deleted file mode 100644
index b9e0805..0000000
--- a/res/drawable-v21/view_pager_tab_background.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ~ Copyright (C) 2016 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
-  -->
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
-        android:color="@color/tab_ripple_color">
-    <item android:id="@android:id/mask">
-        <color android:color="@android:color/white" />
-    </item>
-</ripple>
diff --git a/res/drawable/unread_count_background.xml b/res/drawable/unread_count_background.xml
deleted file mode 100644
index f70f84a..0000000
--- a/res/drawable/unread_count_background.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 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.
--->
-<shape
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:shape="rectangle">
-    <corners android:radius="@dimen/tab_unread_count_background_radius"/>
-    <solid android:color="@color/tab_unread_count_background_color" />
-</shape>
diff --git a/res/drawable/view_pager_tab_background.xml b/res/drawable/view_pager_tab_background.xml
deleted file mode 100644
index 9f59845..0000000
--- a/res/drawable/view_pager_tab_background.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ~ Copyright (C) 2014 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="@color/tab_ripple_color"/>
-</selector>
\ No newline at end of file
diff --git a/res/layout-ldrtl/unread_count_tab.xml b/res/layout-ldrtl/unread_count_tab.xml
deleted file mode 100644
index b23ab57..0000000
--- a/res/layout-ldrtl/unread_count_tab.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 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.
--->
-<!-- layoutDirection set to ltr as a workaround to a framework bug (b/22010411) causing view with
-     layout_centerInParent inside a RelativeLayout to expand to screen width when RTL is active -->
-<RelativeLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="@drawable/view_pager_tab_background"
-    android:layoutDirection="ltr">
-    <!-- The tab icon -->
-    <ImageView
-        android:id="@+id/icon"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_centerInParent="true"/>
-    <TextView
-        android:id="@+id/count"
-        android:layout_width="wrap_content"
-        android:layout_height="@dimen/tab_unread_count_background_size"
-        android:layout_marginTop="@dimen/tab_unread_count_margin_top"
-        android:layout_marginStart="@dimen/tab_unread_count_margin_left"
-        android:layout_toStartOf="@id/icon"
-        android:paddingLeft="@dimen/tab_unread_count_text_padding"
-        android:paddingRight="@dimen/tab_unread_count_text_padding"
-        android:background="@drawable/unread_count_background"
-        android:fontFamily="sans-serif-medium"
-        android:importantForAccessibility="no"
-        android:minWidth="@dimen/tab_unread_count_background_size"
-        android:textAlignment="center"
-        android:textColor="@color/tab_accent_color"
-        android:textSize="@dimen/tab_unread_count_text_size"
-        android:layoutDirection="locale"/>
-</RelativeLayout>
-
diff --git a/res/layout/people_activity.xml b/res/layout/people_activity.xml
index 9fd1a69..46f0976 100644
--- a/res/layout/people_activity.xml
+++ b/res/layout/people_activity.xml
@@ -25,18 +25,16 @@
                     android:layout_width="match_parent"
                     android:layout_height="match_parent">
 
-        <!--
-            ViewPager for swiping between tabs.  We put fragments at runtime.
-
-            (Adding them directly as the children of this view is not recommended.  ViewPager should
-            be treated like a ListView, which doesn't expect children to be added from the layout.)
-        -->
-        <android.support.v4.view.ViewPager
-            android:id="@+id/tab_pager"
-            android:layout_height="match_parent"
+        <FrameLayout
+            android:id="@+id/contacts_view"
             android:layout_width="match_parent"
-            android:layout_below="@id/toolbar_parent"
-            />
+            android:layout_height="match_parent"
+            android:layout_below="@id/toolbar_parent">
+            <FrameLayout
+                android:id="@+id/contacts_list_container"
+                android:layout_height="match_parent"
+                android:layout_width="match_parent" />
+        </FrameLayout>
 
         <FrameLayout
             android:id="@+id/contacts_unavailable_view"
diff --git a/res/layout/people_activity_tabs_lands.xml b/res/layout/people_activity_tabs_lands.xml
deleted file mode 100644
index 8d7b42b..0000000
--- a/res/layout/people_activity_tabs_lands.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 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.
--->
-
-<com.android.contacts.common.list.ViewPagerTabs
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/lists_pager_header"
-    android:layout_width="@dimen/people_activity_landscape_tabs_width"
-    android:layout_height="match_parent"
-    android:textAllCaps="true"
-    android:orientation="horizontal"
-    android:layout_gravity="top"
-    android:layout_weight="0"
-    android:visibility="gone"
-    android:textSize="@dimen/people_activity_landscape_tabs_text_size"
-    style="@style/ContactsActionBarTabTextStyle" />
diff --git a/res/layout/people_activity_toolbar.xml b/res/layout/people_activity_toolbar.xml
index edca3ba..3599f0c 100644
--- a/res/layout/people_activity_toolbar.xml
+++ b/res/layout/people_activity_toolbar.xml
@@ -36,17 +36,4 @@
             style="@style/ContactsToolbarStyle" />
 
     </FrameLayout>
-
-    <com.android.contacts.common.list.ViewPagerTabs
-        android:id="@+id/lists_pager_header"
-        android:layout_width="match_parent"
-        android:layout_height="?attr/actionBarSize"
-        android:textAllCaps="true"
-        android:orientation="horizontal"
-        android:layout_gravity="top"
-        android:layout_weight="0"
-        android:layout_below="@id/toolbar"
-        android:visibility="gone"
-        style="@style/ContactsActionBarTabTextStyle" />
-
 </LinearLayout>
\ No newline at end of file
diff --git a/res/layout/unread_count_tab.xml b/res/layout/unread_count_tab.xml
deleted file mode 100644
index 783f1c1..0000000
--- a/res/layout/unread_count_tab.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 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.
--->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="@drawable/view_pager_tab_background">
-    <!-- The tab icon -->
-    <ImageView
-        android:id="@+id/icon"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_centerInParent="true" />
-    <TextView
-        android:id="@+id/count"
-        android:background="@drawable/unread_count_background"
-        android:layout_width="wrap_content"
-        android:layout_height="@dimen/tab_unread_count_background_size"
-        android:gravity="center"
-        android:minWidth="@dimen/tab_unread_count_background_size"
-        android:layout_marginStart="@dimen/tab_unread_count_margin_left"
-        android:layout_marginTop="@dimen/tab_unread_count_margin_top"
-        android:layout_toEndOf="@id/icon"
-        android:paddingLeft="@dimen/tab_unread_count_text_padding"
-        android:paddingRight="@dimen/tab_unread_count_text_padding"
-        android:textAlignment="center"
-        android:textSize="@dimen/tab_unread_count_text_size"
-        android:textColor="@color/tab_accent_color"
-        android:fontFamily="sans-serif-medium"
-        android:importantForAccessibility="no" />
-</RelativeLayout>
diff --git a/res/values-sw600dp/dimens.xml b/res/values-sw600dp/dimens.xml
index 6f6f4e1..8dd1ba9 100644
--- a/res/values-sw600dp/dimens.xml
+++ b/res/values-sw600dp/dimens.xml
@@ -28,10 +28,6 @@
     <dimen name="contact_browser_list_top_margin">18dp</dimen>
 
     <dimen name="quick_contact_photo_container_height">360dip</dimen>
-    <!-- Height of the selection indicator of a tab. -->
-    <dimen name="tab_selected_underline_height">3dp</dimen>
-    <!-- Size of text in tabs. -->
-    <dimen name="tab_text_size">16sp</dimen>
 
     <!-- Because the "join" screen has the vertical scroll bar on right,
       we cannot use @dimen/contact_browser_list_header_left_margin as is. -->
diff --git a/res/values-sw720dp-land/dimens.xml b/res/values-sw720dp-land/dimens.xml
index b89c2c1..baa8498 100644
--- a/res/values-sw720dp-land/dimens.xml
+++ b/res/values-sw720dp-land/dimens.xml
@@ -18,5 +18,4 @@
     <dimen name="group_editor_side_padding">64dip</dimen>
     <dimen name="contact_detail_list_top_padding">32dip</dimen>
     <dimen name="detail_contact_photo_size">256dip</dimen>
-    <dimen name="people_activity_landscape_tabs_text_size">16dp</dimen>
 </resources>
diff --git a/res/values-w470dp/dimens.xml b/res/values-w470dp/dimens.xml
deleted file mode 100644
index 2c04e5d..0000000
--- a/res/values-w470dp/dimens.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 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>
-
-    <!-- The width the that the tabs occupy in the ActionBar when in landscape mode.
-         470dp is the height of a "normal" screen. We should leave 240dp for
-         the title and menu items -->
-    <dimen name="people_activity_landscape_tabs_width">230dip</dimen>
-    <!-- The size of the text displayed in the ActionBar tabs in landscape mode.
-         Text in the tabs should must be width dependent, otherwise it won't fit in the tabs.
-         In portrait mode, the tabs look okay when overflowing their allocated space.
-         We have to be more careful in landscape. -->
-    <dimen name="people_activity_landscape_tabs_text_size">9dp</dimen>
-
-</resources>
\ No newline at end of file
diff --git a/res/values-w590dp/dimens.xml b/res/values-w590dp/dimens.xml
deleted file mode 100644
index 2fff6ca..0000000
--- a/res/values-w590dp/dimens.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 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>
-
-    <!-- The width the that the tabs occupy in the ActionBar when in landscape mode.
-         590dp is almost the height of a "large" screen. We should leave 240dp for
-         the title and menu items -->
-    <dimen name="people_activity_landscape_tabs_width">350dip</dimen>
-    <!-- The size of the text displayed in the ActionBar tabs in landscape mode.
-         Text in the tabs should must be width dependent, otherwise it won't fit in the tabs.
-         In portrait mode, the tabs look okay when overflowing their allocated space.
-         We have to be more careful in landscape. -->
-    <dimen name="people_activity_landscape_tabs_text_size">14dp</dimen>
-
-</resources>
\ No newline at end of file
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 0cba8e6..2e7dea3 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -201,11 +201,6 @@
     <!-- Darker version of the actionbar color. Used for the status bar and navigation bar colors. -->
     <color name="actionbar_background_color_dark">#008aa1</color>
 
-    <color name="tab_ripple_color">@color/tab_accent_color</color>
-    <color name="tab_accent_color">#ffffff</color>
-    <color name="tab_selected_underline_color">@color/tab_accent_color</color>
-    <color name="tab_unread_count_background_color">#700f4b70</color>
-
     <!-- Color of the title to the Frequently Contacted section -->
     <color name="frequently_contacted_title_color">@color/actionbar_background_color</color>
 
@@ -218,7 +213,6 @@
     <color name="actionbar_text_color_black">#DF000000</color>
     <!-- Solid grey for status bar overlay-->
     <color name="actionbar_color_grey_solid">#777777</color>
-    <color name="actionbar_unselected_text_color">#a6ffffff</color>
 
     <!-- Text color of the search box text as entered by user  -->
     <color name="searchbox_text_color">#000000</color>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index ab102fe..2eb4b22 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -238,16 +238,6 @@
     <dimen name="quickcontact_expanding_button_section_height">48dp</dimen>
     <dimen name="quickcontact_expanding_button_section_padding">8dp</dimen>
 
-    <!-- The width the that the tabs occupy in the ActionBar when in landscape mode.
-         426dp is the height of a "small" screen. We should leave 240dp for
-         the title and menu items -->
-    <dimen name="people_activity_landscape_tabs_width">186dip</dimen>
-    <!-- The size of the text displayed in the ActionBar tabs in landscape mode.
-         Text in the tabs should must be width dependent, otherwise it won't fit in the tabs.
-         In portrait mode, the tabs look okay when overflowing their allocated space.
-         We have to be more careful in landscape. -->
-    <dimen name="people_activity_landscape_tabs_text_size">8dp</dimen>
-
     <!-- Top margin of the text message when provider status is busy -->
     <dimen name="update_contact_list_top_margin">188dp</dimen>
 
@@ -431,17 +421,8 @@
     <!-- Offset of bottom margin of the floating action button used when dialpad is up -->
     <dimen name="floating_action_button_dialpad_margin_bottom_offset">4dp</dimen>
 
-    <!-- Height of the selection indicator of a tab. -->
-    <dimen name="tab_selected_underline_height">2dp</dimen>
     <!-- Size of text in tabs. -->
-    <dimen name="tab_text_size">14sp</dimen>
     <dimen name="tab_elevation">2dp</dimen>
-    <dimen name="tab_unread_count_background_size">16dp</dimen>
-    <dimen name="tab_unread_count_background_radius">2dp</dimen>
-    <dimen name="tab_unread_count_margin_left">10dp</dimen>
-    <dimen name="tab_unread_count_margin_top">2dp</dimen>
-    <dimen name="tab_unread_count_text_size">12sp</dimen>
-    <dimen name="tab_unread_count_text_padding">2dp</dimen>
 
     <!-- Padding around the icon in the search box. -->
     <dimen name="search_box_icon_margin">4dp</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 33fa11e..528a61a 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -41,10 +41,6 @@
 
     <style name="PeopleTheme" parent="@android:style/Theme.Material.Light">
         <item name="android:actionBarStyle">@style/ContactsActionBarStyle</item>
-        <!-- Style for the tab bar (for the divider between tabs) -->
-        <item name="android:actionBarTabBarStyle">@style/ContactsActionBarTabBarStyle</item>
-        <!-- Style for the tab bar text (for text on tabs) -->
-        <item name="android:actionBarTabTextStyle">@style/ContactsActionBarTabTextStyle</item>
         <!--  Drawable for the back button -->
         <item name="android:homeAsUpIndicator">@drawable/ic_back_arrow</item>
         <!-- Style for the overflow button in the actionbar. -->
@@ -107,12 +103,6 @@
         <!-- Styles that require AppCompat compatibility, remember to update both sets -->
         <item name="android:actionBarStyle">@style/ContactsActionBarStyleAppCompat</item>
         <item name="actionBarStyle">@style/ContactsActionBarStyleAppCompat</item>
-        <!-- Style for the tab bar (for the divider between tabs) -->
-        <item name="android:actionBarTabBarStyle">@style/ContactsActionBarTabBarStyle</item>
-        <item name="actionBarTabBarStyle">@style/ContactsActionBarTabBarStyle</item>
-        <!-- Style for the tab bar text (for text on tabs) -->
-        <item name="android:actionBarTabTextStyle">@style/ContactsActionBarTabTextStyle</item>
-        <item name="actionBarTabTextStyle">@style/ContactsActionBarTabTextStyle</item>
         <item name="android:actionButtonStyle">@style/ContactsActionButtonStyle</item>
         <item name="actionButtonStyle">@style/ContactsActionButtonStyle</item>
         <!--  Drawable for the back button -->
@@ -244,22 +234,6 @@
         <item name="android:textColor">@color/actionbar_text_color_black</item>
     </style>
 
-    <!-- Styling for the tab bar; handles styling of the divider line. -->
-    <style name="ContactsActionBarTabBarStyle"
-           parent="@android:style/Widget.Material.ActionBar.TabBar">
-        <item name="android:showDividers">none</item>
-    </style>
-
-    <!-- Text style for tabs. -->
-    <style name="ContactsActionBarTabTextStyle"
-           parent="android:style/Widget.Material.Light.ActionBar.TabText">
-        <item name="android:textColor">@color/tab_text_color</item>
-        <item name="android:textSize">@dimen/tab_text_size</item>
-        <item name="android:fontFamily">@string/tab_font_family</item>
-        <item name="android:elevation">0dp</item>
-        <item name="android:textStyle">bold</item>
-    </style>
-
     <!-- Action bar overflow menu icon. -->
     <style name="ContactsActionBarOverflowQP"
            parent="Widget.AppCompat.Light.ActionButton.Overflow">
diff --git a/src/com/android/contacts/activities/ActionBarAdapter.java b/src/com/android/contacts/activities/ActionBarAdapter.java
index b896406..129f36b 100644
--- a/src/com/android/contacts/activities/ActionBarAdapter.java
+++ b/src/com/android/contacts/activities/ActionBarAdapter.java
@@ -20,11 +20,8 @@
 import android.animation.ValueAnimator;
 import android.app.Activity;
 import android.content.Context;
-import android.content.SharedPreferences;
 import android.content.res.ColorStateList;
-import android.content.res.TypedArray;
 import android.os.Bundle;
-import android.preference.PreferenceManager;
 import android.support.v4.content.ContextCompat;
 import android.support.v7.app.ActionBar;
 import android.support.v7.widget.Toolbar;
@@ -71,41 +68,26 @@
 
         void onAction(int action);
 
-        /**
-         * Called when the user selects a tab.  The new tab can be obtained using
-         * {@link #getCurrentTab}.
-         */
-        void onSelectedTabChanged();
-
         void onUpButtonPressed();
     }
 
     private static final String EXTRA_KEY_SEARCH_MODE = "navBar.searchMode";
     private static final String EXTRA_KEY_QUERY = "navBar.query";
-    private static final String EXTRA_KEY_SELECTED_TAB = "navBar.selectedTab";
     private static final String EXTRA_KEY_SELECTED_MODE = "navBar.selectionMode";
 
-    private static final String PERSISTENT_LAST_TAB = "actionBarAdapter.lastTab";
-
     private boolean mSelectionMode;
     private boolean mSearchMode;
     private String mQueryString;
 
     private EditText mSearchView;
     private View mClearSearchView;
-    /** The view that represents tabs when we are in portrait mode **/
-    private View mPortraitTabs;
-    /** The view that represents tabs when we are in landscape mode **/
-    private View mLandscapeTabs;
     private View mSearchContainer;
     private View mSelectionContainer;
 
-    private int mMaxPortraitTabHeight;
     private int mMaxToolbarContentInsetStart;
     private int mActionBarAnimationDuration;
 
     private final Activity mActivity;
-    private final SharedPreferences mPrefs;
 
     private Listener mListener;
 
@@ -126,29 +108,16 @@
 
     private ValueAnimator mStatusBarAnimator;
 
-    public interface TabState {
-        public static int ALL = 0;
-
-        public static int COUNT = 1;
-        public static int DEFAULT = ALL;
-    }
-
-    private int mCurrentTab = TabState.DEFAULT;
-
     public ActionBarAdapter(Activity activity, Listener listener, ActionBar actionBar,
-            View portraitTabs, View landscapeTabs, Toolbar toolbar) {
-        this(activity, listener, actionBar, portraitTabs, landscapeTabs, toolbar,
-                R.string.hint_findContacts);
+            Toolbar toolbar) {
+        this(activity, listener, actionBar, toolbar, R.string.hint_findContacts);
     }
 
     public ActionBarAdapter(Activity activity, Listener listener, ActionBar actionBar,
-            View portraitTabs, View landscapeTabs, Toolbar toolbar, int searchHintResId) {
+            Toolbar toolbar, int searchHintResId) {
         mActivity = activity;
         mListener = listener;
         mActionBar = actionBar;
-        mPrefs = PreferenceManager.getDefaultSharedPreferences(mActivity);
-        mPortraitTabs = portraitTabs;
-        mLandscapeTabs = landscapeTabs;
         mToolbar = toolbar;
         mToolBarFrame = (FrameLayout) mToolbar.getParent();
         mMaxToolbarContentInsetStart = mToolbar.getContentInsetStart();
@@ -157,7 +126,6 @@
                 mActivity.getResources().getInteger(R.integer.action_bar_animation_duration);
 
         setupSearchAndSelectionViews();
-        setupTabs(mActivity);
     }
 
     public void setShowHomeIcon(boolean showHomeIcon) {
@@ -168,22 +136,10 @@
         mShowHomeAsUp = showHomeAsUp;
     }
 
-    public EditText getSearchView() {
-        return mSearchView;
-    }
-
     public View getSelectionContainer() {
         return mSelectionContainer;
     }
 
-    private void setupTabs(Context context) {
-        final TypedArray attributeArray = context.obtainStyledAttributes(
-                new int[]{android.R.attr.actionBarSize});
-        mMaxPortraitTabHeight = attributeArray.getDimensionPixelSize(0, 0);
-        // Hide tabs initially
-        setPortraitTabHeight(0);
-    }
-
     private void setupSearchAndSelectionViews() {
         final LayoutInflater inflater = (LayoutInflater) mToolbar.getContext().getSystemService(
                 Context.LAYOUT_INFLATER_SERVICE);
@@ -238,19 +194,11 @@
         if (savedState == null) {
             mSearchMode = request.isSearchMode();
             mQueryString = request.getQueryString();
-            mCurrentTab = loadLastTabPreference();
             mSelectionMode = false;
         } else {
             mSearchMode = savedState.getBoolean(EXTRA_KEY_SEARCH_MODE);
             mSelectionMode = savedState.getBoolean(EXTRA_KEY_SELECTED_MODE);
             mQueryString = savedState.getString(EXTRA_KEY_QUERY);
-
-            // Just set to the field here.  The listener will be notified by update().
-            mCurrentTab = savedState.getInt(EXTRA_KEY_SELECTED_TAB);
-        }
-        if (mCurrentTab >= TabState.COUNT || mCurrentTab < 0) {
-            // Invalid tab index was saved (b/12938207). Restore the default.
-            mCurrentTab = TabState.DEFAULT;
         }
         // Show tabs or the expanded {@link SearchView}, depending on whether or not we are in
         // search mode.
@@ -294,30 +242,6 @@
     }
 
     /**
-     * Save the current tab selection, and notify the listener.
-     */
-    public void setCurrentTab(int tab) {
-        setCurrentTab(tab, true);
-    }
-
-    /**
-     * Save the current tab selection.
-     */
-    public void setCurrentTab(int tab, boolean notifyListener) {
-        if (tab == mCurrentTab) {
-            return;
-        }
-        mCurrentTab = tab;
-
-        if (notifyListener && mListener != null) mListener.onSelectedTabChanged();
-        saveLastTabPreference(mCurrentTab);
-    }
-
-    public int getCurrentTab() {
-        return mCurrentTab;
-    }
-
-    /**
      * @return Whether in search mode, i.e. if the search view is visible/expanded.
      *
      * Note even if the action bar is in search mode, if the query is empty, the search fragment
@@ -472,18 +396,12 @@
         // to adding the desired container.
         if (skipAnimation || isSwitchingFromSearchToSelection) {
             if (isTabHeightChanging || isSwitchingFromSearchToSelection) {
-                mToolbar.removeView(mLandscapeTabs);
                 mToolbar.removeView(mSearchContainer);
                 mToolBarFrame.removeView(mSelectionContainer);
                 if (mSelectionMode) {
-                    setPortraitTabHeight(0);
                     addSelectionContainer();
                 } else if (mSearchMode) {
-                    setPortraitTabHeight(0);
                     addSearchContainer();
-                } else {
-                    setPortraitTabHeight(mMaxPortraitTabHeight);
-                    addLandscapeViewPagerTabs();
                 }
                 updateDisplayOptions(isSearchModeChanging);
             }
@@ -492,25 +410,21 @@
 
         // Handle a switch to/from selection mode, due to UI interaction.
         if (isSelectionModeChanging) {
-            mToolbar.removeView(mLandscapeTabs);
             if (mSelectionMode) {
                 addSelectionContainer();
                 mSelectionContainer.setAlpha(0);
                 mSelectionContainer.animate().alpha(1).setDuration(mActionBarAnimationDuration);
-                animateTabHeightChange(mMaxPortraitTabHeight, 0);
                 updateDisplayOptions(isSearchModeChanging);
             } else {
                 if (mListener != null) {
                     mListener.onAction(Action.BEGIN_STOPPING_SEARCH_AND_SELECTION_MODE);
                 }
                 mSelectionContainer.setAlpha(1);
-                animateTabHeightChange(0, mMaxPortraitTabHeight);
                 mSelectionContainer.animate().alpha(0).setDuration(mActionBarAnimationDuration)
                         .withEndAction(new Runnable() {
                     @Override
                     public void run() {
                         updateDisplayOptions(isSearchModeChanging);
-                        addLandscapeViewPagerTabs();
                         mToolBarFrame.removeView(mSelectionContainer);
                     }
                 });
@@ -519,22 +433,18 @@
 
         // Handle a switch to/from search mode, due to UI interaction.
         if (isSearchModeChanging) {
-            mToolbar.removeView(mLandscapeTabs);
             if (mSearchMode) {
                 addSearchContainer();
                 mSearchContainer.setAlpha(0);
                 mSearchContainer.animate().alpha(1).setDuration(mActionBarAnimationDuration);
-                animateTabHeightChange(mMaxPortraitTabHeight, 0);
                 updateDisplayOptions(isSearchModeChanging);
             } else {
                 mSearchContainer.setAlpha(1);
-                animateTabHeightChange(0, mMaxPortraitTabHeight);
                 mSearchContainer.animate().alpha(0).setDuration(mActionBarAnimationDuration)
                         .withEndAction(new Runnable() {
                     @Override
                     public void run() {
                         updateDisplayOptions(isSearchModeChanging);
-                        addLandscapeViewPagerTabs();
                         mToolbar.removeView(mSearchContainer);
                     }
                 });
@@ -641,13 +551,6 @@
         }
     }
 
-    private void addLandscapeViewPagerTabs() {
-        if (mLandscapeTabs != null) {
-            mToolbar.removeView(mLandscapeTabs);
-            mToolbar.addView(mLandscapeTabs);
-        }
-    }
-
     private void addSearchContainer() {
         mToolbar.removeView(mSearchContainer);
         mToolbar.addView(mSearchContainer);
@@ -682,7 +585,6 @@
             }
             if (!mSearchMode && !mSelectionMode) {
                 mListener.onAction(Action.STOP_SEARCH_AND_SELECTION_MODE);
-                mListener.onSelectedTabChanged();
             }
         }
         updateDisplayOptionsInner();
@@ -698,7 +600,6 @@
         outState.putBoolean(EXTRA_KEY_SEARCH_MODE, mSearchMode);
         outState.putBoolean(EXTRA_KEY_SELECTED_MODE, mSelectionMode);
         outState.putString(EXTRA_KEY_QUERY, mQueryString);
-        outState.putInt(EXTRA_KEY_SELECTED_TAB, mCurrentTab);
     }
 
     public void setFocusOnSearchView() {
@@ -713,41 +614,4 @@
             imm.showSoftInput(view, 0);
         }
     }
-
-    private void saveLastTabPreference(int tab) {
-        mPrefs.edit().putInt(PERSISTENT_LAST_TAB, tab).apply();
-    }
-
-    private int loadLastTabPreference() {
-        try {
-            return mPrefs.getInt(PERSISTENT_LAST_TAB, TabState.DEFAULT);
-        } catch (IllegalArgumentException e) {
-            // Preference is corrupt?
-            return TabState.DEFAULT;
-        }
-    }
-
-    private void animateTabHeightChange(int start, int end) {
-        if (mPortraitTabs == null) {
-            return;
-        }
-        final ValueAnimator animator = ValueAnimator.ofInt(start, end);
-        animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
-            @Override
-            public void onAnimationUpdate(ValueAnimator valueAnimator) {
-                int value = (Integer) valueAnimator.getAnimatedValue();
-                setPortraitTabHeight(value);
-            }
-        });
-        animator.setDuration(100).start();
-    }
-
-    private void setPortraitTabHeight(int height) {
-        if (mPortraitTabs == null) {
-            return;
-        }
-        ViewGroup.LayoutParams layoutParams = mPortraitTabs.getLayoutParams();
-        layoutParams.height = height;
-        mPortraitTabs.setLayoutParams(layoutParams);
-    }
 }
diff --git a/src/com/android/contacts/activities/ContactSelectionActivity.java b/src/com/android/contacts/activities/ContactSelectionActivity.java
index 7bb921d..57c460a 100644
--- a/src/com/android/contacts/activities/ContactSelectionActivity.java
+++ b/src/com/android/contacts/activities/ContactSelectionActivity.java
@@ -146,8 +146,7 @@
         // Add a shadow under the toolbar.
         ViewUtil.addRectangularOutlineProvider(findViewById(R.id.toolbar_parent), getResources());
 
-        mActionBarAdapter = new ActionBarAdapter(this, this, getSupportActionBar(),
-                /* portraitTabs */ null, /* landscapeTabs */ null, mToolbar,
+        mActionBarAdapter = new ActionBarAdapter(this, this, getSupportActionBar(), mToolbar,
                 R.string.enter_contact_name);
         mActionBarAdapter.setShowHomeIcon(true);
         mActionBarAdapter.setShowHomeAsUp(true);
@@ -436,10 +435,6 @@
     }
 
     @Override
-    public void onSelectedTabChanged() {
-    }
-
-    @Override
     public void onUpButtonPressed() {
         onBackPressed();
     }
diff --git a/src/com/android/contacts/activities/PeopleActivity.java b/src/com/android/contacts/activities/PeopleActivity.java
index 41139d8..8cef3e3 100644
--- a/src/com/android/contacts/activities/PeopleActivity.java
+++ b/src/com/android/contacts/activities/PeopleActivity.java
@@ -34,7 +34,6 @@
 import android.net.Uri;
 import android.os.Bundle;
 import android.os.Handler;
-import android.os.Parcelable;
 import android.provider.ContactsContract.Contacts;
 import android.provider.ContactsContract.Intents;
 import android.provider.ContactsContract.ProviderStatus;
@@ -42,11 +41,8 @@
 import android.support.design.widget.CoordinatorLayout;
 import android.support.design.widget.FloatingActionButton;
 import android.support.design.widget.Snackbar;
-import android.support.v13.app.FragmentPagerAdapter;
 import android.support.v4.content.LocalBroadcastManager;
 import android.support.v4.view.GravityCompat;
-import android.support.v4.view.PagerAdapter;
-import android.support.v4.view.ViewPager;
 import android.support.v4.widget.SwipeRefreshLayout;
 import android.text.TextUtils;
 import android.util.Log;
@@ -66,7 +62,6 @@
 import com.android.contacts.ContactSaveService;
 import com.android.contacts.ContactsDrawerActivity;
 import com.android.contacts.R;
-import com.android.contacts.activities.ActionBarAdapter.TabState;
 import com.android.contacts.common.Experiments;
 import com.android.contacts.common.activity.RequestPermissionsActivity;
 import com.android.contacts.common.compat.CompatUtils;
@@ -77,7 +72,6 @@
 import com.android.contacts.common.list.DirectoryListLoader;
 import com.android.contacts.common.list.ProviderStatusWatcher;
 import com.android.contacts.common.list.ProviderStatusWatcher.ProviderStatusListener;
-import com.android.contacts.common.list.ViewPagerTabs;
 import com.android.contacts.common.logging.ListEvent;
 import com.android.contacts.common.logging.Logger;
 import com.android.contacts.common.logging.ScreenEvent.ScreenType;
@@ -127,6 +121,8 @@
 
     private static final String ENABLE_DEBUG_OPTIONS_HIDDEN_CODE = "debug debug!";
 
+    private static final String TAG_ALL = "contacts-all";
+
     private static final int ACTIVITY_REQUEST_CODE_SHARE = 0;
 
     private final DialogManager mDialogManager = new DialogManager(this);
@@ -155,12 +151,7 @@
      */
     private DefaultContactBrowseListFragment mAllFragment;
 
-    /** ViewPager for swipe */
-    private ViewPager mTabPager;
-    private ViewPagerTabs mViewPagerTabs;
-    private TabPagerAdapter mTabPagerAdapter;
-    private String[] mTabTitles;
-    private final TabPagerListener mTabPagerListener = new TabPagerListener();
+    private View mContactsView;
 
     private boolean mEnableDebugMenuOptions;
 
@@ -386,44 +377,17 @@
 
         final FragmentManager fragmentManager = getFragmentManager();
 
-        // Hide all tabs (the current tab will later be reshown once a tab is selected)
         final FragmentTransaction transaction = fragmentManager.beginTransaction();
 
-        mTabTitles = new String[TabState.COUNT];
-        mTabTitles[TabState.ALL] = getString(R.string.all_contacts_tab_label);
-        mTabPager = getView(R.id.tab_pager);
-        mTabPagerAdapter = new TabPagerAdapter();
-        mTabPager.setAdapter(mTabPagerAdapter);
-        mTabPager.setOnPageChangeListener(mTabPagerListener);
-
-        // Configure toolbar and toolbar tabs. If in landscape mode, we configure tabs differently.
-        final ViewPagerTabs portraitViewPagerTabs
-                = (ViewPagerTabs) findViewById(R.id.lists_pager_header);
-        ViewPagerTabs landscapeViewPagerTabs = null;
-        if (portraitViewPagerTabs ==  null) {
-            landscapeViewPagerTabs = (ViewPagerTabs) getLayoutInflater().inflate(
-                    R.layout.people_activity_tabs_lands, mToolbar, /* attachToRoot = */ false);
-            mViewPagerTabs = landscapeViewPagerTabs;
-        } else {
-            mViewPagerTabs = portraitViewPagerTabs;
-        }
-        mViewPagerTabs.setViewPager(mTabPager);
-
-        final String ALL_TAG = "tab-pager-all";
-
-        // Create the fragments and add as children of the view pager.
-        // The pager adapter will only change the visibility; it'll never create/destroy
-        // fragments.
-        // However, if it's after screen rotation, the fragments have been re-created by
-        // the fragment manager, so first see if there're already the target fragments
-        // existing.
         mAllFragment = (DefaultContactBrowseListFragment)
-                fragmentManager.findFragmentByTag(ALL_TAG);
+                fragmentManager.findFragmentByTag(TAG_ALL);
+
+        mContactsView = getView(R.id.contacts_view);
 
         if (mAllFragment == null) {
             mAllFragment = new DefaultContactBrowseListFragment();
             mAllFragment.setAnimateOnLoad(true);
-            transaction.add(R.id.tab_pager, mAllFragment, ALL_TAG);
+            transaction.add(R.id.contacts_list_container, mAllFragment, TAG_ALL);
         }
 
         mAllFragment.setFeatureHighlightCallback(this);
@@ -431,15 +395,14 @@
         mAllFragment.setCheckBoxListListener(new CheckBoxListListener());
         mAllFragment.setListType(mContactListFilterController.getFilterListType());
 
-        // Hide all fragments for now.  We adjust visibility when we get onSelectedTabChanged()
-        // from ActionBarAdapter.
+        // Hide all fragments for now.  We adjust visibility when we get
+        // onAction(Action.STOP_SEARCH_AND_SELECTION_MODE) from ActionBarAdapter.
         transaction.hide(mAllFragment);
 
         transaction.commitAllowingStateLoss();
         fragmentManager.executePendingTransactions();
 
-        mActionBarAdapter = new ActionBarAdapter(this, this, getSupportActionBar(),
-                portraitViewPagerTabs, landscapeViewPagerTabs, mToolbar);
+        mActionBarAdapter = new ActionBarAdapter(this, this, getSupportActionBar(), mToolbar);
         mActionBarAdapter.initialize(savedState, mRequest);
 
         // Configure floating action button
@@ -515,11 +478,6 @@
         // called.  See also: onSaveInstanceState
         mActionBarAdapter.setListener(this);
         mDisableOptionItemSelected = false;
-        if (mTabPager != null) {
-            mTabPager.setOnPageChangeListener(mTabPagerListener);
-        }
-        // Current tab may have changed since the last onSaveInstanceState().  Make sure
-        // the actual contents match the tab.
         updateFragmentsVisibility();
 
         if (Flags.getInstance(this).getBoolean(Experiments.PULL_TO_REFRESH)) {
@@ -558,33 +516,22 @@
             ContactListFilter filter = null;
             int actionCode = mRequest.getActionCode();
             boolean searchMode = mRequest.isSearchMode();
-            final int tabToOpen;
             switch (actionCode) {
                 case ContactsRequest.ACTION_ALL_CONTACTS:
                     filter = createContactsFilter();
-                    tabToOpen = TabState.ALL;
                     break;
                 case ContactsRequest.ACTION_CONTACTS_WITH_PHONES:
                     filter = ContactListFilter.createFilterWithType(
                             ContactListFilter.FILTER_TYPE_WITH_PHONE_NUMBERS_ONLY);
-                    tabToOpen = TabState.ALL;
                     break;
 
                 case ContactsRequest.ACTION_FREQUENT:
                 case ContactsRequest.ACTION_STREQUENT:
                 case ContactsRequest.ACTION_STARRED:
-                    tabToOpen = TabState.ALL;
-                    break;
                 case ContactsRequest.ACTION_VIEW_CONTACT:
-                    tabToOpen = TabState.ALL;
-                    break;
                 default:
-                    tabToOpen = -1;
                     break;
             }
-            if (tabToOpen != -1) {
-                mActionBarAdapter.setCurrentTab(tabToOpen);
-            }
 
             if (filter != null) {
                 mContactListFilterController.setContactListFilter(filter, /* persistent */ false);
@@ -718,11 +665,6 @@
     }
 
     @Override
-    public void onSelectedTabChanged() {
-        updateFragmentsVisibility();
-    }
-
-    @Override
     public void onUpButtonPressed() {
         onBackPressed();
     }
@@ -736,223 +678,13 @@
 
     /**
      * Updates the fragment/view visibility according to the current mode, such as
-     * {@link ActionBarAdapter#isSearchMode()} and {@link ActionBarAdapter#getCurrentTab()}.
+     * {@link ActionBarAdapter#isSearchMode()}.
      */
     private void updateFragmentsVisibility() {
-        int tab = mActionBarAdapter.getCurrentTab();
-
-        if (mActionBarAdapter.isSearchMode() || mActionBarAdapter.isSelectionMode()) {
-            mTabPagerAdapter.setTabsHidden(true);
-        } else {
-            // No smooth scrolling if quitting from the search/selection mode.
-            final boolean wereTabsHidden = mTabPagerAdapter.areTabsHidden()
-                    || mActionBarAdapter.isSelectionMode();
-            mTabPagerAdapter.setTabsHidden(false);
-            if (mTabPager.getCurrentItem() != tab) {
-                mTabPager.setCurrentItem(tab, !wereTabsHidden);
-            }
-        }
         if (!mActionBarAdapter.isSelectionMode()) {
             mAllFragment.displayCheckBoxes(false);
         }
         invalidateOptionsMenu();
-        showEmptyStateForTab(tab);
-    }
-
-    private void showEmptyStateForTab(int tab) {
-        if (mContactsUnavailableFragment != null) {
-            switch (getTabPositionForTextDirection(tab)) {
-                case TabState.ALL:
-                    mContactsUnavailableFragment.setTabInfo(R.string.noContacts, TabState.ALL);
-                    break;
-            }
-            // When using the mContactsUnavailableFragment the ViewPager doesn't contain two views.
-            // Therefore, we have to trick the ViewPagerTabs into thinking we have changed tabs
-            // when the mContactsUnavailableFragment changes. Otherwise the tab strip won't move.
-            mViewPagerTabs.onPageScrolled(tab, 0, 0);
-        }
-    }
-
-    private class TabPagerListener implements ViewPager.OnPageChangeListener {
-
-        // This package-protected constructor is here because of a possible compiler bug.
-        // PeopleActivity$1.class should be generated due to the private outer/inner class access
-        // needed here.  But for some reason, PeopleActivity$1.class is missing.
-        // Since $1 class is needed as a jvm work around to get access to the inner class,
-        // changing the constructor to package-protected or public will solve the problem.
-        // To verify whether $1 class is needed, javap PeopleActivity$TabPagerListener and look for
-        // references to PeopleActivity$1.
-        //
-        // When the constructor is private and PeopleActivity$1.class is missing, proguard will
-        // correctly catch this and throw warnings and error out the build on user/userdebug builds.
-        //
-        // All private inner classes below also need this fix.
-        TabPagerListener() {}
-
-        @Override
-        public void onPageScrollStateChanged(int state) {
-            if (!mTabPagerAdapter.areTabsHidden()) {
-                mViewPagerTabs.onPageScrollStateChanged(state);
-            }
-        }
-
-        @Override
-        public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
-            if (!mTabPagerAdapter.areTabsHidden()) {
-                mViewPagerTabs.onPageScrolled(position, positionOffset, positionOffsetPixels);
-            }
-        }
-
-        @Override
-        public void onPageSelected(int position) {
-            // Make sure not in the search mode, in which case position != TabState.ordinal().
-            if (!mTabPagerAdapter.areTabsHidden()) {
-                mActionBarAdapter.setCurrentTab(position, false);
-                mViewPagerTabs.onPageSelected(position);
-                showEmptyStateForTab(position);
-                invalidateOptionsMenu();
-            }
-        }
-    }
-
-    /**
-     * Adapter for the {@link ViewPager}.  Unlike {@link FragmentPagerAdapter},
-     * {@link #instantiateItem} returns existing fragments, and {@link #instantiateItem}/
-     * {@link #destroyItem} show/hide fragments instead of attaching/detaching.
-     *
-     * In search mode, we always show the "all" fragment, and disable the swipe.  We change the
-     * number of items to 1 to disable the swipe.
-     *
-     * TODO figure out a more straight way to disable swipe.
-     */
-    private class TabPagerAdapter extends PagerAdapter {
-        private final FragmentManager mFragmentManager;
-        private FragmentTransaction mCurTransaction = null;
-
-        private boolean mAreTabsHiddenInTabPager;
-
-        private Fragment mCurrentPrimaryItem;
-
-        public TabPagerAdapter() {
-            mFragmentManager = getFragmentManager();
-        }
-
-        public boolean areTabsHidden() {
-            return mAreTabsHiddenInTabPager;
-        }
-
-        public void setTabsHidden(boolean hideTabs) {
-            if (hideTabs == mAreTabsHiddenInTabPager) {
-                return;
-            }
-            mAreTabsHiddenInTabPager = hideTabs;
-            notifyDataSetChanged();
-        }
-
-        @Override
-        public int getCount() {
-            return mAreTabsHiddenInTabPager ? 1 : TabState.COUNT;
-        }
-
-        /** Gets called when the number of items changes. */
-        @Override
-        public int getItemPosition(Object object) {
-            if (mAreTabsHiddenInTabPager) {
-                if (object == mAllFragment) {
-                    return 0; // Only 1 page in search mode
-                }
-            } else {
-                if (object == mAllFragment) {
-                    return getTabPositionForTextDirection(TabState.ALL);
-                }
-            }
-            return POSITION_NONE;
-        }
-
-        @Override
-        public void startUpdate(ViewGroup container) {
-        }
-
-        private Fragment getFragment(int position) {
-            position = getTabPositionForTextDirection(position);
-            if (mAreTabsHiddenInTabPager) {
-                if (position != 0) {
-                    // This has only been observed in monkey tests.
-                    // Let's log this issue, but not crash
-                    Log.w(TAG, "Request fragment at position=" + position + ", eventhough we " +
-                            "are in search mode");
-                }
-                return mAllFragment;
-            } else {
-                if (position == TabState.ALL) {
-                    return mAllFragment;
-                }
-            }
-            throw new IllegalArgumentException("position: " + position);
-        }
-
-        @Override
-        public Object instantiateItem(ViewGroup container, int position) {
-            if (mCurTransaction == null) {
-                mCurTransaction = mFragmentManager.beginTransaction();
-            }
-            Fragment f = getFragment(position);
-            mCurTransaction.show(f);
-
-            // Non primary pages are not visible.
-            f.setUserVisibleHint(f == mCurrentPrimaryItem);
-            return f;
-        }
-
-        @Override
-        public void destroyItem(ViewGroup container, int position, Object object) {
-            if (mCurTransaction == null) {
-                mCurTransaction = mFragmentManager.beginTransaction();
-            }
-            mCurTransaction.hide((Fragment) object);
-        }
-
-        @Override
-        public void finishUpdate(ViewGroup container) {
-            if (mCurTransaction != null) {
-                mCurTransaction.commitAllowingStateLoss();
-                mCurTransaction = null;
-                mFragmentManager.executePendingTransactions();
-            }
-        }
-
-        @Override
-        public boolean isViewFromObject(View view, Object object) {
-            return ((Fragment) object).getView() == view;
-        }
-
-        @Override
-        public void setPrimaryItem(ViewGroup container, int position, Object object) {
-            Fragment fragment = (Fragment) object;
-            if (mCurrentPrimaryItem != fragment) {
-                if (mCurrentPrimaryItem != null) {
-                    mCurrentPrimaryItem.setUserVisibleHint(false);
-                }
-                if (fragment != null) {
-                    fragment.setUserVisibleHint(true);
-                }
-                mCurrentPrimaryItem = fragment;
-            }
-        }
-
-        @Override
-        public Parcelable saveState() {
-            return null;
-        }
-
-        @Override
-        public void restoreState(Parcelable state, ClassLoader loader) {
-        }
-
-        @Override
-        public CharSequence getPageTitle(int position) {
-            return mTabTitles[position];
-        }
     }
 
     private void setQueryTextToFragment(String query) {
@@ -1034,10 +766,10 @@
         // actually at least one real account (not "local" account) on device.
         if ((mProviderStatus.equals(ProviderStatus.STATUS_EMPTY) && hasNonLocalAccount())
                 || mProviderStatus.equals(ProviderStatus.STATUS_NORMAL)) {
-            // Ensure that the mTabPager is visible; we may have made it invisible below.
+            // Ensure that the mContactsView is visible; we may have made it invisible below.
             contactsUnavailableView.setVisibility(View.GONE);
-            if (mTabPager != null) {
-                mTabPager.setVisibility(View.VISIBLE);
+            if (mContactsView != null) {
+                mContactsView.setVisibility(View.VISIBLE);
             }
 
             if (mAllFragment != null) {
@@ -1059,14 +791,12 @@
             }
             mContactsUnavailableFragment.updateStatus(mProviderStatus);
 
-            // Show the contactsUnavailableView, and hide the mTabPager so that we don't
+            // Show the contactsUnavailableView, and hide the mContactsView so that we don't
             // see it sliding in underneath the contactsUnavailableView at the edges.
             contactsUnavailableView.setVisibility(View.VISIBLE);
-            if (mTabPager != null) {
-                mTabPager.setVisibility(View.GONE);
+            if (mContactsView != null) {
+                mContactsView.setVisibility(View.GONE);
             }
-
-            showEmptyStateForTab(mActionBarAdapter.getCurrentTab());
         }
 
         invalidateOptionsMenuIfNeeded();
@@ -1482,17 +1212,11 @@
         // TODO Figure out a better way to deal with the issue.
         mDisableOptionItemSelected = true;
         mActionBarAdapter.setListener(null);
-        if (mTabPager != null) {
-            mTabPager.setOnPageChangeListener(null);
-        }
     }
 
     @Override
     protected void onRestoreInstanceState(Bundle savedInstanceState) {
         super.onRestoreInstanceState(savedInstanceState);
-        // In our own lifecycle, the focus is saved and restore but later taken away by the
-        // ViewPager. As a hack, we force focus on the SearchView if we know that we are searching.
-        // This fixes the keyboard going away on screen rotation
         if (mActionBarAdapter.isSearchMode()) {
             mActionBarAdapter.setFocusOnSearchView();
         }
@@ -1537,16 +1261,6 @@
         }
     }
 
-    /**
-     * Returns the tab position adjusted for the text direction.
-     */
-    private int getTabPositionForTextDirection(int position) {
-        if (isRTL()) {
-            return TabState.COUNT - 1 - position;
-        }
-        return position;
-    }
-
     private void setFilterAndUpdateTitle(ContactListFilter filter) {
         setFilterAndUpdateTitle(filter, true);
     }
diff --git a/src/com/android/contacts/common/list/ViewPagerTabStrip.java b/src/com/android/contacts/common/list/ViewPagerTabStrip.java
deleted file mode 100644
index c8ae21a..0000000
--- a/src/com/android/contacts/common/list/ViewPagerTabStrip.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (C) 2014 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
- */
-
-package com.android.contacts.common.list;
-
-import android.content.Context;
-import android.content.res.Resources;
-import android.graphics.Canvas;
-import android.graphics.Paint;
-import android.util.AttributeSet;
-import android.view.View;
-import android.widget.LinearLayout;
-
-import com.android.contacts.common.R;
-
-public class ViewPagerTabStrip extends LinearLayout {
-    private int mSelectedUnderlineThickness;
-    private final Paint mSelectedUnderlinePaint;
-
-    private int mIndexForSelection;
-    private float mSelectionOffset;
-
-    public ViewPagerTabStrip(Context context) {
-        this(context, null);
-    }
-
-    public ViewPagerTabStrip(Context context, AttributeSet attrs) {
-        super(context, attrs);
-
-        final Resources res = context.getResources();
-
-        mSelectedUnderlineThickness =
-                res.getDimensionPixelSize(R.dimen.tab_selected_underline_height);
-        int underlineColor = res.getColor(R.color.tab_selected_underline_color);
-        int backgroundColor = res.getColor(R.color.actionbar_background_color);
-
-        mSelectedUnderlinePaint = new Paint();
-        mSelectedUnderlinePaint.setColor(underlineColor);
-
-        setBackgroundColor(backgroundColor);
-        setWillNotDraw(false);
-    }
-
-    /**
-     * Notifies this view that view pager has been scrolled. We save the tab index
-     * and selection offset for interpolating the position and width of selection
-     * underline.
-     */
-    void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
-        mIndexForSelection = position;
-        mSelectionOffset = positionOffset;
-        invalidate();
-    }
-
-    @Override
-    protected void onDraw(Canvas canvas) {
-        int childCount = getChildCount();
-
-        // Thick colored underline below the current selection
-        if (childCount > 0) {
-            View selectedTitle = getChildAt(mIndexForSelection);
-
-            if (selectedTitle == null) {
-                // The view pager's tab count changed but we weren't notified yet. Ignore this draw
-                // pass, when we get a new selection we will update and draw the selection strip in
-                // the correct place.
-                return;
-            }
-            int selectedLeft = selectedTitle.getLeft();
-            int selectedRight = selectedTitle.getRight();
-            final boolean isRtl = isRtl();
-            final boolean hasNextTab = isRtl ? mIndexForSelection > 0
-                    : (mIndexForSelection < (getChildCount() - 1));
-            if ((mSelectionOffset > 0.0f) && hasNextTab) {
-                // Draw the selection partway between the tabs
-                View nextTitle = getChildAt(mIndexForSelection + (isRtl ? -1 : 1));
-                int nextLeft = nextTitle.getLeft();
-                int nextRight = nextTitle.getRight();
-
-                selectedLeft = (int) (mSelectionOffset * nextLeft +
-                        (1.0f - mSelectionOffset) * selectedLeft);
-                selectedRight = (int) (mSelectionOffset * nextRight +
-                        (1.0f - mSelectionOffset) * selectedRight);
-            }
-
-            int height = getHeight();
-            canvas.drawRect(selectedLeft, height - mSelectedUnderlineThickness,
-                    selectedRight, height, mSelectedUnderlinePaint);
-        }
-    }
-
-    private boolean isRtl() {
-        return getLayoutDirection() == View.LAYOUT_DIRECTION_RTL;
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/contacts/common/list/ViewPagerTabs.java b/src/com/android/contacts/common/list/ViewPagerTabs.java
deleted file mode 100644
index 48de6af..0000000
--- a/src/com/android/contacts/common/list/ViewPagerTabs.java
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * Copyright (C) 2014 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.
- */
-package com.android.contacts.common.list;
-
-import android.content.Context;
-import android.content.res.ColorStateList;
-import android.content.res.TypedArray;
-import android.graphics.Outline;
-import android.support.v4.view.PagerAdapter;
-import android.support.v4.view.ViewPager;
-import android.util.AttributeSet;
-import android.util.TypedValue;
-import android.view.Gravity;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewOutlineProvider;
-import android.widget.FrameLayout;
-import android.widget.HorizontalScrollView;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import com.android.contacts.common.R;
-import com.android.contacts.common.compat.CompatUtils;
-
-/**
- * Lightweight implementation of ViewPager tabs. This looks similar to traditional actionBar tabs,
- * but allows for the view containing the tabs to be placed anywhere on screen. Text-related
- * attributes can also be assigned in XML - these will get propogated to the child TextViews
- * automatically.
- */
-public class ViewPagerTabs extends HorizontalScrollView implements ViewPager.OnPageChangeListener {
-
-    ViewPager mPager;
-    private ViewPagerTabStrip mTabStrip;
-
-    /**
-     * Linearlayout that will contain the TextViews serving as tabs. This is the only child
-     * of the parent HorizontalScrollView.
-     */
-    final int mTextStyle;
-    final ColorStateList mTextColor;
-    final int mTextSize;
-    final boolean mTextAllCaps;
-    int mPrevSelected = -1;
-    int mSidePadding;
-
-    private int[] mTabIcons;
-    // For displaying the unread count next to the tab icon.
-    private int[] mUnreadCounts;
-
-    private static final ViewOutlineProvider VIEW_BOUNDS_OUTLINE_PROVIDER;
-    static {
-        if (CompatUtils.isLollipopCompatible()) {
-            VIEW_BOUNDS_OUTLINE_PROVIDER = new ViewOutlineProvider() {
-                @Override
-                public void getOutline(View view, Outline outline) {
-                    outline.setRect(0, 0, view.getWidth(), view.getHeight());
-                }
-            };
-        } else {
-            VIEW_BOUNDS_OUTLINE_PROVIDER = null;
-        }
-    }
-
-    private static final int TAB_SIDE_PADDING_IN_DPS = 10;
-
-    // TODO: This should use <declare-styleable> in the future
-    private static final int[] ATTRS = new int[] {
-        android.R.attr.textSize,
-        android.R.attr.textStyle,
-        android.R.attr.textColor,
-        android.R.attr.textAllCaps
-    };
-
-    /**
-     * Simulates actionbar tab behavior by showing a toast with the tab title when long clicked.
-     */
-    private class OnTabLongClickListener implements OnLongClickListener {
-        final int mPosition;
-
-        public OnTabLongClickListener(int position) {
-            mPosition = position;
-        }
-
-        @Override
-        public boolean onLongClick(View v) {
-            final int[] screenPos = new int[2];
-            getLocationOnScreen(screenPos);
-
-            final Context context = getContext();
-            final int width = getWidth();
-            final int height = getHeight();
-            final int screenWidth = context.getResources().getDisplayMetrics().widthPixels;
-
-            Toast toast = Toast.makeText(context, mPager.getAdapter().getPageTitle(mPosition),
-                    Toast.LENGTH_SHORT);
-
-            // Show the toast under the tab
-            toast.setGravity(Gravity.TOP | Gravity.CENTER_HORIZONTAL,
-                    (screenPos[0] + width / 2) - screenWidth / 2, screenPos[1] + height);
-
-            toast.show();
-            return true;
-        }
-    }
-
-    public ViewPagerTabs(Context context) {
-        this(context, null);
-    }
-
-    public ViewPagerTabs(Context context, AttributeSet attrs) {
-        this(context, attrs, 0);
-    }
-
-    public ViewPagerTabs(Context context, AttributeSet attrs, int defStyle) {
-        super(context, attrs, defStyle);
-        setFillViewport(true);
-
-        mSidePadding = (int) (getResources().getDisplayMetrics().density * TAB_SIDE_PADDING_IN_DPS);
-
-        final TypedArray a = context.obtainStyledAttributes(attrs, ATTRS);
-        mTextSize = a.getDimensionPixelSize(0, 0);
-        mTextStyle = a.getInt(1, 0);
-        mTextColor = a.getColorStateList(2);
-        mTextAllCaps = a.getBoolean(3, false);
-
-        mTabStrip = new ViewPagerTabStrip(context);
-        addView(mTabStrip,
-                new FrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT));
-        a.recycle();
-
-        if (CompatUtils.isLollipopCompatible()) {
-            // enable shadow casting from view bounds
-            setOutlineProvider(VIEW_BOUNDS_OUTLINE_PROVIDER);
-        }
-    }
-
-    public void setViewPager(ViewPager viewPager) {
-        mPager = viewPager;
-        addTabs(mPager.getAdapter());
-    }
-
-    /**
-     * Set the tab icons and initialize an array for unread counts the same length as the icon
-     * array.
-     *
-     * @param tabIcons An array representing the tab icons in order.
-     */
-    public void configureTabIcons(int[] tabIcons) {
-        mTabIcons = tabIcons;
-        mUnreadCounts = new int[tabIcons.length];
-    }
-
-    public void setUnreadCount(int count, int position) {
-        if (mUnreadCounts == null || position >= mUnreadCounts.length) {
-            return;
-        }
-        mUnreadCounts[position] = count;
-    }
-
-    private void addTabs(PagerAdapter adapter) {
-        mTabStrip.removeAllViews();
-
-        final int count = adapter.getCount();
-        for (int i = 0; i < count; i++) {
-            addTab(adapter.getPageTitle(i), i);
-        }
-    }
-
-    private void addTab(CharSequence tabTitle, final int position) {
-        View tabView;
-        if (mTabIcons != null && position < mTabIcons.length) {
-            View layout = LayoutInflater.from(getContext()).inflate(
-                    R.layout.unread_count_tab, null);
-            View iconView = layout.findViewById(R.id.icon);
-            iconView.setBackgroundResource(mTabIcons[position]);
-            iconView.setContentDescription(tabTitle);
-            TextView textView = (TextView) layout.findViewById(R.id.count);
-            if (mUnreadCounts != null && mUnreadCounts[position] > 0) {
-                textView.setText(Integer.toString(mUnreadCounts[position]));
-                textView.setVisibility(View.VISIBLE);
-                iconView.setContentDescription(getResources().getQuantityString(
-                        R.plurals.tab_title_with_unread_items,
-                        mUnreadCounts[position],
-                        tabTitle.toString(),
-                        mUnreadCounts[position]));
-            } else {
-                textView.setVisibility(View.INVISIBLE);
-                iconView.setContentDescription(tabTitle);
-            }
-            tabView = layout;
-        } else {
-            final TextView textView = new TextView(getContext());
-            textView.setText(tabTitle);
-            textView.setBackgroundResource(R.drawable.view_pager_tab_background);
-
-            // Assign various text appearance related attributes to child views.
-            if (mTextStyle > 0) {
-                textView.setTypeface(textView.getTypeface(), mTextStyle);
-            }
-            if (mTextSize > 0) {
-                textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, mTextSize);
-            }
-            if (mTextColor != null) {
-                textView.setTextColor(mTextColor);
-            }
-            textView.setAllCaps(mTextAllCaps);
-            textView.setGravity(Gravity.CENTER);
-
-            tabView = textView;
-        }
-
-        tabView.setOnClickListener(new OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                mPager.setCurrentItem(getRtlPosition(position));
-            }
-        });
-
-        tabView.setOnLongClickListener(new OnTabLongClickListener(position));
-
-        tabView.setPadding(mSidePadding, 0, mSidePadding, 0);
-
-        mTabStrip.addView(tabView, position, new LinearLayout.LayoutParams(
-                LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT, 1));
-
-        // Default to the first child being selected
-        if (position == 0) {
-            mPrevSelected = 0;
-            tabView.setSelected(true);
-        }
-    }
-
-    /**
-     * Remove a tab at a certain index.
-     *
-     * @param index The index of the tab view we wish to remove.
-     */
-    public void removeTab(int index) {
-        View view = mTabStrip.getChildAt(index);
-        if (view != null) {
-            mTabStrip.removeView(view);
-        }
-    }
-
-    /**
-     * Refresh a tab at a certain index by removing it and reconstructing it.
-     *
-     * @param index The index of the tab view we wish to update.
-     */
-    public void updateTab(int index) {
-        removeTab(index);
-
-        if (index < mPager.getAdapter().getCount()) {
-            addTab(mPager.getAdapter().getPageTitle(index), index);
-        }
-    }
-
-    @Override
-    public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
-        position = getRtlPosition(position);
-        int tabStripChildCount = mTabStrip.getChildCount();
-        if ((tabStripChildCount == 0) || (position < 0) || (position >= tabStripChildCount)) {
-            return;
-        }
-
-        mTabStrip.onPageScrolled(position, positionOffset, positionOffsetPixels);
-    }
-
-    @Override
-    public void onPageSelected(int position) {
-        position = getRtlPosition(position);
-        int tabStripChildCount = mTabStrip.getChildCount();
-        if ((tabStripChildCount == 0) || (position < 0) || (position >= tabStripChildCount)) {
-            return;
-        }
-
-        if (mPrevSelected >= 0 && mPrevSelected < tabStripChildCount) {
-            mTabStrip.getChildAt(mPrevSelected).setSelected(false);
-        }
-        final View selectedChild = mTabStrip.getChildAt(position);
-        selectedChild.setSelected(true);
-
-        // Update scroll position
-        final int scrollPos = selectedChild.getLeft() - (getWidth() - selectedChild.getWidth()) / 2;
-        smoothScrollTo(scrollPos, 0);
-        mPrevSelected = position;
-    }
-
-    @Override
-    public void onPageScrollStateChanged(int state) {
-    }
-
-    private int getRtlPosition(int position) {
-        if (getLayoutDirection() == View.LAYOUT_DIRECTION_RTL) {
-            return mTabStrip.getChildCount() - 1 - position;
-        }
-        return position;
-    }
-}
-
diff --git a/src/com/android/contacts/group/GroupMembersFragment.java b/src/com/android/contacts/group/GroupMembersFragment.java
index d3c828b..2951a21 100644
--- a/src/com/android/contacts/group/GroupMembersFragment.java
+++ b/src/com/android/contacts/group/GroupMembersFragment.java
@@ -392,10 +392,6 @@
     }
 
     @Override
-    public void onSelectedTabChanged() {
-    }
-
-    @Override
     public void onUpButtonPressed() {
         getActivity().onBackPressed();
     }
@@ -452,8 +448,7 @@
         // be null (i.e. it can be null in onCreateView() of this fragment)
         final GroupMembersActivity activity = (GroupMembersActivity) getActivity();
         mActionBarAdapter = new ActionBarAdapter(activity, this, activity.getSupportActionBar(),
-                /* portraitTabs */ null, /* landscapeTabs */ null, activity.getToolbar(),
-                R.string.enter_contact_name);
+                activity.getToolbar(), R.string.enter_contact_name);
         mActionBarAdapter.setShowHomeIcon(true);
         final ContactsRequest contactsRequest = new ContactsRequest();
         contactsRequest.setActionCode(ContactsRequest.ACTION_GROUP);
diff --git a/src/com/android/contacts/list/ContactsUnavailableFragment.java b/src/com/android/contacts/list/ContactsUnavailableFragment.java
index 1b122cc..aa08a32 100644
--- a/src/com/android/contacts/list/ContactsUnavailableFragment.java
+++ b/src/com/android/contacts/list/ContactsUnavailableFragment.java
@@ -33,7 +33,6 @@
 import android.widget.TextView;
 
 import com.android.contacts.R;
-import com.android.contacts.activities.ActionBarAdapter.TabState;
 import com.android.contacts.common.compat.ProviderStatusCompat;
 
 /**
@@ -50,7 +49,6 @@
     private ProgressBar mProgress;
     private View mButtonsContainer;
     private int mNoContactsMsgResId = -1;
-    private int mLastTab = -1;
 
     private OnContactsUnavailableActionListener mListener;
 
@@ -125,10 +123,6 @@
      * Update views in the fragment when provider status is empty.
      */
     private void updateViewsForEmptyStatus() {
-        setTabInfo(mNoContactsMsgResId, mLastTab);
-        if (mLastTab == TabState.ALL) {
-            updateButtonVisibilty(View.VISIBLE);
-        }
         mProgress.setVisibility(View.GONE);
     }
 
@@ -167,29 +161,6 @@
         }
     }
 
-    /**
-     * Set the message to be shown if no data is available for the selected tab
-     *
-     * @param resId - String resource ID of the message , -1 means view will not be visible
-     */
-    public void setTabInfo(int resId, int callerTab) {
-        mNoContactsMsgResId = resId;
-        mLastTab = callerTab;
-        if ((mMessageView != null) && (mProviderStatus != null) &&
-                mProviderStatus.equals(ProviderStatusCompat.STATUS_EMPTY)) {
-            if (resId != -1) {
-                mMessageView.setText(mNoContactsMsgResId);
-                mMessageView.setGravity(Gravity.CENTER_HORIZONTAL);
-                mMessageView.setVisibility(View.VISIBLE);
-                if (callerTab == TabState.ALL) {
-                    updateButtonVisibilty(View.VISIBLE);
-                }
-            } else {
-                mMessageView.setVisibility(View.GONE);
-            }
-        }
-    }
-
     private void updateButtonVisibilty(int visibility) {
         if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
             mAddAccountButton.setVisibility(visibility);
