Closed Bug 888821 Opened 6 years ago Closed 6 years ago

B2G MMS: UA profile configuration based on MNC and MCC.


(Core :: DOM: Device Interfaces, defect, P2, major)

Gonk (Firefox OS)



1.1 QE4 (15jul)
blocking-b2g leo+
Tracking Status
firefox23 --- wontfix
firefox24 --- wontfix
firefox25 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- wontfix
b2g-v1.1hd --- fixed


(Reporter: leo.bugzilla.gaia, Assigned: johnhu)



(Whiteboard: [u=commsapps-user c=messaging p=0][fixed-in-birch])


(2 files, 5 obsolete files)

1. Title: UA profile configuration based on MNC and MCC
2. Precondition: MMS feature enabled on FFOS device
3. Detailed Symptom (ENG.) : When we receive an MMS,there is an URL send to server which contains all the information about the MIME types supported.
In APN,we have set the maximum size for an MMS when sending based on the operator,even at the receiving side we need to have this configurations enabled based on the operator.
blocking-b2g: --- → leo+
Target Milestone: --- → 1.1 QE4 (15jul)
The implementation of the UA profile configuration based on MNC and MCC is discussed with Corey in Taiwan workweek
Priority: -- → P2
Assignee: nobody → gnarf37
Whiteboard: [u=commsapps-user c=messaging p=0]
Sounds like we can handle this kind of configuration on the Gaia end. Maybe apn.json? I guess.
No longer blocks: b2g-mms
So, the only thing that will be different about the UA profile per provider is the max size yeah?

Perhaps we should just have a list of profiles that are based on the max size we already setup in the apn.json?



Is it possible to have this be generated by the server?

Flags: needinfo?(leo.bugzilla.gaia)
Flags: in-moztrap?
Hello Corey,

From MMS application point of view, the only difference in UA profile is the Maximum size. Your suggestion on server generating is interesting, however this is not the case. Based on the configuration the client should pick one of these profiles and place it part of the GET request.
Flags: needinfo?(leo.bugzilla.gaia)
Okay, since the UA profile is sent inside the gecko code, this is something for one of those engineers I think.  We will need a list of the correct URLs.  ctai, gene, is this for one of you?
Assignee: gnarf37 → nobody
Flags: needinfo?(gene.lian)
Flags: needinfo?(ctai)
Because UAProf is device dependent one, I don't suggest use a URLs in here. Those correct URL should be put in customized file. Per talk with Leo guys, my suggestion is below.
We will get the max size of MMS from apn.json. For example, we have wap.UAProf.url.300, wap.UAProf.url.500, wap.UAProf.url.600, wap.UAProf.url.default in b2g.js or user.js. In user.js, it will be a correct url defined by device maker. The Gecko will read the UAProf url by combine the max_size with UAProf. If the max size is 500, Gecko will get the preference "wap.UAProf.url.500". If this preference is not defined, we will use wap.UAProf.url.default.
Flags: needinfo?(gene.lian)
Flags: needinfo?(ctai)
Please verify changes done for UAProfile configuration based on MNC&MCC and provide comments.
Please check the changes done for UAProfile configuration based on MNC&MCC and provide comments.
Attachment #774444 - Attachment is obsolete: true
Comment on attachment 774476 [details]
Patch for UAProfile based on MNC and MCC

Please ignore the attachments
Attachment #774476 - Attachment is obsolete: true
Attachment #774476 - Attachment is patch: false
Assignee: nobody → ctai
Component: Gaia::SMS → DOM: Device Interfaces
Product: Boot2Gecko → Core
Summary: [MMS] UA profile configuration based on MNC and MCC → B2G MMS: UA profile configuration based on the max size defined in MNC and MCC.
Comment on attachment 776249 [details] [diff] [review]

Review of attachment 776249 [details] [diff] [review]:

