The peak refresh rate will not be guaranteed to be integer, but
config_defaultPeakRefreshRate only takes integer into the comparison.
To expose the smooth display is enabled by default in Settings, the
patch corrects the check of peak refresh rate with proper rounding.
Bug: 185102566
Test: Enable smooth display by default in Settings
Change-Id: I658ce22cf0b0a108c4b721e3e5320caf9c379639
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
The controller can't be created when Settings Search gets the
non-indexable keys. So Settings Search can't get the correct value
from it.
The controller creates the Handler without the parameter in constructor
and causes the exception. It should use the main Looper of Context as
the parameter to create the Handler.
Fixes: 160179400
Test: run robotest and observe the search result
Change-Id: I6f9bf6de087ae776e8d531ff59d28966aee96b7b