Closed Bug 1037141 Opened 10 years ago Closed 6 years ago

gecko should detect command line time changes

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: dhylands, Unassigned)

References

Details

Currently, some vendors hook into gecko to detect time changes and update the RTC (i.e. on the flame, look at /system/b2g/distribution/bundles/b2g_time/timeservice.js)

However, this won't pick up time changes which are done via the command line (like what ./flash.sh does).

It turns out that /dev/alarm has a mechanism to advertise time changes.

You open /dev/alaram and do an ioctl with ANDROID_ALARM_WAIT. The ioctl will wake up when various alarm events occur, including ALARM_TIME_CHANGE.

So then we'd just need flash.sh to wait until b2g has started up sufficiently to have opened this listener.

Then when gecko detects a time change, it can advertise it just like it does when the user changes the time, and the RTC will get updated.
We would need to protect ourself from detecting our own attempts to modify the time :)

Or perhaps, just decouple the broadcast and make it always come from detecting the time change.
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.