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

Commit 0fa71fcc authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Log failures to unlinkToDeath wakelocks." into sc-dev

parents ddaf6b41 ec4306ac
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -129,6 +129,7 @@ import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.Objects;

/**
@@ -1490,7 +1491,11 @@ public final class PowerManagerService extends SystemService
                mRequestWaitForNegativeProximity = true;
            }

            try {
                wakeLock.mLock.unlinkToDeath(wakeLock, 0);
            } catch (NoSuchElementException e) {
                Slog.wtf(TAG, "Failed to unlink wakelock", e);
            }
            removeWakeLockLocked(wakeLock, index);
        }
    }