diff --git a/OsmAnd/src/net/osmand/plus/download/ui/UpdatesIndexFragment.java b/OsmAnd/src/net/osmand/plus/download/ui/UpdatesIndexFragment.java index 1dbd8782ba..ae0ab9b560 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/UpdatesIndexFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/UpdatesIndexFragment.java @@ -29,7 +29,6 @@ import androidx.appcompat.content.res.AppCompatResources; import androidx.cardview.widget.CardView; import androidx.core.content.ContextCompat; import androidx.core.view.MenuItemCompat; -import androidx.fragment.app.Fragment; import net.osmand.AndroidUtils; import net.osmand.Collator; @@ -426,11 +425,6 @@ public class UpdatesIndexFragment extends OsmAndListFragment implements Download return LiveUpdatesFragment.getMapsToUpdate(listAdapter.mapsList, settings); } - @Override - public Fragment currentFragment() { - return this; - } - @ColorRes public static int getDefaultIconColorId(boolean nightMode) { return nightMode ? R.color.icon_color_default_dark : R.color.icon_color_default_light; diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java index 6e3c951f6c..520af19810 100644 --- a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java +++ b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java @@ -131,7 +131,11 @@ public class LiveUpdatesFragment extends BaseOsmAndDialogFragment implements OnL } }); } else if (countEnabled > 1) { - LiveUpdatesUpdateAllBottomSheet.showInstance(fragmentManager, listener.currentFragment()); + Fragment target = null; + if (listener instanceof Fragment) { + target = (Fragment) listener; + } + LiveUpdatesUpdateAllBottomSheet.showInstance(fragmentManager, target); } } } @@ -650,11 +654,6 @@ public class LiveUpdatesFragment extends BaseOsmAndDialogFragment implements OnL return getMapsToUpdate(adapter.mapsList, settings); } - @Override - public Fragment currentFragment() { - return this; - } - @Override public boolean onUpdateLocalIndex(String fileName, boolean newValue, final Runnable callback) { int frequencyId = preferenceUpdateFrequency(fileName, settings).get(); diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesHelper.java b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesHelper.java index c8e4c42fdf..1833cd397c 100644 --- a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesHelper.java +++ b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesHelper.java @@ -278,7 +278,5 @@ public class LiveUpdatesHelper { void processFinish(); List getMapsToUpdate(); - - Fragment currentFragment(); } }