[Messages] SIM identifier is displayed inside messages and notifications even if only one SIM inserted

RESOLVED FIXED in 2.2 S3 (9jan)

Status

defect
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: azasypkin, Assigned: hsinyi)

Tracking

({regression})

unspecified
2.2 S3 (9jan)
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(blocking-b2g:2.2+, b2g-v2.2 fixed)

Details

Attachments

(1 attachment)

STR:

* Have dual-sim device with only one SIM inserted.

* Send message to any number and once message is sent observe message bubble - SIM identifier is displayed inside message bubble;

OR

* Receive any message and observe notification - notification contains SIM identifier.

Tested on Flame and the latest PVT central build. 

It's not reproduced on week-old PVT build (eg. 2014-12-23-01-02-02).
Hey Hsin-Yi,

Could you please help us to understand the following issue?

To decide if need to display SIM information in SMS app we iterate through "navigator.mozMobileConnections", and check "iccId" property of every connection and if it's not null then we consider it as an active connection/SIM.

Previously if we had only one SIM inserted then "iccId" for another connection was equal to null (eg. in week-old build 2014-12-23-01-02-02), on the most recent builds "iccId" for such connection is empty string.

So should we change our logic to filter out connections with empty and null iccId or Gecko should return to null value for non-active connection?

Thanks!
Flags: needinfo?(htsai)
Also note that other gaia apps use navigator.mozIccManager, I don't know how it behaves now.
(In reply to Julien Wajsberg [:julienw] (PTO 12/25 -> 12/29) from comment #2)
> Also note that other gaia apps use navigator.mozIccManager, I don't know how
> it behaves now.

Yeah, thanks for the note, mozIccManager works correctly now - "mozIccManager.iccIds" contains only one entry. Maybe it's more appropriate for our use case?

Anyway it'd be better to know what happened to mozMobileConnection.iccId :)
(Assignee)

Comment 4

4 years ago
(In reply to Oleg Zasypkin [:azasypkin] from comment #3)
> (In reply to Julien Wajsberg [:julienw] (PTO 12/25 -> 12/29) from comment #2)
> > Also note that other gaia apps use navigator.mozIccManager, I don't know how
> > it behaves now.
> 
> Yeah, thanks for the note, mozIccManager works correctly now -
> "mozIccManager.iccIds" contains only one entry. Maybe it's more appropriate
> for our use case?
> 
> Anyway it'd be better to know what happened to mozMobileConnection.iccId :)

Hi Oleg,
mozMobileConnection.iccId should be "null" instead of an empty string in this case. I seem know what's going on there. But let me investigate more and confirm. Will keep you updated!
(Assignee)

Comment 5

4 years ago
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #4)
> (In reply to Oleg Zasypkin [:azasypkin] from comment #3)
> > (In reply to Julien Wajsberg [:julienw] (PTO 12/25 -> 12/29) from comment #2)
> > > Also note that other gaia apps use navigator.mozIccManager, I don't know how
> > > it behaves now.
> > 
> > Yeah, thanks for the note, mozIccManager works correctly now -
> > "mozIccManager.iccIds" contains only one entry. Maybe it's more appropriate
> > for our use case?
> > 
> > Anyway it'd be better to know what happened to mozMobileConnection.iccId :)
> 
> Hi Oleg,
> mozMobileConnection.iccId should be "null" instead of an empty string in
> this case. I seem know what's going on there. But let me investigate more
> and confirm. Will keep you updated!

It's caused by Bug 1087847 that accidentally set 'empty string' as default.
Component: Gaia::SMS → RIL
Flags: needinfo?(htsai)
(Assignee)

Comment 6

4 years ago
Posted patch 1116431.patchSplinter Review
(Assignee)

Comment 7

4 years ago
Comment on attachment 8542860 [details] [diff] [review]
1116431.patch

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

Hi Edgar,

Bug 1087847 accidentally set 'empty string' as default of mIccId that changes the API behaviour, because per design, mIccId should be null, not empty string, when there's no sim.
We don't have problems if sim card becomes undetected during device run-time, because our code will |.SetIsVoid(true)| in this case. So the fix is easy that we simply change default value to null.

Mind taking a look? Thank you!
Attachment #8542860 - Flags: review?(echen)

Updated

4 years ago
Blocks: 1087847
Comment on attachment 8542860 [details] [diff] [review]
1116431.patch

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

Good catch!!! Thank you.
Attachment #8542860 - Flags: review?(echen) → review+
(Assignee)

Comment 9

4 years ago
https://tbpl.mozilla.org/?tree=Try&rev=9b81fb77240f try green! going to land this.
triage: this is a regression causing unexpected user flow. it shouldn't display the identifier under single-sim case.
blocking-b2g: 2.2? → 2.2+
https://hg.mozilla.org/mozilla-central/rev/bed9ea907821
Assignee: nobody → htsai
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Duplicate of this bug: 1117999
Target Milestone: --- → 2.2 S3 (9jan)
You need to log in before you can comment on or make changes to this bug.