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,10 +18,7 @@ public class BaseOsmAndFragment extends Fragment {
|
||||||
private IconsCache iconsCache;
|
private IconsCache iconsCache;
|
||||||
|
|
||||||
protected OsmandApplication getMyApplication() {
|
protected OsmandApplication getMyApplication() {
|
||||||
if (isAdded()) {
|
return (OsmandApplication) getActivity().getApplication();
|
||||||
return (OsmandApplication) getActivity().getApplication();
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected OsmandActionBarActivity getMyActivity() {
|
protected OsmandActionBarActivity getMyActivity() {
|
||||||
|
|
|
@ -79,6 +79,12 @@ public class OsmLiveActivity extends AbstractDownloadActivity implements Downloa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
getMyApplication().getDownloadThread().resetUiActivity(this);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
|
|
Loading…
Reference in a new issue