blob: e1844a4a3ac1ecd0f4b0b2cd888cd633882f9517 [file] [log] [blame]
arthurhung6d4bed92021-03-17 11:59:33 +08001/*
2 * Copyright (C) 2021 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 "DragState.h"
18#include <android-base/stringprintf.h>
arthurhung6d4bed92021-03-17 11:59:33 +080019
arthurhung6d4bed92021-03-17 11:59:33 +080020using android::base::StringPrintf;
21
22namespace android::inputdispatcher {
23
24void DragState::dump(std::string& dump, const char* prefix) {
25 dump += prefix + StringPrintf("Drag Window: %s\n", dragWindow->getName().c_str());
26 if (dragHoverWindowHandle) {
27 dump += prefix +
28 StringPrintf("Drag Hover Window: %s\n", dragHoverWindowHandle->getName().c_str());
29 }
30 dump += prefix + StringPrintf("isStartDrag: %s\n", isStartDrag ? "true" : "false");
31 dump += prefix +
32 StringPrintf("isStylusButtonDownAtStart: %s\n",
33 isStylusButtonDownAtStart ? "true" : "false");
34}
35
36} // namespace android::inputdispatcher