mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-20 14:54:09 +00:00
Lower maximum size of cursor window on DB upgrade.
On some systems, the DB upgrade was failing because there were too many rows for the cursor window. This moves some looping operations into single update statements by using the substr() command, and chunks the rest using a series of LIMITs.
This commit is contained in:
@@ -32,6 +32,7 @@ import android.util.Log;
|
||||
import android.widget.RemoteViews;
|
||||
|
||||
import org.thoughtcrime.securesms.ApplicationPreferencesActivity;
|
||||
import org.thoughtcrime.securesms.DatabaseUpgradeActivity;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.RoutingActivity;
|
||||
import org.thoughtcrime.securesms.crypto.DecryptingQueue;
|
||||
@@ -78,8 +79,10 @@ public class KeyCachingService extends Service {
|
||||
new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
DecryptingQueue.schedulePendingDecrypts(KeyCachingService.this, masterSecret);
|
||||
MessageNotifier.updateNotification(KeyCachingService.this, masterSecret);
|
||||
if (!DatabaseUpgradeActivity.isUpdate(KeyCachingService.this)) {
|
||||
DecryptingQueue.schedulePendingDecrypts(KeyCachingService.this, masterSecret);
|
||||
MessageNotifier.updateNotification(KeyCachingService.this, masterSecret);
|
||||
}
|
||||
}
|
||||
}.start();
|
||||
}
|
||||
|
Reference in New Issue
Block a user