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

Commit 2c2de669 authored by Diego Vela's avatar Diego Vela Committed by Android (Google) Code Review
Browse files

Merge "Fix mismatchecd use of isEmpty in Sidecar"

parents 1a11be01 7b2fdb4c
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -192,7 +192,7 @@ class SettingsSidecarImpl extends StubSidecar {
                Rect featureRect = new Rect(left, top, right, bottom);
                rotateRectToDisplayRotation(featureRect, displayId);
                transformToWindowSpaceRect(featureRect, windowToken);
                if (!featureRect.isEmpty()) {
                if (isNotZero(featureRect)) {
                    SidecarDisplayFeature feature = new SidecarDisplayFeature();
                    feature.setRect(featureRect);
                    feature.setType(type);
@@ -207,6 +207,10 @@ class SettingsSidecarImpl extends StubSidecar {
        return features;
    }

    private static boolean isNotZero(Rect rect) {
        return rect.height() > 0 || rect.width() > 0;
    }

    @Override
    protected void onListenersChanged() {
        if (mSettingsObserver == null) {