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

Commit c99243af authored by Jun Mukai's avatar Jun Mukai
Browse files

Fix: input source comparison -> MotionEvent.isFromSource

Similar to I8c14a3b6b92826d27d09f0113c1be47786f94570, isFromSource
is a better method to check if the input is a mouse device.

Bug: 22304981
Change-Id: I40326701d56e0a62895dd589438696f3043648a6
parent 0a5e256d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -229,7 +229,7 @@ public abstract class PanelView extends FrameLayout {
        }

        // On expanding, single mouse click expands the panel instead of dragging.
        if (isFullyCollapsed() && event.getDevice().getSources() == InputDevice.SOURCE_MOUSE) {
        if (isFullyCollapsed() && event.isFromSource(InputDevice.SOURCE_MOUSE)) {
            if (event.getAction() == MotionEvent.ACTION_UP) {
                expand(true);
            }