Expose AutoCloseable.

Bug: 3484927
Change-Id: I769c19ffbefb29ce11b828589f3533c24d134242