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

Commit 4a0580ac authored by Erik Wolsheimer's avatar Erik Wolsheimer Committed by android-build-merger
Browse files

Merge \\"Handle invalid empty args to createAutoBrightnessSpline\\" into nyc-mr1-dev am: 136e6497

am: 27ee075c

Change-Id: Iab0ca0f3a1f45fee5cac6b353467616a54801c09
parents aab044f0 27ee075c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1181,6 +1181,10 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
    }

    private static Spline createAutoBrightnessSpline(int[] lux, int[] brightness) {
        if (lux == null || lux.length == 0 || brightness == null || brightness.length == 0) {
            Slog.e(TAG, "Could not create auto-brightness spline.");
            return null;
        }
        try {
            final int n = brightness.length;
            float[] x = new float[n];