From e9412f6bc0658d2040bc1c9ce193b28f8cdbf75d Mon Sep 17 00:00:00 2001 From: Lisheng Guan Date: Wed, 10 Jan 2024 17:20:38 +0800 Subject: [PATCH] bring back periodic sync --- .../manager/ex/core/docstorage/FileStorageHelper.java | 7 +++---- .../main/java/com/money/manager/ex/sync/SyncService.java | 7 +------ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/com/money/manager/ex/core/docstorage/FileStorageHelper.java b/app/src/main/java/com/money/manager/ex/core/docstorage/FileStorageHelper.java index df99d57cce..c27efc3b2a 100644 --- a/app/src/main/java/com/money/manager/ex/core/docstorage/FileStorageHelper.java +++ b/app/src/main/java/com/money/manager/ex/core/docstorage/FileStorageHelper.java @@ -15,7 +15,6 @@ import androidx.appcompat.app.AppCompatActivity; -import com.amplitude.android.Amplitude; import com.google.common.io.ByteStreams; import com.google.common.io.Files; import com.money.manager.ex.MmexApplication; @@ -24,7 +23,7 @@ import com.money.manager.ex.home.DatabaseMetadata; import com.money.manager.ex.utils.MmxDatabaseUtils; import com.money.manager.ex.utils.MmxDate; -import com.amplitude.android.Amplitude; + import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; @@ -39,12 +38,12 @@ * Functions to assist with selecting database file. */ public class FileStorageHelper { + private final Context _host; + public FileStorageHelper(Context host) { _host = host; } - private final Context _host; - public Context getContext() { return _host; } diff --git a/app/src/main/java/com/money/manager/ex/sync/SyncService.java b/app/src/main/java/com/money/manager/ex/sync/SyncService.java index c458b420c4..9aa8062918 100644 --- a/app/src/main/java/com/money/manager/ex/sync/SyncService.java +++ b/app/src/main/java/com/money/manager/ex/sync/SyncService.java @@ -25,12 +25,10 @@ import android.net.Uri; import android.os.Message; import android.os.Messenger; +import android.text.TextUtils; -import androidx.appcompat.app.AppCompatActivity; import androidx.core.app.JobIntentService; -import android.text.TextUtils; - import com.money.manager.ex.MmexApplication; import com.money.manager.ex.R; import com.money.manager.ex.core.RequestCodes; @@ -40,18 +38,15 @@ import com.money.manager.ex.home.RecentDatabasesProvider; import com.money.manager.ex.sync.events.SyncStartingEvent; import com.money.manager.ex.sync.events.SyncStoppingEvent; -import com.money.manager.ex.utils.MmxFileUtils; import com.money.manager.ex.utils.NetworkUtils; import org.greenrobot.eventbus.EventBus; import java.io.File; -import java.io.IOException; import java.util.HashMap; import javax.inject.Inject; -import rx.SingleSubscriber; import rx.subscriptions.CompositeSubscription; import timber.log.Timber;