Remove unnecessary preference

This commit is contained in:
Vitaliy 2020-02-19 18:54:32 +02:00
parent 04bd798880
commit 018cc182c0
21 changed files with 1 additions and 69 deletions

View file

@ -3444,6 +3444,4 @@
<string name="ltr_or_rtl_triple_combine_via_dash">%1$s — %2$s — %3$s</string>
<string name="shared_string_custom_rendering_style">أسلوب تقديم مخصص</string>
<string name="import_profile_dialog_description">يحتوي ملف التعريف المستوردة على بيانات إضافية. انقر فوق \"استيراد\" لاستيراد بيانات ملف التعريف فقط أو حدد بيانات إضافية لاستيرادها.</string>
<string name="navigation_notification_desc">عرض إشعارات النظام أثناء التنقل بالتوجيهات .</string>
<string name="navigation_notification">إشعار الملاحة</string>
</resources>

View file

@ -3545,6 +3545,4 @@ Lon %2$s</string>
<string name="multimedia_rec_split_title">Aufzeichnungsteilung</string>
<string name="routing_profile_direct_to">Direkt zum Punkt</string>
<string name="search_offline_geo_error">Geo-Intent \'%s\' konnte nicht analysiert werden.</string>
<string name="navigation_notification_desc">Systembenachrichtigung während der Navigation mit Navigationsanweisungen anzeigen.</string>
<string name="navigation_notification">Navigations-Benachrichtigung</string>
</resources>

View file

@ -3521,6 +3521,4 @@ Indikas lokon: %1$s x %2$s"</string>
<string name="import_profile_dialog_description">La enportata profilo enhavas kromajn datumojn. Frapetu “enporti” por enporti nur profilajn datumojn aŭ elektu kromajn datumojn por enporti.</string>
<string name="export_profile_dialog_description">Vi povas elekti kromajn datumojn por elporti kune kun la profilo.</string>
<string name="index_name_antarctica">Antarkto</string>
<string name="navigation_notification_desc">Montri sisteman sciigon dum navigi montrantan instrukciojn turno-post-turno.</string>
<string name="navigation_notification">Sciigo dum navigado</string>
</resources>

View file

@ -3540,8 +3540,6 @@ Lon %2$s</string>
<string name="import_profile_dialog_description">El perfil importado contiene datos adicionales. Pulsa en «Importar» para importar sólo datos de perfil o marca datos adicionales para importar.</string>
<string name="export_profile_dialog_description">Puedes marcar datos adicionales para exportar junto con el perfil.</string>
<string name="index_name_antarctica">Antártida</string>
<string name="navigation_notification_desc">Muestra la notificación del sistema durante la navegación con instrucciones de navegación.</string>
<string name="navigation_notification">Notificación de navegación</string>
<string name="shared_string_app_default_w_val">Aplicación predefinida (%s)</string>
<string name="no_recalculation_setting">Desactivar el recálculo</string>
<string name="route_recalculation_dist_title">Distancia mínima para recalcular la ruta</string>

View file

@ -3540,8 +3540,6 @@ Lon %2$s</string>
<string name="import_profile_dialog_description">El perfil importado contiene datos adicionales. Pulsa en «Importar» para importar sólo datos de perfil o marca datos adicionales para importar.</string>
<string name="export_profile_dialog_description">Puedes marcar datos adicionales para exportar junto con el perfil.</string>
<string name="index_name_antarctica">Antártida</string>
<string name="navigation_notification_desc">Muestra la notificación del sistema durante la navegación con instrucciones de navegación.</string>
<string name="navigation_notification">Notificación de navegación</string>
<string name="shared_string_app_default_w_val">Aplicación predefinida (%s)</string>
<string name="no_recalculation_setting">Desactivar el recálculo</string>
<string name="route_recalculation_dist_title">Distancia mínima para recalcular la ruta</string>

View file

@ -3567,6 +3567,4 @@
<string name="export_profile_dialog_description">می‌توانید دادهٔ بیشتری را انتخاب کنید تا همراه با پروفایل برون‌برد کنید.</string>
<string name="index_name_antarctica">جنوبگان</string>
<string name="accessibility_announce">اعلام</string>
<string name="navigation_notification_desc">هنگام ناوبری راهنمای ناوبری را در اعلان‌ها نمایش می‌دهد.</string>
<string name="navigation_notification">اعلان ناوبری</string>
</resources>

View file

