Skip to content
Commit acb0e27b authored by Daichi Hirono's avatar Daichi Hirono
Browse files

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
parent 62006a72
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment