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

Commit 725844d0 authored by Polina Bondarenko's avatar Polina Bondarenko
Browse files

Removed IAE from HardwarePropertiesManager.

If unknown temperature type is passed to getDeviceTemperatures, returns
empty array.

Bug: 27365463
Change-Id: I223b5e4e0642aee7b32e44fea84e8dc465b7e90b
parent a4fe2389
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -69,7 +69,6 @@ public class HardwarePropertiesManager {
     * @return an array of requested float device temperatures.
     *         Empty if platform doesn't provide the queried temperature.
     *
     * @throws IllegalArgumentException if an incorrect temperature type is queried.
     * @throws SecurityException if a non profile or device owner tries to call this method.
    */
    public @NonNull float[] getDeviceTemperatures(@DeviceTemperatureType int type) {
@@ -84,7 +83,8 @@ public class HardwarePropertiesManager {
                return new float[0];
            }
        default:
            throw new IllegalArgumentException();
            Log.w(TAG, "Unknown device temperature type.");
            return new float[0];
        }
    }