Set directory search mode earlier
* The cause of the crash is that in ag/1424283 we set directory search
mode in onResume in fragment (rather than before onStart), so loader
and adapter gets old directory search mode (0). Then it will invoke
DirectoryListLoader.getDefaultDirectories and IllegalArgumentException
is thrown.
* We set it earlier now so that loader and adapter will set it correctly
accordingly, which is consistent with the logic prior to ag/1424283.
Bug: 31778407
Test: manual:
- follow steps to reproduce in the bug
- verify search actions in tests APK work well
Change-Id: I5b2eaeaac5f3d1b45b9f9be722b76d94035a51e5
2 files changed