summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2014-09-12 19:19:15 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-12 19:19:15 +0000
commit4089afe9ed0f0e37e2b3d1f1497e8e7a3be83d10 (patch)
treec407cd6a071205533300f7059d8fc535475b3781
parent7f00c69b7c44f210a1cd90fceb40a3086131f094 (diff)
parentacf174bca72aab594d7f5fa309ec9f42f41a77bf (diff)
downloadframeworks_base-4089afe9ed0f0e37e2b3d1f1497e8e7a3be83d10.zip
frameworks_base-4089afe9ed0f0e37e2b3d1f1497e8e7a3be83d10.tar.gz
frameworks_base-4089afe9ed0f0e37e2b3d1f1497e8e7a3be83d10.tar.bz2
am 6791ad68: am 733bf7bd: Merge "Attempt to fix invisible Keyguard #2" into lmp-dev
* commit '6791ad68c8e325fe330e495d10bdf86efa0450de': Attempt to fix invisible Keyguard #2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java16
2 files changed, 22 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
index c3b263d..f6d6af1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -86,6 +86,7 @@ public abstract class PanelView extends FrameLayout {
private String mViewName;
private float mInitialTouchY;
private float mInitialTouchX;
+ private boolean mTouchDisabled;
private Interpolator mLinearOutSlowInInterpolator;
private Interpolator mFastOutSlowInInterpolator;
@@ -207,9 +208,13 @@ public abstract class PanelView extends FrameLayout {
event.offsetLocation(-deltaX, -deltaY);
}
+ public void setTouchDisabled(boolean disabled) {
+ mTouchDisabled = disabled;
+ }
+
@Override
public boolean onTouchEvent(MotionEvent event) {
- if (mInstantExpanding) {
+ if (mInstantExpanding || mTouchDisabled) {
return false;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index fd60ac4..3bdae47 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -404,6 +404,12 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
private int mNavigationBarMode;
private Boolean mScreenOn;
+ // The second field is a bit different from the first one because it only listens to screen on/
+ // screen of events from Keyguard. We need this so we don't have a race condition with the
+ // broadcast. In the future, we should remove the first field altogether and rename the second
+ // field.
+ private boolean mScreenOnFromKeyguard;
+
private ViewMediatorCallback mKeyguardViewMediatorCallback;
private ScrimController mScrimController;
@@ -3466,6 +3472,13 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
public void showKeyguard() {
setBarState(StatusBarState.KEYGUARD);
updateKeyguardState(false /* goingToFullShade */, false /* fromShadeLocked */);
+ if (!mScreenOnFromKeyguard) {
+
+ // If the screen is off already, we need to disable touch events because these might
+ // collapse the panel after we expanded it, and thus we would end up with a blank
+ // Keyguard.
+ mNotificationPanel.setTouchDisabled(true);
+ }
instantExpandNotificationsPanel();
mLeaveOpenOnKeyguardHide = false;
if (mDraggedDownRow != null) {
@@ -3870,12 +3883,15 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
}
public void onScreenTurnedOff() {
+ mScreenOnFromKeyguard = false;
mStackScroller.setAnimationsEnabled(false);
}
public void onScreenTurnedOn() {
+ mScreenOnFromKeyguard = true;
mStackScroller.setAnimationsEnabled(true);
mNotificationPanel.onScreenTurnedOn();
+ mNotificationPanel.setTouchDisabled(false);
}
/**