OSDN Git Service

Telephony: Modify code to check that PUK code length is always 8.
authorRakesh Pallerla <rakesh@codeaurora.org>
Wed, 8 Jan 2014 10:19:34 +0000 (15:49 +0530)
committerRakesh Pallerla <rakesh@codeaurora.org>
Wed, 8 Jan 2014 14:16:25 +0000 (19:46 +0530)
As per 3GPP TS 31.101 Release 11 section 9.6, the number of digits
for UNBLOCK PIN (PUK) is always 8.

Change-Id: I4ea69fd8e2e8e96330d10a67b2d1f5a1859c1016

core/res/res/values/strings.xml
packages/Keyguard/src/com/android/keyguard/KeyguardSimPukView.java

index 9025400..986a005 100644 (file)
     <!-- Message shown when the user enters an invalid SIM pin password in PUK screen -->
     <string name="kg_invalid_sim_pin_hint">Type a PIN that is 4 to 8 numbers.</string>
     <!-- Message shown when the user enters an invalid PUK code in the PUK screen -->
-    <string name="kg_invalid_sim_puk_hint">PUK code should be 8 numbers or more.</string>
+    <string name="kg_invalid_sim_puk_hint">PUK code should be 8 numbers.</string>
     <!-- Message shown when the user enters an invalid PUK code -->
     <string name="kg_invalid_puk">Re-enter the correct PUK code. Repeated attempts will permanently disable the SIM.</string>
       <!-- String shown in PUK screen when PIN codes don't match -->
index 6e9e83e..d882eca 100644 (file)
@@ -274,7 +274,7 @@ public class KeyguardSimPukView extends KeyguardAbsKeyInputView
 
     private boolean checkPuk() {
         // make sure the puk is at least 8 digits long.
-        if (mPasswordEntry.getText().length() >= 8) {
+        if (mPasswordEntry.getText().length() == 8) {
             mPukText = mPasswordEntry.getText().toString();
             return true;
         }