Switching to use try-with-resources

The Closeables.closeQuietly(Closeable) method is no longer
present in v18. This change replaces usages with the
try-with-resource pattern.

This is part of the work to upgrade Guava to version 18.

BUG: 19672715

Change-Id: Ice213c8250253acf87f386a1b9c9fc0f159cd7e0
diff --git a/tests/src/com/android/dialer/CallDetailActivityTest.java b/tests/src/com/android/dialer/CallDetailActivityTest.java
index f9f0a58..163fa15 100644
--- a/tests/src/com/android/dialer/CallDetailActivityTest.java
+++ b/tests/src/com/android/dialer/CallDetailActivityTest.java
@@ -39,7 +39,6 @@
 import com.android.contacts.common.test.IntegrationTestUtils;
 import com.android.dialer.util.LocaleTestUtils;
 import com.android.internal.view.menu.ContextMenuBuilder;
-import com.google.common.io.Closeables;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -262,15 +261,9 @@
         mVoicemailUri = getContentResolver().insert(
                 VoicemailContract.Voicemails.buildSourceUri(packageName), values);
         AssetManager assets = getAssets();
-        OutputStream outputStream = null;
-        InputStream inputStream = null;
-        try {
-            inputStream = assets.open(TEST_ASSET_NAME);
-            outputStream = getContentResolver().openOutputStream(mVoicemailUri);
+        try (InputStream inputStream = assets.open(TEST_ASSET_NAME);
+             OutputStream outputStream = getContentResolver().openOutputStream(mVoicemailUri)) {
             copyBetweenStreams(inputStream, outputStream);
-        } finally {
-            Closeables.closeQuietly(outputStream);
-            Closeables.closeQuietly(inputStream);
         }
         Uri callLogUri = ContentUris.withAppendedId(CallLog.Calls.CONTENT_URI_WITH_VOICEMAIL,
                 ContentUris.parseId(mVoicemailUri));