Closed Bug 795307 Opened 7 years ago Closed 7 years ago

Use telemetry to report touch enabled device stats

Categories

(Toolkit :: Telemetry, defect)

x86_64
Windows 7
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: jimm, Assigned: jimm)

Details

Attachments

(1 file)

This will be an interesting stat to track as Windows 8 rolls out.
Attached patch patchSplinter Review
Adds a touch input telemetry metric for Windows. I don't think we need this on other platforms. For Android it's probably safe to assume touch input is 100%, mac doesn't support touch and with linux I don't think we care.
Attachment #665942 - Flags: review?(taras.mozilla)
Comment on attachment 665942 [details] [diff] [review]
patch

Review of attachment 665942 [details] [diff] [review]:
-----------------------------------------------------------------

::: widget/windows/nsLookAndFeel.cpp
@@ +45,5 @@
> +  if ((touchCapabilities & NID_READY) && 
> +      (touchCapabilities & (NID_EXTERNAL_TOUCH | NID_INTEGRATED_TOUCH))) {
> +      return 1;
> +  }
> +  return 0;

Minor nit: you could make this just:

return (touchCapabilities & NID_READY) && (...)

@@ +52,4 @@
>  nsLookAndFeel::nsLookAndFeel() : nsXPLookAndFeel()
>  {
> +  mozilla::Telemetry::Accumulate(mozilla::Telemetry::TOUCH_ENABLED_DEVICE,
> +                                 !!IsTouchPresent());

You can just say IsTouchPresent() here; Accumulate() takes integers all the time anyway and the underlying machinery does the right thing with boolean histograms.
Attachment #665942 - Flags: review?(taras.mozilla) → review+
This broke Windows builds so I backed it out: https://hg.mozilla.org/integration/mozilla-inbound/rev/4fc56788f874
https://tbpl.mozilla.org/php/getParsedLog.php?id=15640932&tree=Mozilla-Inbound&full=1

Backed out again due to mysterious failure with zero info in the log. odd because this is on elm and is building fine.

I'll try a try build I guess, see what happens there.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
https://hg.mozilla.org/integration/mozilla-inbound/rev/e6f2ba68e685

Third time should be the charm. This time with the missing parts of the patch I somehow lost when applying the patch to inbound. This also built on try successfully.
https://hg.mozilla.org/mozilla-central/rev/e6f2ba68e685
Status: REOPENED → RESOLVED
Closed: 7 years ago7 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.