Bug 1251362 - Part 19 - Remove code and resources for the old Recent Tabs panel. r=liuche draft
authorJan Henning <jh+bugzilla@buttercookie.de>
Thu, 26 May 2016 17:40:19 +0200
changeset 376087 48b7556c94e3c99ac36da7e7417484d4b3855b59
parent 376086 412e23f55dce09e4f1be247e13511b0b78156591
child 376088 9f8611e273c9ebf6019001d58bd75065ac1c05ee
push id20500
push usermozilla@buttercookie.de
push dateTue, 07 Jun 2016 11:41:20 +0000
reviewersliuche
bugs1251362
milestone50.0a1
Bug 1251362 - Part 19 - Remove code and resources for the old Recent Tabs panel. r=liuche MozReview-Commit-ID: FQJ7j8YlV6E
mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
mobile/android/base/java/org/mozilla/gecko/home/HomeConfig.java
mobile/android/base/java/org/mozilla/gecko/home/HomeConfigPrefsBackend.java
mobile/android/base/java/org/mozilla/gecko/home/RecentTabsPanel.java
mobile/android/base/locales/en-US/android_strings.dtd
mobile/android/base/moz.build
mobile/android/base/resources/layout-large-land-v11/home_list.xml
mobile/android/base/resources/layout-xlarge-v11/home_list.xml
mobile/android/base/resources/layout/home_list.xml
mobile/android/base/resources/layout/home_list_panel.xml
mobile/android/base/resources/layout/home_open_all_row.xml
mobile/android/base/strings.xml.in
mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/AboutHomeComponent.java
mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAboutHomePageNavigation.java
--- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
@@ -5,16 +5,17 @@
 
 package org.mozilla.gecko;
 
 import android.Manifest;
 import android.app.DownloadManager;
 import android.os.Environment;
 import android.support.annotation.CheckResult;
 import android.support.annotation.NonNull;
+
 import org.json.JSONArray;
 import org.mozilla.gecko.adjust.AdjustHelperInterface;
 import org.mozilla.gecko.annotation.RobocopTarget;
 import org.mozilla.gecko.AppConstants.Versions;
 import org.mozilla.gecko.DynamicToolbar.VisibilityTransition;
 import org.mozilla.gecko.Tabs.TabEvents;
 import org.mozilla.gecko.animation.PropertyAnimator;
 import org.mozilla.gecko.animation.ViewHelper;
@@ -2523,17 +2524,17 @@ public class BrowserApp extends GeckoApp
                 // to panel BAR, the history URL still contains FOO, and we restore to FOO. In most
                 // cases however we aren't supplying a panel ID in the URL so this code still works
                 // for most cases.
                 // We can't fix this directly since we can't ignore the panelId if we're explicitly
                 // loading a specific panel, and we currently can't distinguish between loading
                 // history, and loading new pages, see Bug 1268887
                 panelId = tab.getMostRecentHomePanel();
                 panelRestoreData = tab.getMostRecentHomePanelData();
-            } else if (panelId.equals(HomeConfig.getIdForBuiltinPanelType(PanelType.RECENT_TABS))) {
+            } else if (panelId.equals(HomeConfig.getIdForBuiltinPanelType(PanelType.DEPRECATED_RECENT_TABS))) {
                 // Redirect to the Combined History panel.
                 panelId = HomeConfig.getIdForBuiltinPanelType(PanelType.COMBINED_HISTORY);
                 panelRestoreData = new Bundle();
                 // Jump directly to the Recent Tabs subview of the Combined History panel.
                 panelRestoreData.putBoolean("goToRecentTabs", true);
             }
             showHomePager(panelId, panelRestoreData);
 
