Closed
Bug 1156596
Opened 9 years ago
Closed 9 years ago
[System] Support device type in base module
Categories
(Firefox OS Graveyard :: Gaia::TV::System, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: johnhu, Assigned: rickychien)
References
Details
Attachments
(1 file)
We already had device type information in system app. If a module has its owned sub-modules among different device types, the base module should have the ability to dynamic load the sub modules by device types.
Reporter | ||
Updated•9 years ago
|
Blocks: system-tv-visual
Reporter | ||
Updated•9 years ago
|
Depends on: system-bootstrap
Reporter | ||
Updated•9 years ago
|
Assignee: nobody → im
Reporter | ||
Comment 1•9 years ago
|
||
The proposal we have is: *. change the SUB_MODULES variable from array to object, like: { 'default': ['module1', 'module2'], 'phone': ['module3'], 'tv': ['moduletv'] } *. At _startSubModules, _initialSubModule, _stopSubModules, we only creates and calls |default| + |device typed|, like phone or tv, list. *. If SUB_MODULES variable is still array, we view this array as 'phone' to be backward compatible. *. File bugs to migrate all existing modules' SUB_MODULES from array to object.
Reporter | ||
Comment 2•9 years ago
|
||
I will take this back once I have time to work on it.
Assignee: im → nobody
Assignee | ||
Comment 3•9 years ago
|
||
Hey I'd like to take this when I feel free. I think it's a good starting point to learn about system app.
Assignee: nobody → rchien
Status: NEW → ASSIGNED
Comment 4•9 years ago
|
||
Assignee | ||
Comment 5•9 years ago
|
||
Comment on attachment 8633958 [details] [review] [gaia] rickychien:basemodule > mozilla-b2g:master Hey John, here my first patch for system app and please review it kindly. 1. To support a default and different device type for base_module, the new SUB_MODULES list would merge default type modules and a given device type modules. 2. I also migrate all existing modules's SUB_MODULES from array to object.
Attachment #8633958 -
Flags: review?(im)
Assignee | ||
Updated•9 years ago
|
Attachment #8633958 -
Flags: feedback?(lchang)
Reporter | ||
Comment 6•9 years ago
|
||
(In reply to Ricky Chien [:rickychien] from comment #5) > Comment on attachment 8633958 [details] [review] > [gaia] rickychien:basemodule > mozilla-b2g:master > > Hey John, here my first patch for system app and please review it kindly. > > 1. To support a default and different device type for base_module, the new > SUB_MODULES list would merge default type modules and a given device type > modules. > > 2. I also migrate all existing modules's SUB_MODULES from array to object. Ricky, Thanks for this hard work. To prevent a big patch, we, alive and I, would like to see BaseModule to support fallback mechanism. Existing modules can use an object which implied to phone. If TV needs that module, we change should change that module to support device type. Please see comment 1. BTW, we should email to dev-gaia to notify other devs this change.
Reporter | ||
Updated•9 years ago
|
Attachment #8633958 -
Flags: review?(im)
Assignee | ||
Comment 7•9 years ago
|
||
Backward compatible mechanism is ready for review. I'm going to write a test and additional comments for this new feature before setting r?=johnhu.
Assignee | ||
Comment 8•9 years ago
|
||
Comment on attachment 8633958 [details] [review] [gaia] rickychien:basemodule > mozilla-b2g:master Done. Set review flag to johnhu.
Attachment #8633958 -
Flags: review?(im)
Reporter | ||
Comment 9•9 years ago
|
||
Comment on attachment 8633958 [details] [review] [gaia] rickychien:basemodule > mozilla-b2g:master Looks good to me overall. But please revert the __DEVICE_TYPE__ part. We shouldn't use this variable at too many places. We should keep it only at feature_detector.js.
Attachment #8633958 -
Flags: review?(im) → review+
Comment 10•9 years ago
|
||
Comment on attachment 8633958 [details] [review] [gaia] rickychien:basemodule > mozilla-b2g:master Nice work! :)
Attachment #8633958 -
Flags: feedback?(lchang) → feedback+
Assignee | ||
Comment 11•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=gaia&revision=9b0d970c24135eff049c1c5c273a4e2713a2e3fc all green, ready to land
Assignee | ||
Comment 12•9 years ago
|
||
Landed in master: https://github.com/mozilla-b2g/gaia/commit/b1ca30da064301abaa824cd2376227478ec15f41
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•