The use of the API by powerd is correct

u_hardware_alarm_set_relative_to_with_behavior(
         hardware_alarm,
         U_HARDWARE_ALARM_TIME_REFERENCE_RTC,
         U_HARDWARE_ALARM_SLEEP_BEHAVIOR_WAKEUP_DEVICE,
         &sleep_interval);w

Which platform_api maps to

     else if (time_reference == U_HARDWARE_ALARM_TIME_REFERENCE_RTC)
            switch(behavior)
            {
                case U_HARDWARE_ALARM_SLEEP_BEHAVIOR_WAKEUP_DEVICE:
                    type = ANDROID_ALARM_RTC_WAKEUP;
                    break;
                case U_HARDWARE_ALARM_SLEEP_BEHAVIOR_KEEP_DEVICE_ASLEEP:
                    type = ANDROID_ALARM_RTC;
                    break;
            }

        int result = ::ioctl(fd, ANDROID_ALARM_SET(type), ts);

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1420169

Title:
  Alarms don't wake up the phone when it is powered off

To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-devices-system-image/+bug/1420169/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to