Synchronize checkDatabases.

This function can delete the database while other
threads are trying to read it, which is bad. The readers
are already synchronized methods so this should prevent
that.

Bug: 8964541
Change-Id: Ib2f606f274500f0935a5f0211609cf458a0a6005
diff --git a/src/com/android/email/provider/EmailProvider.java b/src/com/android/email/provider/EmailProvider.java
index 4891b08..b271e1e 100644
--- a/src/com/android/email/provider/EmailProvider.java
+++ b/src/com/android/email/provider/EmailProvider.java
@@ -1035,7 +1035,7 @@
      * any "orphan" database, so that both will be created together.  Note that an "orphan" database
      * will exist after either of the individual databases is deleted due to data corruption.
      */
-    public void checkDatabases() {
+    public synchronized void checkDatabases() {
         // Uncache the databases
         if (mDatabase != null) {
             mDatabase = null;