--- a/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
@@ -1458,17 +1458,17 @@ public abstract class GeckoApp
      * restore tabs as needed.
      * If we restore tabs, we don't need to create a new tab.
      */
     protected void loadStartupTab(final int flags) {
         if (!mShouldRestore) {
             if (mLastSessionCrashed) {
                 // The Recent Tabs panel no longer exists, but BrowserApp will redirect us
                 // to the Recent Tabs folder of the Combined History panel.
-                Tabs.getInstance().loadUrl(AboutPages.getURLForBuiltinPanelType(PanelType.RECENT_TABS), flags);
+                Tabs.getInstance().loadUrl(AboutPages.getURLForBuiltinPanelType(PanelType.DEPRECATED_RECENT_TABS), flags);
             } else {
                 final String homepage = getHomepage();
                 Tabs.getInstance().loadUrl(!TextUtils.isEmpty(homepage) ? homepage : AboutPages.HOME, flags);
             }
         }
     }
 
     /**
--- a/mobile/android/base/java/org/mozilla/gecko/home/HomeConfig.java
+++ b/mobile/android/base/java/org/mozilla/gecko/home/HomeConfig.java
@@ -38,23 +38,23 @@ public final class HomeConfig {
      * to a default set of built-in panels. The DYNAMIC panel type is used by
      * third-party services to create panels with varying types of content.
      */
     @RobocopTarget
     public static enum PanelType implements Parcelable {
         TOP_SITES("top_sites", TopSitesPanel.class),
         BOOKMARKS("bookmarks", BookmarksPanel.class),
         COMBINED_HISTORY("combined_history", CombinedHistoryPanel.class),
-        RECENT_TABS("recent_tabs", RecentTabsPanel.class),
         DYNAMIC("dynamic", DynamicPanel.class),
         // Deprecated panels that should no longer exist but are kept around for
         // migration code. Class references have been replaced with new version of the panel.
         DEPRECATED_REMOTE_TABS("remote_tabs", CombinedHistoryPanel.class),
         DEPRECATED_HISTORY("history", CombinedHistoryPanel.class),
-        DEPRECATED_READING_LIST("reading_list", BookmarksPanel.class);
+        DEPRECATED_READING_LIST("reading_list", BookmarksPanel.class),
+        DEPRECATED_RECENT_TABS("recent_tabs", CombinedHistoryPanel.class);
 
         private final String mId;
         private final Class<?> mPanelClass;
 
         PanelType(String id, Class<?> panelClass) {
             mId = id;
             mPanelClass = panelClass;
         }
@@ -1639,22 +1639,20 @@ public final class HomeConfig {
             return R.string.home_top_sites_title;
 
         case BOOKMARKS:
         case DEPRECATED_READING_LIST:
             return R.string.bookmarks_title;
 
         case DEPRECATED_HISTORY:
         case DEPRECATED_REMOTE_TABS:
+        case DEPRECATED_RECENT_TABS:
         case COMBINED_HISTORY:
             return R.string.home_history_title;
 
-        case RECENT_TABS:
-            return R.string.recent_tabs_title;
-
         default:
             throw new IllegalArgumentException("Only for built-in panel types: " + panelType);
         }
     }
 
     public static String getIdForBuiltinPanelType(PanelType panelType) {
         switch (panelType) {
         case TOP_SITES:
@@ -1670,17 +1668,17 @@ public final class HomeConfig {
             return COMBINED_HISTORY_PANEL_ID;
 
         case DEPRECATED_REMOTE_TABS:
             return REMOTE_TABS_PANEL_ID;
 
         case DEPRECATED_READING_LIST:
             return DEPRECATED_READING_LIST_PANEL_ID;
 
-        case RECENT_TABS:
+        case DEPRECATED_RECENT_TABS:
             return RECENT_TABS_PANEL_ID;
 
         default:
             throw new IllegalArgumentException("Only for built-in panel types: " + panelType);
         }
     }
 
     public static PanelConfig createBuiltinPanelConfig(Context context, PanelType panelType, EnumSet<PanelConfig.Flags> flags) {
--- a/mobile/android/base/java/org/mozilla/gecko/home/HomeConfigPrefsBackend.java
+++ b/mobile/android/base/java/org/mozilla/gecko/home/HomeConfigPrefsBackend.java
@@ -357,17 +357,17 @@ public class HomeConfigPrefsBackend impl
 
         for (int v = version + 1; v <= VERSION; v++) {
             Log.d(LOGTAG, "Migrating to version = " + v);
 
             switch (v) {
                 case 1:
                     // Add "Recent Tabs" panel.
                     addBuiltinPanelConfig(context, jsonPanels,
-                            PanelType.RECENT_TABS, Position.FRONT, Position.BACK);
+                            PanelType.DEPRECATED_RECENT_TABS, Position.FRONT, Position.BACK);
 
                     // Remove the old pref key.
                     prefsEditor.remove(PREFS_CONFIG_KEY_OLD);
                     break;
 
                 case 2:
                     // Add "Remote Tabs"/"Synced Tabs" panel.
                     addBuiltinPanelConfig(context, jsonPanels,
@@ -401,17 +401,17 @@ public class HomeConfigPrefsBackend impl
 
                 case 6:
                     jsonPanels = removePanel(context, jsonPanels,
                             PanelType.DEPRECATED_READING_LIST, PanelType.BOOKMARKS, false);
                     break;
 
                 case 7:
                     jsonPanels = removePanel(context, jsonPanels,
-                            PanelType.RECENT_TABS, PanelType.COMBINED_HISTORY, true);
+                            PanelType.DEPRECATED_RECENT_TABS, PanelType.COMBINED_HISTORY, true);
                     break;
             }
         }
 
         // Save the new panel config and the new version number.
         final JSONObject newJson = new JSONObject();
         newJson.put(JSON_KEY_PANELS, jsonPanels);
         newJson.put(JSON_KEY_VERSION, VERSION);
deleted file mode 100644
--- a/mobile/android/base/java/org/mozilla/gecko/home/RecentTabsPanel.java
+++ /dev/null
@@ -1,443 +0,0 @@
-/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-package org.mozilla.gecko.home;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-import org.mozilla.gecko.AboutPages;
-import org.mozilla.gecko.EventDispatcher;
-import org.mozilla.gecko.GeckoAppShell;
-import org.mozilla.gecko.GeckoEvent;
-import org.mozilla.gecko.GeckoProfile;
-import org.mozilla.gecko.R;
-import org.mozilla.gecko.SessionParser;
-import org.mozilla.gecko.Telemetry;
-import org.mozilla.gecko.TelemetryContract;
-import org.mozilla.gecko.db.BrowserContract.CommonColumns;
-import org.mozilla.gecko.db.BrowserContract.URLColumns;
-import org.mozilla.gecko.reader.SavedReaderViewHelper;
-import org.mozilla.gecko.util.EventCallback;
-import org.mozilla.gecko.util.NativeEventListener;
-import org.mozilla.gecko.util.NativeJSObject;
-import org.mozilla.gecko.util.ThreadUtils;
-
-import android.content.Context;
-import android.database.Cursor;
-import android.database.MatrixCursor;
-import android.database.MatrixCursor.RowBuilder;
-import android.os.Bundle;
-import android.support.v4.app.LoaderManager;
-import android.support.v4.content.Loader;
-import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.ViewStub;
-import android.widget.AdapterView;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-/**
- * Fragment that displays tabs from last session in a ListView.
- */
-public class RecentTabsPanel extends HomeFragment
-                             implements NativeEventListener {
-    // Logging tag name
-    @SuppressWarnings("unused")
-    private static final String LOGTAG = "GeckoRecentTabsPanel";
-
-    // Cursor loader ID for the loader that loads recent tabs
-    private static final int LOADER_ID_RECENT_TABS = 0;
-
-    private static final String TELEMETRY_EXTRA_LAST_TIME = "recent_tabs_last_time";
-    private static final String TELEMETRY_EXTRA_CLOSED = "recent_closed_tabs";
-
-    // Adapter for the list of recent tabs.
-    private RecentTabsAdapter mAdapter;
-
-    // The view shown by the fragment.
-    private HomeListView mList;
-
-    // Reference to the View to display when there are no results.
-    private View mEmptyView;
-
-    // Callbacks used for the search and favicon cursor loaders
-    private CursorLoaderCallbacks mCursorLoaderCallbacks;
-
-    // Recently closed tabs from gecko
-    private ClosedTab[] mClosedTabs;
-
-    private void restoreSessionWithHistory(List<String> dataList) {
-        JSONObject json = new JSONObject();
-        try {
-            json.put("tabs", new JSONArray(dataList));
-        } catch (JSONException e) {
-            Log.e(LOGTAG, "JSON error", e);
-        }
-
-        GeckoAppShell.notifyObservers("Session:RestoreRecentTabs", json.toString());
-    }
-
-    private static final class ClosedTab {
-        public final String url;
-        public final String title;
-        public final String data;
-
-        public ClosedTab(String url, String title, String data) {
-            this.url = url;
-            this.title = title;
-            this.data = data;
-        }
-    }
-
-    public static final class RecentTabs implements URLColumns, CommonColumns {
-        public static final String TYPE = "type";
-        public static final String DATA = "data";
-
-        public static final int TYPE_HEADER = 0;
-        public static final int TYPE_LAST_TIME = 1;
-        public static final int TYPE_CLOSED = 2;
-        public static final int TYPE_OPEN_ALL_LAST_TIME = 3;
-        public static final int TYPE_OPEN_ALL_CLOSED = 4;
-    }
-
-    @Override
-    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
-        return inflater.inflate(R.layout.home_list_panel, container, false);
-    }
-
-    @Override
-    public void onViewCreated(View view, Bundle savedInstanceState) {
-        mList = (HomeListView) view.findViewById(R.id.list);
-        mList.setTag(HomePager.LIST_TAG_RECENT_TABS);
-
-        mList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
-            @Override
-            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-                final Cursor c = mAdapter.getCursor();
-                if (c == null || !c.moveToPosition(position)) {
-                    return;
-                }
-
-                final int itemType = c.getInt(c.getColumnIndexOrThrow(RecentTabs.TYPE));
-
-                if (itemType == RecentTabs.TYPE_OPEN_ALL_LAST_TIME) {
-                    openTabsWithType(RecentTabs.TYPE_LAST_TIME);
-                    return;
-                }
-
-                if (itemType == RecentTabs.TYPE_OPEN_ALL_CLOSED) {
-                    openTabsWithType(RecentTabs.TYPE_CLOSED);
-                    return;
-                }
-
-                final String extras = (itemType == RecentTabs.TYPE_CLOSED) ? TELEMETRY_EXTRA_CLOSED : TELEMETRY_EXTRA_LAST_TIME;
-                Telemetry.sendUIEvent(TelemetryContract.Event.LOAD_URL, TelemetryContract.Method.LIST_ITEM, extras);
-
-                final List<String> dataList = new ArrayList<>();
-                dataList.add(c.getString(c.getColumnIndexOrThrow(RecentTabs.DATA)));
-                restoreSessionWithHistory(dataList);
-            }
-        });
-
-        mList.setContextMenuInfoFactory(new HomeContextMenuInfo.Factory() {
-            @Override
-            public HomeContextMenuInfo makeInfoForCursor(View view, int position, long id, Cursor cursor) {
-                // Don't show context menus for the "Open all" rows.
-                final int itemType = cursor.getInt(cursor.getColumnIndexOrThrow(RecentTabs.TYPE));
-                if (itemType == RecentTabs.TYPE_OPEN_ALL_LAST_TIME || itemType == RecentTabs.TYPE_OPEN_ALL_CLOSED) {
-                    return null;
-                }
-
-                final HomeContextMenuInfo info = new HomeContextMenuInfo(view, position, id);
-                info.url = cursor.getString(cursor.getColumnIndexOrThrow(RecentTabs.URL));
-                info.title = cursor.getString(cursor.getColumnIndexOrThrow(RecentTabs.TITLE));
-                return info;
-            }
-        });
-
-        registerForContextMenu(mList);
-
-        EventDispatcher.getInstance().registerGeckoThreadListener(this, "ClosedTabs:Data");
-        GeckoAppShell.notifyObservers("ClosedTabs:StartNotifications", null);
-    }
-
-    @Override
-    public void onDestroyView() {
-        super.onDestroyView();
-
-        // Discard any additional item clicks on the list as the
-        // panel is getting destroyed (bug 1210243).
-        mList.setOnItemClickListener(null);
-
-        mList = null;
-        mEmptyView = null;
-
-        EventDispatcher.getInstance().unregisterGeckoThreadListener(this, "ClosedTabs:Data");
-        GeckoAppShell.notifyObservers("ClosedTabs:StopNotifications", null);
-    }
-
-    @Override
-    public void onActivityCreated(Bundle savedInstanceState) {
-        super.onActivityCreated(savedInstanceState);
-
-        // Intialize adapter
-        mAdapter = new RecentTabsAdapter(getActivity());
-        mList.setAdapter(mAdapter);
-
-        // Create callbacks before the initial loader is started
-        mCursorLoaderCallbacks = new CursorLoaderCallbacks();
-        loadIfVisible();
-    }
-
-    private void updateUiFromCursor(Cursor c) {
-        if (c != null && c.getCount() > 0) {
-            return;
-        }
-
-        if (mEmptyView == null) {
-            // Set empty panel view. We delay this so that the empty view won't flash.
-            final ViewStub emptyViewStub = (ViewStub) getView().findViewById(R.id.home_empty_view_stub);
-            mEmptyView = emptyViewStub.inflate();
-
-            final ImageView emptyIcon = (ImageView) mEmptyView.findViewById(R.id.home_empty_image);
-            emptyIcon.setImageResource(R.drawable.icon_remote_tabs_empty);
-
-            final TextView emptyText = (TextView) mEmptyView.findViewById(R.id.home_empty_text);
-            emptyText.setText(R.string.home_last_tabs_empty);
-
-            mList.setEmptyView(mEmptyView);
-        }
-    }
-
-    @Override
-    protected void load() {
-        getLoaderManager().initLoader(LOADER_ID_RECENT_TABS, null, mCursorLoaderCallbacks);
-    }
-
-    @Override
-    public void handleMessage(String event, NativeJSObject message, EventCallback callback) {
-        final NativeJSObject[] tabs = message.getObjectArray("tabs");
-        final int length = tabs.length;
-
-        final ClosedTab[] closedTabs = new ClosedTab[length];
-        for (int i = 0; i < length; i++) {
-            final NativeJSObject tab = tabs[i];
-            closedTabs[i] = new ClosedTab(tab.getString("url"), tab.getString("title"), tab.getObject("data").toString());
-        }
-
-        // Only modify mClosedTabs on the UI thread
-        ThreadUtils.postToUiThread(new Runnable() {
-            @Override
-            public void run() {
-                mClosedTabs = closedTabs;
-
-                // The fragment might have been detached before this code
-                // runs in the UI thread.
-                if (getActivity() != null) {
-                    // Reload the cursor to show recently closed tabs.
-                    getLoaderManager().restartLoader(LOADER_ID_RECENT_TABS, null, mCursorLoaderCallbacks);
-                }
-            }
-        });
-    }
-
-    private void openTabsWithType(int type) {
-        final Cursor c = mAdapter.getCursor();
-        if (c == null || !c.moveToFirst()) {
-            return;
-        }
-
-        final List<String> dataList = new ArrayList<String>();
-        do {
-            if (c.getInt(c.getColumnIndexOrThrow(RecentTabs.TYPE)) == type) {
-                dataList.add(c.getString(c.getColumnIndexOrThrow(RecentTabs.DATA)));
-            }
-        } while (c.moveToNext());
-
-        final String extras = (type == RecentTabs.TYPE_CLOSED) ? TELEMETRY_EXTRA_CLOSED : TELEMETRY_EXTRA_LAST_TIME;
-        Telemetry.sendUIEvent(TelemetryContract.Event.LOAD_URL, TelemetryContract.Method.BUTTON, extras);
-
-        restoreSessionWithHistory(dataList);
-    }
-
-    private static class RecentTabsCursorLoader extends SimpleCursorLoader {
-        private final ClosedTab[] closedTabs;
-
-        public RecentTabsCursorLoader(Context context, ClosedTab[] closedTabs) {
-            super(context);
-            this.closedTabs = closedTabs;
-        }
-
-        private void addRow(MatrixCursor c, String url, String title, int type, String data) {
-            final RowBuilder row = c.newRow();
-            row.add(-1);
-            row.add(url);
-            row.add(title);
-            row.add(type);
-            row.add(data);
-        }
-
-        @Override
-        public Cursor loadCursor() {
-            // TwoLinePageRow requires the SavedReaderViewHelper to be initialised. Usually this is
-            // done as part of BrowserDatabaseHelper.onOpen(), however we don't actually access
-            // the DB when showing the Recent Tabs panel, hence it's possible that the SavedReaderViewHelper
-            // isn't loaded. Therefore we need to explicitly force loading here.
-            // Note: loadCursor is run on a background thread, hence it's safe to do this here.
-            // (loading time is a few ms, and hence shouldn't impact overall loading time for this
-            // panel in any significant way).
-            SavedReaderViewHelper.getSavedReaderViewHelper(getContext()).loadItems();
-
-            final Context context = getContext();
-
-            final MatrixCursor c = new MatrixCursor(new String[] { RecentTabs._ID,
-                                                                   RecentTabs.URL,
-                                                                   RecentTabs.TITLE,
-                                                                   RecentTabs.TYPE,
-                                                                   RecentTabs.DATA});
-
-            if (closedTabs != null && closedTabs.length > 0) {
-                // How many closed tabs are actually displayed.
-                int visibleClosedTabs = 0;
-
-                final int length = closedTabs.length;
-                for (int i = 0; i < length; i++) {
-                    final String url = closedTabs[i].url;
-
-                    // Don't show recent tabs for about:home or about:privatebrowsing.
-                    if (!AboutPages.isTitlelessAboutPage(url)) {
-                        // If this is the first closed tab we're adding, add a header for the section.
-                        if (visibleClosedTabs == 0) {
-                            addRow(c, null, context.getString(R.string.home_closed_tabs_title), RecentTabs.TYPE_HEADER, null);
-                        }
-                        addRow(c, url, closedTabs[i].title, RecentTabs.TYPE_CLOSED, closedTabs[i].data);
-                        visibleClosedTabs++;
-                    }
-                }
-
-                // Add an "Open all" button if more than 2 tabs were added to the list.
-                if (visibleClosedTabs > 1) {
-                    addRow(c, null, null, RecentTabs.TYPE_OPEN_ALL_CLOSED, null);
-                }
-            }
-
-            // We need to ensure that the session restore code has updated sessionstore.bak as necessary.
-            GeckoProfile.get(context).waitForOldSessionDataProcessing();
-
-            final String jsonString = GeckoProfile.get(context).readSessionFile(true);
-            if (jsonString == null) {
-                // No previous session data
-                return c;
-            }
-
-            final int count = c.getCount();
-
-            new SessionParser() {
-                @Override
-                public void onTabRead(SessionTab tab) {
-                    final String url = tab.getUrl();
-
-                    // Don't show last tabs for about:home
-                    if (AboutPages.isAboutHome(url)) {
-                        return;
-                    }
-
-                    // If this is the first tab we're reading, add a header.
-                    if (c.getCount() == count) {
-                        addRow(c, null, context.getString(R.string.home_last_tabs_title), RecentTabs.TYPE_HEADER, null);
-                    }
-
-                    addRow(c, url, tab.getTitle(), RecentTabs.TYPE_LAST_TIME, tab.getTabObject().toString());
-                }
-            }.parse(jsonString);
-
-            // Add an "Open all" button if more than 2 tabs were added to the list (account for the header)
-            if (c.getCount() - count > 2) {
-                addRow(c, null, null, RecentTabs.TYPE_OPEN_ALL_LAST_TIME, null);
-            }
-
-            return c;
-        }
-    }
-
-    private static class RecentTabsAdapter extends MultiTypeCursorAdapter {
-        private static final int ROW_HEADER = 0;
-        private static final int ROW_STANDARD = 1;
-        private static final int ROW_OPEN_ALL = 2;
-
-        private static final int[] VIEW_TYPES = new int[] { ROW_STANDARD, ROW_HEADER, ROW_OPEN_ALL };
-        private static final int[] LAYOUT_TYPES =
-            new int[] { R.layout.home_item_row, R.layout.home_header_row, R.layout.home_open_all_row };
-
-        public RecentTabsAdapter(Context context) {
-            super(context, null, VIEW_TYPES, LAYOUT_TYPES);
-        }
-
-        @Override
-        public int getItemViewType(int position) {
-            final Cursor c = getCursor(position);
-            final int type = c.getInt(c.getColumnIndexOrThrow(RecentTabs.TYPE));
-
-            if (type == RecentTabs.TYPE_HEADER) {
-                return ROW_HEADER;
-            }
-
-            if (type == RecentTabs.TYPE_OPEN_ALL_LAST_TIME || type == RecentTabs.TYPE_OPEN_ALL_CLOSED) {
-                return ROW_OPEN_ALL;
-            }
-
-            return ROW_STANDARD;
-         }
-
-        @Override
-        public boolean isEnabled(int position) {
-            return (getItemViewType(position) != ROW_HEADER);
-        }
-
-        @Override
-        public void bindView(View view, Context context, int position) {
-            final int itemType = getItemViewType(position);
-            if (itemType == ROW_OPEN_ALL) {
-                return;
-            }
-
-            final Cursor c = getCursor(position);
-
-            if (itemType == ROW_HEADER) {
-                final String title = c.getString(c.getColumnIndexOrThrow(RecentTabs.TITLE));
-                final TextView textView = (TextView) view;
-                textView.setText(title);
-            } else if (itemType == ROW_STANDARD) {
-                final TwoLinePageRow pageRow = (TwoLinePageRow) view;
-                pageRow.setShowIcons(false);
-                pageRow.updateFromCursor(c);
-            }
-         }
-    }
-
-    private class CursorLoaderCallbacks implements LoaderManager.LoaderCallbacks<Cursor> {
-        @Override
-        public Loader<Cursor> onCreateLoader(int id, Bundle args) {
-            return new RecentTabsCursorLoader(getActivity(), mClosedTabs);
-        }
-
-        @Override
-        public void onLoadFinished(Loader<Cursor> loader, Cursor c) {
-            mAdapter.swapCursor(c);
-            updateUiFromCursor(c);
-        }
-
-        @Override
-        public void onLoaderReset(Loader<Cursor> loader) {
-            mAdapter.swapCursor(null);
-        }
-    }
-}
--- a/mobile/android/base/locales/en-US/android_strings.dtd
+++ b/mobile/android/base/locales/en-US/android_strings.dtd
@@ -39,17 +39,16 @@
 <!ENTITY firstrun_account_message "Have &brandShortName; on another device?">
 
 <!ENTITY  onboard_start_restricted1 "Stay safe and in control with this simplified version of &brandShortName;.">
 
 <!-- Localization note: These are used as the titles of different pages on the home screen.
      They are automatically converted to all caps by the Android platform. -->
 <!ENTITY  bookmarks_title "Bookmarks">
 <!ENTITY  history_title "History">
