From 5e55c8974c4443dd08d8aa1d6082dca6d940393f Mon Sep 17 00:00:00 2001 From: Jayasri bhattacharyya Date: Thu, 10 Sep 2015 16:00:10 +0530 Subject: Fix scrolling of QS panel when no notification is present. After boot when status bar donot have any notification, the overscroll is rubberbanded , changes have been done to fix this and make the behaviour consistent with other scenarios. In NotificationStackScrollLayout when there is no childview present at the touch coordinate, initialization of some variable was not done which was resulting into overscroll being rubberbanded. Usecase of the issue: 1. Reboot the phone. 2. Make sure that no notification is present 3. Pull the status bar. 4. Now pull the "No notifactions" view ,the overscroll is rubberbanded 5. Get some notifications, pull the status bar and then the notifications, the overscroll is not rubberbanded 6. Remove all the notifications, now pull the statusbar and then pull "No notifications" view the overscroll is not rubberbanded. Change-Id: I06d4f0e3d6ed980744be21b9fd7ed307dca69ca3 Signed-off-by: Jayasri bhattacharyya --- .../android/systemui/statusbar/stack/NotificationStackScrollLayout.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java index 6dcbed6f68d2..09c56440eaec 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java @@ -1925,6 +1925,7 @@ public class NotificationStackScrollLayout extends ViewGroup case MotionEvent.ACTION_DOWN: { final int y = (int) ev.getY(); + mScrolledToTopOnFirstDown = isScrolledToTop(); if (getChildAtPosition(ev.getX(), y) == null) { setIsBeingDragged(false); recycleVelocityTracker(); @@ -1938,7 +1939,6 @@ public class NotificationStackScrollLayout extends ViewGroup mLastMotionY = y; mDownX = (int) ev.getX(); mActivePointerId = ev.getPointerId(0); - mScrolledToTopOnFirstDown = isScrolledToTop(); initOrResetVelocityTracker(); mVelocityTracker.addMovement(ev); -- cgit v1.2.3-59-g8ed1b