mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-24 18:03:35 +02:00
Updated AndroidX
This commit is contained in:
@@ -18,6 +18,7 @@ package androidx.room;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteException;
|
||||
import android.os.Build;
|
||||
@@ -210,9 +211,9 @@ public class InvalidationTracker {
|
||||
}
|
||||
}
|
||||
|
||||
void startMultiInstanceInvalidation(Context context, String name) {
|
||||
mMultiInstanceInvalidationClient = new MultiInstanceInvalidationClient(context, name, this,
|
||||
mDatabase.getQueryExecutor());
|
||||
void startMultiInstanceInvalidation(Context context, String name, Intent serviceIntent) {
|
||||
mMultiInstanceInvalidationClient = new MultiInstanceInvalidationClient(context, name,
|
||||
serviceIntent, this, mDatabase.getQueryExecutor());
|
||||
}
|
||||
|
||||
void stopMultiInstanceInvalidation() {
|
||||
@@ -422,19 +423,15 @@ public class InvalidationTracker {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mDatabase.mWriteAheadLoggingEnabled) {
|
||||
// This transaction has to be on the underlying DB rather than the RoomDatabase
|
||||
// in order to avoid a recursive loop after endTransaction.
|
||||
SupportSQLiteDatabase db = mDatabase.getOpenHelper().getWritableDatabase();
|
||||
db.beginTransactionNonExclusive();
|
||||
try {
|
||||
invalidatedTableIds = checkUpdatedTable();
|
||||
db.setTransactionSuccessful();
|
||||
} finally {
|
||||
db.endTransaction();
|
||||
}
|
||||
} else {
|
||||
// This transaction has to be on the underlying DB rather than the RoomDatabase
|
||||
// in order to avoid a recursive loop after endTransaction.
|
||||
SupportSQLiteDatabase db = mDatabase.getOpenHelper().getWritableDatabase();
|
||||
db.beginTransactionNonExclusive();
|
||||
try {
|
||||
invalidatedTableIds = checkUpdatedTable();
|
||||
db.setTransactionSuccessful();
|
||||
} finally {
|
||||
db.endTransaction();
|
||||
}
|
||||
} catch (IllegalStateException | SQLiteException exception) {
|
||||
// may happen if db is closed. just log.
|
||||
|
||||
Reference in New Issue
Block a user