Bug 1410221: Rm unused StreamHighlightItemRowContextMenuListener. r=liuche
MozReview-Commit-ID: LgPtdDMdjVV
deleted file mode 100644
--- a/mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/StreamHighlightItemRowContextMenuListener.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/* 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.activitystream.homepanel;
-
-import android.support.annotation.NonNull;
-import android.view.View;
-import org.mozilla.gecko.activitystream.homepanel.stream.WebpageItemRow;
-
-/**
- * Provides a method to open the context menu for a highlight item.
- *
- * I tried declaring this inside StreamRecyclerAdapter but I got cyclical inheritance warnings
- * (I don't understand why) so it's here instead.
- */
-public interface StreamHighlightItemRowContextMenuListener {
- void openContextMenu(WebpageItemRow highlightItem, int position, View snackbarAnchor, @NonNull final String interactionExtra);
-}
--- a/mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/StreamRecyclerAdapter.java
+++ b/mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/StreamRecyclerAdapter.java
@@ -43,17 +43,17 @@ import java.util.LinkedList;
import java.util.List;
/**
* The adapter for the Activity Stream panel.
*
* Every item is in a single adapter: Top Sites, Welcome panel, Highlights.
*/
public class StreamRecyclerAdapter extends RecyclerView.Adapter<StreamViewHolder> implements RecyclerViewClickSupport.OnItemClickListener,
- RecyclerViewClickSupport.OnItemLongClickListener, StreamHighlightItemRowContextMenuListener {
+ RecyclerViewClickSupport.OnItemLongClickListener {
private static final String LOGTAG = StringUtils.safeSubstring("Gecko" + StreamRecyclerAdapter.class.getSimpleName(), 0, 23);
private Cursor topSitesCursor;
private List<RowModel> recyclerViewModel; // List of item types backing this RecyclerView.
private List<TopStory> topStoriesQueue;
// Content sections available on the Activity Stream page. These may be hidden if the sections are disabled.
@@ -320,18 +320,17 @@ public class StreamRecyclerAdapter exten
return true;
}
/**
* @param snackbarAnchor See {@link ActivityStreamContextMenu#show(Context, View, ActivityStreamTelemetry.Extras.Builder, ActivityStreamContextMenu.MenuMode, WebpageModel, boolean, HomePager.OnUrlOpenListener, HomePager.OnUrlOpenInBackgroundListener, int, int)}
* for additional details.
*/
- @Override
- public void openContextMenu(final WebpageItemRow webpageItemRow, final int position, final View snackbarAnchor,
+ private void openContextMenu(final WebpageItemRow webpageItemRow, final int position, final View snackbarAnchor,
@NonNull final String interactionExtra) {
final WebpageRowModel model = (WebpageRowModel) recyclerViewModel.get(position);
final String sourceType;
final int actionPosition;
final ActivityStreamContextMenu.MenuMode menuMode;
ActivityStreamTelemetry.Extras.Builder extras = ActivityStreamTelemetry.Extras.builder();
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -525,17 +525,16 @@ gbjar.sources += ['java/org/mozilla/geck
'activitystream/homepanel/model/WebpageRowModel.java',
'activitystream/homepanel/stream/HighlightsEmptyStateRow.java',
'activitystream/homepanel/stream/LearnMoreRow.java',
'activitystream/homepanel/stream/StreamOverridablePageIconLayout.java',
'activitystream/homepanel/stream/StreamTitleRow.java',
'activitystream/homepanel/stream/StreamViewHolder.java',
'activitystream/homepanel/stream/TopPanelRow.java',
'activitystream/homepanel/stream/WebpageItemRow.java',
- 'activitystream/homepanel/StreamHighlightItemRowContextMenuListener.java',
'activitystream/homepanel/StreamItemAnimator.java',
'activitystream/homepanel/StreamRecyclerAdapter.java',
'activitystream/homepanel/topsites/TopSitesCard.java',
'activitystream/homepanel/topsites/TopSitesPage.java',
'activitystream/homepanel/topsites/TopSitesPageAdapter.java',
'activitystream/homepanel/topsites/TopSitesPagerAdapter.java',
'activitystream/homepanel/topstories/PocketStoriesLoader.java',
'activitystream/ranking/HighlightCandidate.java',