Prabir Pradhan | addf8e9 | 2023-04-06 00:28:48 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2023 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 "InputDeviceMetricsCollector" |
| 18 | #include "InputDeviceMetricsCollector.h" |
| 19 | |
| 20 | namespace android { |
| 21 | |
| 22 | InputDeviceMetricsCollector::InputDeviceMetricsCollector(InputListenerInterface& listener) |
| 23 | : mNextListener(listener){}; |
| 24 | |
| 25 | void InputDeviceMetricsCollector::notifyInputDevicesChanged( |
| 26 | const NotifyInputDevicesChangedArgs& args) { |
| 27 | mNextListener.notify(args); |
| 28 | } |
| 29 | |
| 30 | void InputDeviceMetricsCollector::notifyConfigurationChanged( |
| 31 | const NotifyConfigurationChangedArgs& args) { |
| 32 | mNextListener.notify(args); |
| 33 | } |
| 34 | |
| 35 | void InputDeviceMetricsCollector::notifyKey(const NotifyKeyArgs& args) { |
| 36 | mNextListener.notify(args); |
| 37 | } |
| 38 | |
| 39 | void InputDeviceMetricsCollector::notifyMotion(const NotifyMotionArgs& args) { |
| 40 | mNextListener.notify(args); |
| 41 | } |
| 42 | |
| 43 | void InputDeviceMetricsCollector::notifySwitch(const NotifySwitchArgs& args) { |
| 44 | mNextListener.notify(args); |
| 45 | } |
| 46 | |
| 47 | void InputDeviceMetricsCollector::notifySensor(const NotifySensorArgs& args) { |
| 48 | mNextListener.notify(args); |
| 49 | } |
| 50 | |
| 51 | void InputDeviceMetricsCollector::notifyVibratorState(const NotifyVibratorStateArgs& args) { |
| 52 | mNextListener.notify(args); |
| 53 | } |
| 54 | |
| 55 | void InputDeviceMetricsCollector::notifyDeviceReset(const NotifyDeviceResetArgs& args) { |
| 56 | mNextListener.notify(args); |
| 57 | } |
| 58 | |
| 59 | void InputDeviceMetricsCollector::notifyPointerCaptureChanged( |
| 60 | const NotifyPointerCaptureChangedArgs& args) { |
| 61 | mNextListener.notify(args); |
| 62 | } |
| 63 | |
| 64 | void InputDeviceMetricsCollector::dump(std::string& dump) { |
| 65 | dump += "InputDeviceMetricsCollector:\n"; |
| 66 | } |
| 67 | |
| 68 | } // namespace android |