зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1096958 - Part 2: Null mGrid's OnItemClickListener when destroying the view. r=liuche
This prevents the listener from being called after some necessary resources are destroyed. There is probably a better solution such as removing the listeners after a successful run, but I'm unsure of the side effects. We know this solution works because of precedent (bug 930160) so let's go with the quick & easy for now. --HG-- extra : rebase_source : 9086ddc50a321f63503dd131dd2c78e73732d200
This commit is contained in:
Родитель
cb2a53ef00
Коммит
f87490c4fc
|
@ -304,11 +304,12 @@ public class TopSitesPanel extends HomeFragment {
|
|||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
|
||||
// Discard any additional item clicks on the list
|
||||
// as the panel is getting destroyed (see bug 930160).
|
||||
// Discard any additional item clicks on the list as the
|
||||
// panel is getting destroyed (see bugs 930160 & 1096958).
|
||||
mList.setOnItemClickListener(null);
|
||||
mList = null;
|
||||
mGrid.setOnItemClickListener(null);
|
||||
|
||||
mList = null;
|
||||
mGrid = null;
|
||||
mListAdapter = null;
|
||||
mGridAdapter = null;
|
||||
|
|
Загрузка…
Ссылка в новой задаче