Regard timeout as an error in the MtpDocumentsProvider test.
Previously if DocumentsProvider found timeout when terminatnig RootScanner's background thread, it just output it in error log. Thus the timeout is not regarded as an error in MtpDocumentsProviderTest, and it makes flaky PipeManagerTest which runs just after MtpDocumentsProviderTest. The CL * lets MtpDocumentsProvider throw TimeoutException for timeout. * removes redundant resumeRootScanner calls to avoid timeout of RootScanner#pause. Also the CL did cleanup the logic that pauses RootScanner when we don't find any devices. Previously the logic was in MtpDocumentsProvider#closeInternal but it is not efficient because we invokes RootScanner#resume just after MtpDocumentsProvider#closeInternal. Now the CL moves the logic to RootScanner so that it can pause itself automatically. BUG=27638500 Change-Id: Ic11bca67c099cbb0f46679db2f035988045d67d6
Loading
Please register or sign in to comment