diff options
author | 2023-10-03 14:04:18 -0700 | |
---|---|---|
committer | 2023-10-04 09:58:21 -0700 | |
commit | 88daa90013a028ecb62dba46113d3935b98dcbc6 (patch) | |
tree | 3706daf385cca42368cc8dde0177be7b2da3e8d6 /vulkan/libvulkan/driver.cpp | |
parent | cc89e85f3aa9225d977d3f78197307ec2f6f47e1 (diff) |
Allow values from SourceClass inside rust Source
Inside ViewTest::testOnTouchEventScroll, some MotionEvents are created
without a valid source. During injection, they get appended with
SourceClass::Pointer.
If these events are sent into the InputVerifier, it's basically being
asked to convert 0x2 === AINPUT_SOURCE_CLASS_POINTER into rust's
input::Source.
This fails during unwrap:
$ TEST=libinput_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST
[ RUN ] InputVerifierTest.BadSourceProcess
thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', frameworks/native/libs/input/rust/lib.rs:84:35
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
Aborted
To mitigate this, add the SourceClass definitions into Source, thus
allowing such conversions.
Bug: 303143553
Bug: 211379801
Test: TEST=libinput_rust_test; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST
Test: TEST=libinput_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST
Change-Id: I46415d88251937959104bb82a3976e72ffcfcaf9
Diffstat (limited to 'vulkan/libvulkan/driver.cpp')
0 files changed, 0 insertions, 0 deletions