Loading services/inputflinger/reader/Android.bp +3 −0 Original line number Original line Diff line number Diff line Loading @@ -58,6 +58,7 @@ filegroup { "mapper/accumulator/MultiTouchMotionAccumulator.cpp", "mapper/accumulator/MultiTouchMotionAccumulator.cpp", "mapper/accumulator/SingleTouchMotionAccumulator.cpp", "mapper/accumulator/SingleTouchMotionAccumulator.cpp", "mapper/accumulator/TouchButtonAccumulator.cpp", "mapper/accumulator/TouchButtonAccumulator.cpp", "mapper/gestures/GesturesLogging.cpp", ], ], } } Loading @@ -69,12 +70,14 @@ cc_defaults { "libcap", "libcap", "libcrypto", "libcrypto", "libcutils", "libcutils", "libjsoncpp", "liblog", "liblog", "libstatslog", "libstatslog", "libutils", "libutils", ], ], static_libs: [ static_libs: [ "libc++fs", "libc++fs", "libchrome-gestures", "libui-types", "libui-types", ], ], header_libs: [ header_libs: [ Loading services/inputflinger/reader/mapper/gestures/GesturesLogging.cpp 0 → 100644 +41 −0 Original line number Original line 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); } } Loading
services/inputflinger/reader/Android.bp +3 −0 Original line number Original line Diff line number Diff line Loading @@ -58,6 +58,7 @@ filegroup { "mapper/accumulator/MultiTouchMotionAccumulator.cpp", "mapper/accumulator/MultiTouchMotionAccumulator.cpp", "mapper/accumulator/SingleTouchMotionAccumulator.cpp", "mapper/accumulator/SingleTouchMotionAccumulator.cpp", "mapper/accumulator/TouchButtonAccumulator.cpp", "mapper/accumulator/TouchButtonAccumulator.cpp", "mapper/gestures/GesturesLogging.cpp", ], ], } } Loading @@ -69,12 +70,14 @@ cc_defaults { "libcap", "libcap", "libcrypto", "libcrypto", "libcutils", "libcutils", "libjsoncpp", "liblog", "liblog", "libstatslog", "libstatslog", "libutils", "libutils", ], ], static_libs: [ static_libs: [ "libc++fs", "libc++fs", "libchrome-gestures", "libui-types", "libui-types", ], ], header_libs: [ header_libs: [ Loading
services/inputflinger/reader/mapper/gestures/GesturesLogging.cpp 0 → 100644 +41 −0 Original line number Original line 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); } }