Closed
Bug 886238
Opened 11 years ago
Closed 11 years ago
Use IccManager for retrieving unlock retry count
Categories
(Firefox OS Graveyard :: Gaia, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: tzimmermann, Assigned: tzimmermann)
References
Details
Attachments
(1 file, 2 obsolete files)
This bug is for landing the Gaia changes for bug 875710.
Assignee | ||
Comment 1•11 years ago
|
||
These changes depend on bug 875710.
Attachment #766577 -
Flags: review?(fernando.campo)
Assignee | ||
Comment 2•11 years ago
|
||
I couldn't really test the changes to the settings app, because the respective dialog seems broken.
Comment 3•11 years ago
|
||
Comment on attachment 766577 [details] Pull request: https://github.com/mozilla-b2g/gaia/pull/10561 I can't approve the patch till the issues with cck, nck, spck are solved, as we shouldn't return 0 retries everytime. The rest of the code looks good though, but probably needs some rebasing, or taking into account bug 884274 as the Travis is failing on all the icc tests. Please reassign the review to me again when the problems are solved, and thanks for your work :)
Attachment #766577 -
Flags: review?(fernando.campo) → review-
Assignee | ||
Comment 4•11 years ago
|
||
Hi Fernando, I added support for the remaining locks. I also added a wrapper to IccHelper for supporting both, mozilla-central and b2g18. I couldn't find a way to support both interfaces, so the wrapper either uses the old interface or returns the default value. From a practical point of view it's not much of a problem, because implementation currently only returns the default anyway. If you know how to wrap both interfaces in IccHelper, I'd be happy to hear about it.
Attachment #766577 -
Attachment is obsolete: true
Attachment #767725 -
Flags: review?(fernando.campo)
Assignee | ||
Comment 5•11 years ago
|
||
I was able to support both APIs by using callback functions.
Attachment #767725 -
Attachment is obsolete: true
Attachment #767725 -
Flags: review?(fernando.campo)
Attachment #768211 -
Flags: review?(fernando.campo)
Comment 6•11 years ago
|
||
Hi Thomas, sorry for the delay but I was on PTO. I'm taking a look now, and before going deep and try some things, I see that you didn't follow the IccHelper current code style. Is there a particular reason for it? Is it what you talk about in comment 4? I'd like some more info about this before getting into it Thanks
Assignee | ||
Comment 7•11 years ago
|
||
No problem, I was on PTO as well! :) At first I had problems with building an IccHelper interface that could support both, new and old, get-retries interface. I finally settled with a caller-supplied function for returning the number of retries to the app. That's what comments 4 and 5 are about. For a cleanup, I can try to put the function getCardLockRetryCount into IccHelper, although this didn't work correctly when I tried it at first. I'm usually not a Gaia dev, so let my know if there is something else wrong with the style.
Assignee | ||
Comment 8•11 years ago
|
||
I cleaned up IccHelper and updated the pull request. Please have a look.
Comment 9•11 years ago
|
||
Comment on attachment 768211 [details] Pull request: https://github.com/mozilla-b2g/gaia/pull/10661 I finished the review and testing, and works nice. Code looks good too, except for the rebase needed (comment on github), and the failing tests. Once you fix that, you got the r+ :) Thanks
Assignee | ||
Comment 10•11 years ago
|
||
Hi, Thanks for the review. You mean these Travis tests, right? Do you have an idea why they fail? The code seems correct and works in practice, just not in the test.
Flags: needinfo?(fernando.campo)
Comment 11•11 years ago
|
||
HiThomas, yes, I mean the Travis tests. They are failing because the code of the classes involved changed (adding new function on IccHelper and calling it from different classes), but the tests are not updated with this new functions. I guess that you need to change the mock_icc_helper.js both on system and ftu folder, and add support for the new function. Cheers
Flags: needinfo?(fernando.campo)
Assignee | ||
Updated•11 years ago
|
Attachment #768211 -
Flags: review?(fernando.campo) → review-
Assignee | ||
Comment 12•11 years ago
|
||
Comment on attachment 768211 [details] Pull request: https://github.com/mozilla-b2g/gaia/pull/10661 I rebased the patch set and fixed the broken tests.
Attachment #768211 -
Flags: review- → review?(fernando.campo)
Comment 13•11 years ago
|
||
Comment on attachment 768211 [details] Pull request: https://github.com/mozilla-b2g/gaia/pull/10661 The patch looks good and works perfectly, so got the r+ Anyway, I left some comments on github for better style and prepare code for future tests. You don't have to make any changes, as the patch works nicely, but it would be a nice to have if you have time for it. Also a comment on the iccHelper (iccManager.getCardStateRetryCount.onerror) to avoid possible buggy situations. And finally, wether you make the changes or not, don't forget to squash the commits in one, and add r=me on the final commit when merging. Thanks for your work!
Attachment #768211 -
Flags: review?(fernando.campo) → review+
Assignee | ||
Comment 14•11 years ago
|
||
Oh great, thanks! I'll have a look at the comments and squash the commit tomorrow. Can you merge the final patch for me? I don't think I have commit rights for Gaia.
Comment 15•11 years ago
|
||
Sure no prob
Assignee | ||
Comment 16•11 years ago
|
||
I updated the pull request according to your suggestions. I also moved the function getCardLockRetryCount into IccHelper. I actually wanted to do this in the previous iteration of the patch, but it seems as if the change got lost somehow. Please have a finally look and merge the pull request if appropriate. There is a Travis error, but it seems unrelated.
Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(fernando.campo)
Comment 17•11 years ago
|
||
Merged on master 27526f86cea54e4c6997adebfd592b9c02e15421 Many thanks Thomas
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: needinfo?(fernando.campo)
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•