Closed Bug 944234 Opened 6 years ago Closed 6 years ago

[Fugu] [B2G] The cardState of second sim card is always 'unknown'

Categories

(Firefox OS Graveyard :: RIL, defect)

x86_64
Linux
defect
Not set

Tracking

(blocking-b2g:1.3+, firefox28 fixed, b2g-v1.3 fixed)

RESOLVED FIXED
1.3 Sprint 6 - 12/6
blocking-b2g 1.3+
Tracking Status
firefox28 --- fixed
b2g-v1.3 --- fixed

People

(Reporter: edgar, Assigned: edgar)

Details

Attachments

(2 files)

Attached file logcat.txt
Put two sim card into fugu device, the cardState of second sim card is always 'unknown'.
Summary: [Fugu] [B2G] ardState of second sim card always returns 'unknown' → [Fugu] [B2G] The cardState of second sim card is always 'unknown'
Quick checking the log:

*First sim:
11-28 11:47:20.150   106   106 I Gecko   : -*- RadioInterface[0]: Received message from worker: {"rilMessageType":"cardstatechange","cardState":"ready"}
11-28 11:47:24.520   106   106 I Gecko   : -*- RILContentHelper: Received message 'RIL:CardStateChanged': {"clientId":0,"data":{"rilMessageType":"cardstatechange","cardState":"ready"}}

*Second sim:
11-28 11:47:19.990   106   106 I Gecko   : -*- RadioInterface[1]: Received message from worker: {"rilMessageType":"cardstatechange","cardState":"pukRequired"}
// But the RILContentHelper did not get the RIL:CardStateChange IPC message for second sim card.
Assignee: nobody → echen
=====
// got the cardState change for both two sim
11-28 11:47:19.990   106   106 I Gecko   : -*- RadioInterface[1]: Received message from worker: {"rilMessageType":"cardstatechange","cardState":"pukRequired"}
11-28 11:47:20.150   106   106 I Gecko   : -*- RadioInterface[0]: Received message from worker: {"rilMessageType":"cardstatechange","cardState":"ready"}

// got system-message-listener-read event
11-28 11:47:23.920   106   106 I GeckoDump: XXX FIXME : Got a mozContentEvent: system-message-listener-ready
====

Gecko got the cardState change for both two sim before system-message-listener is ready. In this case, |gMessageManager| will queue these events first and resent it after got system-message-listener-ready. But if the there two events with same message name, |gMessageManager| will only keep the new one and drop the old one [1].

So in this case the cardStateChange of second sim is dropped by |gMessageManager|. 

[1] http://dxr.mozilla.org/mozilla-central/source/dom/system/gonk/RadioInterfaceLayer.js?from=RadioInterfaceLayer.js#305
Attached patch Patch, v1Splinter Review
We need to take clinet id into account, same message type with different client id should be treated as a different message.
Attachment #8340178 - Flags: review?(htsai)
Comment on attachment 8340178 [details] [diff] [review]
Patch, v1

Review of attachment 8340178 [details] [diff] [review]:
-----------------------------------------------------------------

Thank you!
Attachment #8340178 - Flags: review?(htsai) → review+
blocking-b2g: --- → 1.3?
Target Milestone: --- → 1.3 Sprint 6 - 12/6
https://hg.mozilla.org/mozilla-central/rev/7763ec5989d2
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Seems like this is a blocker for multi-SIM support.
blocking-b2g: 1.3? → 1.3+
You need to log in before you can comment on or make changes to this bug.