Fix DocumentsTest#testTree.

Previously the test sometimes crashed because it tries to read data before the
provider completes writing.

The CL adds synchronized blocks to the provider's implementation so that it
blocks read operation before writing.

BUG=21330123

Change-Id: I3b5ba5d2fb8e1f998179c587ff8733a0a8a2302b
1 file changed