Closed Bug 835350 Opened 12 years ago Closed 12 years ago

Bookmarks customization depending on MCC SIM card

Categories

(Firefox OS Graveyard :: Gaia::Browser, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:tef+, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 fixed)

RESOLVED FIXED
blocking-b2g tef+
Tracking Status
b2g18 --- fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- fixed

People

(Reporter: dpalomino, Assigned: gasolin)

References

Details

(Whiteboard: QARegressExclude)

Attachments

(1 file)

Hi, As part of the carrier personalization, the population of the predefined bookmarks for each carrier is one of the most important points. This could be done depending on MCC country code of SIM card. For instance, included in the FTE, based on the SIM card inserted in that moment, the bookmarks could be customized (usually up to ten bookmarks are required). Thanks, David
I would recommend this be customised for each device in each market before shipping, not based on what SIM card happens to be present when the phone is first launched.
Hi Ben, This issue comes from the need about having a single variant version for several carriers in LatAm, so it's not possible to do it through customization for each market, as this market will involved several carriers. The only possibility I think is to implement it based on SIM MCC detection. This issue is critical for getting a single variant version (mandatory requirement for latam countries). Nominating for tef+. Thanks, David
blocking-b2g: --- → tef?
This feels like a late feature request which puts v1 timelines at risk. That being said, having a single variant version is a product goal. Input from product people would be greatly appreciated.
Flags: needinfo?(ffos-product)
Once again we could do a build-time customization, but its too late for such features for 1.0.0 (unless we want to slip the schedule). I would recommend filing a separate bug for the build time work so we don't lose track of feature for future versions.
blocking-b2g: tef? → -
(In reply to Lucas Adamski from comment #4) > Once again we could do a build-time customization, but its too late for such > features for 1.0.0 (unless we want to slip the schedule). I would recommend > filing a separate bug for the build time work so we don't lose track of > feature for future versions. I think the build time option is already implemented. Based on the target countries for v1.0.0 I think this is no needed for 1.0.0 but for 1.1. Nominating hence for leo.
blocking-b2g: - → leo?
Agreed that, while a nice to have, it's too late to include in 1.0.1. I agree with comment #0 that this is something that'd be good to have as part of the customization framework, and we should look at fitting it into that in a follow-on release.
Flags: needinfo?(ffos-product)
blocking-b2g: leo? → leo+
At this time, customized bookmark is written into bookmark.app in build stage. If we want runtime customization by MCC: 1. FTU app can't overwrite customized bookmark to bookmark.app. Since we can't edit bookmark outside of bookmark app. 2. Bookmark.app did not have permission to get MCC information. If browser has that permission, we can do the customization when first time use browser. We can write multiple bookmark definition files into any app in build time, but need to find some way to customize them in runtime.
Hi Fred, Can you please take this one?
Assignee: nobody → gasolin
OS: Windows 7 → Gonk (Firefox OS)
Hardware: x86_64 → ARM
If I take this, my approach will be: 1. store multiple browser-[mcc].json to browser.app 2. add MCC permission to browser 3. when browser first start, do the following operations: 3.1 check the MCC permission 3.2 if no such MCC, fail back to default bookmarks 3.3 else will write correspondent bookmarks into default bookmark
Assignee: gasolin → nobody
Assignee: nobody → gasolin
(In reply to Fred Lin [:gasolin] from comment #9) > If I take this, my approach will be: > > 1. store multiple browser-[mcc].json to browser.app > 2. add MCC permission to browser > 3. when browser first start, do the following operations: > 3.1 check the MCC permission > 3.2 if no such MCC, fail back to default bookmarks > 3.3 else will write correspondent bookmarks into default bookmark I've discussed this with Fred and it looks like it's the only way. But this is really ugly so I would like to have owners' blessing before proceed. There will be security impact too. Browser app will need |mobileconnection| permission to do this task.
Flags: needinfo?(bfrancis)
Flags: needinfo?(21)
To solve this issue gracefully. We might have to provide some features like android's Content Provider, which can let App expose some data APIs(bookmark, contact, calendar..) for other app. But since now we can't edit bookmark outside of bookmark app, the only way we can do customization in run-time is apply them on each apps...
We should consider the MCC/MNC pair as opposed to just the MCC to allow more flexibility if needed. Please comment if any one has any concerns?
(In reply to Tim Guan-tin Chien [:timdream] (MoCo-TPE) from comment #10) > (In reply to Fred Lin [:gasolin] from comment #9) > > If I take this, my approach will be: > > > > 1. store multiple browser-[mcc].json to browser.app > > 2. add MCC permission to browser > > 3. when browser first start, do the following operations: > > 3.1 check the MCC permission > > 3.2 if no such MCC, fail back to default bookmarks > > 3.3 else will write correspondent bookmarks into default bookmark > > I've discussed this with Fred and it looks like it's the only way. But this > is really ugly so I would like to have owners' blessing before proceed. > > There will be security impact too. Browser app will need |mobileconnection| > permission to do this task. The approach we follow for handling the APN settings works nice IMHO. The APN settings for all carriers all over the world live in the apn.json file and we check out the ones corresponding with the pair MCC MNC codes (in the ICC card) on boot. Then those settings are stored in the setting database and apps use them as needed. The code lives at [1]. [1] https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/operator_variant/operator_variant.js
(In reply to Tim Guan-tin Chien [:timdream] (MoCo-TPE) from comment #10) > There will be security impact too. Browser app will need |mobileconnection| > permission to do this task. I would strongly oppose giving the browser app the mobileconnection permission just for a one-time customisation. The browser app should definitely not be able to lock the SIM card, change or disable the pin number at any time. Perhaps I don't understand the requirement here, but if it's only the country code that's needed, could this not be taken from the current locale setting at runtime? If the MNC is also required then perhaps the approach José describes could work. Unfortunately I believe the browser app (along with all apps) already requires the settings permission so this would at least not make the security situation any worse than it already is.
Flags: needinfo?(bfrancis)
Thanks for feedback! I'll try José's suggestion without adding mobileconnection permission.
Made a candidate pull request https://github.com/mozilla-b2g/gaia/pull/8606 Using José's suggestion without adding mobileconnection permission. I found after 'reset-gaia' then open browser.app immediately, there's a high chance to get default mcc/mnc settings as 0. but navigator.mozMobileConnection.iccInfo.mcc/mnc can always get the correct value. Any idea?
Flags: needinfo?(josea.olivera)
Flags: needinfo?(bfrancis)
(In reply to Fred Lin [:gasolin] from comment #16) > Made a candidate pull request https://github.com/mozilla-b2g/gaia/pull/8606 > > Using José's suggestion without adding mobileconnection permission. > > > I found after 'reset-gaia' then open browser.app immediately, there's a high > chance to get default mcc/mnc settings as 0. This is because the values stored for the keys `operatorvariant.m{c, n}c` are reset as well and the operator-variant logic takes some time before saving the values for those keys after reading the one coming from the SIM through mozMobileConnection API. > > but navigator.mozMobileConnection.iccInfo.mcc/mnc can always get the correct > value. > > Any idea? I don't see what's the reason why not using mozMobileConnection API in the browser app. Anyway you could set an observer for the keys `operatorvariant.m{c, n}c` and set the bookmarks once they have changed.
Flags: needinfo?(josea.olivera)
As Wayne suggests, let's do what José proposed here. As, -- Users don't reset-gaia every day. -- Users will be blocked in FTU for something before he could launch Browser app, and Browser app will only read MCC/MNC when that happens. I'll leave the needinfo for Ben to confirm this suggestion.
It seems fine to me to read the MCC/MNC values via the settings API and set the bookmarks accordingly the first time the browser is run. That makes much more sense than adding the mobileconnection permission to every app that needs this information, thereby increasing the attack surface of those apps unnecessarily. Perhaps this is common practice, but it seems like an odd way to apply customisations to me. If the user boots their new phone for the first time before putting the SIM card in first presumably they get some generic bookmarks?
Flags: needinfo?(bfrancis)
Thank for comment! I'll send review request first for 3/15, but put needinfo from wayne chang. Wayne, is ben's concern an expected case, or should we take any action for this case: When applied customization, If the user boots their new phone for the first time before putting the SIM card in first. The user get default bookmarks (also from customization, not the gaia default bookmarks) instead of customized (binding with specific MCC/MNC) one?
Attachment #725406 - Flags: review?(bfrancis)
Flags: needinfo?(wchang)
To avoid further scope creep I would recommend to use Fred's last suggestion for now, as this is part of the FTE scenario: If the user boots their new phone for the first time before putting the SIM card in first. The user get default bookmarks (also from customization, not the gaia default bookmarks) instead of customized (binding with specific MCC/MNC) one. It should also include non-matching MCC/MNC SIMs. Adding Kevin, we will be discussing separately to explore further customization scenarios and requirements.
Flags: needinfo?(wchang)
(In reply to Kev Needham [:kev] from comment #6) > Agreed that, while a nice to have, it's too late to include in 1.0.1. I > agree with comment #0 that this is something that'd be good to have as part > of the customization framework, and we should look at fitting it into that > in a follow-on release. In this case, which version of Firefox OS needs to have this feature request? Does product management team agree to put it in v1.1.0? Or later version? It looks like the scope of v1.1.0 is getting bigger and bigger. Thanks.
Comment on attachment 725406 [details] get MCC/MNC from settings.app to customize bookmark in first time use Thanks Fred
Attachment #725406 - Flags: review?(bfrancis) → review+
merged to master-gaia https://github.com/mozilla-b2g/gaia/commit/72bba6330849f93e55fcddc8be73edda72fb3c9b With working on these issues I really feel got level up(of my FxOS knowledge), Thanks!
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: needinfo?(21)
Resolution: --- → FIXED
Added a section on B2G/MarketCustomizations wiki for Runtime customization. To explain how to do Bookmarks customization depending on SIM card MCC/MNC https://wiki.mozilla.org/B2G/MarketCustomizations#Runtime_Customization
Uplifted commit 72bba6330849f93e55fcddc8be73edda72fb3c9b as: v1-train: c746882f63fb46b9512c62d157b514ded06258bb
Is it possible to get test cases here in MozTrap for this?
Flags: in-moztrap?(nhirata.bugzilla)
test case #6887 created. Sorry, didn't realize there was stuff outside the excel spreadsheet
Flags: in-moztrap?(nhirata.bugzilla) → in-moztrap+
Fred, can I get a customized sample zip file? The one on the wiki : https://wiki.mozilla.org/B2G/MarketCustomizations#Runtime_Customization doesn't seem to uncompress for me. This is for QA verification.
Flags: needinfo?(gasolin)
work for me, but we should put it to github, then you can download it as zip file.
merged the patch for new bookmark customize sample and updated wiki
Flags: needinfo?(gasolin)
Blocks: 861052
blocking-b2g: leo+ → tef+
Hi John, Please uplift this patch to v1.0.1 to solve bug 861052. commit# 72bba6330849f93e55fcddc8be73edda72fb3c9b
Flags: needinfo?(jhford)
v1.0.1: 0852fcbfc33495a35f122796dfd25ba86f11ffe5
Flags: needinfo?(jhford)
Unable to test this bug on our end. Marking as QARegressExclude.
Whiteboard: QARegressExclude
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: