Bug 1411654 - Pre: Remove unused HomeExpandableListView. r=mcomella
This was added for the Remote Tabs panel in
Bug 785199. That code has
now morphed into the combined history panel, which uses a
RecyclerView.
MozReview-Commit-ID: J6KsVCn8mzh
deleted file mode 100644
--- a/mobile/android/base/java/org/mozilla/gecko/home/HomeExpandableListView.java
+++ /dev/null
@@ -1,68 +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 android.content.Context;
-import android.util.AttributeSet;
-import android.view.ContextMenu.ContextMenuInfo;
-import android.view.View;
-import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemLongClickListener;
-import android.widget.ExpandableListView;
-
-/**
- * <code>HomeExpandableListView</code> is a custom extension of
- * <code>ExpandableListView<code>, that packs a <code>HomeContextMenuInfo</code>
- * when any of its rows is long pressed.
- * <p>
- * This is the <code>ExpandableListView</code> equivalent of
- * <code>HomeListView</code>.
- */
-public class HomeExpandableListView extends ExpandableListView
- implements OnItemLongClickListener {
-
- // ContextMenuInfo associated with the currently long pressed list item.
- private HomeContextMenuInfo mContextMenuInfo;
-
- // ContextMenuInfo factory.
- private HomeContextMenuInfo.ExpandableFactory mContextMenuInfoFactory;
-
- public HomeExpandableListView(Context context) {
- this(context, null);
- }
-
- public HomeExpandableListView(Context context, AttributeSet attrs) {
- this(context, attrs, 0);
- }
-
- public HomeExpandableListView(Context context, AttributeSet attrs, int defStyle) {
- super(context, attrs, defStyle);
-
- setOnItemLongClickListener(this);
- }
-
- @Override
- public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
- if (mContextMenuInfoFactory == null) {
- return false;
- }
-
- // HomeExpandableListView items can correspond to groups and children.
- // The factory can determine whether to add context menu for either,
- // both, or none by unpacking the given position.
- mContextMenuInfo = mContextMenuInfoFactory.makeInfoForAdapter(view, position, id, getExpandableListAdapter());
- return showContextMenuForChild(HomeExpandableListView.this);
- }
-
- @Override
- public ContextMenuInfo getContextMenuInfo() {
- return mContextMenuInfo;
- }
-
- public void setContextMenuInfoFactory(final HomeContextMenuInfo.ExpandableFactory factory) {
- mContextMenuInfoFactory = factory;
- }
-}
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -656,17 +656,16 @@ gbjar.sources += ['java/org/mozilla/geck
'home/FramePanelLayout.java',
'home/HistorySectionsHelper.java',
'home/HomeAdapter.java',
'home/HomeBanner.java',
'home/HomeConfig.java',
'home/HomeConfigLoader.java',
'home/HomeConfigPrefsBackend.java',
'home/HomeContextMenuInfo.java',
- 'home/HomeExpandableListView.java',
'home/HomeFragment.java',
'home/HomeListView.java',
'home/HomePager.java',
'home/HomePanelsManager.java',
'home/HomeScreen.java',
'home/ImageLoader.java',
'home/MultiTypeCursorAdapter.java',
'home/PanelAuthCache.java',