OSDN Git Service
(root)
/
android-x86
/
packages-apps-Camera2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ea01ce
)
Fix "drop table" problem.
author
George Mount
<mount@google.com>
Mon, 18 Mar 2013 17:05:55 +0000
(10:05 -0700)
committer
George Mount
<mount@google.com>
Mon, 18 Mar 2013 17:14:20 +0000
(10:14 -0700)
Bug
8404285
Should drop table if exists when upgrading, not just drop a table.
Change-Id: Ic75fa0efc6ab44be073b2b78a8520e2289cd3148
src/com/android/photos/data/PhotoDatabase.java
patch
|
blob
|
history
diff --git
a/src/com/android/photos/data/PhotoDatabase.java
b/src/com/android/photos/data/PhotoDatabase.java
index
3a9ad3c
..
f0aa4b6
100644
(file)
--- a/
src/com/android/photos/data/PhotoDatabase.java
+++ b/
src/com/android/photos/data/PhotoDatabase.java
@@
-176,7
+176,7
@@
public class PhotoDatabase extends SQLiteOpenHelper {
protected static void dropTable(SQLiteDatabase db, String table) {
db.beginTransaction();
try {
- db.execSQL("drop table " + table);
+ db.execSQL("drop table
if exists
" + table);
db.setTransactionSuccessful();
} finally {
db.endTransaction();