Closed
Bug 1164248
Opened 9 years ago
Closed 9 years ago
Handling of session/sessionEnded for notifyUssdReceived
Categories
(Firefox OS Graveyard :: RIL, defect)
Tracking
(blocking-b2g:2.2+, firefox39 wontfix, firefox40 wontfix, firefox41 fixed, b2g-v2.2 fixed, b2g-master fixed)
People
(Reporter: cyang, Assigned: hsinyi)
References
Details
(Whiteboard: [caf priority: p2][CR 831965])
Attachments
(2 files, 2 obsolete files)
7.18 KB,
patch
|
edgar
:
review+
|
Details | Diff | Splinter Review |
7.20 KB,
patch
|
kkuo
:
approval-mozilla-b2g37+
|
Details | Diff | Splinter Review |
Hi Hsin-Yi, After bug 1058397 was merged, there is a wrapper at [1] called by [2] to repackage "sessionEnded" as "session". I was curious why not perform the repackage at [3]? This is currently breaking our reference ril such that there is no response form after a network initiated USSD request is received and displayed. [1] https://dxr.mozilla.org/mozilla-central/source/dom/telephony/gonk/TelephonyService.js#1719 [2] https://dxr.mozilla.org/mozilla-central/source/dom/messages/SystemMessageManager.js#92 [3] https://dxr.mozilla.org/mozilla-central/source/dom/system/gonk/RILSystemMessenger.jsm#179
Flags: needinfo?(htsai)
Assignee | ||
Comment 1•9 years ago
|
||
(In reply to Carol Yang [:cyang] from comment #0) > Hi Hsin-Yi, > > After bug 1058397 was merged, there is a wrapper at [1] called by [2] to > repackage "sessionEnded" as "session". I was curious why not perform the > repackage at [3]? > > This is currently breaking our reference ril such that there is no response > form after a network initiated USSD request is received and displayed. > > [1] > https://dxr.mozilla.org/mozilla-central/source/dom/telephony/gonk/ > TelephonyService.js#1719 > [2] > https://dxr.mozilla.org/mozilla-central/source/dom/messages/ > SystemMessageManager.js#92 > [3] > https://dxr.mozilla.org/mozilla-central/source/dom/system/gonk/ > RILSystemMessenger.jsm#179 Since bug Bug 1091307 TelephonyService.js was disabled in caf build that leads to no USSDReceivedWrapper in caf build, either. We need to move that function out and make the wrapper available in both builds.
Flags: needinfo?(htsai)
Assignee | ||
Updated•9 years ago
|
Component: Gaia::Dialer → RIL
Comment 2•9 years ago
|
||
triage: blocking, in order to fix the USSD function in 2.2 for commercial RIL.
blocking-b2g: 2.2? → 2.2+
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #1) > Since bug Bug 1091307 TelephonyService.js was disabled in caf build that > leads to no USSDReceivedWrapper in caf build, either. We need to move that > function out and make the wrapper available in both builds. Hsin-Yi, we were never using TelephonyService.js with or without the fix for bug 1091307. I don't understand very well the purpose of this wrapper. Could you please provide some context? Also, it seems like something that should have been done in DOM instead of RIL. Please advise.
Assignee | ||
Comment 4•9 years ago
|
||
(In reply to Anshul from comment #3) > (In reply to Hsin-Yi Tsai [:hsinyi] from comment #1) > > > Since bug Bug 1091307 TelephonyService.js was disabled in caf build that > > leads to no USSDReceivedWrapper in caf build, either. We need to move that > > function out and make the wrapper available in both builds. > > Hsin-Yi, we were never using TelephonyService.js with or without the fix for > bug 1091307. I don't understand very well the purpose of this wrapper. Could > you please provide some context? Also, it seems like something that should > have been done in DOM instead of RIL. Please advise. We want to have a well-defined USSD interface for gaia. However, what gaia relies on now is the format of a system message not a DOM Event. So, this wrapping is used to provide a well-defined USSD interface wrapped in a system message. Yes, after the patch, I don't expect changes on RIL side. All you need to do is keeping using TelephonyMessenger to send out a system message. All magic is hidden behind that. Clear to you?
Assignee | ||
Comment 5•9 years ago
|
||
Move USSDReceivedWrapper out of TelephonyService
Assignee | ||
Comment 6•9 years ago
|
||
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #5) > Created attachment 8605231 [details] [diff] [review] > 1164248.patch > > Move USSDReceivedWrapper out of TelephonyService Hi Carol, The patch should be applied cleanly on v2.2. Could you please give it a try? Thanks!
Flags: needinfo?(cyang)
Reporter | ||
Comment 7•9 years ago
|
||
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #6) > (In reply to Hsin-Yi Tsai [:hsinyi] from comment #5) > > Created attachment 8605231 [details] [diff] [review] > > 1164248.patch > > > > Move USSDReceivedWrapper out of TelephonyService > > Hi Carol, > The patch should be applied cleanly on v2.2. Could you please give it a try? > Thanks! Hi Hsin-Yi, The patch applied cleanly but I get the following compiler error: mozbuild.preprocessor.Error: ('/local/mnt/workspace/cyang/builds/LF.BR.1.2.3/gecko/b2g/installer/package-manifest.in', 473, 'UNDEFINED_VAR', 'RESPATH') Line 473 looks like where you added @RESPATH@/components/USSDReceivedWrapper.js Can you please help with resolving this error? Thanks, Carol
Flags: needinfo?(cyang)
Reporter | ||
Updated•9 years ago
|
Flags: needinfo?(htsai)
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #4) > We want to have a well-defined USSD interface for gaia. However, what gaia > relies on now is the format of a system message not a DOM Event. So, this > wrapping is used to provide a well-defined USSD interface wrapped in a > system message. > > Yes, after the patch, I don't expect changes on RIL side. All you need to do > is keeping using TelephonyMessenger to send out a system message. All magic > is hidden behind that. Clear to you? Hsin-Yi as I understand the intent of system message is to wake up the app and then the app needs to query for the data. Seems like we are hijacking the system message here. The concern is not merely that qcril has no access to this wrapper but also that this wrapper looks like a hack. Is there a plan to improve this in future?
Updated•9 years ago
|
Whiteboard: [CR 831965] → [caf priority: p2][CR 831965]
Comment 9•9 years ago
|
||
Apparently, Hsinyi is working on this bug. Thanks, Hsinyi.
Assignee: nobody → htsai
Assignee | ||
Comment 10•9 years ago
|
||
(In reply to Anshul from comment #8) > (In reply to Hsin-Yi Tsai [:hsinyi] from comment #4) > > We want to have a well-defined USSD interface for gaia. However, what gaia > > relies on now is the format of a system message not a DOM Event. So, this > > wrapping is used to provide a well-defined USSD interface wrapped in a > > system message. > > > > Yes, after the patch, I don't expect changes on RIL side. All you need to do > > is keeping using TelephonyMessenger to send out a system message. All magic > > is hidden behind that. Clear to you? > > Hsin-Yi as I understand the intent of system message is to wake up the app > and then the app needs to query for the data. Seems like we are hijacking > the system message here. The concern is not merely that qcril has no access > to this wrapper but also that this wrapper looks like a hack. Is there a > plan to improve this in future? You are right, the original intention for introducing system message is to wake up the app and to query the pending data. But, what gaia expects from system message is more than this as time goes. That said, when gaia receives a system message, it's sometimes expected to get a object to execute directly from the message. So, no, this isn't a hack. This is an existing behaviour in the SystemMessage mechanism. This kinda mechanism has been used for other modules such as webactivity. Does this make sense to you, Anshul? (In reply to Carol Yang [:cyang] from comment #7) > (In reply to Hsin-Yi Tsai [:hsinyi] from comment #6) > > (In reply to Hsin-Yi Tsai [:hsinyi] from comment #5) > > > Created attachment 8605231 [details] [diff] [review] > > > 1164248.patch > > > > > > Move USSDReceivedWrapper out of TelephonyService > > > > Hi Carol, > > The patch should be applied cleanly on v2.2. Could you please give it a try? > > Thanks! > > Hi Hsin-Yi, > > The patch applied cleanly but I get the following compiler error: > > mozbuild.preprocessor.Error: > ('/local/mnt/workspace/cyang/builds/LF.BR.1.2.3/gecko/b2g/installer/package- > manifest.in', 473, 'UNDEFINED_VAR', 'RESPATH') > > Line 473 looks like where you added > @RESPATH@/components/USSDReceivedWrapper.js > > Can you please help with resolving this error? > > Thanks, > Carol Let me try compile v2.2 build again and get back to you later.
Flags: needinfo?(htsai) → needinfo?(anshulj)
Assignee | ||
Comment 11•9 years ago
|
||
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #10) > (In reply to Anshul from comment #8) > > (In reply to Hsin-Yi Tsai [:hsinyi] from comment #4) > > > We want to have a well-defined USSD interface for gaia. However, what gaia > > > relies on now is the format of a system message not a DOM Event. So, this > > > wrapping is used to provide a well-defined USSD interface wrapped in a > > > system message. > > > > > > Yes, after the patch, I don't expect changes on RIL side. All you need to do > > > is keeping using TelephonyMessenger to send out a system message. All magic > > > is hidden behind that. Clear to you? > > > > Hsin-Yi as I understand the intent of system message is to wake up the app > > and then the app needs to query for the data. Seems like we are hijacking > > the system message here. The concern is not merely that qcril has no access > > to this wrapper but also that this wrapper looks like a hack. Is there a > > plan to improve this in future? > > You are right, the original intention for introducing system message is to > wake up the app and to query the pending data. But, what gaia expects from > system message is more than this as time goes. That said, when gaia receives > a system message, it's sometimes expected to get a object to execute > directly from the message. So, no, this isn't a hack. This is an existing > behaviour in the SystemMessage mechanism. This kinda mechanism has been used > for other modules such as webactivity. > > Does this make sense to you, Anshul? > For your reference, this is where the mechanism locates https://dxr.mozilla.org/mozilla-central/source/dom/messages/SystemMessageManager.js?from=systemmessagemanager.js#88
Assignee | ||
Comment 12•9 years ago
|
||
Attachment #8605231 -
Attachment is obsolete: true
Assignee | ||
Comment 13•9 years ago
|
||
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #12) > Created attachment 8605611 [details] [diff] [review] > [v2.2] patch Hi Carol, Sorry that was a careless compile error.I've uploaded a new v2.2 patch which compiled successfully and worked as expected on my device. Please try again, thank you.
Flags: needinfo?(cyang)
Comment 14•9 years ago
|
||
Hsin-Yi, thanks for your explanation. If system message is now being used to send data as well can we deprecate other events that carry the same information. Seems like there is a lot of duplication of events.
Flags: needinfo?(anshulj)
Reporter | ||
Comment 15•9 years ago
|
||
Hi Hsin-Yi, Your latest patch works! Thanks!
Flags: needinfo?(cyang)
Assignee | ||
Comment 16•9 years ago
|
||
(In reply to Carol Yang [:cyang] from comment #15) > Hi Hsin-Yi, > > Your latest patch works! > > Thanks! Awesome! Will ask for review later. (In reply to Anshul from comment #14) > Hsin-Yi, thanks for your explanation. If system message is now being used to > send data as well can we deprecate other events that carry the same > information. Seems like there is a lot of duplication of events. I totally agree that we deprecate the duplication. Currently the gaia team is prototyping a new gaia architecture. If the new architecture is feasible, we might not even need system messages in certain cases. I'd suggest we review duplication of DOM events and system messages then to make sure we don't need to flip over again and again, if the duplication isn't something urgent to you. How do you think, Anshul?
Assignee | ||
Comment 17•9 years ago
|
||
Hi Edgar, In this patch I simply move USSDReceivedWrapper stuff out of TelephonyService so that it's accessible even in CAF build. I also add some things to let the debugger can be enabled at run-time. Could you help review? Thank you.
Attachment #8606066 -
Flags: review?(echen)
Comment 18•9 years ago
|
||
Comment on attachment 8606066 [details] [diff] [review] [m-c] 1164248.patch Review of attachment 8606066 [details] [diff] [review]: ----------------------------------------------------------------- r=me with the comment addressed, thank you. ::: dom/telephony/gonk/USSDReceivedWrapper.js @@ +31,5 @@ > + * Please see SystemMessageManager.js to know how it customizes the wrapper. > + */ > +function USSDReceivedWrapper() { > + this._updateDebugFlag(); > + Services.prefs.addObserver(kPrefRilDebuggingEnabled, this, false); removeObserver() when xpcom-shutdown.
Attachment #8606066 -
Flags: review?(echen) → review+
Comment 19•9 years ago
|
||
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #16) > I totally agree that we deprecate the duplication. Currently the gaia team > is prototyping a new gaia architecture. If the new architecture is feasible, > we might not even need system messages in certain cases. I'd suggest we > review duplication of DOM events and system messages then to make sure we > don't need to flip over again and again, if the duplication isn't something > urgent to you. How do you think, Anshul? No it's not urgent to us Hsin-Yi. Thanks for understanding. Please involve us in the discussion whenever you have more information.
Assignee | ||
Comment 20•9 years ago
|
||
(In reply to Edgar Chen [:edgar][:echen] from comment #18) > Comment on attachment 8606066 [details] [diff] [review] > [m-c] 1164248.patch > > Review of attachment 8606066 [details] [diff] [review]: > ----------------------------------------------------------------- > > r=me with the comment addressed, thank you. > > ::: dom/telephony/gonk/USSDReceivedWrapper.js > @@ +31,5 @@ > > + * Please see SystemMessageManager.js to know how it customizes the wrapper. > > + */ > > +function USSDReceivedWrapper() { > > + this._updateDebugFlag(); > > + Services.prefs.addObserver(kPrefRilDebuggingEnabled, this, false); > > removeObserver() when xpcom-shutdown. Hi Edgar, Thanks for the review! No, We don't need to manually |removeObserver| because in [1] nsPrefBranch listens to NS_XPCOM_SHUTDOWN_OBSERVER_ID and will do |freeObserverList()| when it gets notified. Also, calling |removeObserver()| isn't necessary while during that time nsPreBranch is executing |freeObserverList| because the |removeObserver| function calls are just ignored [2]. [1] https://dxr.mozilla.org/mozilla-central/source/modules/libpref/nsPrefBranch.cpp?from=nsPrefBranch.cpp&case=true#669 [2] https://dxr.mozilla.org/mozilla-central/source/modules/libpref/nsPrefBranch.cpp?from=nsPrefBranch.cpp&case=true#651
Assignee | ||
Comment 21•9 years ago
|
||
m-c try https://treeherder.mozilla.org/#/jobs?repo=try&revision=b3972b12dad4 v2.2 try https://treeherder.mozilla.org/#/jobs?repo=try&revision=e42094b26d01
Assignee | ||
Comment 22•9 years ago
|
||
add r=edgar, a=2.2+ on commit description
Attachment #8605611 -
Attachment is obsolete: true
Assignee | ||
Comment 23•9 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/79ce87dbf4a7
Reporter | ||
Comment 25•9 years ago
|
||
Comment on attachment 8606795 [details] [diff] [review] [v2.2] 1164248_v2_2.patch, r=edgar Hi Bhavana, Just wanted to make sure this will get into v2.2. Can you please approve? Thanks, Carol NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings. [Approval Request Comment] Bug caused by (feature/regressing bug #): User impact if declined: Testing completed: Risk to taking this patch (and alternatives if risky): String or UUID changes made by this patch:
Flags: needinfo?(bajaj.bhavana)
Attachment #8606795 -
Flags: approval-mozilla-b2g37?
Updated•9 years ago
|
Attachment #8606795 -
Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
Updated•9 years ago
|
status-b2g-v2.2:
--- → affected
status-b2g-master:
--- → fixed
status-firefox39:
--- → wontfix
status-firefox40:
--- → wontfix
Updated•9 years ago
|
Target Milestone: --- → 2.2 S13 (29may)
You need to log in
before you can comment on or make changes to this bug.
Description
•