forked from organicmaps/organicmaps
Fixed crash with detached downloader fragment.
This commit is contained in:
parent
94737bf6bf
commit
5b12085e89
2 changed files with 9 additions and 5 deletions
|
@ -61,7 +61,7 @@ abstract class BaseDownloadAdapter extends BaseAdapter
|
|||
|
||||
public SafeAdapterRunnable(BaseDownloadAdapter adapter)
|
||||
{
|
||||
mAdapterReference = new WeakReference<BaseDownloadAdapter>(adapter);
|
||||
mAdapterReference = new WeakReference<>(adapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -187,7 +187,8 @@ public class DownloadFragment extends MWMListFragment implements View.OnClickLis
|
|||
@Override
|
||||
public void onChanged()
|
||||
{
|
||||
updateToolbar();
|
||||
if (isAdded())
|
||||
updateToolbar();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -205,7 +206,8 @@ public class DownloadFragment extends MWMListFragment implements View.OnClickLis
|
|||
@Override
|
||||
public void onChanged()
|
||||
{
|
||||
updateToolbar();
|
||||
if (isAdded())
|
||||
updateToolbar();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -234,7 +236,8 @@ public class DownloadFragment extends MWMListFragment implements View.OnClickLis
|
|||
@Override
|
||||
public void onCountryStatusChanged(int group, int position, int oldStatus, int newStatus)
|
||||
{
|
||||
updateToolbar();
|
||||
if (isAdded())
|
||||
updateToolbar();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -243,6 +246,7 @@ public class DownloadFragment extends MWMListFragment implements View.OnClickLis
|
|||
@Override
|
||||
public void onCountryOptionsChanged(int group, int position, int newOptions, int requestOptions)
|
||||
{
|
||||
updateToolbar();
|
||||
if (isAdded())
|
||||
updateToolbar();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue