Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(175)

Issue 29516656: Issue 5347 - Add geckoInfo.deviceForm for phone and tablet (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
2 years, 1 month ago by Manish Jethani
Modified:
2 years, 1 month ago
Reviewers:
Sebastian Noack
Base URL:
https://hg.adblockplus.org/buildtools/
Visibility:
Public.

Description

Issue 5347 - Add geckoInfo.deviceForm for phone and tablet Rationale: info.application and info.applicationVersion are available only later, after a lot of code has already been initialized. We need this info sooner so we avoid running a lot of unnecessary code. Besides, the application name "Fennec" doesn't really tell us if it's on mobile or tablet, and we might want to do different things based on the device form factor, either now or in the future. I've added a info.deviceForm property that can have the values "unknown" (default), "phone", or "tablet". The parsing of the UA string is based on the specification here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox The name and possible values of the new property are inspired by this: https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-deployment-deviceform

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -2 lines) Patch
M templates/geckoInfo.js.tmpl View 1 chunk +14 lines, -2 lines 0 comments Download

Messages

Total messages: 7
Manish Jethani
2 years, 1 month ago (2017-08-15 16:11:15 UTC) #1
Manish Jethani
Rationale: info.application and info.applicationVersion is available only later, after a lot of code has already ...
2 years, 1 month ago (2017-08-15 16:15:59 UTC) #2
Manish Jethani
On 2017/08/15 16:15:59, Manish Jethani wrote: > I've added a info.deviceForm property that can have ...
2 years, 1 month ago (2017-08-15 16:17:38 UTC) #3
Sebastian Noack
runtime.getPlatformInfo() provides a more reliable way to detect the OS, since the user agent string ...
2 years, 1 month ago (2017-08-15 16:31:17 UTC) #4
Manish Jethani
On 2017/08/15 16:31:17, Sebastian Noack wrote: > runtime.getPlatformInfo() provides a more reliable way to detect ...
2 years, 1 month ago (2017-08-15 16:44:08 UTC) #5
Manish Jethani
On 2017/08/15 16:44:08, Manish Jethani wrote: > On 2017/08/15 16:31:17, Sebastian Noack wrote: > > ...
2 years, 1 month ago (2017-08-15 16:53:04 UTC) #6
Sebastian Noack
2 years, 1 month ago (2017-08-15 17:02:21 UTC) #7
On 2017/08/15 16:53:04, Manish Jethani wrote:
> We could also just use chrome.windows as a proxy. If it's null, it's mobile.

Sounds like a fair compromise, if it has to be synchronous. It's possible though
that they will implement the "windows" API on Android at some point, but it's at
least not any less reliable than the user agent string (and much simpler to
check).
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 87257f5