Closed
Bug 842458
Opened 12 years ago
Closed 12 years ago
B2G RIL: support FDN for updateICCContact
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
RESOLVED
FIXED
mozilla22
People
(Reporter: allstars.chh, Assigned: allstars.chh)
References
Details
Attachments
(4 files, 7 obsolete files)
2.54 KB,
patch
|
vicamo
:
review+
|
Details | Diff | Splinter Review |
14.51 KB,
patch
|
vicamo
:
review+
|
Details | Diff | Splinter Review |
3.35 KB,
patch
|
vicamo
:
review+
|
Details | Diff | Splinter Review |
8.71 KB,
patch
|
allstars.chh
:
review+
|
Details | Diff | Splinter Review |
In Bug 809726 we support updating ADN to SIM, now we'd also support FDN as well.
Assignee | ||
Comment 1•12 years ago
|
||
Assignee: nobody → allstars.chh
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•12 years ago
|
||
Assignee | ||
Comment 3•12 years ago
|
||
Assignee | ||
Comment 4•12 years ago
|
||
Attachment #718311 -
Attachment is obsolete: true
Assignee | ||
Comment 5•12 years ago
|
||
Attachment #718312 -
Attachment is obsolete: true
Assignee | ||
Updated•12 years ago
|
Attachment #718310 -
Flags: review?(htsai)
Assignee | ||
Updated•12 years ago
|
Attachment #718332 -
Flags: review?(htsai)
Assignee | ||
Updated•12 years ago
|
Attachment #718333 -
Flags: review?(htsai)
Assignee | ||
Comment 6•12 years ago
|
||
Comment on attachment 718332 [details] [diff] [review]
Part 2: implementations for updating FDN. v2
Cancelling r? as I found I missed some changes as well.
Attachment #718332 -
Flags: review?(htsai)
Assignee | ||
Comment 7•12 years ago
|
||
Comment on attachment 718333 [details] [diff] [review]
Part 3: xpcshell tests for updateFdn and updateICCContact. v2
ditto
Attachment #718333 -
Flags: review?(htsai)
Assignee | ||
Comment 8•12 years ago
|
||
Attachment #720541 -
Flags: review?(htsai)
Assignee | ||
Comment 9•12 years ago
|
||
Attachment #718333 -
Attachment is obsolete: true
Attachment #720542 -
Flags: review?(htsai)
Assignee | ||
Updated•12 years ago
|
Attachment #718332 -
Flags: review?(htsai)
Assignee | ||
Comment 10•12 years ago
|
||
Comment on attachment 718310 [details] [diff] [review]
Part 1: Add pin2 for updateICCContact.
Switch r? to Vicamo as Hsinyi is busy.
Attachment #718310 -
Flags: review?(htsai) → review?(vyang)
Assignee | ||
Updated•12 years ago
|
Attachment #718332 -
Flags: review?(htsai) → review?(vyang)
Assignee | ||
Updated•12 years ago
|
Attachment #720541 -
Flags: review?(htsai) → review?(vyang)
Assignee | ||
Updated•12 years ago
|
Attachment #720542 -
Flags: review?(htsai) → review?(vyang)
Comment 11•12 years ago
|
||
Comment on attachment 718310 [details] [diff] [review]
Part 1: Add pin2 for updateICCContact.
Review of attachment 718310 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/system/gonk/nsIRadioInterfaceLayer.idl
@@ +268,3 @@
> interface nsIRadioInterfaceLayer : nsISupports
> {
> const unsigned short CALL_STATE_UNKNOWN = 0;
Sorry but bug 834160 was landed yesterday, and this patch has to be rebased.
Attachment #718310 -
Flags: review?(vyang)
Comment 12•12 years ago
|
||
Comment on attachment 718332 [details] [diff] [review]
Part 2: implementations for updating FDN. v2
Review of attachment 718332 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/system/gonk/ril_worker.js
@@ +10130,5 @@
> switch (contactType) {
> case "ADN":
> switch (appType) {
> case CARD_APPTYPE_SIM:
> + ICCRecordHelper.updateADNLike(ICC_EF_ADN, contact, "", onsuccess, onerror);
|null| please
@@ +10328,5 @@
> */
> updateUSimContact: function updateUSimContact(contact, onsuccess, onerror) {
> let gotPbrCb = function gotPbrCb(pbr) {
> if (pbr.adn) {
> + ICCRecordHelper.updateADNLike(pbr.adn.fileId, contact, "", onsuccess, onerror);
ditto.
Attachment #718332 -
Flags: review?(vyang) → review+
Comment 13•12 years ago
|
||
Comment on attachment 720541 [details] [diff] [review]
Part 3: ICCRecordHelper.getFreeRecordId.
Review of attachment 720541 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/system/gonk/ril_worker.js
@@ +10704,5 @@
> +
> + while (readLen < octetLen) {
> + let octet = GsmPDUHelper.readHexOctet();
> + readLen++;
> + if (octet != 0xff) {
3GPP TS 31.102 section 4.4.2.3 "EF adn" has:
> - Length of BCD number/SSC contents.
> Contents:
> - ... When an ADN/SSC has extension, it is indicated by the extension 1 identifier being unequal to 'FF'.
In the other words, when there is no extension, the extension 1 identifier equals to 'FF'. So the code here recognizes an occupied, no extension ADN record as an empty one. Doesn't it?
Attachment #720541 -
Flags: review?(vyang)
Comment 14•12 years ago
|
||
Comment on attachment 720541 [details] [diff] [review]
Part 3: ICCRecordHelper.getFreeRecordId.
Review of attachment 720541 [details] [diff] [review]:
-----------------------------------------------------------------
Just found you're searching for |octet != 0xFF|, not |octet == 0xFF|.
Attachment #720541 -
Flags: review+
Assignee | ||
Comment 15•12 years ago
|
||
rebase
Attachment #718310 -
Attachment is obsolete: true
Attachment #722066 -
Flags: review?(vyang)
Assignee | ||
Comment 16•12 years ago
|
||
replaced "" with null.
Attachment #718332 -
Attachment is obsolete: true
Comment 18•12 years ago
|
||
Comment on attachment 720542 [details] [diff] [review]
Part 4: xpcshell tests for updateFdn and updateICCContact. v3
Review of attachment 720542 [details] [diff] [review]:
-----------------------------------------------------------------
Great! Those overridden functions make me feel that we do have to complete emulator ICC supports to test these features. :(
::: dom/system/gonk/tests/test_ril_worker_icc.js
@@ +2033,5 @@
> + let contact = {recordId: 1, alphaId: "test", number: "123456"};
> + contactType = "ADN";
> + contactHelper.updateICCContact(CARD_APPTYPE_SIM, contactType, contact, "");
> + contactType = "FDN";
> + contactHelper.updateICCContact(CARD_APPTYPE_SIM, contactType, contact, "1111");
Always abstract test function and make it able for further tests:
function do_test(aContact, aContaType, aFileId, aPin2) {
record.updateADNLike = function (fileId, contact, pin2, onsuccess, onerror) {
do_check_eq(fileId, aFileId);
do_check_eq(contact.alphaId, aContact.alphaId);
do_check_eq(contact.number, aContact.number);
do_check_eq(pin2, aPin2);
};
contactHelper.updateICCContact(CARD_APPTYPE_SIM, aContaType, aContact, aPin2);
}
let contact = {recordId: 1, alphaId: "test", number: "123456"};
do_test(contact, "ADN", ICC_EF_ADN, null);
do_test(contact, "FDN", ICC_EF_FDN, "1111");
run_next_test();
Attachment #720542 -
Flags: review?(vyang) → review+
Updated•12 years ago
|
Attachment #722068 -
Flags: review+
Updated•12 years ago
|
Attachment #722070 -
Flags: review+
Updated•12 years ago
|
Attachment #722066 -
Flags: review?(vyang) → review+
Assignee | ||
Comment 19•12 years ago
|
||
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #18)
> Comment on attachment 720542 [details] [diff] [review]
> Part 4: xpcshell tests for updateFdn and updateICCContact. v3
>
> Review of attachment 720542 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Great! Those overridden functions make me feel that we do have to complete
> emulator ICC supports to test these features. :(
Will try to implement this in Bug 848662.
Assignee | ||
Comment 20•12 years ago
|
||
Addressed comments,
add r=vicamo
Attachment #720542 -
Attachment is obsolete: true
Attachment #722084 -
Flags: review+
Comment 21•12 years ago
|
||
Try run for ab08bcb9da1f is complete.
Detailed breakdown of the results available here:
https://tbpl.mozilla.org/?tree=Try&rev=ab08bcb9da1f
Results (out of 3 total builds):
success: 3
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/yhuang@mozilla.com-ab08bcb9da1f
Assignee | ||
Comment 22•12 years ago
|
||
Comment 23•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/4d432ae31092
https://hg.mozilla.org/mozilla-central/rev/f7d36e47a15c
https://hg.mozilla.org/mozilla-central/rev/b76860154d10
https://hg.mozilla.org/mozilla-central/rev/3e1f112be1e1
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
Assignee | ||
Updated•12 years ago
|
blocking-b2g: --- → tef?
Comment 24•12 years ago
|
||
I think PIN2 and FDN are not V1.0.1. Please re-nominate if I am wrong.
blocking-b2g: tef? → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•