summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaj Yengisetty <rajesh@cyngn.com>2015-03-17 10:31:41 -0700
committerRajesh Yengisetty <rajesh@cyngn.com>2015-03-18 01:41:39 +0000
commitb2b1e85eb6c6040d7bcab313ddd71a798941333a (patch)
tree0aad3f1c8caa1aa5297e704b510a66e53e38aba1
parent751627337db296cc97f34be38307ad91ad64163d (diff)
downloadandroid_packages_apps_Trebuchet-b2b1e85eb6c6040d7bcab313ddd71a798941333a.tar.gz
android_packages_apps_Trebuchet-b2b1e85eb6c6040d7bcab313ddd71a798941333a.tar.bz2
android_packages_apps_Trebuchet-b2b1e85eb6c6040d7bcab313ddd71a798941333a.zip
Trebuchet: protect update path for widgetpreviews db
After the update path is called, calling getWritableDatabase always results in a SQLiteReadOnlyDatabaseException. Looks to be a Lollipop bug, protecting the code path till we have a better solution. Change-Id: Ic0487e2d588a341d42e046fb97e8f041622d6450 (cherry picked from commit 368c91bd821cdd114025fa41b99f2d42c915b2f5)
-rw-r--r--src/com/android/launcher3/WidgetPreviewLoader.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/launcher3/WidgetPreviewLoader.java b/src/com/android/launcher3/WidgetPreviewLoader.java
index d496c1c08..7fcb9f9ad 100644
--- a/src/com/android/launcher3/WidgetPreviewLoader.java
+++ b/src/com/android/launcher3/WidgetPreviewLoader.java
@@ -378,9 +378,13 @@ public class WidgetPreviewLoader {
// Delete everything
try {
db.delete(CacheDb.TABLE_NAME, null, null);
+ } catch (SQLiteReadOnlyDatabaseException e) {
+ // After a DB update subsequent calls to getWritableDatabase seems always result in
+ // a SQLiteReadOnlyDatabaseException. Protect this code path for the time being to
+ // prevent FC
+ return;
} catch (SQLiteDiskIOException e) {
} catch (SQLiteCantOpenDatabaseException e) {
- } catch (SQLiteReadOnlyDatabaseException e) {
dumpOpenFiles();
throw e;
}