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

after enter incorrect PIN code three times.

- update logic
- add unit test
Merge pull request #16980 from EragonJ/v1.3-bug-979751

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