aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-02-18 05:35:53 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-02-18 05:35:54 +0000
commitdb21fad18f70eb4abaf60a8c0ae7f285682acf20 (patch)
tree3d9736ab2106040abea4dc4767819e91fa09a852 /java/src/com/android/inputmethod
parent0f8134dc40253d1e91d6d088cfd19c461cc1f53d (diff)
parent9967f0a1d027cc4df972174a6be8b26e227d9de5 (diff)
downloadlatinime-db21fad18f70eb4abaf60a8c0ae7f285682acf20.tar.gz
latinime-db21fad18f70eb4abaf60a8c0ae7f285682acf20.tar.xz
latinime-db21fad18f70eb4abaf60a8c0ae7f285682acf20.zip
Merge "Avoid crashing when the Content URL is not found."
Diffstat (limited to 'java/src/com/android/inputmethod')
-rw-r--r--java/src/com/android/inputmethod/dictionarypack/DownloadManagerWrapper.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/dictionarypack/DownloadManagerWrapper.java b/java/src/com/android/inputmethod/dictionarypack/DownloadManagerWrapper.java
index e95ca1799..75cc7d4cb 100644
--- a/java/src/com/android/inputmethod/dictionarypack/DownloadManagerWrapper.java
+++ b/java/src/com/android/inputmethod/dictionarypack/DownloadManagerWrapper.java
@@ -59,6 +59,10 @@ public class DownloadManagerWrapper {
// be opened. It may be a problem with file system corruption. In any case, there is
// not much we can do apart from avoiding crashing.
Log.e(TAG, "Can't remove files with ID " + ids + " from download manager", e);
+ } catch (IllegalArgumentException e) {
+ // Not sure how this can happen, but it could be another case where the provider
+ // is disabled. Or it could be a bug in older versions of the framework.
+ Log.e(TAG, "Can't find the content URL for DownloadManager?", e);
}
}
@@ -69,6 +73,8 @@ public class DownloadManagerWrapper {
}
} catch (SQLiteException e) {
Log.e(TAG, "Can't open downloaded file with ID " + fileId, e);
+ } catch (IllegalArgumentException e) {
+ Log.e(TAG, "Can't find the content URL for DownloadManager?", e);
}
// We come here if mDownloadManager is null or if an exception was thrown.
throw new FileNotFoundException();
@@ -81,6 +87,8 @@ public class DownloadManagerWrapper {
}
} catch (SQLiteException e) {
Log.e(TAG, "Can't query the download manager", e);
+ } catch (IllegalArgumentException e) {
+ Log.e(TAG, "Can't find the content URL for DownloadManager?", e);
}
// We come here if mDownloadManager is null or if an exception was thrown.
return null;
@@ -93,6 +101,8 @@ public class DownloadManagerWrapper {
}
} catch (SQLiteException e) {
Log.e(TAG, "Can't enqueue a request with the download manager", e);
+ } catch (IllegalArgumentException e) {
+ Log.e(TAG, "Can't find the content URL for DownloadManager?", e);
}
return 0;
}