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

Commit 0619bc22 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "core/jni: update parameter name comments in input-related files"

parents d487c3b8 87a56d9c
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -278,7 +278,7 @@ int NativeInputEventReceiver::handleEvent(int receiveFd, int events, void* data)

    if (events & ALOOPER_EVENT_INPUT) {
        JNIEnv* env = AndroidRuntime::getJNIEnv();
        status_t status = consumeEvents(env, false /*consumeBatches*/, -1, nullptr);
        status_t status = consumeEvents(env, /*consumeBatches=*/false, -1, nullptr);
        mMessageQueue->raiseAndClearException(env, "handleReceiveCallback");
        return status == OK || status == NO_MEMORY ? KEEP_CALLBACK : REMOVE_CALLBACK;
    }
@@ -398,7 +398,7 @@ status_t NativeInputEventReceiver::consumeEvents(JNIEnv* env,
                    env->CallVoidMethod(receiverObj.get(),
                                        gInputEventReceiverClassInfo.onFocusEvent,
                                        jboolean(focusEvent->getHasFocus()));
                    finishInputEvent(seq, true /* handled */);
                    finishInputEvent(seq, /*handled=*/true);
                    continue;
                }
                case InputEventType::CAPTURE: {
@@ -411,7 +411,7 @@ status_t NativeInputEventReceiver::consumeEvents(JNIEnv* env,
                    env->CallVoidMethod(receiverObj.get(),
                                        gInputEventReceiverClassInfo.onPointerCaptureEvent,
                                        jboolean(captureEvent->getPointerCaptureEnabled()));
                    finishInputEvent(seq, true /* handled */);
                    finishInputEvent(seq, /*handled=*/true);
                    continue;
                }
                case InputEventType::DRAG: {
@@ -423,7 +423,7 @@ status_t NativeInputEventReceiver::consumeEvents(JNIEnv* env,
                    env->CallVoidMethod(receiverObj.get(), gInputEventReceiverClassInfo.onDragEvent,
                                        jboolean(dragEvent->isExiting()), dragEvent->getX(),
                                        dragEvent->getY());
                    finishInputEvent(seq, true /* handled */);
                    finishInputEvent(seq, /*handled=*/true);
                    continue;
                }
                case InputEventType::TOUCH_MODE: {
@@ -436,7 +436,7 @@ status_t NativeInputEventReceiver::consumeEvents(JNIEnv* env,
                    env->CallVoidMethod(receiverObj.get(),
                                        gInputEventReceiverClassInfo.onTouchModeChanged,
                                        jboolean(touchModeEvent->isInTouchMode()));
                    finishInputEvent(seq, true /* handled */);
                    finishInputEvent(seq, /*handled=*/true);
                    continue;
                }

@@ -571,8 +571,8 @@ static jboolean nativeConsumeBatchedInputEvents(JNIEnv* env, jclass clazz, jlong
    sp<NativeInputEventReceiver> receiver =
            reinterpret_cast<NativeInputEventReceiver*>(receiverPtr);
    bool consumedBatch;
    status_t status = receiver->consumeEvents(env, true /*consumeBatches*/, frameTimeNanos,
            &consumedBatch);
    status_t status =
            receiver->consumeEvents(env, /*consumeBatches=*/true, frameTimeNanos, &consumedBatch);
    if (status && status != DEAD_OBJECT && !env->ExceptionCheck()) {
        std::string message =
                android::base::StringPrintf("Failed to consume batched input event.  status=%s(%d)",
+1 −1
Original line number Diff line number Diff line
@@ -239,7 +239,7 @@ static jlong nativeSendMotionEvent(JNIEnv* env, jobject clazz, jlong ptr, jobjec
        return -1;
    }
    MotionEvent* event = queue->createMotionEvent();
    event->copyFrom(originalEvent, true /* keepHistory */);
    event->copyFrom(originalEvent, /*keepHistory=*/true);
    queue->enqueueEvent(event);
    return reinterpret_cast<jlong>(event);
}
+2 −2
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ jobject android_view_KeyCharacterMap_create(JNIEnv* env, int32_t deviceId,
                          reinterpret_cast<jlong>(nativeMap));
}

static jobject nativeObtainEmptyKeyCharacterMap(JNIEnv* env, jobject /* clazz */, jint deviceId) {
static jobject nativeObtainEmptyKeyCharacterMap(JNIEnv* env, /*clazz=*/jobject, jint deviceId) {
    return android_view_KeyCharacterMap_create(env, deviceId, nullptr);
}

@@ -202,7 +202,7 @@ static jobjectArray nativeGetEvents(JNIEnv *env, jobject clazz, jlong ptr,
        jcharArray charsArray) {
    NativeKeyCharacterMap* map = reinterpret_cast<NativeKeyCharacterMap*>(ptr);
    if (!map || !map->getMap()) {
        return env->NewObjectArray(0 /* size */, gKeyEventClassInfo.clazz, NULL);
        return env->NewObjectArray(/*size=*/0, gKeyEventClassInfo.clazz, NULL);
    }
    jchar* chars = env->GetCharArrayElements(charsArray, NULL);
    if (!chars) {