Fix DisplayTest.testModeSwitchOnPrimaryDisplay

The test creates a shuffled list of modes to test. It's important
that the first mode is differnet from the currently active mode.
Currently the code aknowledges that, but it doesn't take into account
that the active mode can change after creating the list. This way
it's possible that the first mode will be the same as the active
mode and the test will fail because no onDisplayChanged event
will be generated.

This CL moves the creation of the list after turning off refresh
rate switching.

Test: test no longer fails
Bug: 201616188
Change-Id: I914401c4878eea4cf69aa653f72d7b9eaf7c4cf2
1 file changed