Siarhei Vishniakou | 6e1e987 | 2022-11-08 17:51:35 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2022 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 | #include "TouchedWindow.h" |
| 18 | |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 19 | #include <android-base/logging.h> |
Siarhei Vishniakou | 6e1e987 | 2022-11-08 17:51:35 -0800 | [diff] [blame] | 20 | #include <android-base/stringprintf.h> |
| 21 | #include <input/PrintTools.h> |
| 22 | |
| 23 | using android::base::StringPrintf; |
| 24 | |
| 25 | namespace android { |
| 26 | |
| 27 | namespace inputdispatcher { |
| 28 | |
Siarhei Vishniakou | 1ff00cc | 2023-12-13 16:12:13 -0800 | [diff] [blame^] | 29 | namespace { |
| 30 | |
| 31 | bool hasPointerId(const std::vector<PointerProperties>& pointers, int32_t pointerId) { |
| 32 | return std::find_if(pointers.begin(), pointers.end(), |
| 33 | [&pointerId](const PointerProperties& properties) { |
| 34 | return properties.id == pointerId; |
| 35 | }) != pointers.end(); |
| 36 | } |
| 37 | |
| 38 | } // namespace |
| 39 | |
Siarhei Vishniakou | b581f7f | 2022-12-07 20:23:06 +0000 | [diff] [blame] | 40 | bool TouchedWindow::hasHoveringPointers() const { |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 41 | for (const auto& [_, state] : mDeviceStates) { |
Siarhei Vishniakou | 1ff00cc | 2023-12-13 16:12:13 -0800 | [diff] [blame^] | 42 | if (!state.hoveringPointers.empty()) { |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 43 | return true; |
| 44 | } |
| 45 | } |
| 46 | return false; |
Siarhei Vishniakou | b581f7f | 2022-12-07 20:23:06 +0000 | [diff] [blame] | 47 | } |
| 48 | |
Siarhei Vishniakou | d38a1e0 | 2023-07-18 11:55:17 -0700 | [diff] [blame] | 49 | bool TouchedWindow::hasHoveringPointers(DeviceId deviceId) const { |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 50 | const auto stateIt = mDeviceStates.find(deviceId); |
| 51 | if (stateIt == mDeviceStates.end()) { |
| 52 | return false; |
| 53 | } |
| 54 | const DeviceState& state = stateIt->second; |
| 55 | |
Siarhei Vishniakou | 1ff00cc | 2023-12-13 16:12:13 -0800 | [diff] [blame^] | 56 | return !state.hoveringPointers.empty(); |
Siarhei Vishniakou | e0431e4 | 2023-01-28 17:01:39 -0800 | [diff] [blame] | 57 | } |
| 58 | |
Siarhei Vishniakou | 2899c55 | 2023-07-10 18:20:46 -0700 | [diff] [blame] | 59 | void TouchedWindow::clearHoveringPointers(DeviceId deviceId) { |
| 60 | auto stateIt = mDeviceStates.find(deviceId); |
| 61 | if (stateIt == mDeviceStates.end()) { |
| 62 | return; |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 63 | } |
Siarhei Vishniakou | 2899c55 | 2023-07-10 18:20:46 -0700 | [diff] [blame] | 64 | DeviceState& state = stateIt->second; |
Siarhei Vishniakou | 1ff00cc | 2023-12-13 16:12:13 -0800 | [diff] [blame^] | 65 | state.hoveringPointers.clear(); |
Siarhei Vishniakou | 2899c55 | 2023-07-10 18:20:46 -0700 | [diff] [blame] | 66 | if (!state.hasPointers()) { |
| 67 | mDeviceStates.erase(stateIt); |
| 68 | } |
Siarhei Vishniakou | b581f7f | 2022-12-07 20:23:06 +0000 | [diff] [blame] | 69 | } |
| 70 | |
Siarhei Vishniakou | d38a1e0 | 2023-07-18 11:55:17 -0700 | [diff] [blame] | 71 | bool TouchedWindow::hasHoveringPointer(DeviceId deviceId, int32_t pointerId) const { |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 72 | const auto stateIt = mDeviceStates.find(deviceId); |
| 73 | if (stateIt == mDeviceStates.end()) { |
Siarhei Vishniakou | b581f7f | 2022-12-07 20:23:06 +0000 | [diff] [blame] | 74 | return false; |
| 75 | } |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 76 | const DeviceState& state = stateIt->second; |
Siarhei Vishniakou | 1ff00cc | 2023-12-13 16:12:13 -0800 | [diff] [blame^] | 77 | return hasPointerId(state.hoveringPointers, pointerId); |
Siarhei Vishniakou | b581f7f | 2022-12-07 20:23:06 +0000 | [diff] [blame] | 78 | } |
| 79 | |
Siarhei Vishniakou | 1ff00cc | 2023-12-13 16:12:13 -0800 | [diff] [blame^] | 80 | void TouchedWindow::addHoveringPointer(DeviceId deviceId, const PointerProperties& pointer) { |
| 81 | std::vector<PointerProperties>& hoveringPointers = mDeviceStates[deviceId].hoveringPointers; |
| 82 | const size_t initialSize = hoveringPointers.size(); |
| 83 | std::erase_if(hoveringPointers, [&pointer](const PointerProperties& properties) { |
| 84 | return properties.id == pointer.id; |
| 85 | }); |
| 86 | if (hoveringPointers.size() != initialSize) { |
| 87 | LOG(ERROR) << __func__ << ": " << pointer << ", device " << deviceId << " was in " << *this; |
| 88 | } |
| 89 | hoveringPointers.push_back(pointer); |
Siarhei Vishniakou | b581f7f | 2022-12-07 20:23:06 +0000 | [diff] [blame] | 90 | } |
| 91 | |
Siarhei Vishniakou | d38a1e0 | 2023-07-18 11:55:17 -0700 | [diff] [blame] | 92 | void TouchedWindow::addTouchingPointers(DeviceId deviceId, |
Siarhei Vishniakou | 1ff00cc | 2023-12-13 16:12:13 -0800 | [diff] [blame^] | 93 | const std::vector<PointerProperties>& pointers) { |
| 94 | std::vector<PointerProperties>& touchingPointers = mDeviceStates[deviceId].touchingPointers; |
| 95 | const size_t initialSize = touchingPointers.size(); |
| 96 | for (const PointerProperties& pointer : pointers) { |
| 97 | std::erase_if(touchingPointers, [&pointer](const PointerProperties& properties) { |
| 98 | return properties.id == pointer.id; |
| 99 | }); |
| 100 | } |
| 101 | if (touchingPointers.size() != initialSize) { |
| 102 | LOG(ERROR) << __func__ << ": " << dumpVector(pointers, streamableToString) << ", device " |
| 103 | << deviceId << " already in " << *this; |
| 104 | } |
| 105 | touchingPointers.insert(touchingPointers.end(), pointers.begin(), pointers.end()); |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 106 | } |
| 107 | |
| 108 | bool TouchedWindow::hasTouchingPointers() const { |
| 109 | for (const auto& [_, state] : mDeviceStates) { |
Siarhei Vishniakou | 1ff00cc | 2023-12-13 16:12:13 -0800 | [diff] [blame^] | 110 | if (!state.touchingPointers.empty()) { |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 111 | return true; |
| 112 | } |
| 113 | } |
| 114 | return false; |
| 115 | } |
| 116 | |
Siarhei Vishniakou | d38a1e0 | 2023-07-18 11:55:17 -0700 | [diff] [blame] | 117 | bool TouchedWindow::hasTouchingPointers(DeviceId deviceId) const { |
Siarhei Vishniakou | 1ff00cc | 2023-12-13 16:12:13 -0800 | [diff] [blame^] | 118 | return !getTouchingPointers(deviceId).empty(); |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 119 | } |
| 120 | |
Siarhei Vishniakou | d38a1e0 | 2023-07-18 11:55:17 -0700 | [diff] [blame] | 121 | bool TouchedWindow::hasTouchingPointer(DeviceId deviceId, int32_t pointerId) const { |
Siarhei Vishniakou | 1ff00cc | 2023-12-13 16:12:13 -0800 | [diff] [blame^] | 122 | const auto stateIt = mDeviceStates.find(deviceId); |
| 123 | if (stateIt == mDeviceStates.end()) { |
| 124 | return false; |
| 125 | } |
| 126 | const DeviceState& state = stateIt->second; |
| 127 | return hasPointerId(state.touchingPointers, pointerId); |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 128 | } |
| 129 | |
Siarhei Vishniakou | 1ff00cc | 2023-12-13 16:12:13 -0800 | [diff] [blame^] | 130 | std::vector<PointerProperties> TouchedWindow::getTouchingPointers(DeviceId deviceId) const { |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 131 | const auto stateIt = mDeviceStates.find(deviceId); |
| 132 | if (stateIt == mDeviceStates.end()) { |
| 133 | return {}; |
| 134 | } |
| 135 | const DeviceState& state = stateIt->second; |
Siarhei Vishniakou | 1ff00cc | 2023-12-13 16:12:13 -0800 | [diff] [blame^] | 136 | return state.touchingPointers; |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 137 | } |
| 138 | |
Siarhei Vishniakou | d38a1e0 | 2023-07-18 11:55:17 -0700 | [diff] [blame] | 139 | void TouchedWindow::removeTouchingPointer(DeviceId deviceId, int32_t pointerId) { |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 140 | std::bitset<MAX_POINTER_ID + 1> pointerIds; |
| 141 | pointerIds.set(pointerId, true); |
| 142 | |
| 143 | removeTouchingPointers(deviceId, pointerIds); |
| 144 | } |
| 145 | |
Siarhei Vishniakou | d38a1e0 | 2023-07-18 11:55:17 -0700 | [diff] [blame] | 146 | void TouchedWindow::removeTouchingPointers(DeviceId deviceId, |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 147 | std::bitset<MAX_POINTER_ID + 1> pointers) { |
| 148 | const auto stateIt = mDeviceStates.find(deviceId); |
| 149 | if (stateIt == mDeviceStates.end()) { |
| 150 | return; |
| 151 | } |
| 152 | DeviceState& state = stateIt->second; |
| 153 | |
Siarhei Vishniakou | 1ff00cc | 2023-12-13 16:12:13 -0800 | [diff] [blame^] | 154 | std::erase_if(state.touchingPointers, [&pointers](const PointerProperties& properties) { |
| 155 | return pointers.test(properties.id); |
| 156 | }); |
| 157 | |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 158 | state.pilferingPointerIds &= ~pointers; |
| 159 | |
| 160 | if (!state.hasPointers()) { |
| 161 | mDeviceStates.erase(stateIt); |
Siarhei Vishniakou | 6464e46 | 2023-02-06 18:57:59 -0800 | [diff] [blame] | 162 | } |
| 163 | } |
| 164 | |
Siarhei Vishniakou | d38a1e0 | 2023-07-18 11:55:17 -0700 | [diff] [blame] | 165 | std::set<DeviceId> TouchedWindow::getTouchingDeviceIds() const { |
| 166 | std::set<DeviceId> deviceIds; |
Prabir Pradhan | 9cd9eb6 | 2023-11-22 17:58:06 +0000 | [diff] [blame] | 167 | for (const auto& [deviceId, deviceState] : mDeviceStates) { |
Siarhei Vishniakou | 1ff00cc | 2023-12-13 16:12:13 -0800 | [diff] [blame^] | 168 | if (!deviceState.touchingPointers.empty()) { |
Prabir Pradhan | 9cd9eb6 | 2023-11-22 17:58:06 +0000 | [diff] [blame] | 169 | deviceIds.insert(deviceId); |
| 170 | } |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 171 | } |
| 172 | return deviceIds; |
| 173 | } |
| 174 | |
Siarhei Vishniakou | d38a1e0 | 2023-07-18 11:55:17 -0700 | [diff] [blame] | 175 | bool TouchedWindow::hasPilferingPointers(DeviceId deviceId) const { |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 176 | const auto stateIt = mDeviceStates.find(deviceId); |
| 177 | if (stateIt == mDeviceStates.end()) { |
| 178 | return false; |
| 179 | } |
| 180 | const DeviceState& state = stateIt->second; |
| 181 | |
| 182 | return state.pilferingPointerIds.any(); |
| 183 | } |
| 184 | |
Siarhei Vishniakou | d38a1e0 | 2023-07-18 11:55:17 -0700 | [diff] [blame] | 185 | void TouchedWindow::addPilferingPointers(DeviceId deviceId, |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 186 | std::bitset<MAX_POINTER_ID + 1> pointerIds) { |
| 187 | mDeviceStates[deviceId].pilferingPointerIds |= pointerIds; |
| 188 | } |
| 189 | |
Siarhei Vishniakou | d38a1e0 | 2023-07-18 11:55:17 -0700 | [diff] [blame] | 190 | void TouchedWindow::addPilferingPointer(DeviceId deviceId, int32_t pointerId) { |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 191 | mDeviceStates[deviceId].pilferingPointerIds.set(pointerId); |
| 192 | } |
| 193 | |
Siarhei Vishniakou | d38a1e0 | 2023-07-18 11:55:17 -0700 | [diff] [blame] | 194 | std::bitset<MAX_POINTER_ID + 1> TouchedWindow::getPilferingPointers(DeviceId deviceId) const { |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 195 | const auto stateIt = mDeviceStates.find(deviceId); |
| 196 | if (stateIt == mDeviceStates.end()) { |
| 197 | return {}; |
| 198 | } |
| 199 | const DeviceState& state = stateIt->second; |
| 200 | |
| 201 | return state.pilferingPointerIds; |
| 202 | } |
| 203 | |
Siarhei Vishniakou | d38a1e0 | 2023-07-18 11:55:17 -0700 | [diff] [blame] | 204 | std::map<DeviceId, std::bitset<MAX_POINTER_ID + 1>> TouchedWindow::getPilferingPointers() const { |
| 205 | std::map<DeviceId, std::bitset<MAX_POINTER_ID + 1>> out; |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 206 | for (const auto& [deviceId, state] : mDeviceStates) { |
| 207 | out.emplace(deviceId, state.pilferingPointerIds); |
| 208 | } |
| 209 | return out; |
| 210 | } |
| 211 | |
Siarhei Vishniakou | d38a1e0 | 2023-07-18 11:55:17 -0700 | [diff] [blame] | 212 | std::optional<nsecs_t> TouchedWindow::getDownTimeInTarget(DeviceId deviceId) const { |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 213 | const auto stateIt = mDeviceStates.find(deviceId); |
| 214 | if (stateIt == mDeviceStates.end()) { |
| 215 | return {}; |
| 216 | } |
| 217 | const DeviceState& state = stateIt->second; |
| 218 | return state.downTimeInTarget; |
| 219 | } |
| 220 | |
Siarhei Vishniakou | d38a1e0 | 2023-07-18 11:55:17 -0700 | [diff] [blame] | 221 | void TouchedWindow::trySetDownTimeInTarget(DeviceId deviceId, nsecs_t downTime) { |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 222 | auto [stateIt, _] = mDeviceStates.try_emplace(deviceId); |
| 223 | DeviceState& state = stateIt->second; |
| 224 | |
| 225 | if (!state.downTimeInTarget) { |
| 226 | state.downTimeInTarget = downTime; |
| 227 | } |
| 228 | } |
| 229 | |
Siarhei Vishniakou | d38a1e0 | 2023-07-18 11:55:17 -0700 | [diff] [blame] | 230 | void TouchedWindow::removeAllTouchingPointersForDevice(DeviceId deviceId) { |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 231 | const auto stateIt = mDeviceStates.find(deviceId); |
| 232 | if (stateIt == mDeviceStates.end()) { |
| 233 | return; |
| 234 | } |
| 235 | DeviceState& state = stateIt->second; |
| 236 | |
Siarhei Vishniakou | 1ff00cc | 2023-12-13 16:12:13 -0800 | [diff] [blame^] | 237 | state.touchingPointers.clear(); |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 238 | state.pilferingPointerIds.reset(); |
| 239 | state.downTimeInTarget.reset(); |
| 240 | |
| 241 | if (!state.hasPointers()) { |
| 242 | mDeviceStates.erase(stateIt); |
| 243 | } |
Siarhei Vishniakou | 0686f0c | 2023-05-02 11:56:15 -0700 | [diff] [blame] | 244 | } |
| 245 | |
Siarhei Vishniakou | d38a1e0 | 2023-07-18 11:55:17 -0700 | [diff] [blame] | 246 | void TouchedWindow::removeHoveringPointer(DeviceId deviceId, int32_t pointerId) { |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 247 | const auto stateIt = mDeviceStates.find(deviceId); |
| 248 | if (stateIt == mDeviceStates.end()) { |
Siarhei Vishniakou | b581f7f | 2022-12-07 20:23:06 +0000 | [diff] [blame] | 249 | return; |
| 250 | } |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 251 | DeviceState& state = stateIt->second; |
Siarhei Vishniakou | b581f7f | 2022-12-07 20:23:06 +0000 | [diff] [blame] | 252 | |
Siarhei Vishniakou | 1ff00cc | 2023-12-13 16:12:13 -0800 | [diff] [blame^] | 253 | std::erase_if(state.hoveringPointers, [&pointerId](const PointerProperties& properties) { |
| 254 | return properties.id == pointerId; |
| 255 | }); |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 256 | |
| 257 | if (!state.hasPointers()) { |
| 258 | mDeviceStates.erase(stateIt); |
Siarhei Vishniakou | b581f7f | 2022-12-07 20:23:06 +0000 | [diff] [blame] | 259 | } |
| 260 | } |
| 261 | |
Siarhei Vishniakou | d38a1e0 | 2023-07-18 11:55:17 -0700 | [diff] [blame] | 262 | void TouchedWindow::removeAllHoveringPointersForDevice(DeviceId deviceId) { |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 263 | const auto stateIt = mDeviceStates.find(deviceId); |
| 264 | if (stateIt == mDeviceStates.end()) { |
| 265 | return; |
| 266 | } |
| 267 | DeviceState& state = stateIt->second; |
| 268 | |
Siarhei Vishniakou | 1ff00cc | 2023-12-13 16:12:13 -0800 | [diff] [blame^] | 269 | state.hoveringPointers.clear(); |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 270 | |
| 271 | if (!state.hasPointers()) { |
| 272 | mDeviceStates.erase(stateIt); |
| 273 | } |
| 274 | } |
| 275 | |
| 276 | std::string TouchedWindow::deviceStateToString(const TouchedWindow::DeviceState& state) { |
Siarhei Vishniakou | 1ff00cc | 2023-12-13 16:12:13 -0800 | [diff] [blame^] | 277 | return StringPrintf("[touchingPointers=%s, " |
| 278 | "downTimeInTarget=%s, hoveringPointers=%s, pilferingPointerIds=%s]", |
| 279 | dumpVector(state.touchingPointers, streamableToString).c_str(), |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 280 | toString(state.downTimeInTarget).c_str(), |
Siarhei Vishniakou | 1ff00cc | 2023-12-13 16:12:13 -0800 | [diff] [blame^] | 281 | dumpVector(state.hoveringPointers, streamableToString).c_str(), |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 282 | bitsetToString(state.pilferingPointerIds).c_str()); |
Siarhei Vishniakou | 0686f0c | 2023-05-02 11:56:15 -0700 | [diff] [blame] | 283 | } |
| 284 | |
Siarhei Vishniakou | 6e1e987 | 2022-11-08 17:51:35 -0800 | [diff] [blame] | 285 | std::string TouchedWindow::dump() const { |
Siarhei Vishniakou | b581f7f | 2022-12-07 20:23:06 +0000 | [diff] [blame] | 286 | std::string out; |
Siarhei Vishniakou | 0836a30 | 2023-05-03 13:54:30 -0700 | [diff] [blame] | 287 | std::string deviceStates = |
| 288 | dumpMap(mDeviceStates, constToString, TouchedWindow::deviceStateToString); |
| 289 | out += StringPrintf("name='%s', targetFlags=%s, mDeviceStates=%s\n", |
| 290 | windowHandle->getName().c_str(), targetFlags.string().c_str(), |
| 291 | deviceStates.c_str()); |
Siarhei Vishniakou | b581f7f | 2022-12-07 20:23:06 +0000 | [diff] [blame] | 292 | return out; |
Siarhei Vishniakou | 6e1e987 | 2022-11-08 17:51:35 -0800 | [diff] [blame] | 293 | } |
| 294 | |
Siarhei Vishniakou | 72945a0 | 2023-09-18 18:30:25 -0700 | [diff] [blame] | 295 | std::ostream& operator<<(std::ostream& out, const TouchedWindow& window) { |
| 296 | out << window.dump(); |
| 297 | return out; |
| 298 | } |
| 299 | |
Siarhei Vishniakou | 6e1e987 | 2022-11-08 17:51:35 -0800 | [diff] [blame] | 300 | } // namespace inputdispatcher |
| 301 | } // namespace android |