services/tests/vibrator/src/com/android/server/vibrator/BasicToPwleSegmentAdapterTest.java
0 → 100644
+158
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
We're updating the BasicToPwleSegmentAdapter to check if the FrequencyProfile is empty (has no valid frequency range) before attempting to adapt the segment. Without that there is a possibility of a NullPointerException. If the FrequencyProfile is empty, then we return the segments unchanged. Bug: 388239434 Flag: android.os.vibrator.normalized_pwle_effects Test: atest BasicToPwleSegmentAdapterTest Change-Id: Ic519b1e7bf2c1319bb17fa6412e2091aa2bd1353