am fcddd014: Merge "email: "Exchange Services has stopped" - Rain of Exchange Javacrashes" into jb-ub-mail-ur9

* commit 'fcddd014dafd33b2db74e51041e3fd0aef617fd6':
  email: "Exchange Services has stopped" - Rain of Exchange Javacrashes
This commit is contained in:
Paul Westbrook 2013-04-05 15:37:24 -07:00 committed by Android Git Automerger
commit dfed09fb58

View File

@ -552,6 +552,16 @@ public final class DBHelper {
@Override @Override
public void onOpen(SQLiteDatabase db) { 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");
}
} }
} }