message_button.show();
}
- protected virtual bool push_aux_state()
+ protected override bool push_aux_state()
{
- var state = new zavai.led.LedState(name);
+ var state = new zavai.led.LedState(notifier_name);
state.set_blink(255);
zavai.led.aux.push_state(state);
return true;
}
- protected virtual bool push_vibrator_state()
+ protected override bool push_vibrator_state()
{
- var state = new zavai.led.LedState(name);
+ var state = new zavai.led.LedState(notifier_name);
state.set_blink(255);
zavai.led.aux.push_state(state);
return true;
}
- protected virtual bool push_ringtone_state()
+ protected override bool push_ringtone_state()
{
- var state = new zavai.audio.PlayerState(name, config.ringtone_alarm, true);
+ var state = new zavai.audio.PlayerState(notifier_name, config.ringtone_alarm, true);
zavai.audio.soundplayer.push_state(state);
return true;
}
// Setup our attention seeking strategy
bool has_aux = zavai.led.aux != null && push_aux_state();
bool has_vibrator = zavai.led.vibrator != null && push_vibrator_state();
- // TODO bool has_ringtone = zavai.audio.soundplayer != null && push_ringtone_state();
+ bool has_ringtone = zavai.audio.soundplayer != null && push_ringtone_state();
// Run dialog
int res = base.run();
- // TODO: Restore ringtone state
+ if (has_ringtone) zavai.audio.soundplayer.pop_state(notifier_name);
if (has_vibrator) zavai.led.vibrator.pop_state(notifier_name);
if (has_aux) zavai.led.aux.pop_state(notifier_name);
ui.power.backlight.release(notifier_name);