Closed Bug 714694 Opened 13 years ago Closed 13 years ago

Add IdleService to gonk backend

Categories

(Core :: Widget, defect)

Other
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla12

People

(Reporter: kanru, Assigned: kanru)

References

Details

Attachments

(2 files, 5 obsolete files)

Add IdleService to gonk backend and track user activity.
Attachment #585343 - Flags: review?
Attachment #585343 - Attachment description: add_idleservice.patch → Part 1, Add IdleService to gonk backend
Attachment #585343 - Flags: review? → review?(mwu)
Attachment #585344 - Attachment description: track_useractivity.patch → Part 2, Track user activity in gonk backend
Attachment #585344 - Flags: review? → review?(mwu)
Blocks: 697132
-- Attachment #585343 [details] [diff] - Attachment is obsolete: true
Attachment #585660 - Flags: review?
Attachment #585343 - Attachment is obsolete: true
Attachment #585343 - Flags: review?(mwu)
Attachment #585660 - Attachment description: add_idleservice.patch → Part 1, Add IdleService to gonk backend, v2
Attachment #585660 - Flags: review? → review?(mwu)
Attachment #585660 - Flags: review?(mwu) → review+
Assignee: nobody → kchen
Comment on attachment 585344 [details] [diff] [review] Part 2, Track user activity in gonk backend Review of attachment 585344 [details] [diff] [review]: ----------------------------------------------------------------- ::: widget/src/gonk/nsWindow.cpp @@ +68,5 @@ > static nsWindow *gWindowToRedraw = nsnull; > static nsWindow *gFocusedWindow = nsnull; > static android::FramebufferNativeWindow *gNativeWindow = nsnull; > static bool sFramebufferOpen; > +static nsCOMPtr<nsIdleService> gIdleService; nsCOMPtrs generally shouldn't be used in a global since they'll hold objects past xpcom shutdown, and those objects end up being counted as leaked. There's a way to fix that, but instead I suggest just putting this variable in nsWindow and calling UserActivity() on the focused window.
-- Attachment #585344 [details] [diff] - Attachment is obsolete: true
Attachment #586004 - Flags: review?
Attachment #585344 - Attachment is obsolete: true
Attachment #585344 - Flags: review?(mwu)
Attachment #586004 - Attachment description: Part 2, Track user activity in gonk backend → Part 2, Track user activity in gonk backend, v2
Attachment #586004 - Flags: review? → review?(mwu)
Comment on attachment 586004 [details] [diff] [review] Part 2, Track user activity in gonk backend, v2 Review of attachment 586004 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. r=me with indenting nit fixed. ::: widget/src/gonk/nsWindow.cpp @@ +433,5 @@ > (*mEventCallback)(&event); > } > > +void > +nsWindow::UserActivity() This function should use four space indent to be consistent with the rest of the file.
Attachment #586004 - Flags: review?(mwu) → review+
-- Attachment #586004 [details] [diff] - Attachment is obsolete: true
Attachment #586302 - Flags: review?
Attachment #586004 - Attachment is obsolete: true
Attachment #586302 - Flags: review? → review+
Keywords: checkin-needed
applying thg-import-yu21aq.patch unable to find 'widget/src/gonk/Makefile.in' for patching 1 out of 1 hunks FAILED -- saving rejects to file widget/src/gonk/Makefile.in.rej unable to find 'widget/src/gonk/nsWidgetFactory.cpp' for patching 1 out of 1 hunks FAILED -- saving rejects to file widget/src/gonk/nsWidgetFactory.cpp.rej patch failed, unable to continue (try -v) patch failed, rejects left in working dir
Keywords: checkin-needed
-- Attachment #585660 [details] [diff] - Attachment is obsolete: true
Attachment #587546 - Flags: review?(mwu)
-- Attachment #586302 [details] [diff] - Attachment is obsolete: true
Attachment #587547 - Flags: review?(mwu)
Attachment #585660 - Attachment is obsolete: true
Attachment #586302 - Attachment is obsolete: true
You don't need to request review again if you've only done minor things to mske your patch apply again, or if you are addressing minor nits in review comments. Some people carry review over from older patches to reflect this, though I consider this optional.
(In reply to Michael Wu [:mwu] from comment #11) > You don't need to request review again if you've only done minor things to > mske your patch apply again, or if you are addressing minor nits in review > comments. Some people carry review over from older patches to reflect this, > though I consider this optional. I see :)
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/7c5ecb76b94c https://hg.mozilla.org/integration/mozilla-inbound/rev/0e41b25f9a59 (^ Second landing, first I backed out since I didn't spot the patch author was missing, as I was mistakenly convinced I'd checked everything before the patch was updated for bitrot) To save time for future landings, could you set your hgrc to include the author automatically & also add a commit message that includes the bug number (and if reuploading after review for bitrot, the r=foo too), along the lines of: https://developer.mozilla.org/en/Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F Thanks :-)
Status: NEW → ASSIGNED
Keywords: checkin-needed
Target Milestone: --- → mozilla12
Attachment #587546 - Flags: review?(mwu)
Attachment #587547 - Flags: review?(mwu)
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: