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
Родитель 05dd36077b
Коммит fadd9365c6
5 изменённых файлов: 30 добавлений и 0 удалений

Просмотреть файл

@ -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;

Просмотреть файл

@ -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;

Просмотреть файл

@ -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;

Просмотреть файл

@ -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;
}

Просмотреть файл

@ -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;