Closed
Bug 948847
Opened 11 years ago
Closed 11 years ago
[Gaia] add AirplaneModeHelper to make sure settings app and system app will not do the same thing
Categories
(Firefox OS Graveyard :: Gaia::Settings, defect)
Tracking
(blocking-b2g:1.3+, firefox29 fixed, b2g-v1.3 fixed)
RESOLVED
FIXED
blocking-b2g | 1.3+ |
People
(Reporter: eragonj, Assigned: eragonj)
References
Details
Attachments
(2 files, 1 obsolete file)
This is a follow-up enhancement that we can make a AirplaneModeHelper to extract airplane mode logic existed in settings app and systems app.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → ejchen
Assignee | ||
Comment 1•11 years ago
|
||
This is a follow-up enhancement but from bug 945140.
Assignee | ||
Comment 2•11 years ago
|
||
It is currently a temp WIP.
Assignee | ||
Comment 3•11 years ago
|
||
Comment on attachment 8349924 [details] [review]
WIP
hi Arthur,
can you give me some feedbacks about the implementations ?
Just want to make sure the direction is right ! Thanks :)
Attachment #8349924 -
Flags: feedback?(arthur.chen)
Comment 4•11 years ago
|
||
Comment on attachment 8349924 [details] [review]
WIP
Looks good to me. Please check my github comments, thanks!
Attachment #8349924 -
Flags: feedback?(arthur.chen) → feedback+
Assignee | ||
Comment 5•11 years ago
|
||
@Arthur,
currently it works now and I think I still need to do some code refactoring.
If possible, can you give it a try on your device ? Thanks :)
Assignee | ||
Comment 6•11 years ago
|
||
Comment on attachment 8349924 [details] [review]
WIP
Hi Alive & Arthur,
I just totally (well just a little bit ??) rewrote the airplaneMode in settings & system apps.
After this redesign, airplane_mode.js in settings app only has 5x lines now wow~
I just tested all airplane mode related test cases on MozTrap and they all work well, so I think its functionality is ok and just have to refactor some code and it will be fine to be used !
Can you guys give me some feedbacks ? Thanks :)
Attachment #8349924 -
Flags: feedback?(arthur.chen)
Attachment #8349924 -
Flags: feedback?(alive)
Attachment #8349924 -
Flags: feedback+
Assignee | ||
Comment 7•11 years ago
|
||
@alive, do you think it is needed to extract updateStatus/restore/suspend into a separate file (?
Assignee | ||
Comment 8•11 years ago
|
||
Comment on attachment 8349924 [details] [review]
WIP
Hi Arthur & Alive,
can you help me review code base :) ? Thanks !
Attachment #8349924 -
Flags: review?(arthur.chen)
Attachment #8349924 -
Flags: review?(alive)
Attachment #8349924 -
Flags: feedback?(arthur.chen)
Attachment #8349924 -
Flags: feedback?(alive)
Attachment #8349924 -
Flags: feedback?
Comment 9•11 years ago
|
||
Comment on attachment 8349924 [details] [review]
WIP
Good job, EJ! Please check my comments in github. And please also update related unit tests.
Attachment #8349924 -
Flags: review?(arthur.chen)
Attachment #8349924 -
Flags: feedback?
Comment 10•11 years ago
|
||
Blocks blocking bugs.
Please do flag the bug if you plan to tackle the blocking bugs this way, thanks!
blocking-b2g: --- → 1.3+
Comment 11•11 years ago
|
||
Comment on attachment 8349924 [details] [review]
WIP
I believe Arthur's review is enough.
Attachment #8349924 -
Flags: review?(alive)
Assignee | ||
Comment 12•11 years ago
|
||
(In reply to Alive Kuo [:alive][NEEDINFO!] from comment #11)
> Comment on attachment 8349924 [details] [review]
> WIP
>
> I believe Arthur's review is enough.
Thanks Alive.
Assignee | ||
Comment 13•11 years ago
|
||
Comment on attachment 8349924 [details] [review]
WIP
Hi Arthur,
I added unit test for this patch and I think they are good to go.
BTW, I also rebased the code base to make it able to be merged.
Thanks !!
Attachment #8349924 -
Flags: review?(arthur.chen)
Comment 14•11 years ago
|
||
Comment on attachment 8349924 [details] [review]
WIP
Cancel the review per the offline discussion. We are almost there!
Attachment #8349924 -
Flags: review?(arthur.chen)
Assignee | ||
Comment 15•11 years ago
|
||
Comment on attachment 8349924 [details] [review]
WIP
Hi Arthur,
I need your review again !! Thanks :)
Attachment #8349924 -
Flags: review?(arthur.chen)
Comment 16•11 years ago
|
||
Comment on attachment 8349924 [details] [review]
WIP
r=me. Thank you for the effort! Please squash all commits before merging.
Attachment #8349924 -
Flags: review?(arthur.chen) → review+
Assignee | ||
Comment 17•11 years ago
|
||
Special thanks to Jose, Arthur and Alive for your great help.
Patches were landed on :
Gaia/master : 1bd937c8c110788fcaec7deefe5f3367def18a42
Gaia/v1.3 : 27f6ac2b5591dace72951baebde2345422b6f1e5
Status: NEW → RESOLVED
Closed: 11 years ago
status-b2g-v1.3:
--- → fixed
status-firefox29:
--- → fixed
Resolution: --- → FIXED
Comment 18•11 years ago
|
||
I'm gonna back out this from 1.3, this broke integration tests, see https://travis-ci.org/mozilla-b2g/gaia/jobs/16922527:
1) manipulate support settings check support with SIM custom "before each" hook:
JavaScriptError: (17) TypeError: mobileConnections is undefined
Remote Stack:
@app://system.gaiamobile.org/js/airplane_mode.js, line 282
at Error.MarionetteError (/home/travis/build/mozilla-b2g/gaia/node_modules/marionette-client/lib/marionette/error.js:67:13)
2) lockscreen disabled test launch test app:
JavaScriptError: (17) TypeError: mobileConnections is undefined
Remote Stack:
@app://system.gaiamobile.org/js/airplane_mode.js, line 282
at Error.MarionetteError (/home/travis/build/mozilla-b2g/gaia/node_modules/marionette-client/lib/marionette/error.js:67:13)
reverting from v1.3: 5a9cae9babced2482c4cb8d560a64b99b2007f44
Comment 19•11 years ago
|
||
Hey EJ, the integration tests issue make me think the patch needs to be adapted for v1.3, or a dependent patch is missing.
Needinfo you so that you can properly uplift this.
Flags: needinfo?(ejchen)
Comment 20•11 years ago
|
||
Actually, let's back this out on all branches. This also completely broke one of the Gaia UI Tests as well in bug 959691.
Depends on: 959691
Flags: needinfo?(jhford)
Comment 21•11 years ago
|
||
needinfo on jhford to backout the patch on master
Assignee | ||
Comment 22•11 years ago
|
||
@Jason,
just reverted from master : 5ac56d4474e94ba49356d0ee2c071a84a2c6e7fe
It's kinda interesting, I noticed that we would skip some Gaia UI tests on Travis and that's why this case is not covered in this patch. I have a question that why don't we activate it on Travis (?)
@Julien,
it means that we have no mozMobileConnections on v1.3 when running marionette test (?) Kinda weird, I will check what's wrong about these marionette tests on v1.3.
Thanks.
Flags: needinfo?(jhford)
Flags: needinfo?(ejchen)
Assignee | ||
Updated•11 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•11 years ago
|
Comment 23•11 years ago
|
||
(In reply to EJ Chen [:eragonj] from comment #22)
> @Jason,
>
> just reverted from master : 5ac56d4474e94ba49356d0ee2c071a84a2c6e7fe
>
> It's kinda interesting, I noticed that we would skip some Gaia UI tests on
> Travis and that's why this case is not covered in this patch. I have a
> question that why don't we activate it on Travis (?)
>
> @Julien,
>
> it means that we have no mozMobileConnections on v1.3 when running
> marionette test (?) Kinda weird, I will check what's wrong about these
> marionette tests on v1.3.
>
> Thanks.
I think mozMobileConnections is not available in B2G Desktop, but I'll needinfo Vicamo to be sure.
I also think that Zac disabled in Travis all the tests that run only on devices. Zac, am I right here?
Flags: needinfo?(zcampbell)
Flags: needinfo?(vyang)
Comment 24•11 years ago
|
||
Julienw, yes it is disabled because the Travis VM lacks the hardware the test needs. (If we ever mock it for desktopb2g then we could enable it).
Flags: needinfo?(zcampbell)
Assignee | ||
Comment 25•11 years ago
|
||
Hi all, we noticed that two failed tests which Julien talked about were already commented out on master at Bug 952611 - Disable broken gaia integration tests. We would do the same thing on v1.3 to disable these integration tests.
About mozMobileConntions is undefined problem, it is a known issue here (bug 951888). After discussion with Tim & Arthur, because the related error is hidden on TBPL, we think `undefined` issue is better to be handled independently on that bug instead of this one together.
Thanks :)
Assignee | ||
Comment 26•11 years ago
|
||
Assignee | ||
Comment 27•11 years ago
|
||
Attachment #8349924 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Attachment #8360312 -
Flags: review?(arthur.chen)
Assignee | ||
Updated•11 years ago
|
Attachment #8360313 -
Flags: review?(arthur.chen)
Comment 28•11 years ago
|
||
Comment on attachment 8360312 [details] [review]
patch on v1.3
Looks good to me.
Attachment #8360312 -
Flags: review?(arthur.chen) → review+
Assignee | ||
Updated•11 years ago
|
Attachment #8360312 -
Flags: review?(florin.strugariu)
Assignee | ||
Updated•11 years ago
|
Attachment #8360313 -
Flags: review?(florin.strugariu)
Comment 29•11 years ago
|
||
Comment on attachment 8360313 [details] [review]
patch on master
Looks good to me.
Attachment #8360313 -
Flags: review?(arthur.chen) → review+
Comment 30•11 years ago
|
||
Comment on attachment 8360313 [details] [review]
patch on master
the UI tests seem to work as expected when setting the AirPlane Mode
Attachment #8360313 -
Flags: review?(florin.strugariu) → review+
Comment 31•11 years ago
|
||
Comment on attachment 8360312 [details] [review]
patch on v1.3
tested this on 1.3 and it works as expected
Attachment #8360312 -
Flags: review?(florin.strugariu) → review+
Assignee | ||
Comment 32•11 years ago
|
||
Thanks Bebe !! :)
Assignee | ||
Comment 33•11 years ago
|
||
Thanks all, just merged the code in
Gaia/master : 8a562338f6ea381f6f1cdac2a544970c1a5b2093
Gaia/v1.3 : ffc82b03405b4878cee0b626a1160a8e884c9c05
:)
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Comment 34•11 years ago
|
||
(In reply to Julien Wajsberg [:julienw] from comment #23)
> (In reply to EJ Chen [:eragonj] from comment #22)
> > @Julien,
> >
> > it means that we have no mozMobileConnections on v1.3 when running
> > marionette test (?) Kinda weird, I will check what's wrong about these
> > marionette tests on v1.3.
> >
> > Thanks.
>
> I think mozMobileConnections is not available in B2G Desktop, but I'll
> needinfo Vicamo to be sure.
Kind of late now :( Based on bug 859554, we have all RIL APIs (but MobileMessage) undefined on platforms unsupported since bug 915604 and bug 920551.
Flags: needinfo?(vyang)
You need to log in
before you can comment on or make changes to this bug.
Description
•