From 6b329ce52257773e3a027fc90a15b352129a35b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Zieli=C5=84ski?= Date: Thu, 29 Sep 2022 11:39:48 +0200 Subject: [PATCH] [MOS-242] Fix windows flow after PIN mistakes After too many PIN mistakes during a PIN change, the user saw distorted windows instead of a PUK request. Now, this has been fixed. Also, a typo in a translation has been corrected. --- image/assets/lang/English.json | 2 +- module-services/service-cellular/src/SimCard.cpp | 9 ++++++++- pure_changelog.md | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/image/assets/lang/English.json b/image/assets/lang/English.json index bce18817c8b0e3361b64c75185039115d57820a9..619d8480301d489e9fe8d266441fa89b7b783bae 100644 --- a/image/assets/lang/English.json +++ b/image/assets/lang/English.json @@ -224,7 +224,7 @@ "app_desktop_info_mmi_result_failed": "Failed", "sim_header_setup": "$SIM setup", "sim_enter_pin_unlock": "Enter the PIN code to set up

the $PINTYPE card:
", - "sim_enter_enter_current": "Type current Pin Code:", + "sim_enter_enter_current": "Type current PIN code:", "sim_change_pin": "Change PIN code", "sim_enter_new_pin": "Enter new PIN code:", "sim_confirm_new_pin": "Confirm new PIN code:", diff --git a/module-services/service-cellular/src/SimCard.cpp b/module-services/service-cellular/src/SimCard.cpp index 0b37b1099e6d2b4075a77e3a4184768a37995e99..7c5152ae31ac3d85c1e0e3c815f55278c702523d 100644 --- a/module-services/service-cellular/src/SimCard.cpp +++ b/module-services/service-cellular/src/SimCard.cpp @@ -227,9 +227,16 @@ namespace cellular } } else if (result != sim::Result::OK) { - if (onUnhandledCME) + if (result == sim::Result::SIM_PUKRequired) { + // MOS-242: silence this case to avoid a misleading "wrong PUK" pop-up + return false; + } + + if (onUnhandledCME) { onUnhandledCME(static_cast(result)); + } } + return result == sim::Result::OK; } diff --git a/pure_changelog.md b/pure_changelog.md index 8516fb4556d3fd153574aac1376d4bb0bfb8eb5a..a44dc775b3212add4ae03b2913ac076a5a287811 100644 --- a/pure_changelog.md +++ b/pure_changelog.md @@ -29,6 +29,7 @@ * Fixed PLAY label translation in German * Fixed USB connection/disconnection detection * Fixed memory leaks in APN settings +* Fixed windows flow regarding PUK requests after too many PIN mistakes ### Added * Added basic MMS handling