am d9f1a0c3: Merge "Fixed wake to unlock when the device has never been unlocked" into mnc-dev

* commit 'd9f1a0c3a42bcc1f7b8cd82be8eed60f5438f091':
  Fixed wake to unlock when the device has never been unlocked
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index f595847..7d72dab 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -460,15 +460,20 @@
 
         @Override
         public void onFingerprintAuthenticated(int userId, boolean wakeAndUnlocking) {
+            boolean unlockingWithFingerprintAllowed =
+                    mUpdateMonitor.isUnlockingWithFingerprintAllowed();
             if (mStatusBarKeyguardViewManager.isBouncerShowing()) {
-                if (mUpdateMonitor.isUnlockingWithFingerprintAllowed()) {
+                if (unlockingWithFingerprintAllowed) {
                     mStatusBarKeyguardViewManager.notifyKeyguardAuthenticated();
                 }
             } else {
-                if (wakeAndUnlocking) {
+                if (wakeAndUnlocking && unlockingWithFingerprintAllowed) {
                     mWakeAndUnlocking = true;
                     keyguardDone(true, true);
                 } else {
+                    if (wakeAndUnlocking) {
+                        mStatusBarKeyguardViewManager.notifyScreenWakeUpRequested();
+                    }
                     mStatusBarKeyguardViewManager.animateCollapsePanels(
                             FINGERPRINT_COLLAPSE_SPEEDUP_FACTOR);
                 }