The only thing we should do in this bug, is expose both "wap.UAProf.url" and "wap.UAProf.tagname" as new Settings entries.  Please do not build "policy" into Gecko.
Attachment #776249 - Flags: review?(vyang)
Summary: B2G MMS: UA profile configuration based on the max size defined in MNC and MCC. → B2G MMS: UA profile configuration based on MNC and MCC.
Attached patch Patch v1.0 (obsolete) — Splinter Review
Attachment #776249 - Attachment is obsolete: true
Per talk with Vicamo, Steve and LEO guys, we decide to do below method for this bug.
We only expose "wap.UAProf.url" and "wap.UAProf.tagname" as new Settings entries in Gecko part.
We will provide a field "UAProf" in apn.json for different MCC, MNC in Gaia part.
We will left empty by default. Device maker can override those values if necessary.
We need to provide a variable for the default value in Gaia part about the UAProf.url if the values is not presented.
Comment on attachment 776911 [details] [diff] [review]
Patch v1.0

Review of attachment 776911 [details] [diff] [review]:

Please also rewrite the commit summary to something more accurate.
Attachment #776911 - Flags: review?(vyang) → review+
Attached patch Patch v1.1Splinter Review
Attachment #776911 - Attachment is obsolete: true
Attachment #776935 - Attachment description: Patch v1.1 → b2g18-Patch v1.1
Comment on attachment 776935 [details] [diff] [review]
b2g18-Patch v1.1

We don't need a b2g18-sepcificed patch.
Attachment #776935 - Attachment is obsolete: true
Keywords: checkin-needed
Whiteboard: [u=commsapps-user c=messaging p=0] → [u=commsapps-user c=messaging p=0][leave open][fixed-in-birch]
Geko's part is done. Re-assign to Steve Chung. He will take care Gaia's part.
Assignee: ctai → schung
Assignee: schung → johu
We will use build customization mechanism for device maker to create its owned configuration. The mechanism is based on this page: It will be the second app using Runtime Customization which means it changes wap.UAProf.url when mcc/mnc is changed.

The customization file name will be "wapuaprof.json". The file structure is similar to browser, linked with mcc and mnc with zero padding, like:
     "000000": {
       "url": "http://example.url/file.xml"
     "123001": {
       "url": "http://example.url/file.xml"

If "000000" is used, that will be the default value. So, when we can't find the customized record based on mcc/mnc, we use this value as the default value. Otherwise, we use "undefined" as the default value.

After discussing with Chai-hung, the implementation will only support url. When tagname is needed to expose to device maker, we will open another bug to add it.
Attached file patch for gaia part
1. add wapuaprof.json file to application_data.js
2. add the code to handling WAP UA profile url settings in operator_variant.js
3. add apps/system/resources/wapuaprof.json to ignore list

The implementation is based on the statements of last comment.
Attachment #777021 - Flags: review?(arthur.chen)
I will change the wiki page of when this patch is r+ and before landing.
Comment on attachment 777021 [details]
patch for gaia part

Nice work, John! r=me.
Attachment #777021 - Flags: review?(arthur.chen) → review+
merged to master:
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [u=commsapps-user c=messaging p=0][leave open][fixed-in-birch] → [u=commsapps-user c=messaging p=0][fixed-in-birch]

Leaving status-b2g18 set to affected until the Gaia patch in comment 25 is uplifted to v1-train.
Flags: needinfo?(jhford)
There is a merge conflict on v1-train in

Flags: needinfo?(jhford)

John, can you please assist with resolving the v1-train merge conflict in comment 27?
Flags: needinfo?(johu)
Hi John Ford, 

I had resolved the conflict of operator_variant.js. Please find the branch in my github:

Thanks for help...

John Hu
Flags: needinfo?(johu) → needinfo?(jhford)
v1-train: c376446
Flags: needinfo?(jhford)
v1.1.0hd: c376446da64aacb6907b26542a2684d54a0162eb
v1.1.0hd: 16db10014db8da6c25b673953264f358d205e206
You need to log in before you can comment on or make changes to this bug.