Closed
Bug 1005823
Opened 10 years ago
Closed 10 years ago
[Dolphin] Cannot place emergency call w/o SIM card.
Categories
(Firefox OS Graveyard :: Gaia::Dialer, defect)
Tracking
(blocking-b2g:1.4+, b2g-v1.4 fixed, b2g-v2.0 verified, b2g-v2.1 verified)
People
(Reporter: sku, Assigned: drs)
References
Details
(Whiteboard: [partner-blocker][Dolphin_1.4][sprd 304991])
Attachments
(3 files, 4 obsolete files)
STR: 1. Insert two valid SIMs 2. Settings -> SIM manager -> Outgoing calls -> Always ask 3. power down -> remove two SIMs -> power on 4. place 112 via dialler Symptom: See attached screenshot
Reporter | ||
Updated•10 years ago
|
Whiteboard: [Dolphin_1.4]
Reporter | ||
Comment 1•10 years ago
|
||
Hi Carrie: Could you please help comment which UX behaviour should we follow? Thanks!! Shawn
Flags: needinfo?(cawang)
Comment 2•10 years ago
|
||
Hi Shawn Since it's for emergency call, it should be dialed out directly even there is no SIM inserted. Thanks!
Flags: needinfo?(cawang)
Reporter | ||
Comment 3•10 years ago
|
||
Hi Carrie: Yes, agree with you. however, Gaia did not know ECC or not until place call out. (if my memory is correct) My original ni? is asking Which SIM slot ID should we used for this case if gaia can identify ECC? Pre-condition: two SIMs inserted + always ask option 1. remove slot1 SIM, keep slot 2 case 2. remove slot2 SIM, keep slot 1 case 3. remove both slot1/slot2 SIM case Hi Arthur: Please correct me if anything is wrong.
Flags: needinfo?(arthur.chen)
Comment 4•10 years ago
|
||
I think we can simply make emergency calls using the first sim slot without prompting anything to users.
Flags: needinfo?(arthur.chen)
Comment 5•10 years ago
|
||
Nominate this bug for v1.4 since the issue is critical and affect all DSDS phone including Flame.
blocking-b2g: --- → 1.4?
Updated•10 years ago
|
blocking-b2g: 1.4? → 1.4+
it block our PTR1 test of Dolphin,please help to fix it asap. Thanks!
it block our PTR1 test of Dolphin,please help to fix it asap. Thanks!
Comment 8•10 years ago
|
||
Hi, per discussion, the behaviour should be: Pre-condition: two SIMs inserted + always ask option 1. two SIM inserted: Pop up the SIM picker for dialing emergency calls. 2. remove 1 SIM: All the settings will be switched to the remain SIM. Hence, the emergency calls will be directly dialed via it (without ask). 3. remove both slot 0 and slot 1 case: Slot 0 is the default SIM for emergency calls. 4. Airplane mode: Slot 0 is the default SIM for emergency calls. Thanks!
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → drs+bugzilla
Status: NEW → ASSIGNED
Updated•10 years ago
|
Target Milestone: --- → 2.0 S3 (6june)
Assignee | ||
Comment 9•10 years ago
|
||
I believe this is a Gecko regression. I was able to repro this without calling an emergency number. I verified that we're passing |cardIndex| 0 here (which is as far as Gaia goes): https://github.com/mozilla-b2g/gaia/blob/v1.4/apps/communications/dialer/js/telephony_helper.js#L97 Despite the blocking flag, I don't think this is actually a v1.4 Gaia bug. I've verified this bug with the following: v1.4 Gaia, master Gecko master Gaia, master Gecko Hsin-Yi, can you take a look or point us to someone who can? Thanks.
Flags: needinfo?(htsai)
Comment 10•10 years ago
|
||
(In reply to Doug Sherk (:drs) from comment #9) > I believe this is a Gecko regression. I was able to repro this without > calling an emergency number. I verified that we're passing |cardIndex| 0 > here (which is as far as Gaia goes): > https://github.com/mozilla-b2g/gaia/blob/v1.4/apps/communications/dialer/js/ > telephony_helper.js#L97 > > Despite the blocking flag, I don't think this is actually a v1.4 Gaia bug. > I've verified this bug with the following: > > v1.4 Gaia, master Gecko > master Gaia, master Gecko > > Hsin-Yi, can you take a look or point us to someone who can? Thanks. Sure. I'll keep you posted.
Comment 11•10 years ago
|
||
(In reply to Carrie Wang [:carrie] from comment #8) > Hi, > per discussion, the behaviour should be: > > Pre-condition: > two SIMs inserted + always ask option > > 1. two SIM inserted: > Pop up the SIM picker for dialing emergency calls. > > 2. remove 1 SIM: > All the settings will be switched to the remain SIM. Hence, the emergency > calls will be directly dialed via it (without ask). > > 3. remove both slot 0 and slot 1 case: > Slot 0 is the default SIM for emergency calls. > > 4. Airplane mode: > Slot 0 is the default SIM for emergency calls. > 4. isn't true. Slot 0 isn't necessarily the default SIM in airplane mode. We should still check if there's a card inserted. If yes, use the specified default SIM. > Thanks!
Comment 12•10 years ago
|
||
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #11) > (In reply to Carrie Wang [:carrie] from comment #8) > > Hi, > > per discussion, the behaviour should be: > > > > Pre-condition: > > two SIMs inserted + always ask option > > > > 1. two SIM inserted: > > Pop up the SIM picker for dialing emergency calls. > > > > 2. remove 1 SIM: > > All the settings will be switched to the remain SIM. Hence, the emergency > > calls will be directly dialed via it (without ask). > > > > 3. remove both slot 0 and slot 1 case: > > Slot 0 is the default SIM for emergency calls. > > > > 4. Airplane mode: > > Slot 0 is the default SIM for emergency calls. > > > > 4. isn't true. Slot 0 isn't necessarily the default SIM in airplane mode. We > should still check if there's a card inserted. If yes, use the specified > default SIM. > This is the device implementation issue. But it looks the code [1] does the right way :) [1] https://github.com/mozilla-b2g/gaia/blob/v1.4/apps/communications/dialer/js/telephony_helper.js#L94 > > > Thanks!
Comment 13•10 years ago
|
||
(In reply to Doug Sherk (:drs) from comment #9) > I believe this is a Gecko regression. I was able to repro this without > calling an emergency number. I verified that we're passing |cardIndex| 0 > here (which is as far as Gaia goes): > https://github.com/mozilla-b2g/gaia/blob/v1.4/apps/communications/dialer/js/ > telephony_helper.js#L97 > > Despite the blocking flag, I don't think this is actually a v1.4 Gaia bug. > I've verified this bug with the following: > > v1.4 Gaia, master Gecko > master Gaia, master Gecko > > Hsin-Yi, can you take a look or point us to someone who can? Thanks. Hi Doug, I read through the whole comment and the STR, and don't know why you believe this is a gecko regression. Per STR in comment 0 and the attached screenshot.png, SIM picker is popped out even there's no sim card at all. And as there's no sim card, the selection menu is empty so that user has no way to make out a call. When I was reproducing the issue, [1] was not reached, and telephony.dial() API was never called, either. I tried to trace the gaia code but didn't get an idea why sim picker menu still shows up when there's no sim. Could you please check gaia part again? Also, if we don't follow STR, i.e. not choosing "ALWAYS ASK", before taking out the cards from the device, then I could successfully make out a call/emergency call when no cards inserted. Gecko works well. [1] https://github.com/mozilla-b2g/gaia/blob/v1.4/apps/communications/dialer/js/telephony_helper.js#L97
Flags: needinfo?(htsai) → needinfo?(drs+bugzilla)
Comment 14•10 years ago
|
||
Okay, I think I know where goes wrong. [1] checks if it hits the case of one sim card. However, if there's no card, [2] will still be reached out. We need to consider the case of no card individually. [1] https://github.com/mozilla-b2g/gaia/blob/v1.4/shared/js/multi_sim_action_button.js#L63 [2] https://github.com/mozilla-b2g/gaia/blob/v1.4/shared/js/multi_sim_action_button.js#L71
Assignee | ||
Comment 15•10 years ago
|
||
(In reply to Hsin-Yi Tsai (OOO 5/30 ~ 6/8) [:hsinyi] from comment #13) > Hi Doug, > > I read through the whole comment and the STR, and don't know why you believe > this is a gecko regression. > > Per STR in comment 0 and the attached screenshot.png, SIM picker is popped > out even there's no sim card at all. And as there's no sim card, the > selection menu is empty so that user has no way to make out a call. > > When I was reproducing the issue, [1] was not reached, and telephony.dial() > API was never called, either. I tried to trace the gaia code but didn't get > an idea why sim picker menu still shows up when there's no sim. Could you > please check gaia part again? > > Also, if we don't follow STR, i.e. not choosing "ALWAYS ASK", before taking > out the cards from the device, then I could successfully make out a > call/emergency call when no cards inserted. Gecko works well. > > [1] > https://github.com/mozilla-b2g/gaia/blob/v1.4/apps/communications/dialer/js/ > telephony_helper.js#L97 Thanks for looking into this. It's possible that the issue I was reproing was something different (since I used different STR), and I assumed that they had the same root cause. Your analysis makes sense for the emergency call case. I'm going to look more into the other issue I was reproing.
Assignee | ||
Comment 16•10 years ago
|
||
(In reply to Hsin-Yi Tsai (OOO 5/30 ~ 6/8) [:hsinyi] from comment #14) > Okay, I think I know where goes wrong. > > [1] checks if it hits the case of one sim card. However, if there's no card, > [2] will still be reached out. We need to consider the case of no card > individually. > > [1] > https://github.com/mozilla-b2g/gaia/blob/v1.4/shared/js/ > multi_sim_action_button.js#L63 > [2] > https://github.com/mozilla-b2g/gaia/blob/v1.4/shared/js/ > multi_sim_action_button.js#L71 Sorry for wasting your time Hsin-Yi, I completely messed up on this and in my head I was merging this issue with bug 1008974. There's actually nothing in common between them. :) PR: https://github.com/mozilla-b2g/gaia/pull/19727
Attachment #8430064 -
Flags: review?(anthony)
Flags: needinfo?(drs+bugzilla)
Comment 17•10 years ago
|
||
(In reply to Doug Sherk (:drs) from comment #16) > Created attachment 8430064 [details] [diff] [review] > Fix emergency calls with no SIM card. > > (In reply to Hsin-Yi Tsai (OOO 5/30 ~ 6/8) [:hsinyi] from comment #14) > > Okay, I think I know where goes wrong. > > > > [1] checks if it hits the case of one sim card. However, if there's no card, > > [2] will still be reached out. We need to consider the case of no card > > individually. > > > > [1] > > https://github.com/mozilla-b2g/gaia/blob/v1.4/shared/js/ > > multi_sim_action_button.js#L63 > > [2] > > https://github.com/mozilla-b2g/gaia/blob/v1.4/shared/js/ > > multi_sim_action_button.js#L71 > > Sorry for wasting your time Hsin-Yi, No problem! Glad that we got the root cause eventually :) > I completely messed up on this and in > my head I was merging this issue with bug 1008974. There's actually nothing > in common between them. :) > > PR: https://github.com/mozilla-b2g/gaia/pull/19727
Comment 18•10 years ago
|
||
Comment on attachment 8430064 [details] [diff] [review] Fix emergency calls with no SIM card. Review of attachment 8430064 [details] [diff] [review]: ----------------------------------------------------------------- ::: shared/js/multi_sim_action_button.js @@ +60,5 @@ > return; > } > > + if (navigator.mozIccManager.iccIds.length <= 1) { > + this.performAction(0); Hi, sorry to jump in. This line isn't right. iccIds index isn't the same as 'cardIndex' we require for dialing a call. We should rely on the index of mobileConnections, where the corresponding element detects a card. Sorry that the API isn't clear enough :(
Updated•10 years ago
|
status-b2g-v1.4:
--- → affected
Assignee | ||
Comment 19•10 years ago
|
||
(In reply to Hsin-Yi Tsai (OOO 5/30 ~ 6/8) [:hsinyi] from comment #18) > Hi, sorry to jump in. > This line isn't right. iccIds index isn't the same as 'cardIndex' we require > for dialing a call. We should rely on the index of mobileConnections, where > the corresponding element detects a card. Sorry that the API isn't clear > enough :( Thanks! Does this fix look reasonable to you then? https://github.com/DouglasSherk/gaia/commit/7016117318ad5795f3bee4fa3a8e48db74698b0e#diff-f9110901d30ac29f4ff93925255d9a5eR63
Attachment #8430064 -
Attachment is obsolete: true
Attachment #8430064 -
Flags: review?(anthony)
Attachment #8433039 -
Flags: review?(anthony)
Flags: needinfo?(htsai)
Updated•10 years ago
|
Whiteboard: [Dolphin_1.4][sprd 304991] → [partner-blocker][Dolphin_1.4][sprd 304991]
Comment 20•10 years ago
|
||
Comment on attachment 8433039 [details] [diff] [review] Fix emergency calls with no SIM card. Review of attachment 8433039 [details] [diff] [review]: ----------------------------------------------------------------- Sorry for the slow review, this patch needs rebasing because of that. Please send me an email when you put it in review again so I can put it on top of my todo list.
Attachment #8433039 -
Flags: review?(anthony)
Assignee | ||
Comment 21•10 years ago
|
||
Rebased, updated PR.
Attachment #8433039 -
Attachment is obsolete: true
Attachment #8436527 -
Flags: review?(anthony)
Comment 23•10 years ago
|
||
Comment on attachment 8436527 [details] [diff] [review] Fix emergency calls with no SIM card. Review of attachment 8436527 [details] [diff] [review]: ----------------------------------------------------------------- This is a bit complicated for what we want here. The for loop you're doing to find out which SIM card is inserted is already handled by some code in the system app that sets the preferred card. Therefore, I think the code should read like this: var cardIndex = getCardIndex() if (navigator.mozIccManager.iccIds.length === 0) { performAction(0) } // we don't care, the call will go through if it's an emergency number (that fixes this bug) if (cardIndex == ALWAYS_ASK) { displaySimPicker() } else { performAction(cardIndex) } // this fixes bug 1019488 ::: apps/communications/dialer/test/unit/multi_sim_action_button_test.js @@ +158,5 @@ > > + test('should use first SIM slot (which is empty)', shouldUsePrimarySimCard); > + }); > + > + suite('1 SIM', function() { To test both slot 0 and 1, can you wrap this in a [0, 1].forEach() ? Like at https://github.com/mozilla-b2g/gaia/blob/86da626923719d6550b4e0fccc67af27f96a02e4/apps/communications/dialer/test/unit/call_log_test.js#L807-L831
Attachment #8436527 -
Flags: review?(anthony) → review-
Updated•10 years ago
|
Target Milestone: 2.0 S3 (6june) → 2.0 S4 (20june)
Assignee | ||
Comment 24•10 years ago
|
||
Addressed review comments, updated PR. You're right that it was overly complicated. I'm not sure why we ever special cased the length === 1 situation to begin with.
Attachment #8436527 -
Attachment is obsolete: true
Attachment #8437152 -
Flags: review?(anthony)
Updated•10 years ago
|
Comment 25•10 years ago
|
||
Comment on attachment 8437152 [details] [diff] [review] Fix emergency calls with no SIM card. Review of attachment 8437152 [details] [diff] [review]: ----------------------------------------------------------------- If I disable the code in the if (0) branch, the tests are not failing. Also, you can probably remove all the mozMobileConnections setup in the tests since we're not using this API anymore.
Attachment #8437152 -
Flags: review?(anthony) → review-
Assignee | ||
Comment 26•10 years ago
|
||
Updated PR. The 0 SIM test in this now fails if you disable the SIMs.length === 0 check in MSAB.
Attachment #8437152 -
Attachment is obsolete: true
Attachment #8437979 -
Flags: review?(anthony)
Comment 27•10 years ago
|
||
Comment on attachment 8437979 [details]
Fix emergency calls with no SIM card.
Just a tiny title change for readability.
Attachment #8437979 -
Flags: review?(anthony) → review+
Assignee | ||
Comment 28•10 years ago
|
||
master: https://github.com/mozilla-b2g/gaia/commit/61b732ecd5b4682f22ab6aeb5311c2f6e026a084 v2.0: https://github.com/mozilla-b2g/gaia/commit/3503185c6829ac89d114b6c652691bfaac1163f8 v1.4: https://github.com/mozilla-b2g/gaia/commit/9379ddab393eb09cb175cd9418f58b76b9951842
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•10 years ago
|
Comment 29•10 years ago
|
||
This issue has been verified successfully on Flame2.0&2.1. Reproducing rate: 0/5 See attachment: Verify_Flame_ECC.mp4 Flame2.0 build version: Gaia-Rev 8d1e868864c8a8f1e037685f0656d1da70d08c06 Gecko-Rev https://hg.mozilla.org/releases/mozilla-b2g32_v2_0/rev/c756bd8bf3c3 Build-ID 20141201000201 Version 32.0 Flame2.1 build version: Gaia-Rev ccb49abe412c978a4045f0c75abff534372716c4 Gecko-Rev https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/18fb67530b22 Build-ID 20141201001201 Version 34.0
Comment 30•10 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•