summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSridhar Dubbaka <sdubbaka@codeaurora.org>2014-10-29 22:48:21 +0530
committerLinux Build Service Account <lnxbuild@localhost>2015-10-06 03:27:16 -0600
commit887b3242c97056c69d17c3ddff948f8722ec0edb (patch)
tree0cfedf41b6f196eb1d195f1f215bbea660d29057
parent4dda7bbd0feee1ec8ec5ff35790d1f2a25825c63 (diff)
downloadframeworks_base-887b3242c97056c69d17c3ddff948f8722ec0edb.zip
frameworks_base-887b3242c97056c69d17c3ddff948f8722ec0edb.tar.gz
frameworks_base-887b3242c97056c69d17c3ddff948f8722ec0edb.tar.bz2
Add change to show Invalid card when erroneous card is inserted
Add change to show "Invalid card" on UI on CARD_IO_ERROR when erroneous SIM card is inserted Change-Id: I94c52ff462c999cdb8dbe742fa0bd3f1019ce335
-rw-r--r--packages/Keyguard/res/values/strings.xml3
-rw-r--r--packages/Keyguard/src/com/android/keyguard/CarrierText.java10
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java2
3 files changed, 14 insertions, 1 deletions
diff --git a/packages/Keyguard/res/values/strings.xml b/packages/Keyguard/res/values/strings.xml
index cba122f..25a3e6e 100644
--- a/packages/Keyguard/res/values/strings.xml
+++ b/packages/Keyguard/res/values/strings.xml
@@ -48,6 +48,9 @@
to unlock the keyguard. Displayed in one line in a large font. -->
<string name="keyguard_password_wrong_pin_code">Incorrect PIN code.</string>
+ <!-- Shown in the lock screen when there is SIM card IO error. -->
+ <string name="lockscreen_sim_error_message_short">Invalid Card.</string>
+
<!-- When the lock screen is showing, the phone is plugged in and the battery is fully
charged, say that it is charged. -->
<string name="keyguard_charged">Charged</string>
diff --git a/packages/Keyguard/src/com/android/keyguard/CarrierText.java b/packages/Keyguard/src/com/android/keyguard/CarrierText.java
index 159ac4c..370bb9c 100644
--- a/packages/Keyguard/src/com/android/keyguard/CarrierText.java
+++ b/packages/Keyguard/src/com/android/keyguard/CarrierText.java
@@ -77,7 +77,8 @@ public class CarrierText extends TextView {
SimPukLocked, // SIM card is PUK locked because SIM entered wrong too many times
SimLocked, // SIM card is currently locked
SimPermDisabled, // SIM card is permanently disabled due to PUK unlock failure
- SimNotReady; // SIM is not ready yet. May never be on devices w/o a SIM.
+ SimNotReady, // SIM is not ready yet. May never be on devices w/o a SIM.
+ SimIoError; //The sim card is faulty
}
public CarrierText(Context context) {
@@ -270,6 +271,11 @@ public class CarrierText extends TextView {
getContext().getText(R.string.keyguard_sim_puk_locked_message),
text);
break;
+ case SimIoError:
+ carrierText = makeCarrierStringOnEmergencyCapable(
+ getContext().getText(R.string.lockscreen_sim_error_message_short),
+ text);
+ break;
}
return carrierText;
@@ -319,6 +325,8 @@ public class CarrierText extends TextView {
return StatusMode.SimPermDisabled;
case UNKNOWN:
return StatusMode.SimMissing;
+ case CARD_IO_ERROR:
+ return StatusMode.SimIoError;
}
return StatusMode.SimMissing;
}
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
index c7adc98..df7f893 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -702,6 +702,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
}
} else if (IccCardConstants.INTENT_VALUE_LOCKED_NETWORK.equals(stateExtra)) {
state = IccCardConstants.State.NETWORK_LOCKED;
+ } else if (IccCardConstants.INTENT_VALUE_ICC_CARD_IO_ERROR.equals(stateExtra)) {
+ state = IccCardConstants.State.CARD_IO_ERROR;
} else if (IccCardConstants.INTENT_VALUE_ICC_LOADED.equals(stateExtra)
|| IccCardConstants.INTENT_VALUE_ICC_IMSI.equals(stateExtra)) {
// This is required because telephony doesn't return to "READY" after