Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67ad50ae authored by Olivier St-Onge's avatar Olivier St-Onge
Browse files

Add null check to motion events in global actions dialog

Flag: EXEMPT bugfix
Fixes: 369112580
Test: manually
Change-Id: Ib182b3fce83f1aaf002524b423cd0861e7dccd3b
parent 50e83ba8
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -2298,9 +2298,11 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
                    }

                    @Override
                    public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX,
                    public boolean onScroll(@Nullable MotionEvent e1, MotionEvent e2,
                            float distanceX,
                            float distanceY) {
                        if (distanceY < 0 && distanceY > distanceX
                                && e1 != null
                                && e1.getY() <= mStatusBarWindowController.getStatusBarHeight()) {
                            // Downwards scroll from top
                            openShadeAndDismiss();
@@ -2310,9 +2312,11 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
                    }

                    @Override
                    public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
                    public boolean onFling(@Nullable MotionEvent e1, MotionEvent e2,
                            float velocityX,
                            float velocityY) {
                        if (velocityY > 0 && Math.abs(velocityY) > Math.abs(velocityX)
                                && e1 != null
                                && e1.getY() <= mStatusBarWindowController.getStatusBarHeight()) {
                            // Downwards fling from top
                            openShadeAndDismiss();