[System] expose device type to system app

RESOLVED FIXED

Status

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: johnhu, Assigned: chens)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

To enable multiple device type in one system app, we should expose device type to system app. The following is our plan:

1. Create a FeatureDetector module which wraps feature detections functions, like navigator.getFeature(), document.implementation.hasFeature(xxx, xxx) and device type.
2. use system app's build script to expose __DEVICE_TYPE to window object
3. register FeatureDetector's deviceType to service.
BTW, please modify the navigator.getFeature used by InputWindowManager[1] to FeatureDetector

[1] https://github.com/mozilla-b2g/gaia/blob/bfe504b49533fb268c5ddda99c606aa66442b313/apps/system/js/input_window_manager.js#L271-L280
Created attachment 8587327 [details] [review]
[gaia] shamenchens:Bug1150423-ExposeDeviceType > mozilla-b2g:master
(Assignee)

Comment 3

3 years ago
Comment on attachment 8587327 [details] [review]
[gaia] shamenchens:Bug1150423-ExposeDeviceType > mozilla-b2g:master

Alive, this patch introduce FeatureDetector to system app and exposes device type/device memory to service, would you review changes in system app? thanks!

Ricky, we tend to replace some variable in build time, and I add `matchFileContentInZip` to helper function for build integration test, would you review changes in build system part? thanks!
Attachment #8587327 - Flags: review?(ricky060709)
Attachment #8587327 - Flags: review?(alive)
Comment on attachment 8587327 [details] [review]
[gaia] shamenchens:Bug1150423-ExposeDeviceType > mozilla-b2g:master

LGTM for build system part. Please fix the nit before landing.
Attachment #8587327 - Flags: review?(ricky060709) → review+
Comment on attachment 8587327 [details] [review]
[gaia] shamenchens:Bug1150423-ExposeDeviceType > mozilla-b2g:master

r+ with nits, feel free to flag review again if you have problem with the change.
Attachment #8587327 - Flags: review?(alive) → review+
(Assignee)

Updated

3 years ago
Keywords: checkin-needed

Updated

3 years ago
Keywords: checkin-needed

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
(Assignee)

Updated

3 years ago
Assignee: nobody → chens
You need to log in before you can comment on or make changes to this bug.