summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yeabkal Wubshit <yeabkal@google.com> 2024-05-13 03:04:16 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-05-13 03:04:16 +0000
commitb972663f6daf3cb60874e1169c3e080e735bc8b6 (patch)
tree45823b384987cf1ff61943f86f9669a32fdeb173
parent2e661a10da4b64742cd006438834afcb0ef058a7 (diff)
parentd14f0147d0a55b2431e0d9fcc5752e4ffa7ffc11 (diff)
Merge "Copy FocusEventDebugView MotionEvent before it gets recycled" into main
-rw-r--r--services/core/java/com/android/server/input/debug/FocusEventDebugView.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/input/debug/FocusEventDebugView.java b/services/core/java/com/android/server/input/debug/FocusEventDebugView.java
index 6eae9a4bbe22..d7d57df7f74c 100644
--- a/services/core/java/com/android/server/input/debug/FocusEventDebugView.java
+++ b/services/core/java/com/android/server/input/debug/FocusEventDebugView.java
@@ -240,7 +240,8 @@ public class FocusEventDebugView extends RelativeLayout {
return;
}
- post(() -> handleRotaryInput(MotionEvent.obtain((MotionEvent) event)));
+ MotionEvent motionEvent = MotionEvent.obtain(event);
+ post(() -> handleRotaryInput(motionEvent));
}
private void handleKeyEvent(KeyEvent keyEvent) {