Remove unnecessary check for outdated fragment

This commit is contained in:
Vitaliy 2020-10-28 03:32:36 +02:00
parent cf906f3300
commit 1f09ffc1bb
2 changed files with 4 additions and 12 deletions

View file

@ -5,7 +5,6 @@ import android.graphics.drawable.Drawable;
import android.text.SpannableString;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
@ -25,7 +24,6 @@ import net.osmand.plus.helpers.FontCache;
import net.osmand.plus.mapcontextmenu.MenuController;
import net.osmand.plus.mapcontextmenu.builders.FavouritePointMenuBuilder;
import net.osmand.plus.mapcontextmenu.editors.FavoritePointEditor;
import net.osmand.plus.mapcontextmenu.editors.FavoritePointEditorFragment;
import net.osmand.plus.mapcontextmenu.editors.FavoritePointEditorFragmentNew;
import net.osmand.plus.transport.TransportStopRoute;
import net.osmand.plus.widgets.style.CustomTypefaceSpan;
@ -102,14 +100,8 @@ public class FavouritePointMenuController extends MenuController {
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
Fragment fragment = mapActivity.getSupportFragmentManager().findFragmentByTag(FavoritePointEditor.TAG);
if (fragment != null) {
// TODO: uncomment & delete if else after switch to new UI Fragment
//((FavoritePointEditorFragment) fragment).dismiss();
if (fragment instanceof FavoritePointEditorFragmentNew) {
((FavoritePointEditorFragmentNew) fragment).dismiss();
} else {
((FavoritePointEditorFragment) fragment).dismiss();
}
return true;
}
}

View file

@ -214,7 +214,7 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
speechAllowed = true;
switch (mTts.isLanguageAvailable(newLocale)) {
case TextToSpeech.LANG_MISSING_DATA:
// if (isSettingsBaseActivity(act)) {
// if (isSettingsActivity(act)) {
// AlertDialog.Builder builder = createAlertDialog(
// R.string.tts_missing_language_data_title,
// R.string.tts_missing_language_data,
@ -250,7 +250,7 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
break;
case TextToSpeech.LANG_NOT_SUPPORTED:
//maybe weird, but I didn't want to introduce parameter in around 5 methods just to do this if condition
// if (isSettingsBaseActivity(act)) {
// if (isSettingsActivity(act)) {
// AlertDialog.Builder builder = createAlertDialog(
// R.string.tts_language_not_supported_title,
// R.string.tts_language_not_supported,