Merge "Check if the SIM is secure before dispatching swipe to unlock." into sc-v2-dev
This commit is contained in:
@@ -1727,6 +1727,21 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable,
|
|||||||
|| mUpdateMonitor.isSimPinSecure();
|
|| mUpdateMonitor.isSimPinSecure();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether any of the SIMs on the device are secured with a PIN. If so, the keyguard should not
|
||||||
|
* be dismissable until the PIN is entered, even if the device itself has no lock set.
|
||||||
|
*/
|
||||||
|
public boolean isAnySimPinSecure() {
|
||||||
|
for (int i = 0; i < mLastSimStates.size(); i++) {
|
||||||
|
final int key = mLastSimStates.keyAt(i);
|
||||||
|
if (KeyguardUpdateMonitor.isSimPinSecure(mLastSimStates.get(key))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public void setSwitchingUser(boolean switching) {
|
public void setSwitchingUser(boolean switching) {
|
||||||
mUpdateMonitor.setSwitchingUser(switching);
|
mUpdateMonitor.setSwitchingUser(switching);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1354,10 +1354,14 @@ public class StatusBar extends SystemUI implements
|
|||||||
// Things that mean we're not dismissing the keyguard, and should ignore this expansion:
|
// Things that mean we're not dismissing the keyguard, and should ignore this expansion:
|
||||||
// - Keyguard isn't even visible.
|
// - Keyguard isn't even visible.
|
||||||
// - Keyguard is visible, but can't be dismissed (swiping up will show PIN/password prompt).
|
// - Keyguard is visible, but can't be dismissed (swiping up will show PIN/password prompt).
|
||||||
|
// - The SIM is locked, you can't swipe to unlock. If the SIM is locked but there is no
|
||||||
|
// device lock set, canDismissLockScreen returns true even though you should not be able
|
||||||
|
// to dismiss the lock screen until entering the SIM PIN.
|
||||||
// - QS is expanded and we're swiping - swiping up now will hide QS, not dismiss the
|
// - QS is expanded and we're swiping - swiping up now will hide QS, not dismiss the
|
||||||
// keyguard.
|
// keyguard.
|
||||||
if (!isKeyguardShowing()
|
if (!isKeyguardShowing()
|
||||||
|| !mKeyguardStateController.canDismissLockScreen()
|
|| !mKeyguardStateController.canDismissLockScreen()
|
||||||
|
|| mKeyguardViewMediator.isAnySimPinSecure()
|
||||||
|| (mNotificationPanelViewController.isQsExpanded() && trackingTouch)) {
|
|| (mNotificationPanelViewController.isQsExpanded() && trackingTouch)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user