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

Commit b510eaf9 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 am: b84ea8d1

parents bb5fd995 b84ea8d1
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -306,8 +306,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);