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

Commit bca972ba authored by Yabin Cui's avatar Yabin Cui Committed by Automerger Merge Worker
Browse files

Merge "InputDispatcher: fix code for clang update" am: 2bde961a am: 8e0107a7

parents 803d9130 8e0107a7
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -5881,9 +5881,9 @@ void InputDispatcher::onAnrLocked(std::shared_ptr<InputApplicationHandle> applic
            StringPrintf("%s does not have a focused window", application->getName().c_str());
            StringPrintf("%s does not have a focused window", application->getName().c_str());
    updateLastAnrStateLocked(*application, reason);
    updateLastAnrStateLocked(*application, reason);


    auto command = [this, application = std::move(application)]() REQUIRES(mLock) {
    auto command = [this, app = std::move(application)]() REQUIRES(mLock) {
        scoped_unlock unlock(mLock);
        scoped_unlock unlock(mLock);
        mPolicy->notifyNoFocusedWindowAnr(application);
        mPolicy->notifyNoFocusedWindowAnr(app);
    };
    };
    postCommandLocked(std::move(command));
    postCommandLocked(std::move(command));
}
}
@@ -5944,9 +5944,9 @@ void InputDispatcher::doInterceptKeyBeforeDispatchingCommand(const sp<IBinder>&
void InputDispatcher::sendWindowUnresponsiveCommandLocked(const sp<IBinder>& token,
void InputDispatcher::sendWindowUnresponsiveCommandLocked(const sp<IBinder>& token,
                                                          std::optional<int32_t> pid,
                                                          std::optional<int32_t> pid,
                                                          std::string reason) {
                                                          std::string reason) {
    auto command = [this, token, pid, reason = std::move(reason)]() REQUIRES(mLock) {
    auto command = [this, token, pid, r = std::move(reason)]() REQUIRES(mLock) {
        scoped_unlock unlock(mLock);
        scoped_unlock unlock(mLock);
        mPolicy->notifyWindowUnresponsive(token, pid, reason);
        mPolicy->notifyWindowUnresponsive(token, pid, r);
    };
    };
    postCommandLocked(std::move(command));
    postCommandLocked(std::move(command));
}
}