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