mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-25 10:05:49 +01:00
add option to enable sunrise/sunset on the timeline
Also fix a small type Aquire -> Acquire
This commit is contained in:
parent
c9aad271da
commit
2e8d96e995
@ -36,6 +36,10 @@ public class AlarmReceiver extends BroadcastReceiver {
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
if (!GBApplication.getPrefs().getBoolean("send_sunrise_sunset", false)) {
|
||||
LOG.info("won't send sunrise and sunset events (disabled in preferences)");
|
||||
return;
|
||||
}
|
||||
LOG.info("will resend sunrise and sunset events");
|
||||
|
||||
final GregorianCalendar dateTimeTomorrow = new GregorianCalendar();
|
||||
|
@ -76,8 +76,11 @@
|
||||
<string name="pref_title_enable_pebblekit">Allow 3rd Party Android App Access</string>
|
||||
<string name="pref_summary_enable_pebblekit">Enable experimental support for Android Apps using PebbleKit</string>
|
||||
|
||||
<string name="pref_title_sunrise_sunset">Sunrise and Sunset</string>
|
||||
<string name="pref_summary_sunrise_sunset">Send sunrise and sunset times based on the location to the pebble timeline</string>
|
||||
|
||||
<string name="pref_header_location">Location</string>
|
||||
<string name="pref_title_location_aquire">Aquire Location</string>
|
||||
<string name="pref_title_location_aquire">Acquire Location</string>
|
||||
<string name="pref_title_location_latitude">Latitude</string>
|
||||
<string name="pref_title_location_longitude">Longitude</string>
|
||||
|
||||
|
@ -215,6 +215,10 @@
|
||||
android:key="pebble_activitytracker"
|
||||
android:title="@string/pref_title_pebble_activitytracker"
|
||||
android:summary="%s" />
|
||||
<CheckBoxPreference
|
||||
android:title="@string/pref_title_sunrise_sunset"
|
||||
android:summary="@string/pref_summary_sunrise_sunset"
|
||||
android:key="send_sunrise_sunset" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory
|
||||
android:title="@string/pref_header_location">
|
||||
@ -222,10 +226,12 @@
|
||||
android:key="location_aquire"
|
||||
android:title="@string/pref_title_location_aquire"/>
|
||||
<EditTextPreference
|
||||
android:digits="0123456789."
|
||||
android:defaultValue="0"
|
||||
android:key="location_latitude"
|
||||
android:title="@string/pref_title_location_latitude" />
|
||||
<EditTextPreference
|
||||
android:digits="0123456789."
|
||||
android:defaultValue="0"
|
||||
android:key="location_longitude"
|
||||
android:title="@string/pref_title_location_longitude" />
|
||||
|
Loading…
Reference in New Issue
Block a user