diff --git a/FlowCrypt/src/main/AndroidManifest.xml b/FlowCrypt/src/main/AndroidManifest.xml
index d6a9fc4ba9..9290557619 100644
--- a/FlowCrypt/src/main/AndroidManifest.xml
+++ b/FlowCrypt/src/main/AndroidManifest.xml
@@ -286,7 +286,7 @@
android:permission="android.permission.BIND_JOB_SERVICE" />
diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/jobscheduler/MessagesMovingJobService.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/jobscheduler/MessagesManagingJobService.kt
similarity index 93%
rename from FlowCrypt/src/main/java/com/flowcrypt/email/jobscheduler/MessagesMovingJobService.kt
rename to FlowCrypt/src/main/java/com/flowcrypt/email/jobscheduler/MessagesManagingJobService.kt
index 7e2310ae54..0a18ae3165 100644
--- a/FlowCrypt/src/main/java/com/flowcrypt/email/jobscheduler/MessagesMovingJobService.kt
+++ b/FlowCrypt/src/main/java/com/flowcrypt/email/jobscheduler/MessagesManagingJobService.kt
@@ -30,15 +30,14 @@ import javax.mail.Session
import javax.mail.Store
/**
- * This [JobService] moves messages from one folder to another one (archiving, deleting, total
- * deleting and etc).
+ * This [JobService] manages messages (archiving, deleting, total deleting and etc).
*
* @author Denis Bondarenko
* Date: 10/9/19
* Time: 7:05 PM
* E-mail: DenBond7@gmail.com
*/
-class MessagesMovingJobService : JobService() {
+class MessagesManagingJobService : JobService() {
override fun onCreate() {
super.onCreate()
@@ -65,9 +64,9 @@ class MessagesMovingJobService : JobService() {
/**
* This is an implementation of [AsyncTask] which sends the outgoing messages.
*/
- private class MoveMessagesAsyncTask internal constructor(jobService: MessagesMovingJobService)
+ private class MoveMessagesAsyncTask internal constructor(jobService: MessagesManagingJobService)
: AsyncTask() {
- private val weakRef: WeakReference = WeakReference(jobService)
+ private val weakRef: WeakReference = WeakReference(jobService)
private var sess: Session? = null
private var store: Store? = null
@@ -166,14 +165,14 @@ class MessagesMovingJobService : JobService() {
companion object {
- private val TAG = MessagesMovingJobService::class.java.simpleName
+ private val TAG = MessagesManagingJobService::class.java.simpleName
@JvmStatic
fun schedule(context: Context?) {
context ?: return
val jobInfoBuilder = JobInfo.Builder(JobIdManager.JOB_TYPE_MOVE_MESSAGES,
- ComponentName(context, MessagesMovingJobService::class.java))
+ ComponentName(context, MessagesManagingJobService::class.java))
.setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY)
.setPersisted(true)
diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/ui/activity/LauncherActivity.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/ui/activity/LauncherActivity.kt
index 43b7be10b8..de4e78c332 100644
--- a/FlowCrypt/src/main/java/com/flowcrypt/email/ui/activity/LauncherActivity.kt
+++ b/FlowCrypt/src/main/java/com/flowcrypt/email/ui/activity/LauncherActivity.kt
@@ -16,7 +16,7 @@ import com.flowcrypt.email.database.dao.source.AccountDao
import com.flowcrypt.email.database.dao.source.AccountDaoSource
import com.flowcrypt.email.database.dao.source.ActionQueueDaoSource
import com.flowcrypt.email.jobscheduler.ForwardedAttachmentsDownloaderJobService
-import com.flowcrypt.email.jobscheduler.MessagesMovingJobService
+import com.flowcrypt.email.jobscheduler.MessagesManagingJobService
import com.flowcrypt.email.jobscheduler.MessagesSenderJobService
import com.flowcrypt.email.security.SecurityUtils
import com.flowcrypt.email.service.EmailSyncService
@@ -50,7 +50,7 @@ class LauncherActivity : BaseActivity() {
PreferenceManager.setDefaultValues(this, R.xml.preferences_notifications_settings, false)
ForwardedAttachmentsDownloaderJobService.schedule(applicationContext)
MessagesSenderJobService.schedule(applicationContext)
- MessagesMovingJobService.schedule(applicationContext)
+ MessagesManagingJobService.schedule(applicationContext)
FeedbackJobIntentService.enqueueWork(this)
account = AccountDaoSource().getActiveAccountInformation(this)
diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/ui/activity/fragment/MessageDetailsFragment.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/ui/activity/fragment/MessageDetailsFragment.kt
index 215dc8550e..7515372130 100644
--- a/FlowCrypt/src/main/java/com/flowcrypt/email/ui/activity/fragment/MessageDetailsFragment.kt
+++ b/FlowCrypt/src/main/java/com/flowcrypt/email/ui/activity/fragment/MessageDetailsFragment.kt
@@ -53,7 +53,7 @@ import com.flowcrypt.email.database.MessageState
import com.flowcrypt.email.database.dao.source.AccountDaoSource
import com.flowcrypt.email.database.dao.source.ContactsDaoSource
import com.flowcrypt.email.database.dao.source.imap.MessageDaoSource
-import com.flowcrypt.email.jobscheduler.MessagesMovingJobService
+import com.flowcrypt.email.jobscheduler.MessagesManagingJobService
import com.flowcrypt.email.model.MessageEncryptionType
import com.flowcrypt.email.model.MessageType
import com.flowcrypt.email.service.attachment.AttachmentDownloadManagerService
@@ -213,7 +213,7 @@ class MessageDetailsFragment : BaseSyncFragment(), View.OnClickListener {
R.id.menuActionArchiveMessage -> {
MessageDaoSource().updateMsgState(context!!, details?.email ?: "", details?.label ?: "",
details?.uid?.toLong() ?: 0, MessageState.PENDING_ARCHIVING)
- MessagesMovingJobService.schedule(context?.applicationContext)
+ MessagesManagingJobService.schedule(context?.applicationContext)
activity?.finish()
true
}