summaryrefslogtreecommitdiffstats
path: root/packages/Keyguard
diff options
context:
space:
mode:
authorxinhe <xinhe@google.com>2014-12-04 21:23:53 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-04 21:23:53 +0000
commita766b75103426dbe5cc89d7e6ad5eb9b93c92ef9 (patch)
treeb27567111cfb4002c3706d07c67e8030816662c1 /packages/Keyguard
parent6abe46c472b189dfa05b5ab9c0debea7b0308f7b (diff)
parentc377c360e971b07ccb3c2937f23168c88f426640 (diff)
downloadframeworks_base-a766b75103426dbe5cc89d7e6ad5eb9b93c92ef9.zip
frameworks_base-a766b75103426dbe5cc89d7e6ad5eb9b93c92ef9.tar.gz
frameworks_base-a766b75103426dbe5cc89d7e6ad5eb9b93c92ef9.tar.bz2
am c377c360: am 9a4472bf: am 8f61e754: Merge "Unable to unlock SIM with a PIN/PUK" into lmp-mr1-dev
* commit 'c377c360e971b07ccb3c2937f23168c88f426640': Unable to unlock SIM with a PIN/PUK
Diffstat (limited to 'packages/Keyguard')
-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));
}