Closed
Bug 1053110
Opened 11 years ago
Closed 11 years ago
[Telephony] Move temporary clir logic from ril_worker to telephonyService
Categories
(Firefox OS Graveyard :: RIL, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
2.1 S3 (29aug)
People
(Reporter: aknow, Assigned: aknow)
References
Details
Attachments
(4 files, 5 obsolete files)
1.39 KB,
patch
|
aknow
:
review+
|
Details | Diff | Splinter Review |
8.74 KB,
patch
|
aknow
:
review+
|
Details | Diff | Splinter Review |
9.45 KB,
patch
|
aknow
:
review+
|
Details | Diff | Splinter Review |
7.95 KB,
patch
|
aknow
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•11 years ago
|
||
Try to make it more readable.
Attachment #8472200 -
Flags: review?(htsai)
Assignee | ||
Comment 2•11 years ago
|
||
1. Move the clir logic from ril_worker to telephonyService.
2. At this time, let promise rejected when passing an mmi code to telephony.dial
Attachment #8472201 -
Flags: review?(htsai)
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #8472202 -
Flags: review?(htsai)
Assignee | ||
Comment 4•11 years ago
|
||
Comment on attachment 8472201 [details] [diff] [review]
Part 3: Move clir logic to TelephonyService
Got new modification. Cancel the review.
Attachment #8472201 -
Flags: review?(htsai)
Comment 5•11 years ago
|
||
Comment on attachment 8472202 [details] [diff] [review]
Part 1: Add mmi code test
Review of attachment 8472202 [details] [diff] [review]:
-----------------------------------------------------------------
This looks good though it seems not directly related to this bug.
Attachment #8472202 -
Flags: review?(htsai) → review+
Assignee | ||
Updated•11 years ago
|
Attachment #8472202 -
Attachment description: Part 3: Add mmi code test → Part 1: Add mmi code test
Assignee | ||
Updated•11 years ago
|
Attachment #8472200 -
Attachment description: Part 1: Refactoring MMI regex → Part 2: Refactoring MMI regex
Assignee | ||
Updated•11 years ago
|
Attachment #8472201 -
Attachment description: Part 2: Move clir logic to TelephonyService → Part 3: Move clir logic to TelephonyService
Attachment #8472201 -
Attachment is obsolete: true
Updated•11 years ago
|
Attachment #8472200 -
Flags: review?(htsai) → review+
Assignee | ||
Comment 6•11 years ago
|
||
Attachment #8474416 -
Flags: review?(htsai)
Assignee | ||
Comment 7•11 years ago
|
||
Attachment #8474417 -
Flags: review?(htsai)
Comment 8•11 years ago
|
||
Comment on attachment 8474416 [details] [diff] [review]
Part 3: Create a helper: sendToRilWorker
Review of attachment 8474416 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/telephony/gonk/TelephonyService.js
@@ -331,5 @@
>
> this._currentCalls[aClientId][call.callIndex] = call;
> }
> -
> - return false;
We can't remove this. The 'false' value does matter. Please see http://dxr.mozilla.org/mozilla-central/source/dom/system/gonk/RadioInterfaceLayer.js?from=RadioInterfaceLayer.js&case=true#1830
Attachment #8474416 -
Flags: review?(htsai) → review-
Assignee | ||
Comment 9•11 years ago
|
||
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #8)
> Comment on attachment 8474416 [details] [diff] [review]
> Part 3: Create a helper: sendToRilWorker
>
> Review of attachment 8474416 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: dom/telephony/gonk/TelephonyService.js
> @@ -331,5 @@
> >
> > this._currentCalls[aClientId][call.callIndex] = call;
> > }
> > -
> > - return false;
>
> We can't remove this. The 'false' value does matter. Please see
> http://dxr.mozilla.org/mozilla-central/source/dom/system/gonk/
> RadioInterfaceLayer.js?from=RadioInterfaceLayer.js&case=true#1830
Returning nothing means 'undefined' and 'undefined' is treated as false.
Comment 10•11 years ago
|
||
Comment on attachment 8474416 [details] [diff] [review]
Part 3: Create a helper: sendToRilWorker
Review of attachment 8474416 [details] [diff] [review]:
-----------------------------------------------------------------
It's okay though considering the workermessenger protocol I am still inclined to returning 'false' explicitly.
Attachment #8474416 -
Flags: review- → review+
Assignee | ||
Comment 11•11 years ago
|
||
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #10)
> Comment on attachment 8474416 [details] [diff] [review]
> Part 3: Create a helper: sendToRilWorker
>
> Review of attachment 8474416 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> It's okay though considering the workermessenger protocol I am still
> inclined to returning 'false' explicitly.
I have a different opinion.
The purpose of the returning value is documented in workermessenger.send() but not sendWorkerMessage(). So, when writing a callback, it's really hard to understand why the function needs a return value. Also, what's the meaning of true or false? I just think that showing a "return" statement there is not so nature. It's better to hide the special ability of the "return value" and not to encourage the usage of it.
Comment 12•11 years ago
|
||
(In reply to Szu-Yu Chen [:aknow] from comment #11)
> (In reply to Hsin-Yi Tsai [:hsinyi] from comment #10)
> > Comment on attachment 8474416 [details] [diff] [review]
> > Part 3: Create a helper: sendToRilWorker
> >
> > Review of attachment 8474416 [details] [diff] [review]:
> > -----------------------------------------------------------------
> >
> > It's okay though considering the workermessenger protocol I am still
> > inclined to returning 'false' explicitly.
>
> I have a different opinion.
>
> The purpose of the returning value is documented in workermessenger.send()
> but not sendWorkerMessage(). So, when writing a callback, it's really hard
> to understand why the function needs a return value.
You are right. I agree with you on this. :\
> Also, what's the
> meaning of true or false? I just think that showing a "return" statement
> there is not so nature. It's better to hide the special ability of the
> "return value" and not to encourage the usage of it.
The file RadioInterfaceLayer.js defines "true" and "false" clearly, but I am convinced by you that for a callback writer, there seems space to improving the design.
Comment 13•11 years ago
|
||
Comment on attachment 8474417 [details] [diff] [review]
Part 4: Move clir logic to TelephonyService
Review of attachment 8474417 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me!
::: dom/system/gonk/ril_worker.js
@@ +2381,5 @@
> + *
> + * @param number
> + * Phone number to be parsed
> + */
> + parseMMIFromDialNumber: function(options) {
I believe it's a transient state that we will move the whole parsing work to TelephonyService.js in the bug of cleaning API backward compatibility. (Let me file a bug for tracking.) So it looks fine for now.
Attachment #8474417 -
Flags: review?(htsai) → review+
Assignee | ||
Comment 14•11 years ago
|
||
Attachment #8472202 -
Attachment is obsolete: true
Attachment #8475016 -
Flags: review+
Assignee | ||
Comment 15•11 years ago
|
||
Attachment #8472200 -
Attachment is obsolete: true
Attachment #8475017 -
Flags: review+
Assignee | ||
Comment 16•11 years ago
|
||
Attachment #8474416 -
Attachment is obsolete: true
Attachment #8475018 -
Flags: review+
Assignee | ||
Comment 17•11 years ago
|
||
Attachment #8474417 -
Attachment is obsolete: true
Attachment #8475019 -
Flags: review+
Assignee | ||
Comment 18•11 years ago
|
||
Keywords: checkin-needed
Comment 19•11 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/c1b4aead588e
https://hg.mozilla.org/integration/b2g-inbound/rev/a2cf291453d9
https://hg.mozilla.org/integration/b2g-inbound/rev/7ab3375eef2b
https://hg.mozilla.org/integration/b2g-inbound/rev/ef36a3938db7
Flags: in-testsuite+
Keywords: checkin-needed
Comment 20•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c1b4aead588e
https://hg.mozilla.org/mozilla-central/rev/a2cf291453d9
https://hg.mozilla.org/mozilla-central/rev/7ab3375eef2b
https://hg.mozilla.org/mozilla-central/rev/ef36a3938db7
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.1 S3 (29aug)
You need to log in
before you can comment on or make changes to this bug.
Description
•