- When doing factory reset, we will launch the account credential confirmation. If this fails, the settings page is re-initialized. This steps might trigger multiple layout changes for the scrollview before it is finalized. However, we are removing the global layout listener once we receive the first update, which could result in the reset button being disabled incorrectly, as the scroll state is calculated based on wrong view heights. Remove the call that remove the layout listener, so that we can still receive further updates. - also remove the scroll listener once we enable the reset button from scroll, as no more action is really needed on suceeding scroll. Change-Id: I6ec1f592991629c15e5ad2bcb29fdd679d598f70 Fixes: 73298075 Test: make RunSettingsRoboTests
Running Settings Robolectric tests
The full suite
$ croot
$ make RunSettingsRoboTests
Running a single test class
$ croot
$ make RunSettingsRoboTests ROBOTEST_FILTER=<ClassName>
For example:
make RunSettingsRoboTests ROBOTEST_FILTER=CodeInspectionTest
You can also use partial class name in ROBOTEST_FILTER. If the partial class name matches multiple file names, all of them will be executed.