Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7824b01b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Log creation and removal of monitors" into sc-dev am: f0dcab5d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/14282592

Change-Id: I6a53e5536035fc0f1750617de722759eec1e751e
parents 3cd22a59 f0dcab5d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -5100,6 +5100,8 @@ Result<std::unique_ptr<InputChannel>> InputDispatcher::createInputMonitor(int32_
        monitorsByDisplay[displayId].emplace_back(serverChannel, pid);

        mLooper->addFd(fd, 0, ALOOPER_EVENT_INPUT, handleReceiveCallback, this);
        ALOGI("Created monitor %s for display %" PRId32 ", gesture=%s, pid=%" PRId32, name.c_str(),
              displayId, toString(isGestureMonitor), pid);
    }

    // Wake the looper because some connections have changed.
@@ -5160,6 +5162,8 @@ void InputDispatcher::removeMonitorChannelLocked(
        const size_t numMonitors = monitors.size();
        for (size_t i = 0; i < numMonitors; i++) {
            if (monitors[i].inputChannel->getConnectionToken() == connectionToken) {
                ALOGI("Erasing monitor %s on display %" PRId32 ", pid=%" PRId32,
                      monitors[i].inputChannel->getName().c_str(), it->first, monitors[i].pid);
                monitors.erase(monitors.begin() + i);
                break;
            }