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

Commit fa9de5f5 authored by lijilou's avatar lijilou
Browse files

Minor optimize code for performance

Quick return when there is no task systembar listener.

Bug: none
Flag: EXEMPT minor optimization
Change-Id: Id4a5546bdfadb7038c70cddc9b80d6caa5fe81a0
parent 1b6cc77f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -48,8 +48,10 @@ final class TaskSystemBarsListenerController {
            int taskId,
            boolean visible,
            boolean wereRevealedFromSwipeOnSystemBar) {
        HashSet<TaskSystemBarsListener> localListeners;
        localListeners = new HashSet<>(mListeners);
        if (mListeners.isEmpty()) {
            return;
        }
        final HashSet<TaskSystemBarsListener> localListeners = new HashSet<>(mListeners);

        mBackgroundExecutor.execute(() -> {
            for (TaskSystemBarsListener listener : localListeners) {