am cb1e18da: Merge "Remove location permissions" into mnc-dev

* commit 'cb1e18da0de89549c2a512ee9887f15f4976d8ff':
  Remove location permissions
diff --git a/src/com/android/providers/contacts/AbstractContactsProvider.java b/src/com/android/providers/contacts/AbstractContactsProvider.java
index 226652e..6f84df5 100644
--- a/src/com/android/providers/contacts/AbstractContactsProvider.java
+++ b/src/com/android/providers/contacts/AbstractContactsProvider.java
@@ -278,11 +278,15 @@
         }
         ContactsTransaction transaction = mTransactionHolder.get();
         if (transaction != null && (!transaction.isBatch() || callerIsBatch)) {
+            boolean notify = false;
             try {
                 if (transaction.isDirty()) {
-                    notifyChange();
+                    notify = true;
                 }
                 transaction.finish(callerIsBatch);
+                if (notify) {
+                    notifyChange();
+                }
             } finally {
                 // No matter what, make sure we clear out the thread-local transaction reference.
                 mTransactionHolder.set(null);
diff --git a/src/com/android/providers/contacts/debug/DataExporter.java b/src/com/android/providers/contacts/debug/DataExporter.java
index c7c7dea..3ea49bd 100644
--- a/src/com/android/providers/contacts/debug/DataExporter.java
+++ b/src/com/android/providers/contacts/debug/DataExporter.java
@@ -17,7 +17,6 @@
 package com.android.providers.contacts.debug;
 
 import com.android.providers.contacts.util.Hex;
-import com.google.common.io.Closeables;
 
 import android.content.Context;
 import android.net.Uri;
@@ -62,12 +61,10 @@
         Log.i(TAG, "Dump started...");
 
         ensureOutputDirectory(context);
-        final ZipOutputStream os = new ZipOutputStream(new FileOutputStream(outFile));
-        os.setLevel(Deflater.BEST_COMPRESSION);
-        try {
+        
+        try (ZipOutputStream os = new ZipOutputStream(new FileOutputStream(outFile))) {
+            os.setLevel(Deflater.BEST_COMPRESSION);
             addDirectory(context, os, context.getFilesDir().getParentFile(), "contacts-files");
-        } finally {
-            Closeables.closeQuietly(os);
         }
         Log.i(TAG, "Dump finished.");
         return DumpFileProvider.AUTHORITY_URI.buildUpon().appendPath(fileName).build();