Finish action mode in onPause()

This commit is contained in:
Alexander Sytnyk 2017-12-11 12:19:13 +02:00
parent ce961553a7
commit ba1b578f5c
4 changed files with 27 additions and 0 deletions

View file

@ -209,6 +209,14 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
initListExpandedState();
}
@Override
public void onPause() {
super.onPause();
if (actionMode != null) {
actionMode.finish();
}
}
private int getSelectedFavoritesCount() {
int count = 0;
for (Set<FavouritePoint> set : favoritesSelected.values()) {

View file

@ -136,6 +136,14 @@ public class NotesFragment extends OsmAndListFragment {
listView.setAdapter(listAdapter);
}
@Override
public void onPause() {
super.onPause();
if (actionMode != null) {
actionMode.finish();
}
}
@Override
public ArrayAdapter<?> getAdapter() {
return listAdapter;

View file

@ -207,6 +207,9 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
asyncProcessor.cancel(false);
asyncProcessor = null;
}
if (actionMode != null) {
actionMode.finish();
}
}
public void updateCurrentTrack() {

View file

@ -332,6 +332,14 @@ public class OsmEditsFragment extends OsmAndListFragment implements SendPoiDialo
fetchData();
}
@Override
public void onPause() {
super.onPause();
if (actionMode != null) {
actionMode.finish();
}
}
private void fetchData() {
boolean portrait = AndroidUiHelper.isOrientationPortrait(getActivity());
osmEdits = new ArrayList<>();