forked from upstream-mirrors/OpenTracks
@@ -390,6 +390,10 @@ public class TrackRecordingActivity extends AbstractActivity implements ChooseAc
|
||||
return;
|
||||
}
|
||||
|
||||
if (!PreferencesUtils.shouldShowGpsDisabledWarning()) {
|
||||
return;
|
||||
}
|
||||
|
||||
snackbar = Snackbar
|
||||
.make(viewBinding.trackRecordingCoordinatorLayout,
|
||||
getString(R.string.gps_recording_status, getString(gpsStatusValue.message), getString(R.string.gps_recording_without_signal)),
|
||||
|
||||
@@ -318,6 +318,11 @@ public class PreferencesUtils {
|
||||
return getBoolean(R.string.stats_fullscreen_while_recording_key, DEFAULT);
|
||||
}
|
||||
|
||||
public static boolean shouldShowGpsDisabledWarning() {
|
||||
final boolean DEFAULT = resources.getBoolean(R.bool.stats_show_gps_disabled_warnings_default);
|
||||
return getBoolean(R.string.stats_show_gps_disabled_warnings_key, DEFAULT);
|
||||
}
|
||||
|
||||
public static boolean shouldShowElevation() {
|
||||
final boolean DEFAULT = resources.getBoolean(R.bool.chart_display_elevation_default);
|
||||
return getBoolean(R.string.chart_display_elevation_key, DEFAULT);
|
||||
|
||||
@@ -286,6 +286,9 @@
|
||||
<string name="stats_fullscreen_while_recording_key" translatable="false">trackdetail_fullscreen_while_recording</string>
|
||||
<bool name="stats_fullscreen_while_recording_default" translatable="false">false</bool>
|
||||
|
||||
<string name="stats_show_gps_disabled_warnings_key" translatable="false">trackdetail_show_gps_disabled_warnings</string>
|
||||
<bool name="stats_show_gps_disabled_warnings_default" translatable="false">true</bool>
|
||||
|
||||
<!-- Chart Settings -->
|
||||
<string name="chart_display_elevation_key" translatable="false">chart_display_elevation</string>
|
||||
<bool name="chart_display_elevation_default" translatable="false">true</bool>
|
||||
|
||||
@@ -362,6 +362,8 @@ limitations under the License.
|
||||
<string name="settings_recording_keep_screen_on_while_recording_summary">While recording, keep the screen on.</string>
|
||||
<string name="settings_recording_fullscreen_on_while_recording_title">Fullscreen</string>
|
||||
<string name="settings_recording_fullscreen_on_while_recording_summary">While recording, present in fullscreen.</string>
|
||||
<string name="settings_recording_show_gps_disabled_warning_title">GPS disabled warning</string>
|
||||
<string name="settings_recording_show_gps_disabled_warning_summary">While recording, show a warning if GPS is disabled.</string>
|
||||
<string name="settings_recording_default_activity_title">Default activity type</string>
|
||||
<string name="settings_recording_location_frequency_summary">%1$s between location checks</string>
|
||||
<string name="settings_recording_max_recording_distance_summary">A new segment is created if the distance between two locations is greater than %1$s</string>
|
||||
|
||||
@@ -56,6 +56,12 @@
|
||||
android:key="@string/stats_fullscreen_while_recording_key"
|
||||
android:summary="@string/settings_recording_fullscreen_on_while_recording_summary"
|
||||
android:title="@string/settings_recording_fullscreen_on_while_recording_title" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="@bool/stats_show_gps_disabled_warnings_default"
|
||||
android:key="@string/stats_show_gps_disabled_warnings_key"
|
||||
android:summary="@string/settings_recording_show_gps_disabled_warning_summary"
|
||||
android:title="@string/settings_recording_show_gps_disabled_warning_title" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory app:title="@string/settings_charts_title">
|
||||
|
||||
Reference in New Issue
Block a user