Fix 2555028: Restore showing tab unlock before PIN & password entry.

This fixes a bug introduced in change 46594 that prevents showing
the tab unlock screen before PIN & password entry.

Change-Id: Ibd603921f6a22b603652c4751fa0f2f7d9129bb2
diff --git a/policy/com/android/internal/policy/impl/LockPatternKeyguardView.java b/policy/com/android/internal/policy/impl/LockPatternKeyguardView.java
index 5a32dc8..c1b14c4 100644
--- a/policy/com/android/internal/policy/impl/LockPatternKeyguardView.java
+++ b/policy/com/android/internal/policy/impl/LockPatternKeyguardView.java
@@ -640,10 +640,15 @@
         final IccCard.State simState = mUpdateMonitor.getSimState();
         if (stuckOnLockScreenBecauseSimMissing() || (simState == IccCard.State.PUK_REQUIRED)) {
             return Mode.LockScreen;
-        } else if (isSecure()) {
-            return Mode.UnlockScreen;
         } else {
-            return Mode.LockScreen;
+            // Show LockScreen first for any screen other than Pattern unlock.
+            final boolean usingLockPattern = mLockPatternUtils.getKeyguardStoredPasswordQuality()
+                    == DevicePolicyManager.PASSWORD_QUALITY_SOMETHING;
+            if (isSecure() && usingLockPattern) {
+                return Mode.UnlockScreen;
+            } else {
+                return Mode.LockScreen;
+            }
         }
     }