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

Commit 94b8ed89 authored by Jason Monk's avatar Jason Monk Committed by Android (Google) Code Review
Browse files

Merge "resolve merge conflicts of 148db9df to oc-mr1-dev" into oc-mr1-dev

parents f8c35ac8 27ceab92
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -74,8 +74,11 @@ public class DockedStackExistsListener {

    private static void onDockedStackExistsChanged(boolean exists) {
        synchronized (sCallbacks) {
            sCallbacks.removeIf(wf -> wf.get() == null);
            sCallbacks.forEach(wf -> wf.get().accept(exists));
            sCallbacks.removeIf(wf -> {
                Consumer<Boolean> l = wf.get();
                if (l != null) l.accept(exists);
                return l == null;
            });
        }
    }

+6 −4
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ import com.android.systemui.statusbar.policy.KeyButtonDrawable;

import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.function.Consumer;

public class NavigationBarView extends FrameLayout implements PluginListener<NavGesture> {
    final static boolean DEBUG = false;
@@ -563,10 +564,7 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav

        getImeSwitchButton().setOnClickListener(mImeSwitcherClickListener);

        DockedStackExistsListener.register(exists -> mHandler.post(() -> {
            mDockedStackExists = exists;
            updateRecentsIcon();
        }));
        DockedStackExistsListener.register(mDockedListener);
        updateRotatedViews();
    }

@@ -839,4 +837,8 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
        void onVerticalChanged(boolean isVertical);
    }

    private final Consumer<Boolean> mDockedListener = exists -> mHandler.post(() -> {
        mDockedStackExists = exists;
        updateRecentsIcon();
    });
}