Closed Bug 1070941 Opened 10 years ago Closed 7 years ago

ICC.updateContact should not require to pass pin2 as a parameter

Categories

(Firefox OS Graveyard :: RIL, defect)

x86
macOS
defect
Not set
normal

Tracking

(b2g-v1.4 affected, b2g-v2.0 affected, b2g-v2.1 affected, b2g-v2.2 affected)

RESOLVED WONTFIX
Tracking Status
b2g-v1.4 --- affected
b2g-v2.0 --- affected
b2g-v2.1 --- affected
b2g-v2.2 --- affected

People

(Reporter: sergi, Unassigned)

References

Details

icc.updateContact requires the SIM pin2 code in order to update a FDN contact[1]. This duplicates functionality from icc.setCardLock[2] and causes some other problems like not giving the remaining retry count when a password is incorrect[3]. icc.updateContact should delegate PIN2 handling to icc.setCardLock and not require the PIN2 as a parameter. [1] https://mxr.mozilla.org/mozilla-central/source/dom/webidl/MozIcc.webidl#378 [2] https://mxr.mozilla.org/mozilla-central/source/dom/webidl/MozIcc.webidl#330 [3] https://github.com/mozilla-b2g/gaia/blob/master/apps/settings/js/simcard_dialog.js#L242
Flags: needinfo?(echen)
Blocks: 1070961
Hi Sergi, Contact and card lock api are different set of api, we doesn't support carry remaining retry count in card lock API. And icc.setCardLock() is used for enabling/disabling card lock or changing the pin. I think it is not suitable to delegate PIN2 handling to it. How about calling icc.getCardLockRetryCount()[1] to get remaining retry count when passing an incorrect 'pin2' to icc.updateContact('fdn')? (But it is not AOSP standard, some devices may not support this) [1] https://mxr.mozilla.org/mozilla-central/source/dom/webidl/MozIcc.webidl#345
Flags: needinfo?(echen) → needinfo?(sergi.mansilla)
Hi Edgar, thanks for your prompt response :). I believe Sergi was referring to icc.unlockCardLock [1] instead of icc.setCardLock in the bug description. If I am not wrong, we already allow to enter the PIN2 and PUK2 via icc.unlockCardLock (even if it is not documented in the webidl) and the AOSP standard definitely allows it. We allow entering the PIN2 via MMI as well, but that doesn't really matter in this case. By using icc.unlockCardLock() we get the retry count for free as it is already contained in the error responses of this function and we can also infer the need of entering the PUK2 when the retry count is 0. I guess that on the Gaia side we could simply start using icc.unlockCardLock({lockType: "pin2", pin2: "whatever"}) once we get the error response from icc.updateContact about the PIN2 requirement. So bug 1070961 shouldn't be blocked by this one. Note that this would leave us with an unused API for entering the PIN2 via icc.updateContact that IMHO should be removed. [1] https://mxr.mozilla.org/mozilla-central/source/dom/webidl/MozIcc.webidl#276
No longer blocks: 1070961
Flags: needinfo?(echen)
Hi Edgar, Thanks for your comment. As Fernando pointed out, I said `setCardLock` when I really meant `unlockCardLock`[1].
Flags: needinfo?(sergi.mansilla)
I see, thanks for the clarification. :) I like the idea of reusing icc.unlockCardLock() then icc.updateContact() don't need to take 'pin2' as argument. But this API changes needs to wait for Gaia ready first (I guess Gaia will do the changes in bug 1070961). Thank you, Sergi and Fernando.
Assignee: nobody → echen
Depends on: 1070961
Flags: needinfo?(echen)
Assignee: echen → sergi.mansilla
Taking the bug with Edgar´s permission.
Target Milestone: --- → 2.1 S6 (10oct)
This is proving to be a bit more complicated that it looks, and perhaps not at all possible given the current RIL. Leaving for now to focus on more pressing bugs, since this one is not critical.
Assignee: sergi.mansilla → nobody
Target Milestone: 2.1 S6 (10oct) → ---
Blocks: 1157082
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.