Исправлено множество предупреждений
This commit is contained in:
@@ -67,11 +67,4 @@ class ManageStoragesEncryptionUseCase @Inject constructor(
|
||||
unlockManager.close(storage)
|
||||
}
|
||||
|
||||
suspend fun changePassword(storage: IStorageInfo, newKey: EncryptKey, encryptPath: Boolean) {
|
||||
if (storage !is IStorage) return
|
||||
if (storage.metaInfo.value.encInfo == null) {
|
||||
throw IllegalStateException("Storage is not encrypted")
|
||||
}
|
||||
storage.setEncInfo(Encryptor.generateEncryptionInfo(newKey, encryptPath))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,6 @@ class RunStorageSyncUseCase @Inject constructor(
|
||||
* @param logReason техническая метка для логов (не для UI)
|
||||
* @return false, если синхронизация уже в очереди или выполняется — новая задача не создана
|
||||
*/
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
fun enqueue(displayTitle: String, logReason: String): Boolean {
|
||||
if (!running.compareAndSet(false, true)) {
|
||||
return false
|
||||
|
||||
@@ -4,12 +4,8 @@ import com.github.nullptroma.wallenc.domain.datatypes.EncryptKey
|
||||
import com.github.nullptroma.wallenc.domain.interfaces.IStorage
|
||||
import com.github.nullptroma.wallenc.domain.interfaces.StorageSyncGroup
|
||||
import com.github.nullptroma.wallenc.domain.interfaces.StorageSyncGroupEncryptionKind
|
||||
import java.util.Base64
|
||||
import java.util.UUID
|
||||
|
||||
fun storageEncryptionSecret(key: EncryptKey): String =
|
||||
Base64.getEncoder().encodeToString(key.bytes)
|
||||
|
||||
fun isStorageCompatibleWithGroup(
|
||||
storage: IStorage,
|
||||
group: StorageSyncGroup,
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.github.nullptroma.wallenc.usecases
|
||||
import com.github.nullptroma.wallenc.domain.interfaces.IStorageSyncGroupStore
|
||||
import com.github.nullptroma.wallenc.domain.interfaces.IVaultsManager
|
||||
import kotlinx.coroutines.delay
|
||||
import java.util.UUID
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
|
||||
|
||||
Reference in New Issue
Block a user