email: "Exchange Services has stopped" - Rain of Exchange Javacrashes
Cleanup some nasty records containing NULL fields. Change-Id: Iec5e7e1bebc4beee8fa010c3f9c9ee723fd2cd83 Author: Emmanuel Berthier <emmanuel.berthier@intel.com> Signed-off-by: Shuo Gao <shuo.gao@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com> Signed-off-by: Jack Ren <jack.ren@intel.com> Author-tracking-BZ: 60461 cherry-pick of https://android-review.googlesource.com/#/c/47571/1
This commit is contained in:
parent
d402c890dc
commit
689efab2b1
@ -552,6 +552,16 @@ public final class DBHelper {
|
||||
|
||||
@Override
|
||||
public void onOpen(SQLiteDatabase db) {
|
||||
try {
|
||||
// Cleanup some nasty records
|
||||
db.execSQL("DELETE FROM " + Account.TABLE_NAME
|
||||
+ " WHERE " + AccountColumns.DISPLAY_NAME + " ISNULL;");
|
||||
db.execSQL("DELETE FROM " + HostAuth.TABLE_NAME
|
||||
+ " WHERE " + HostAuthColumns.PROTOCOL + " ISNULL;");
|
||||
} catch (SQLException e) {
|
||||
// Shouldn't be needed unless we're debugging and interrupt the process
|
||||
LogUtils.e(TAG, e, "Exception cleaning EmailProvider.db");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user