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:
Nick Alexander 2015-02-12 15:14:37 -08:00
Родитель 4af97612e4
Коммит 565246b350
2 изменённых файлов: 14 добавлений и 0 удалений

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

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