зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1131635 - Make sure view was not destroyed before updating UI. r=nalexander
We already used this work-around in RemoteTabsPanel. --HG-- extra : rebase_source : b5c5fe309681623f7cb279674683a2c723cb5da6
This commit is contained in:
Родитель
4af97612e4
Коммит
565246b350
|
@ -175,6 +175,13 @@ public class RemoteTabsExpandableListFragment extends RemoteTabsBaseFragment {
|
|||
|
||||
@Override
|
||||
protected void updateUiFromClients(List<RemoteClient> clients, List<RemoteClient> hiddenClients) {
|
||||
if (getView() == null) {
|
||||
// Early abort. It is possible to get UI updates after the view is
|
||||
// destroyed; this can happen due to asynchronous loaders or
|
||||
// animations complete.
|
||||
return;
|
||||
}
|
||||
|
||||
// We have three states: no clients (including hidden clients) at all;
|
||||
// all clients hidden; some clients hidden. We want to show the empty
|
||||
// list view only when we have no clients at all. This flag
|
||||
|
|
|
@ -204,6 +204,13 @@ public class RemoteTabsSplitPlaneFragment extends RemoteTabsBaseFragment {
|
|||
|
||||
@Override
|
||||
protected void updateUiFromClients(List<RemoteClient> clients, List<RemoteClient> hiddenClients) {
|
||||
if (getView() == null) {
|
||||
// Early abort. It is possible to get UI updates after the view is
|
||||
// destroyed; this can happen due to asynchronous loaders or
|
||||
// animations complete.
|
||||
return;
|
||||
}
|
||||
|
||||
// We have three states: no clients (including hidden clients) at all;
|
||||
// all clients hidden; some clients hidden. We want to show the empty
|
||||
// list view only when we have no clients at all. This flag
|
||||
|
|
Загрузка…
Ссылка в новой задаче