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

Commit 6420db38 authored by Dan Pasanen's avatar Dan Pasanen Committed by Joey
Browse files

NightDisplayController: report unvailable if livedisplay feature is present

Change-Id: Id677e76d452ced2e62373337d63593c7b85f2fba
parent 44e7f914
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -451,10 +451,12 @@ public final class NightDisplayController {
    }
    }


    /**
    /**
     * 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) {
    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");
    }
    }


    /**
    /**