mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-06 04:45:50 +01:00
Added sync
This commit is contained in:
@@ -2051,6 +2051,12 @@ public class Helper {
|
|||||||
|
|
||||||
// Files
|
// Files
|
||||||
|
|
||||||
|
static {
|
||||||
|
System.loadLibrary("fairemail");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static native void sync();
|
||||||
|
|
||||||
static String sanitizeFilename(String name) {
|
static String sanitizeFilename(String name) {
|
||||||
if (name == null)
|
if (name == null)
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -109,8 +109,10 @@ public class WorkerFts extends Worker {
|
|||||||
|
|
||||||
markIndexed(db, ids);
|
markIndexed(db, ids);
|
||||||
|
|
||||||
if (checkpoints)
|
if (checkpoints) {
|
||||||
DB.checkpoint(context);
|
DB.checkpoint(context);
|
||||||
|
Helper.sync();
|
||||||
|
}
|
||||||
|
|
||||||
Log.i("FTS indexed=" + indexed);
|
Log.i("FTS indexed=" + indexed);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include <netinet/tcp.h>
|
#include <netinet/tcp.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "compact_enc_det/compact_enc_det.h"
|
#include "compact_enc_det/compact_enc_det.h"
|
||||||
#include "cld_3/src/nnet_language_identifier.h"
|
#include "cld_3/src/nnet_language_identifier.h"
|
||||||
@@ -200,3 +201,11 @@ Java_eu_faircode_email_ConnectionHelper_jni_1is_1numeric_1address(
|
|||||||
env->ReleaseStringUTFChars(_ip, ip);
|
env->ReleaseStringUTFChars(_ip, ip);
|
||||||
return numeric;
|
return numeric;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
JNIEXPORT void JNICALL
|
||||||
|
Java_eu_faircode_email_Helper_sync(JNIEnv *env, jclass clazz) {
|
||||||
|
log_android(ANDROID_LOG_DEBUG, "sync");
|
||||||
|
sync();
|
||||||
|
log_android(ANDROID_LOG_DEBUG, "synced");
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user