@ -3510,8 +3510,6 @@ représentant la zone : %1$s x %2$s</string>
<string name="import_profile_dialog_description">Le profil importé contient des données supplémentaires. Cliquez sur Importer pour n\'importer que les données de profil ou sélectionnez des données supplémentaires à importer.</string>
<string name="export_profile_dialog_description">Vous pouvez sélectionner des données supplémentaires à exporter en même temps que le profil.</string>
<string name="index_name_antarctica">Antarctique</string>
<string name="navigation_notification_desc">Pendant la navigation, afficher une notification système avec les directions.</string>
<string name="navigation_notification">Notification pendant la navigation</string>
<string name="shared_string_app_default_w_val">Par défaut pour l\'application (%s)</string>
<string name="no_recalculation_setting">Désactiver le re-calcul</string>
<string name="route_recalculation_dist_title">Distance à partir de laquelle recalculer litinéraire</string>

View file

@ -3527,8 +3527,6 @@ Pôr do Sol: %2$s</string>
<string name="import_profile_dialog_description">O perfil importado contém dados adicionais. Clique em Importar para importar apenas dados do perfil ou selecione dados adicionais a serem importados.</string>
<string name="export_profile_dialog_description">Você pode selecionar dados adicionais para exportar junto com o perfil.</string>
<string name="index_name_antarctica">Antártida</string>
<string name="navigation_notification_desc">Mostrar notificação do sistema durante a navegação com instruções de navegação.</string>
<string name="navigation_notification">Notificação de navegação</string>
<string name="shared_string_app_default_w_val">Aplicativo padrão (%s)</string>
<string name="no_recalculation_setting">Desativar recálculo</string>
<string name="route_recalculation_dist_title">Distância mínima para recalcular a rota</string>

View file

@ -3538,8 +3538,6 @@ Pro praghere iscrie su còdighe intreu</string>
\n</string>
<string name="sort_by_category">Òrdina pro categoria</string>
<string name="index_name_antarctica">Antàrticu</string>
<string name="navigation_notification_desc">Ammustra notìficas de sistema durante sa navigatzione cun istrutziones de navigatzione.</string>
<string name="navigation_notification">Notìfica de navigatzione</string>
<string name="shared_string_app_default_w_val">Predefinidu in s\'aplicatzione (%s)</string>
<string name="no_recalculation_setting">Disabìlita su ri-càlculu de s\'àndala</string>
<string name="route_recalculation_dist_title">Distàntzia mìnima pro torrare a calculare s\'àndala</string>

View file

@ -3495,8 +3495,6 @@
<string name="import_profile_dialog_description">İçe aktarılan profil ilave veriler içermektedir. Yalnızca profil verilerini içe aktarmak için İçe Aktar\'ı tıklayın veya içe aktarılacak ilave verileri seçin.</string>
<string name="export_profile_dialog_description">Profil ile birlikte dışa aktarılacak ilave veriler seçebilirsiniz.</string>
<string name="index_name_antarctica">Antarktika</string>
<string name="navigation_notification_desc">Navigasyon talimatları ile navigasyon sırasında sistem bildirimini göster.</string>
<string name="navigation_notification">Navigasyon bildirimi</string>
<string name="shared_string_app_default_w_val">Uygulama Varsayılanı (%s)</string>
<string name="no_recalculation_setting">Yeniden hesaplamayı devre dışı bırak</string>
<string name="route_recalculation_dist_title">Rotayı yeniden hesaplamak için minimum mesafe</string>

View file

@ -3530,6 +3530,4 @@
<string name="import_profile_dialog_description">Імпортований профіль містить додаткові дані. Натисніть кнопку імпортувати, щоб імпортувати лише дані профілю або вибрати додаткові дані для імпорту.</string>
<string name="export_profile_dialog_description">Ви можете вибрати додаткові дані для експорту разом із профілем.</string>
<string name="index_name_antarctica">Антарктида</string>
<string name="navigation_notification_desc">Показувати системне сповіщення з навігаційними вказівками під час навігації.</string>
<string name="navigation_notification">Навігаційне сповіщення</string>
</resources>

View file

@ -3530,6 +3530,4 @@
<string name="import_profile_dialog_description">已匯入的設定檔包含了額外資料。點擊匯入僅匯入設定檔資料或選取額外的資料以匯入。</string>
<string name="export_profile_dialog_description">您可以選取額外的資料以與設定檔一起匯出。</string>
<string name="index_name_antarctica">南極洲</string>
<string name="navigation_notification_desc">使用導航說明時喜訕系統通知。</string>
<string name="navigation_notification">導航通知</string>
</resources>

View file

@ -16,8 +16,6 @@
<string name="shared_string_angle">Angle</string>
<string name="recalc_angle_dialog_descr">Extra straight segment between my location and calculated route will be displayed until the route is recalculated</string>
<string name="recalc_angle_dialog_title">Minimum angle between my location and route</string>
<string name="navigation_notification_desc">Show system notification while navigation with navigation instructions.</string>
<string name="navigation_notification">Navigation notification</string>
<string name="shared_string_app_default_w_val">App Default (%s)</string>
<string name="please_provide_profile_name_message">Please provide a name for the profile</string>
<string name="no_recalculation_setting">Disable recalculation</string>

