Correctly select peak refresh rate.
Currently we will get an arbitrary value that is greater than the default depending on the order returned by the Display. Bug: 180723012 Test: make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.display.PeakRefreshRatePreferenceControllerTest" Change-Id: Id2c99f2bea9c6b2814d82a9db3a417e4a93ee06d
This commit is contained in:
@@ -122,7 +122,7 @@ public class ForcePeakRefreshRatePreferenceController extends DeveloperOptionsPr
|
||||
private float findPeakRefreshRate(Display.Mode[] modes) {
|
||||
float peakRefreshRate = DEFAULT_REFRESH_RATE;
|
||||
for (Display.Mode mode : modes) {
|
||||
if (Math.round(mode.getRefreshRate()) > DEFAULT_REFRESH_RATE) {
|
||||
if (Math.round(mode.getRefreshRate()) > peakRefreshRate) {
|
||||
peakRefreshRate = mode.getRefreshRate();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user