From 5243c12f49fbe0ab8fe6b3b2be368783cd2b2a7b Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Wed, 21 Oct 2015 14:00:33 -0700 Subject: [PATCH] Fixed a bug where a notification could stay userlocked Moved the responsibility to remove the userlocked flag into the DragdownHelper instead of the Callback. Bug: 24866646 Change-Id: Ib0dbe310f9f7637f9bae466b1029728a6611f291 --- .../src/com/android/systemui/statusbar/DragDownHelper.java | 3 +++ .../com/android/systemui/statusbar/phone/PhoneStatusBar.java | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/DragDownHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/DragDownHelper.java index 7b0a44f7fe38d..517572d19a11e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/DragDownHelper.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/DragDownHelper.java @@ -134,6 +134,8 @@ public class DragDownHelper implements Gefingerpoken { (int) (y - mInitialTouchY))) { if (mStartingChild == null) { mDragDownCallback.setEmptyDragAmount(0f); + } else { + mCallback.setUserLockedChild(mStartingChild, false); } mDraggingDown = false; } else { @@ -180,6 +182,7 @@ public class DragDownHelper implements Gefingerpoken { private void cancelExpansion(final ExpandableView child) { if (child.getContentHeight() == child.getMinHeight()) { + mCallback.setUserLockedChild(child, false); return; } ObjectAnimator anim = ObjectAnimator.ofInt(child, "contentHeight", 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 f3658eb3c1c99..deb44025880c3 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -3986,9 +3986,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, mNotificationPanel.animateToFullShade(0 /* delay */); setBarState(StatusBarState.SHADE_LOCKED); updateKeyguardState(false /* goingToFullShade */, false /* fromShadeLocked */); - if (row != null) { - row.setUserLocked(false); - } } }