Replace isResumed with isRemoving
This commit is contained in:
parent
3046db3338
commit
e9aef89dee
2 changed files with 3 additions and 3 deletions
|
@ -817,7 +817,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
|
|||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
int colorId = -1;
|
||||
Fragment fragment = getVisibleFragment(getSupportFragmentManager());
|
||||
if (fragment != null && fragment.isResumed() && fragment instanceof BaseOsmAndFragment) {
|
||||
if (fragment != null && !fragment.isRemoving() && fragment instanceof BaseOsmAndFragment) {
|
||||
colorId = ((BaseOsmAndFragment) fragment).getStatusBarColorId();
|
||||
} else if (dashboardOnMap.isVisible()) {
|
||||
colorId = dashboardOnMap.getStatusBarColor();
|
||||
|
|
|
@ -58,8 +58,8 @@ public class BaseOsmAndFragment extends Fragment {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
public void onDetach() {
|
||||
super.onDetach();
|
||||
if (Build.VERSION.SDK_INT >= 21 && getStatusBarColorId() != -1) {
|
||||
Activity activity = getActivity();
|
||||
if (activity instanceof MapActivity) {
|
||||
|
|
Loading…
Reference in a new issue