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

Commit 5ef7a9bb authored by Dan Pasanen's avatar Dan Pasanen Committed by Arne Coucheron
Browse files

NightDisplayController: report unavailable if livedisplay feature is present

Change-Id: Id677e76d452ced2e62373337d63593c7b85f2fba
parent 982a770a
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -558,10 +558,12 @@ public final class ColorDisplayController {
    }

    /**
     * Returns {@code true} if Night display is supported by the device.
     * Returns {@code true} if Night display is supported by the device,
     * unless LiveDisplay feature is available.
     */
    public static boolean isAvailable(Context context) {
        return context.getResources().getBoolean(R.bool.config_nightDisplayAvailable);
        return context.getResources().getBoolean(R.bool.config_nightDisplayAvailable) &&
                !context.getPackageManager().hasSystemFeature("org.lineageos.livedisplay");
    }

    /**