diff options
author | Wink Saville <wink@google.com> | 2014-12-12 04:45:29 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2014-12-12 04:45:29 +0000 |
commit | 6cc211669c64878942ee93f592d9c2780f9607a0 (patch) | |
tree | f0cf601cf1d31ba3b7684571828aec30caf53cd8 /packages/Keyguard | |
parent | 28ca1f628cca564b676d6b1c5ca773d8466552d0 (diff) | |
parent | 05e2ada58a79994170e8e98ff9a619715cdddc28 (diff) | |
download | frameworks_base-6cc211669c64878942ee93f592d9c2780f9607a0.zip frameworks_base-6cc211669c64878942ee93f592d9c2780f9607a0.tar.gz frameworks_base-6cc211669c64878942ee93f592d9c2780f9607a0.tar.bz2 |
am 6e04a7b6: Merge "Change tests against INVALID_SUBSCRIPTION_ID to use isValidSubscriptionId." into lmp-mr1-dev automerge: 6cc44cc
automerge: 05e2ada
* commit '05e2ada58a79994170e8e98ff9a619715cdddc28':
Change tests against INVALID_SUBSCRIPTION_ID to use isValidSubscriptionId.
Diffstat (limited to 'packages/Keyguard')
4 files changed, 7 insertions, 7 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java index 5350e5a..1e2a233 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java @@ -81,11 +81,11 @@ public class KeyguardSecurityModel { SecurityMode getSecurityMode() { KeyguardUpdateMonitor monitor = KeyguardUpdateMonitor.getInstance(mContext); SecurityMode mode = SecurityMode.None; - if (monitor.getNextSubIdForState(IccCardConstants.State.PIN_REQUIRED) - != SubscriptionManager.INVALID_SUBSCRIPTION_ID) { + if (SubscriptionManager.isValidSubscriptionId( + monitor.getNextSubIdForState(IccCardConstants.State.PIN_REQUIRED))) { mode = SecurityMode.SimPin; - } else if (monitor.getNextSubIdForState(IccCardConstants.State.PUK_REQUIRED) - != SubscriptionManager.INVALID_SUBSCRIPTION_ID + } else if (SubscriptionManager.isValidSubscriptionId( + monitor.getNextSubIdForState(IccCardConstants.State.PUK_REQUIRED)) && mLockPatternUtils.isPukUnlockScreenEnable()) { mode = SecurityMode.SimPuk; } else { diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java index f1c4cd4..f4acff8 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java @@ -75,7 +75,7 @@ public class KeyguardSimPinView extends KeyguardPinBasedInputView { if (DEBUG) Log.v(TAG, "Resetting state"); KeyguardUpdateMonitor monitor = KeyguardUpdateMonitor.getInstance(mContext); mSubId = monitor.getNextSubIdForState(IccCardConstants.State.PIN_REQUIRED); - if (mSubId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) { + if (SubscriptionManager.isValidSubscriptionId(mSubId)) { int count = TelephonyManager.getDefault().getSimCount(); Resources rez = getResources(); final String msg; diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPukView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSimPukView.java index c9670bb..b85d966 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPukView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSimPukView.java @@ -118,7 +118,7 @@ public class KeyguardSimPukView extends KeyguardPinBasedInputView { state = ENTER_PUK; KeyguardUpdateMonitor monitor = KeyguardUpdateMonitor.getInstance(mContext); mSubId = monitor.getNextSubIdForState(IccCardConstants.State.PUK_REQUIRED); - if (mSubId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) { + if (SubscriptionManager.isValidSubscriptionId(mSubId)) { int count = TelephonyManager.getDefault().getSimCount(); Resources rez = getResources(); final String msg; diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java index 8458ae0..c8cfe31b 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java @@ -938,7 +938,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { + slotId + ", state=" + state +")"); } - if (subId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) { + if (!SubscriptionManager.isValidSubscriptionId(subId)) { Log.w(TAG, "invalid subId in handleSimStateChange()"); return; } |