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

Commit 51d00d88 authored by Griff Hazen's avatar Griff Hazen
Browse files

Workaround for javac compilation issue of lambda code

frameworks/base/services/core/java/com/android/server/wm/WindowState.java:601: error: variable w1 might not have been initialized

BUG: 32554459
Change-Id: I939ad4917f0b53d6f3f090ed2643b5e0354c37a3
parent 3f5de07e
Loading
Loading
Loading
Loading
+16 −11
Original line number Diff line number Diff line
@@ -539,17 +539,22 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
     * Compares two window sub-layers and returns -1 if the first is lesser than the second in terms
     * of z-order and 1 otherwise.
     */
    private static final Comparator<WindowState> sWindowSubLayerComparator = (w1, w2) -> {
    private static final Comparator<WindowState> sWindowSubLayerComparator =
            new Comparator<WindowState>() {
                @Override
                public int compare(WindowState w1, WindowState w2) {
                    final int layer1 = w1.mSubLayer;
                    final int layer2 = w2.mSubLayer;
                    if (layer1 < layer2 || (layer1 == layer2 && layer2 < 0 )) {
            // We insert the child window into the list ordered by the sub-layer.
            // For same sub-layers, the negative one should go below others; the positive one should
            // go above others.
                        // We insert the child window into the list ordered by
                        // the sub-layer.  For same sub-layers, the negative one
                        // should go below others; the positive one should go
                        // above others.
                        return -1;
                    }
                    return 1;
                };
            };

    WindowState(WindowManagerService service, Session s, IWindow c, WindowToken token,
           WindowState parentWindow, int appOp, int seq, WindowManager.LayoutParams a,