Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 715d94fb authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Update dispatcher invocation to use std::chrono

Now that the dispatcher interface has changed, update the callsite to
use std::chrono as well.

Bug: 294547658
Test: m libservices.core
Change-Id: I15c4ec6f666d62d828c5664230c0b7dad99ca7fa
parent ace8b54a
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -2557,11 +2557,10 @@ static void nativeSetMotionClassifierEnabled(JNIEnv* env, jobject nativeImplObj,
static void nativeSetKeyRepeatConfiguration(JNIEnv* env, jobject nativeImplObj, jint timeoutMs,
                                            jint delayMs) {
    NativeInputManager* im = getNativeInputManager(env, nativeImplObj);
    im->getInputManager()->getDispatcher().setKeyRepeatConfiguration(static_cast<nsecs_t>(
                                                                             timeoutMs) *
                                                                             1000000,
                                                                     static_cast<nsecs_t>(delayMs) *
                                                                             1000000);
    im->getInputManager()->getDispatcher().setKeyRepeatConfiguration(std::chrono::milliseconds(
                                                                             timeoutMs),
                                                                     std::chrono::milliseconds(
                                                                             delayMs));
}

static jobject createInputSensorInfo(JNIEnv* env, jstring name, jstring vendor, jint version,