-<!ENTITY  recent_tabs_title "Recent Tabs">
 
 <!ENTITY  switch_to_tab "Switch to tab">
 
 <!ENTITY  crash_reporter_title "&brandShortName; Crash Reporter">
 <!ENTITY  crash_message2 "&brandShortName; had a problem and crashed. Your tabs should be listed on the &brandShortName; Start page when you restart.">
 <!ENTITY  crash_send_report_message3 "Tell &vendorShortName; about this crash so they can fix it">
 <!ENTITY  crash_include_url2 "Include the address of the page I was on">
 <!ENTITY  crash_sorry "We\'re sorry">
@@ -565,21 +564,18 @@ size. -->
 <!ENTITY home_synced_devices_smartfolder "Synced devices">
 <!ENTITY home_synced_devices_number "&formatD; devices">
 <!-- Localization note (home_synced_devices_one_device): This is the singular version of home_synced_devices_number, referring to the number of devices a user has synced. -->
 <!ENTITY home_synced_devices_one "1 device">
 <!ENTITY home_history_back_to2 "Back to full History">
 <!ENTITY home_clear_history_button "Clear browsing history">
 <!ENTITY home_clear_history_confirm "Are you sure you want to clear your history?">
 <!ENTITY home_bookmarks_empty "Bookmarks you save show up here.">
