mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-10 17:11:56 +01:00
Compare commits
2 Commits
89b6ae9f24
...
22e51f841b
Author | SHA1 | Date | |
---|---|---|---|
|
22e51f841b | ||
|
275b662188 |
@ -125,11 +125,11 @@ public class AlarmDetails extends AbstractGBActivity {
|
|||||||
timePicker.setCurrentHour(alarm.getHour());
|
timePicker.setCurrentHour(alarm.getHour());
|
||||||
timePicker.setCurrentMinute(alarm.getMinute());
|
timePicker.setCurrentMinute(alarm.getMinute());
|
||||||
|
|
||||||
cbSmartWakeup.setChecked(alarm.getSmartWakeup());
|
boolean smartAlarmForced = forcedSmartWakeup(alarm.getPosition());
|
||||||
|
cbSmartWakeup.setChecked(alarm.getSmartWakeup() || smartAlarmForced);
|
||||||
int smartAlarmVisibility = supportsSmartWakeup(alarm.getPosition()) ? View.VISIBLE : View.GONE;
|
int smartAlarmVisibility = supportsSmartWakeup(alarm.getPosition()) ? View.VISIBLE : View.GONE;
|
||||||
cbSmartWakeup.setVisibility(smartAlarmVisibility);
|
cbSmartWakeup.setVisibility(smartAlarmVisibility);
|
||||||
boolean smartAlarmEnabled = !forcedSmartWakeup(alarm.getPosition());
|
cbSmartWakeup.setEnabled(!smartAlarmForced);
|
||||||
cbSmartWakeup.setEnabled(smartAlarmEnabled);
|
|
||||||
|
|
||||||
cbSnooze.setChecked(alarm.getSnooze());
|
cbSnooze.setChecked(alarm.getSnooze());
|
||||||
int snoozeVisibility = supportsSnoozing() ? View.VISIBLE : View.GONE;
|
int snoozeVisibility = supportsSnoozing() ? View.VISIBLE : View.GONE;
|
||||||
|
@ -203,12 +203,17 @@ public class TestDeviceCoordinator extends AbstractDeviceCoordinator {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getAlarmSlotCount(final GBDevice device) {
|
public int getAlarmSlotCount(final GBDevice device) {
|
||||||
return super.getAlarmSlotCount(device);
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean supportsSmartWakeup(final GBDevice device, int position) {
|
public boolean supportsSmartWakeup(final GBDevice device, int position) {
|
||||||
return supports(getTestDevice(), TestFeature.SMART_WAKEUP);
|
return supports(getTestDevice(), TestFeature.SMART_WAKEUP) && position <= 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean forcedSmartWakeup(final GBDevice device, final int alarmPosition) {
|
||||||
|
return supports(getTestDevice(), TestFeature.SMART_WAKEUP_FORCED_SLOT) && alarmPosition == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -56,6 +56,7 @@ public enum TestFeature {
|
|||||||
SCREENSHOTS,
|
SCREENSHOTS,
|
||||||
SLEEP_RESPIRATORY_RATE,
|
SLEEP_RESPIRATORY_RATE,
|
||||||
SMART_WAKEUP,
|
SMART_WAKEUP,
|
||||||
|
SMART_WAKEUP_FORCED_SLOT,
|
||||||
SPO2,
|
SPO2,
|
||||||
STRESS_MEASUREMENT,
|
STRESS_MEASUREMENT,
|
||||||
UNICODE_EMOJIS,
|
UNICODE_EMOJIS,
|
||||||
|
Loading…
Reference in New Issue
Block a user