Use current directory to load prediction model
Before this CL, the testing binary could not execute properly when
invoked directly. This is because the current working directory does not
get set.
To fix this, use the model file from /system/etc when __ANDROID__ is
defined, and refer to the current directory for all other cases.
Test: m libinput_tests && $ANDROID_HOST_OUT/nativetest64/libinput_tests/libinput_tests
Test: atest libinput_tests
Test: atest --host libinput_tests
Bug: 271134652
Change-Id: I0547ca9666eab153208a581fb60f6bef656b946a
diff --git a/include/input/TfLiteMotionPredictor.h b/include/input/TfLiteMotionPredictor.h
index 54e2851..7de551b41 100644
--- a/include/input/TfLiteMotionPredictor.h
+++ b/include/input/TfLiteMotionPredictor.h
@@ -99,7 +99,7 @@
class TfLiteMotionPredictorModel {
public:
// Creates a model from an encoded Flatbuffer model.
- static std::unique_ptr<TfLiteMotionPredictorModel> create(const char* modelPath);
+ static std::unique_ptr<TfLiteMotionPredictorModel> create();
~TfLiteMotionPredictorModel();