Refrain wrong Writer#flush() call.

- We cannot rely on finilizer ordering: FileOutputStream may be
  released before HandlerForOutputStream
- Writer#flush() call in finalizer may lock file system for a long time
  (10> secs), which will let the VM assume there is deadlock
- Writer#flush() will be called from Writer#close() so we don't need
  to call it explicitly.
- There's a race condition between VCardComposer.finalize()
  and FileOutputSteram.finalize() since they may be called
  concurrently.
- Use CloseGuard for detecting missing terminate() call.

Change-Id: I1ddcaf2c4564476e81dc67d3ec6ec1c947872a84
1 file changed
tree: c67d0f19164c94772c7a715993e8ef6ba34d0f12
  1. java/
  2. tests/
  3. Android.mk