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

Commit 88e37111 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Correct potential deadlock in AnrTimerService" into main

parents cf5bddb6 8f9c68fa
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -934,7 +934,6 @@ void AnrTimerService::scrubExpiredLocked() {
}

// Hold the lock in order to manage the running list.
// the listener.
void AnrTimerService::expire(timer_id_t timerId) {
    // Save the timer attributes for the notification
    int pid = 0;
@@ -967,7 +966,6 @@ void AnrTimerService::expire(timer_id_t timerId) {
    // Deliver the notification outside of the lock.
    if (expired) {
        if (!notifier_(timerId, pid, uid, elapsed, notifierCookie_, notifierObject_)) {
            AutoMutex _l(lock_);
            // Notification failed, which means the listener will never call accept() or
            // discard().  Do not reinsert the timer.
            discard(timerId);