aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-09-19 14:00:05 +0900
committerKen Wakasa <kwakasa@google.com>2014-09-19 07:29:03 +0000
commitc648bae15de599e76d865fd181e980fc1b2175b3 (patch)
treea6d7e9f2d2f031123ac6357ad096315220d8d447 /java
parent00e018370fdc3b66a7937a3f08197cedb7907c19 (diff)
downloadlatinime-c648bae15de599e76d865fd181e980fc1b2175b3.tar.gz
latinime-c648bae15de599e76d865fd181e980fc1b2175b3.tar.xz
latinime-c648bae15de599e76d865fd181e980fc1b2175b3.zip
(DO NOT MERGE) Remove some logs which spam encrypted boot
Bug: 17539539 Change-Id: Idb442c2f0db2361b8e535f39b02d209b1edd1069 (cherry picked from commit 4b6c6fa0e475b987fe3734989dee4159b1d6d548)
Diffstat (limited to 'java')
-rw-r--r--java/src/com/android/inputmethod/dictionarypack/DownloadManagerWrapper.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/java/src/com/android/inputmethod/dictionarypack/DownloadManagerWrapper.java b/java/src/com/android/inputmethod/dictionarypack/DownloadManagerWrapper.java
index 75cc7d4cb..3dbbc9b9b 100644
--- a/java/src/com/android/inputmethod/dictionarypack/DownloadManagerWrapper.java
+++ b/java/src/com/android/inputmethod/dictionarypack/DownloadManagerWrapper.java
@@ -54,15 +54,13 @@ public class DownloadManagerWrapper {
if (null != mDownloadManager) {
mDownloadManager.remove(ids);
}
+ } catch (IllegalArgumentException e) {
+ // This is expected to happen on boot when the device is encrypted.
} catch (SQLiteException e) {
// We couldn't remove the file from DownloadManager. Apparently, the database can't
// 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);
}
}
@@ -71,10 +69,10 @@ public class DownloadManagerWrapper {
if (null != mDownloadManager) {
return mDownloadManager.openDownloadedFile(fileId);
}
+ } catch (IllegalArgumentException e) {
+ // This is expected to happen on boot when the device is encrypted.
} 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();
@@ -85,10 +83,10 @@ public class DownloadManagerWrapper {
if (null != mDownloadManager) {
return mDownloadManager.query(query);
}
+ } catch (IllegalArgumentException e) {
+ // This is expected to happen on boot when the device is encrypted.
} 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;
@@ -99,10 +97,10 @@ public class DownloadManagerWrapper {
if (null != mDownloadManager) {
return mDownloadManager.enqueue(request);
}
+ } catch (IllegalArgumentException e) {
+ // This is expected to happen on boot when the device is encrypted.
} 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;
}