summaryrefslogtreecommitdiff
path: root/tests/MotionPrediction/src
AgeCommit message (Collapse)Author
2023-03-03Change MotionPredictor API to only support a single device Siarhei Vishniakou
Before this CL, the MotionPredictor API was inconvenient to use. The MotionPredictor.predict returned a list of MotionEvents, with one MotionEvent per-device. The goal was to force applications to consider multi-device streams. However, even if the apps use this API, there's no way they can currently test this behaviour, since the multi-device feature is not yet available. For the multi-device streams feature, the current plan is to provide a new View callback to get these raw streams. In those streams, the per-device MotionEvents would continue to look the same. However, the events may now be interleaved between different devices. For example, a sequence like this would be possible: DOWN(deviceId=2) -> DOWN(deviceId=3) -> MOVE(deviceId=2). That means that the app will likely have to do per-device bookkeeping anyways. So the app might as well just create a per-device MotionPredictor object, as well. Bug: 167946763 Test: (cd frameworks/native/services/inputflinger && atest) Change-Id: I34b8dc02d4f995146cb3eed33888ae34abde29d6
2023-01-09Prediction for motion events Siarhei Vishniakou
The class MotionPredictor will be used to call into native code to execute prediction algorithm. The feature can be enabled by setting the appropriate config on the device. To enable the feature: adb shell setprop persist.input.enable_motion_prediction true Bug: 210158587 Test: m MotionPrediction && adb install $ANDROID_PRODUCT_OUT/system/app/MotionPrediction/MotionPrediction.apk Change-Id: Iaee80d99b18da2f788fa8eacf2e14a6b5c6a7088