Fix crash with OSM Live update
This commit is contained in:
parent
7ea02dcdae
commit
b6f6680557
2 changed files with 7 additions and 4 deletions
|
@ -18,11 +18,8 @@ public class BaseOsmAndFragment extends Fragment {
|
|||
private IconsCache iconsCache;
|
||||
|
||||
protected OsmandApplication getMyApplication() {
|
||||
if (isAdded()) {
|
||||
return (OsmandApplication) getActivity().getApplication();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
protected OsmandActionBarActivity getMyActivity() {
|
||||
return (OsmandActionBarActivity) getActivity();
|
||||
|
|
|
@ -79,6 +79,12 @@ public class OsmLiveActivity extends AbstractDownloadActivity implements Downloa
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
getMyApplication().getDownloadThread().resetUiActivity(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
|
Loading…
Reference in a new issue