Bug 979751 - [Security setting] Redundant "Enter PUK code" page shows

after enter incorrect PIN code three times.

- update logic
- add unit test