-<!ENTITY home_closed_tabs_title "Recently closed tabs">
 <!ENTITY home_closed_tabs_title2 "Recently closed">
-<!ENTITY home_last_tabs_title "Tabs from last time">
 <!ENTITY home_last_tabs_empty "Your recent tabs show up here.">
-<!ENTITY home_open_all "Open all">
 <!ENTITY home_restore_all "Restore all">
 <!ENTITY home_closed_tabs_number "&formatD; tabs">
 <!-- Localization note (home_closed_tabs_one): This is the singular version of home_closed_tabs_number, referring to the number of recently closed tabs available. -->
 <!ENTITY home_closed_tabs_one "1 tab">
 <!ENTITY home_most_recent_empty "Websites you visited most recently show up here.">
 <!-- Localization note (home_most_recent_emptyhint2): "Psst" is a sound that might be used to attract someone's attention unobtrusively, and intended to hint at Private Browsing to the user.
      The placeholders &formatS1; and &formatS2; are used to mark the location of text underlining. -->
 <!ENTITY home_most_recent_emptyhint2 "Psst: using a &formatS1;New Private Tab&formatS2; won\'t save your history.">
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -427,17 +427,16 @@ gbjar.sources += ['java/org/mozilla/geck
     'home/PanelListView.java',
     'home/PanelRecyclerView.java',
     'home/PanelRecyclerViewAdapter.java',
     'home/PanelRefreshLayout.java',
     'home/PanelViewAdapter.java',
     'home/PanelViewItemHandler.java',
     'home/PinSiteDialog.java',
     'home/RecentTabsAdapter.java',
-    'home/RecentTabsPanel.java',
     'home/RemoteTabsExpandableListState.java',
     'home/SearchEngine.java',
     'home/SearchEngineAdapter.java',
     'home/SearchEngineBar.java',
     'home/SearchEngineRow.java',
     'home/SearchLoader.java',
     'home/SimpleCursorLoader.java',
     'home/SpacingDecoration.java',
deleted file mode 100644
--- a/mobile/android/base/resources/layout-large-land-v11/home_list.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <ViewStub android:id="@+id/home_empty_view_stub"
-              android:layout="@layout/home_empty_panel"
-              android:layout_width="match_parent"
-              android:layout_height="match_parent"/>
-
-    <org.mozilla.gecko.home.HomeListView
-            android:id="@+id/list"
-            style="@style/Widget.Home.HomeList"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            android:layout_weight="1"/>
-
-</merge>
deleted file mode 100644
--- a/mobile/android/base/resources/layout-xlarge-v11/home_list.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <ViewStub android:id="@+id/home_empty_view_stub"
-              android:layout="@layout/home_empty_panel"
-              android:layout_width="match_parent"
-              android:layout_height="match_parent"/>
-
-    <org.mozilla.gecko.home.HomeListView
-            android:id="@+id/list"
-            style="@style/Widget.Home.HomeList"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            android:layout_weight="1"/>
-
-</merge>
deleted file mode 100644
--- a/mobile/android/base/resources/layout/home_list.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <ViewStub android:id="@+id/home_empty_view_stub"
-              android:layout="@layout/home_empty_panel"
-              android:layout_width="match_parent"
-              android:layout_height="match_parent"/>
-
-    <org.mozilla.gecko.home.HomeListView
-            android:id="@+id/list"
-            style="@style/Widget.Home.HomeList"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            android:layout_weight="1"/>
-
-</merge>
deleted file mode 100644
--- a/mobile/android/base/resources/layout/home_list_panel.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-              android:layout_width="match_parent"
-              android:layout_height="match_parent"
-              android:orientation="vertical">
-
-    <include layout="@layout/home_list"/>
-
-</LinearLayout>
deleted file mode 100644
--- a/mobile/android/base/resources/layout/home_open_all_row.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
-          android:text="@string/home_open_all"
-          style="@style/Widget.Home.ActionItem"/>
--- a/mobile/android/base/strings.xml.in
+++ b/mobile/android/base/strings.xml.in
@@ -60,17 +60,16 @@
 
   <string name="firstrun_account_title">&firstrun_account_title;</string>
   <string name="firstrun_account_message">&firstrun_account_message;</string>
 
   <string name="firstrun_welcome_restricted">&onboard_start_restricted1;</string>
 
   <string name="bookmarks_title">&bookmarks_title;</string>
   <string name="history_title">&history_title;</string>
-  <string name="recent_tabs_title">&recent_tabs_title;</string>
 
   <string name="switch_to_tab">&switch_to_tab;</string>
 
   <string name="crash_reporter_title">&crash_reporter_title;</string>
   <string name="crash_message2">&crash_message2;</string>
   <string name="crash_send_report_message3">&crash_send_report_message3;</string>
   <string name="crash_include_url2">&crash_include_url2;</string>
   <string name="crash_sorry">&crash_sorry;</string>
@@ -447,21 +446,18 @@
   <string name="home_history_title">&home_history_title;</string>
   <string name="home_synced_devices_smartfolder">&home_synced_devices_smartfolder;</string>
   <string name="home_synced_devices_number">&home_synced_devices_number;</string>
   <string name="home_synced_devices_one">&home_synced_devices_one;</string>
   <string name="home_history_back_to">&home_history_back_to2;</string>
   <string name="home_clear_history_button">&home_clear_history_button;</string>
   <string name="home_clear_history_confirm">&home_clear_history_confirm;</string>
   <string name="home_bookmarks_empty">&home_bookmarks_empty;</string>
-  <string name="home_closed_tabs_title">&home_closed_tabs_title;</string>
   <string name="home_closed_tabs_title2">&home_closed_tabs_title2;</string>
-  <string name="home_last_tabs_title">&home_last_tabs_title;</string>
   <string name="home_last_tabs_empty">&home_last_tabs_empty;</string>
-  <string name="home_open_all">&home_open_all;</string>
   <string name="home_restore_all">&home_restore_all;</string>
   <string name="home_closed_tabs_number">&home_closed_tabs_number;</string>
   <string name="home_closed_tabs_one">&home_closed_tabs_one;</string>
   <string name="home_most_recent_empty">&home_most_recent_empty;</string>
   <string name="home_most_recent_emptyhint">&home_most_recent_emptyhint2;</string>
   <string name="home_default_empty">&home_default_empty;</string>
   <string name="home_move_back_to_filter">&home_move_back_to_filter;</string>
   <string name="home_remote_tabs_many_hidden_devices">&home_remote_tabs_many_hidden_devices;</string>
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/AboutHomeComponent.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/AboutHomeComponent.java
@@ -29,18 +29,17 @@ import com.robotium.solo.Solo;
  * A class representing any interactions that take place on the Awesomescreen.
  */
 public class AboutHomeComponent extends BaseComponent {
     private static final String LOGTAG = AboutHomeComponent.class.getSimpleName();
 
     private static final List<PanelType> PANEL_ORDERING = Arrays.asList(
             PanelType.TOP_SITES,
             PanelType.BOOKMARKS,
-            PanelType.COMBINED_HISTORY,
-            PanelType.RECENT_TABS
+            PanelType.COMBINED_HISTORY
     );
 
     // The percentage of the panel to swipe between 0 and 1. This value was set through
     // testing: 0.55f was tested on try and fails on armv6 devices.
     private static final float SWIPE_PERCENTAGE = 0.70f;
 
     public AboutHomeComponent(final UITestContext testContext) {
         super(testContext);
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAboutHomePageNavigation.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAboutHomePageNavigation.java
@@ -5,18 +5,16 @@
 package org.mozilla.gecko.tests;
 
 import org.mozilla.gecko.home.HomeConfig.PanelType;
 import org.mozilla.gecko.tests.helpers.DeviceHelper;
 import org.mozilla.gecko.tests.helpers.GeckoHelper;
 
 /**
  * Tests functionality related to navigating between the various about:home panels.
- *
- * TODO: Update this test to account for recent tabs panel (bug 1028727).
  */
 public class testAboutHomePageNavigation extends UITest {
     // TODO: Define this test dynamically by creating dynamic representations of the Page
     // enum for both phone and tablet, then swiping through the panels. This will also
     // benefit having a HomePager with custom panels.
     public void testAboutHomePageNavigation() {
         GeckoHelper.blockForDelayedStartup();