Loading packages/SystemUI/src/com/android/systemui/SwipeHelper.java +10 −2 Original line number Diff line number Diff line Loading @@ -493,7 +493,15 @@ public class SwipeHelper implements Gefingerpoken { updateSwipeProgressFromOffset(view, canAnimViewBeDismissed); } public void snapChildIfNeeded(final View view, boolean animate) { /** * Called when a view is updated to be non-dismissable, if the view was being dismissed before * the update this will handle snapping it back into place. * * @param view the view to snap if necessary. * @param animate whether to animate the snap or not. * @param targetLeft the target to snap to. */ public void snapChildIfNeeded(final View view, boolean animate, float targetLeft) { if ((mDragging && mCurrView == view) || mSnappingChild) { return; } Loading @@ -507,7 +515,7 @@ public class SwipeHelper implements Gefingerpoken { } if (needToSnap) { if (animate) { snapChild(view, 0 /* targetLeft */, 0.0f /* velocity */); snapChild(view, targetLeft, 0.0f /* velocity */); } else { snapChildInstantly(view); } Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +4 −2 Original line number Diff line number Diff line Loading @@ -990,9 +990,11 @@ public class NotificationStackScrollLayout extends ViewGroup true /* isDismissAll */); } public void snapViewIfNeeded(View child) { public void snapViewIfNeeded(ExpandableNotificationRow child) { boolean animate = mIsExpanded || isPinnedHeadsUp(child); mSwipeHelper.snapChildIfNeeded(child, animate); // If the child is showing the gear to go to settings, snap to that float targetLeft = child.getSettingsRow().isVisible() ? child.getTranslation() : 0; mSwipeHelper.snapChildIfNeeded(child, animate, targetLeft); } @Override Loading Loading
packages/SystemUI/src/com/android/systemui/SwipeHelper.java +10 −2 Original line number Diff line number Diff line Loading @@ -493,7 +493,15 @@ public class SwipeHelper implements Gefingerpoken { updateSwipeProgressFromOffset(view, canAnimViewBeDismissed); } public void snapChildIfNeeded(final View view, boolean animate) { /** * Called when a view is updated to be non-dismissable, if the view was being dismissed before * the update this will handle snapping it back into place. * * @param view the view to snap if necessary. * @param animate whether to animate the snap or not. * @param targetLeft the target to snap to. */ public void snapChildIfNeeded(final View view, boolean animate, float targetLeft) { if ((mDragging && mCurrView == view) || mSnappingChild) { return; } Loading @@ -507,7 +515,7 @@ public class SwipeHelper implements Gefingerpoken { } if (needToSnap) { if (animate) { snapChild(view, 0 /* targetLeft */, 0.0f /* velocity */); snapChild(view, targetLeft, 0.0f /* velocity */); } else { snapChildInstantly(view); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +4 −2 Original line number Diff line number Diff line Loading @@ -990,9 +990,11 @@ public class NotificationStackScrollLayout extends ViewGroup true /* isDismissAll */); } public void snapViewIfNeeded(View child) { public void snapViewIfNeeded(ExpandableNotificationRow child) { boolean animate = mIsExpanded || isPinnedHeadsUp(child); mSwipeHelper.snapChildIfNeeded(child, animate); // If the child is showing the gear to go to settings, snap to that float targetLeft = child.getSettingsRow().isVisible() ? child.getTranslation() : 0; mSwipeHelper.snapChildIfNeeded(child, animate, targetLeft); } @Override Loading