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

Commit 5024482d authored by Ben Murdoch's avatar Ben Murdoch
Browse files

Add glue for Gestures logging, and link gestures stack in input reader.

Bug: 251196347
Test: Treehugger
Change-Id: I4307f577ecd4338d16af8264fe05293c1d2e5920
parent 65b6e83e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ filegroup {
        "mapper/accumulator/MultiTouchMotionAccumulator.cpp",
        "mapper/accumulator/SingleTouchMotionAccumulator.cpp",
        "mapper/accumulator/TouchButtonAccumulator.cpp",
        "mapper/gestures/GesturesLogging.cpp",
    ],
}

@@ -69,12 +70,14 @@ cc_defaults {
        "libcap",
        "libcrypto",
        "libcutils",
        "libjsoncpp",
        "liblog",
        "libstatslog",
        "libutils",
    ],
    static_libs: [
        "libc++fs",
        "libchrome-gestures",
        "libui-types",
    ],
    header_libs: [
+41 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2022 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef LOG_TAG
#define LOG_TAG "Gestures"
#endif

#include <stdio.h>

#include <log/log.h>

#include "include/gestures.h"

extern "C" {

void gestures_log(int verb, const char* fmt, ...) {
    va_list args;
    va_start(args, fmt);
    if (verb == GESTURES_LOG_ERROR) {
        LOG_PRI_VA(ANDROID_LOG_ERROR, LOG_TAG, fmt, args);
    } else if (verb == GESTURES_LOG_INFO) {
        LOG_PRI_VA(ANDROID_LOG_INFO, LOG_TAG, fmt, args);
    } else {
        LOG_PRI_VA(ANDROID_LOG_DEBUG, LOG_TAG, fmt, args);
    }
    va_end(args);
}
}