summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jun Mukai <mukai@google.com> 2015-10-15 02:59:57 -0700
committer Jun Mukai <mukai@google.com> 2015-10-15 02:59:57 -0700
commitc99243aff8f039734fcc9af93f6854c3838796cf (patch)
tree0da9ae3fc316db82c7f232afb67a1455d523eb09
parent0a5e256d9fd56607ab4bbd987268fbfa3fe935fe (diff)
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
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
index 76edafa2bed0..ebe77853c1b2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -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);
}