1 /*
2  * Copyright (C) 2019 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #define LOG_TAG "InputClassifierHAL"
18 
19 #include "InputClassifier.h"
20 #include <inttypes.h>
21 #include <log/log.h>
22 #include <utils/Timers.h>
23 
24 using namespace android::hardware::input::common::V1_0;
25 
26 namespace android {
27 namespace hardware {
28 namespace input {
29 namespace classifier {
30 namespace V1_0 {
31 namespace implementation {
32 
33 // Methods from ::android::hardware::input::classifier::V1_0::IInputClassifier follow.
classify(const MotionEvent &)34 Return<Classification> InputClassifier::classify(const MotionEvent& /*event*/) {
35     /**
36      * The touchscreen data is highly device-dependent.
37      * As a result, the implementation of this method will likely be hardware-specific.
38      * Here we just report gesture as not having any classification, which means that the
39      * default action will be taken in the framework.
40      * This is equivalent to not having the InputClassifier HAL at all.
41      */
42     return Classification::NONE;
43 }
44 
reset()45 Return<void> InputClassifier::reset() {
46     // We don't have any internal state, so no work needed here.
47     return Void();
48 }
49 
resetDevice(int32_t)50 Return<void> InputClassifier::resetDevice(int32_t /*deviceId*/) {
51     // We don't have any internal per-device state, so no work needed here.
52     return Void();
53 }
54 
55 }  // namespace implementation
56 }  // namespace V1_0
57 }  // namespace classifier
58 }  // namespace input
59 }  // namespace hardware
60 }  // namespace android
61