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

Commit 2cd85fb0 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Log failures to unlinkToDeath wakelocks." into sc-dev am: 0fa71fcc

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

Change-Id: Ie86ffd16bcebe252b2905883b9b90d494aa2752a
parents 303137b2 0fa71fcc
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);
        }
    }