Do not save an alarm as "smart" if the device does not support it (#612)

Opening the activity when a device that does not support smart alarms is connected hides the "smart alarm" toggle. This is now reflected also on the saved data.
This solution is not ideal in case of multiple devices but as long as #577 is not solved its the best we can do.
master
Daniele Gobbetti 2017-03-26 17:57:03 +02:00
parent 11b48e7a1a
commit d550defcb3
3 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,8 @@
###Changelog
###Version next
* Alarms activity improvements and fixes
###Version 0.18.3
* Fix bug that caused the same value in weekly charts for every day on Android 6 and older

View File

@ -105,7 +105,7 @@ public class AlarmDetails extends GBActivity {
}
private void updateAlarm() {
alarm.setSmartWakeup(cbSmartWakeup.isChecked());
alarm.setSmartWakeup(supportsSmartWakeup() && cbSmartWakeup.isChecked());
alarm.setRepetition(cbMonday.isChecked(), cbTuesday.isChecked(), cbWednesday.isChecked(), cbThursday.isChecked(), cbFriday.isChecked(), cbSaturday.isChecked(), cbSunday.isChecked());
alarm.setHour(timePicker.getCurrentHour());
alarm.setMinute(timePicker.getCurrentMinute());

View File

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<changelog>
<release version="next">
<change>Alarms activity improvements and fixes</change>
</release>
<release version="0.18.3" versioncode="90">
<change>Fix bug that caused the same value in weekly charts for every day on Android 6 and older</change>
</release>