Bug 1210243 - Cleanup click handlers in Fragments/Panels r=margaret

This commit is contained in:
Mark Finkle 2015-10-03 00:36:04 -04:00
parent cce33e362c
commit 07e3eee74d
5 changed files with 30 additions and 0 deletions

View File

@ -237,6 +237,14 @@ public class HistoryPanel extends HomeFragment {
@Override
public void onDestroyView() {
super.onDestroyView();
// Discard any additional item clicks on the list as the
// panel is getting destroyed (bug 1210243).
if (mRangeList != null) {
mRangeList.setOnItemClickListener(null);
}
mList.setOnItemClickListener(null);
mRangeList = null;
mList = null;
mEmptyView = null;

View File

@ -125,6 +125,11 @@ public class ReadingListPanel extends HomeFragment {
@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;
mTopView = null;
mEmptyView = null;

View File

@ -166,6 +166,11 @@ public class RecentTabsPanel extends HomeFragment
@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;

View File

@ -125,6 +125,12 @@ public class RemoteTabsExpandableListFragment extends RemoteTabsBaseFragment {
@Override
public void onDestroyView() {
super.onDestroyView();
// Discard any additional item clicks on the list as the
// panel is getting destroyed (bug 1210243).
mList.setOnChildClickListener(null);
mList.setOnGroupClickListener(null);
mList = null;
mEmptyView = null;
}

View File

@ -140,6 +140,12 @@ public class RemoteTabsSplitPlaneFragment extends RemoteTabsBaseFragment {
@Override
public void onDestroyView() {
super.onDestroyView();
// Discard any additional item clicks on the list as the
// panel is getting destroyed (bug 1210243).
mClientList.setOnItemClickListener(null);
mTabList.setOnItemClickListener(null);
mClientList = null;
mTabList = null;
mEmptyView = null;