Merge "Fix issue where keyguard wouldn't be dismissed" into oc-dr1-dev am: 94f8143129
am: bb9e8ccea1

Change-Id: I8157d308f178f2693529452f9fe83ab8442a5e73
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
index 06cdfae..b4b859c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
@@ -113,7 +113,7 @@
             // Since we won't get a setOccluded call we have to reset the view manually such that
             // the bouncer goes away.
             if (mOccluded) {
-                reset(false /* hideBouncerWhenShowing */);
+                reset(true /* hideBouncerWhenShowing */);
             }
         }
     };
@@ -316,6 +316,7 @@
                 return;
             }
         }
+        boolean isOccluding = !mOccluded && occluded;
         mOccluded = occluded;
         if (mShowing) {
             mStatusBar.updateMediaMetaData(false, animate && !occluded);
@@ -326,7 +327,7 @@
         if (!mDozing) {
             // If Keyguard is reshown, don't hide the bouncer as it might just have been requested
             // by a FLAG_DISMISS_KEYGUARD_ACTIVITY.
-            reset(false /* hideBouncerWhenShowing*/);
+            reset(isOccluding /* hideBouncerWhenShowing*/);
         }
         if (animate && !occluded && mShowing) {
             mStatusBar.animateKeyguardUnoccluding();