Closed Bug 445267 Opened 11 years ago Closed 11 years ago

nsIdleService requires X ScreenSaver

Categories

(Firefox for Android Graveyard :: General, defect)

x86
macOS
defect
Not set

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: dougt, Assigned: dougt)

References

Details

Attachments

(1 file, 1 obsolete file)

When running m5 on the device, i see lots of these warnings:

WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file /home/dougt/mozilla/mozilla-central/toolkit/components/places/src/nsNavHistory.cpp, line 4492
oh, looks like we might be doing the wrong thing in the idle service.
can you be more specific?
I haven't debugged it very far, but I bet this fails:

http://mxr.mozilla.org/mozilla-central/source/widget/src/gtk2/nsIdleServiceGTK.cpp#141

I will fix.  There is a osso callback we can use to detect when applications are told to "power down".  This is an indication that there is idle time.
Assignee: nobody → doug.turner
Depends on: 446089
On OSSO devices, there is not X Screen Saver.  It looks like on maemo/osso, i can detect when there is an idle period on the system, but I can not detect when there is activity.  So, i can tell you that we have entered into idle time, but I can not tell you to wake up.  

Maybe we can add code into nsWindow.cpp report that there was an UI event that happened (user moves the mouse, presses a key, etc).  Or maybe there already is a gtk event that does this?
Summary: nsNavHistory.cpp warnings → nsIdleService requires X ScreenSaver
Attached patch patch v.1 (obsolete) — Splinter Review
creates a seperate idle service for osso that listens for system notifications.  Depends on bug 446089.
Attachment #331244 - Flags: review?
Comment on attachment 331244 [details] [diff] [review]
patch v.1

oh, in Observe(), please pretend you see an "else" between those if statements.
Comment on attachment 331244 [details] [diff] [review]
patch v.1

the header should probably just declare NS_DECL_NSIIDLESERVICE rather than the GetIdleTime method.

PR_Now() returns microseconds, not milliseconds doesn't it?
Attached patch patch v.2Splinter Review
Attachment #331244 - Attachment is obsolete: true
Attachment #331261 - Flags: review?
Attachment #331244 - Flags: review?
Comment on attachment 331261 [details] [diff] [review]
patch v.2

i am also updating the gtk's header to use the generated macro.
Attachment #331261 - Flags: review? → review+
33d9196aa5d5

fixed.

btw, i could not use NS_DECL_NSIIDLESERVICE.  The idle service, for whatever reason, only implements GetIdleTime.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
verified the idle service is working via mochitests.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.