summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaj Yengisetty <rajesh@cyngn.com>2015-03-17 17:31:41 (GMT)
committerMatt Garnes <matt@cyngn.com>2015-03-18 01:30:24 (GMT)
commit368c91bd821cdd114025fa41b99f2d42c915b2f5 (patch)
tree5ff9f49a96df3e6a27e420733cda638f0e5a9892
parent5482c2f488e7ce312a85e7440b72865d1f2cf598 (diff)
downloadandroid_packages_apps_Trebuchet-368c91bd821cdd114025fa41b99f2d42c915b2f5.zip
android_packages_apps_Trebuchet-368c91bd821cdd114025fa41b99f2d42c915b2f5.tar.gz
android_packages_apps_Trebuchet-368c91bd821cdd114025fa41b99f2d42c915b2f5.tar.bz2
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
-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 d496c1c..7fcb9f9 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;
}