Note: There are a few cases of duplicates in user autocompletion which are being worked on.

Add IdleService to gonk backend

RESOLVED FIXED in mozilla12

Status

()

Core
Widget
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: kanru, Assigned: kanru)

Tracking

unspecified
mozilla12
Other
Gonk (Firefox OS)
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 5 obsolete attachments)

(Assignee)

Description

6 years ago
Add IdleService to gonk backend and track user activity.
(Assignee)

Comment 1

6 years ago
Created attachment 585343 [details] [diff] [review]
Part 1, Add IdleService to gonk backend
Attachment #585343 - Flags: review?
(Assignee)

Comment 2

6 years ago
Created attachment 585344 [details] [diff] [review]
Part 2, Track user activity in gonk backend
Attachment #585344 - Flags: review?
(Assignee)

Updated

6 years ago
Attachment #585343 - Attachment description: add_idleservice.patch → Part 1, Add IdleService to gonk backend
Attachment #585343 - Flags: review? → review?(mwu)
(Assignee)

Updated

6 years ago
Attachment #585344 - Attachment description: track_useractivity.patch → Part 2, Track user activity in gonk backend
Attachment #585344 - Flags: review? → review?(mwu)
(Assignee)

Updated

6 years ago
Blocks: 697132
(Assignee)

Comment 3

6 years ago
Created attachment 585660 [details] [diff] [review]
Part 1, Add IdleService to gonk backend, v2

--
Attachment #585343 [details] [diff] - Attachment is obsolete: true
Attachment #585660 - Flags: review?
(Assignee)

Updated

6 years ago
Attachment #585343 - Attachment is obsolete: true
Attachment #585343 - Flags: review?(mwu)
(Assignee)

Updated

6 years ago
Attachment #585660 - Attachment description: add_idleservice.patch → Part 1, Add IdleService to gonk backend, v2
Attachment #585660 - Flags: review? → review?(mwu)

Updated

6 years ago
Attachment #585660 - Flags: review?(mwu) → review+

Updated

6 years ago
Assignee: nobody → kchen

Comment 4

6 years ago
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.
(Assignee)

Comment 5

6 years ago
Created attachment 586004 [details] [diff] [review]
Part 2, Track user activity in gonk backend, v2

--
Attachment #585344 [details] [diff] - Attachment is obsolete: true
Attachment #586004 - Flags: review?
(Assignee)

Updated

6 years ago
Attachment #585344 - Attachment is obsolete: true
Attachment #585344 - Flags: review?(mwu)
(Assignee)

Updated

6 years ago
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 6

6 years ago
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+
(Assignee)

Comment 7

6 years ago
Created attachment 586302 [details] [diff] [review]
Part 2, Track user activity in gonk backend

--
Attachment #586004 [details] [diff] - Attachment is obsolete: true
Attachment #586302 - Flags: review?
(Assignee)

Updated

6 years ago
Attachment #586004 - Attachment is obsolete: true

Updated

6 years ago
Attachment #586302 - Flags: review? → review+
(Assignee)

Updated

6 years ago
Keywords: checkin-needed

Comment 8

6 years ago
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
(Assignee)

Comment 9

6 years ago
Created attachment 587546 [details] [diff] [review]
Part 1, Add IdleService to gonk backend, v2

--
Attachment #585660 [details] [diff] - Attachment is obsolete: true
Attachment #587546 - Flags: review?(mwu)
(Assignee)

Comment 10

6 years ago
Created attachment 587547 [details] [diff] [review]
Part 2, Track user activity in gonk backend

--
Attachment #586302 [details] [diff] - Attachment is obsolete: true
Attachment #587547 - Flags: review?(mwu)
(Assignee)

Updated

6 years ago
Attachment #585660 - Attachment is obsolete: true
(Assignee)

Updated

6 years ago
Attachment #586302 - Attachment is obsolete: true

Comment 11

6 years ago
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.
(Assignee)

Comment 12

6 years ago
(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 :)
(Assignee)

Updated

6 years ago
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

Updated

6 years ago
Attachment #587546 - Flags: review?(mwu)

Updated

6 years ago
Attachment #587547 - Flags: review?(mwu)
https://hg.mozilla.org/mozilla-central/rev/7c5ecb76b94c
https://hg.mozilla.org/mozilla-central/rev/0e41b25f9a59
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.