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

Commit b9bd57e5 authored by lijilou's avatar lijilou Committed by Cherrypicker Worker
Browse files

Direct return when remove the sleep token which is non-exist.

Bug: none
Flag: EXEMPT minor optimization
(cherry picked from https://android-review.googlesource.com/q/commit:014fef2cf7a29f96219da810596ff1b48920191a)
Merged-In: Ieb3ae23b876bfe3fff7039a9cf8610aaeee1c016
Change-Id: Ieb3ae23b876bfe3fff7039a9cf8610aaeee1c016
parent d4130fbc
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -2902,10 +2902,9 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
    }

    void removeSleepToken(SleepToken token) {
        if (!mSleepTokens.contains(token.mHashKey)) {
        if (mSleepTokens.removeReturnOld(token.mHashKey) == null) {
            Slog.d(TAG, "Remove non-exist sleep token: " + token + " from " + Debug.getCallers(6));
        }
        mSleepTokens.remove(token.mHashKey);
        final DisplayContent display = getDisplayContent(token.mDisplayId);
        if (display == null) {
            Slog.d(TAG, "Remove sleep token for non-existing display: " + token + " from "