Closed Bug 877847 Opened 11 years ago Closed 7 years ago

Removing SIM does not clear navigator.mozMobileConnection.lastKnownHomeNetwork

Categories

(Firefox OS Graveyard :: RIL, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:-)

RESOLVED WONTFIX
blocking-b2g -

People

(Reporter: cvan, Unassigned)

Details

1. Put a T-Mobile US SIM in your phone. 2. `navigator.mozMobileConnection.lastKnownHomeNetwork` reports '310-260'. 3. Remove your SIM from your phone. 4. `navigator.mozMobileConnection.lastKnownHomeNetwork` still reports '310-260'. Opening up the Marketplace for example, you can still see we're getting the old value: E/GeckoConsole( 724): Content JS LOG at https://marketplace.cdn.mozilla.net/media/fireplace/js/include.js?b=aaab37b:1 in anonymous: [user] MCC = 310, MNC = 260 I know that the name `lastKnownHomeNetwork` is accurate; it is the "last known network" I was connected to. But removing the SIM should probably clear this value IMO. Or at least we should have some other value such as `currentHomeNetwork` to tell us what's the current network.
Component: Gaia → DOM: Device Interfaces
Product: Boot2Gecko → Core
Version: unspecified → Trunk
Assignee: nobody → echen
The 'lastKnownHomeNetwork' means the *last known* network device belongs to. So I think we should not clear this value after removing the SIM. Is there any use case needs to know the 'currentHomeNetwork'?
Flags: needinfo?(cvan)
If I remove my Polish T-Mobile SIM card, I should not still see apps that are specific to T-Mobile in Poland. This means users will see operator shelves even after removing their SIM cards. Clouserw, anything else to add?
Flags: needinfo?(cvan) → needinfo?(clouserw)
There are current network information in mozMobileConnection, but application needs having 'mobileconnection' permission to access. * navigator.mozMobileConneciton.voice.network.mcc * navigator.mozMobileConnection.voice.network.mnc I think Marketplace application does have 'mobileconnection' permission, right? According to bug 866272 comment #43, Jonas suggest to have a separate API, instead of a readonly mode. So If we really needs 'currentNetwork', maybe we should expose this on a separate API.
(In reply to Edgar Chen [:edgar][:echen] from comment #3) > There are current network information in mozMobileConnection, but > application needs having 'mobileconnection' permission to access. > * navigator.mozMobileConneciton.voice.network.mcc > * navigator.mozMobileConnection.voice.network.mnc > > I think Marketplace application does have 'mobileconnection' permission, > right? Yes. > According to bug 866272 comment #43, Jonas suggest to have a separate API, > instead of a readonly mode. > So If we really needs 'currentNetwork', maybe we should expose this on a > separate API. That sounds completely fine - is there a bug on file for that? Whatever needs to be done to give us back the currently active MCC/MNC pair is what the Marketplace needs. Many thanks for your help!
Flags: needinfo?(clouserw)
Yes, I'd be in favor of moving this to an API separate from .mobileconnection. But I think that's orthogonal to this bug. But if you want to fix both problems at once then I'm of course fine with that :)
Component: DOM: Device Interfaces → RIL
Product: Core → Firefox OS
Version: Trunk → unspecified
Move it to backlog.
blocking-b2g: --- → backlog
blocking-b2g: backlog → -
Unassigning myself as I am no longer working on this.
Assignee: echen → nobody
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.