summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2013-10-29 13:49:39 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-29 13:49:39 -0700
commitdd225d28e6e7a57a9ae70c4a7f6217358e3a2052 (patch)
tree51228608bb441a7c3870e10de126c659515309c2
parent161e43dc5952a607a5996ab2cd07ac3ef49c2902 (diff)
parent7fbba1622a975782fddb9a7c5d9dd733dd4e425d (diff)
downloadframeworks_base-dd225d28e6e7a57a9ae70c4a7f6217358e3a2052.zip
frameworks_base-dd225d28e6e7a57a9ae70c4a7f6217358e3a2052.tar.gz
frameworks_base-dd225d28e6e7a57a9ae70c4a7f6217358e3a2052.tar.bz2
am 7fbba162: Merge "Suppress OperationCanceledException logging." into klp-dev
* commit '7fbba1622a975782fddb9a7c5d9dd733dd4e425d': Suppress OperationCanceledException logging.
-rw-r--r--core/java/android/provider/DocumentsContract.java5
-rw-r--r--packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java5
2 files changed, 8 insertions, 2 deletions
diff --git a/core/java/android/provider/DocumentsContract.java b/core/java/android/provider/DocumentsContract.java
index 09f5fe3..86d3cf8 100644
--- a/core/java/android/provider/DocumentsContract.java
+++ b/core/java/android/provider/DocumentsContract.java
@@ -34,6 +34,7 @@ import android.media.ExifInterface;
import android.net.Uri;
import android.os.Bundle;
import android.os.CancellationSignal;
+import android.os.OperationCanceledException;
import android.os.ParcelFileDescriptor;
import android.os.ParcelFileDescriptor.OnCloseListener;
import android.os.RemoteException;
@@ -670,7 +671,9 @@ public final class DocumentsContract {
try {
return getDocumentThumbnail(client, documentUri, size, signal);
} catch (Exception e) {
- Log.w(TAG, "Failed to load thumbnail for " + documentUri + ": " + e);
+ if (!(e instanceof OperationCanceledException)) {
+ Log.w(TAG, "Failed to load thumbnail for " + documentUri + ": " + e);
+ }
return null;
} finally {
ContentProviderClient.releaseQuietly(client);
diff --git a/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java b/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java
index 775720e..b2b2bd8 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java
@@ -47,6 +47,7 @@ import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.CancellationSignal;
+import android.os.OperationCanceledException;
import android.os.Parcelable;
import android.provider.DocumentsContract;
import android.provider.DocumentsContract.Document;
@@ -1028,7 +1029,9 @@ public class DirectoryFragment extends Fragment {
thumbs.put(mUri, result);
}
} catch (Exception e) {
- Log.w(TAG, "Failed to load thumbnail for " + mUri + ": " + e);
+ if (!(e instanceof OperationCanceledException)) {
+ Log.w(TAG, "Failed to load thumbnail for " + mUri + ": " + e);
+ }
} finally {
ContentProviderClient.releaseQuietly(client);
}