View file

@ -72,12 +72,4 @@
android:summaryOn="@string/shared_string_on"
android:title="@string/animate_my_location" />
<net.osmand.plus.settings.preferences.SwitchPreferenceEx
android:key="show_navigation_notification"
android:layout="@layout/preference_with_descr_dialog_and_switch"
android:summaryOff="@string/shared_string_disabled"
android:summaryOn="@string/shared_string_enabled"
android:title="@string/navigation_notification"
tools:icon="@drawable/ic_action_notification" />
</PreferenceScreen>

View file

@ -1974,8 +1974,6 @@ public class OsmandSettings {
SHOW_ZOOM_BUTTONS_NAVIGATION.setModeDefaultValue(ApplicationMode.PEDESTRIAN, true);
}
public final CommonPreference<Boolean> SHOW_NAVIGATION_NOTIFICATION = new BooleanPreference("show_navigation_notification", true).makeProfile();
// Json
public final OsmandPreference<String> SELECTED_GPX = new StringPreference("selected_gpx", "").makeGlobal();

View file

@ -53,11 +53,6 @@ public class DownloadNotification extends OsmandNotification {
return new Intent(app, DownloadActivity.class);
}
@Override
public boolean isUpdateDisabled() {
return false;
}
@Override
public NotificationCompat.Builder buildNotification(boolean wearable) {
icon = android.R.drawable.stat_sys_download;

View file

@ -48,11 +48,6 @@ public class ErrorNotification extends OsmandNotification {
return new Intent(app, MapActivity.class);
}
@Override
public boolean isUpdateDisabled() {
return false;
}
@Override
public NotificationCompat.Builder buildNotification(boolean wearable) {
String notificationTitle;

View file

@ -103,11 +103,6 @@ public class GpxNotification extends OsmandNotification {
return new Intent(app, MapActivity.class);
}
@Override
public boolean isUpdateDisabled() {
return app.getSettings().MAP_ACTIVITY_ENABLED.get() && !app.getSettings().SHOW_TRIP_REC_NOTIFICATION.get();
}
@Override
public void onNotificationDismissed() {
if (!wasNoDataDismissed) {

View file

@ -114,11 +114,6 @@ public class NavigationNotification extends OsmandNotification {
|| (routingHelper.isRoutePlanningMode() && routingHelper.isPauseNavigation());
}
@Override
public boolean isUpdateDisabled() {
return app.getSettings().MAP_ACTIVITY_ENABLED.get() && !app.getSettings().SHOW_NAVIGATION_NOTIFICATION.get();
}
@Override
public Intent getContentIntent() {
return new Intent(app, MapActivity.class);

View file

@ -104,8 +104,6 @@ public abstract class OsmandNotification {
public abstract boolean isEnabled();
public abstract boolean isUpdateDisabled();
public abstract Intent getContentIntent();
public void setupNotification(Notification notification) {
@ -126,7 +124,7 @@ public abstract class OsmandNotification {
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(app);
if (isEnabled()) {
Builder notificationBuilder = buildNotification(false);
if (notificationBuilder != null && !isUpdateDisabled()) {
if (notificationBuilder != null) {
Notification notification = getNotification(notificationBuilder, false);
setupNotification(notification);
notificationManager.notify(top ? TOP_NOTIFICATION_SERVICE_ID : getOsmandNotificationId(), notification);
@ -142,9 +140,6 @@ public abstract class OsmandNotification {
if (isEnabled()) {
Builder notificationBuilder = buildNotification(false);
if (notificationBuilder != null) {
if (isUpdateDisabled()) {
return false;
}
Notification notification = getNotification(notificationBuilder, true);
setupNotification(notification);
if (top) {

View file

@ -64,7 +64,6 @@ public class NavigationFragment extends BaseSettingsFragment {
setupSpeakRoutingAlarmsPref();
setupVehicleParametersPref();
setupNavigationNotificationPref();
animateMyLocation.setDescription(getString(R.string.animate_my_location_desc));
}
@ -269,12 +268,6 @@ public class NavigationFragment extends BaseSettingsFragment {
vehicleParameters.setIcon(getContentIcon(iconRes));
}
private void setupNavigationNotificationPref() {
SwitchPreferenceEx navigationNotification = (SwitchPreferenceEx) findPreference(settings.SHOW_NAVIGATION_NOTIFICATION.getId());
navigationNotification.setDescription(getString(R.string.navigation_notification_desc));
navigationNotification.setIcon(getPersistentPrefIcon(R.drawable.ic_action_notification));
}
private void updateMenu() {
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {