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

Commit b84ea8d1 authored by Piotr Wilczyński's avatar Piotr Wilczyński Committed by Automerger Merge Worker
Browse files

Merge "Fix NPE when store brightness and displayDevice is null" am: 9741dde4

parents bc0f38ed 9741dde4
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -300,8 +300,11 @@ final class PersistentDataStore {
    }

    public boolean setBrightness(DisplayDevice displayDevice, float brightness) {
        if (displayDevice == null || !displayDevice.hasStableUniqueId()) {
            return false;
        }
        final String displayDeviceUniqueId = displayDevice.getUniqueId();
        if (!displayDevice.hasStableUniqueId() || displayDeviceUniqueId == null) {
        if (displayDeviceUniqueId == null) {
            return false;
        }
        final DisplayState state = getDisplayState(displayDeviceUniqueId, true);