summaryrefslogtreecommitdiffstats
path: root/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
diff options
context:
space:
mode:
authorxinhe <xinhe@google.com>2014-12-02 15:03:20 -0800
committerxin He <xinhe@google.com>2014-12-03 23:36:16 +0000
commit18b9c3cb506ae99bed1e9e95757a22b234cf366b (patch)
treef98b2702d3e1297cae8384017aa70abc24611d38 /packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
parentdc1baa16b1c559b07d392f7d899fcfe18fa7036c (diff)
downloadframeworks_base-18b9c3cb506ae99bed1e9e95757a22b234cf366b.zip
frameworks_base-18b9c3cb506ae99bed1e9e95757a22b234cf366b.tar.gz
frameworks_base-18b9c3cb506ae99bed1e9e95757a22b234cf366b.tar.bz2
Unable to unlock SIM with a PIN/PUK
call TelephonyManager.getSimState instead of accessing systemProperty Bug:18489776 Change-Id: I45d2315a588f706c4815750963dcfec9f8409c5d
Diffstat (limited to 'packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java')
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
index 7f1314d..ff07dd7 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -1303,16 +1303,15 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
// that don't return the complete set of values and have different types. In Keyguard we
// need IccCardConstants, but TelephonyManager would only give us
// TelephonyManager.SIM_STATE*, so we retrieve it manually.
- final int phoneId = SubscriptionManager.getPhoneId(subId);
- final String stateString = TelephonyManager.getTelephonyProperty(phoneId,
- TelephonyProperties.PROPERTY_SIM_STATE, "");
+ final TelephonyManager tele = TelephonyManager.from(mContext);
+ int simState = tele.getSimState(slotId);
State state;
try {
- state = State.valueOf(stateString);
+ state = State.intToState(simState);
} catch(IllegalArgumentException ex) {
- Log.w(TAG, "Unknown sim state: " + stateString);
+ Log.w(TAG, "Unknown sim state: " + simState);
state = State.UNKNOWN;
- }
+ }
mSimDatas.put(subId, new SimData(state, slotId, subId));
}